1
This commit is contained in:
parent
249482137e
commit
f5ee804d71
BIN
WWW - 快捷方式.lnk
BIN
WWW - 快捷方式.lnk
Binary file not shown.
@ -4,6 +4,7 @@ namespace app\modules\api\controllers;
|
||||
|
||||
use function AlibabaCloud\Client\value;
|
||||
use app\models\Banner;
|
||||
use app\models\Option;
|
||||
use app\modules\api\behaviors\LoginBehavior;
|
||||
use Yii;
|
||||
use yii\web\NotFoundHttpException;
|
||||
@ -24,6 +25,7 @@ class BannerController extends Controller
|
||||
'class' => LoginBehavior::className(),
|
||||
'ignore' => [
|
||||
'api/banner/index',
|
||||
'api/banner/description',
|
||||
]
|
||||
]
|
||||
]);
|
||||
@ -45,4 +47,26 @@ class BannerController extends Controller
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* showdoc
|
||||
* @catalog 首页公告
|
||||
* @title 首页公告
|
||||
* @description 首页公告
|
||||
* @method get
|
||||
* @url /api/banner/description
|
||||
* @return {"code":0,"msg":"ok","data":"追求完美、追求和谐、追求卓越"}
|
||||
* @return_param data string 公告
|
||||
* @remark
|
||||
*/
|
||||
public function actionDescription()
|
||||
{
|
||||
$list = Option::getOption('SITE_DESCRIPTION');
|
||||
$data = [
|
||||
'code' => 0,
|
||||
'msg' => 'ok',
|
||||
'data' => $list
|
||||
];
|
||||
return $this->responseHandler($data);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -235,7 +235,21 @@ class StoreController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* 案例列表
|
||||
* showdoc
|
||||
* @catalog 案例列表
|
||||
* @title 案例列表
|
||||
* @description 案例列表
|
||||
* @method get
|
||||
* @url /api/store/box
|
||||
* @param keywords 非必选 string 搜索(冠军姓名)
|
||||
* @param bj_id 非必选 string 搜索(案例分类ID)
|
||||
* @return {"code":0,"msg":"ok","data":[{"id":"7","created_at":"1701157851","cover_pic":"[\"/upload/0/1/upload/file/2023/1128/1701157842910381.jpg\",\"/upload/0/1/upload/file/2023/1128/1701157845582203.txt\"]","status":"1","goods_name":"张三","bj_name":"222","created_at_cn":"2023-11-28 15:50","cover_pic_arr":["http://cxgj.com/upload/0/1/upload/file/2023/1128/1701157842910381.jpg","http://cxgj.com/upload/0/1/upload/file/2023/1128/1701157845582203.txt"]}],"count":"1"}
|
||||
* @return_param goods_name string 冠军名称
|
||||
* @return_param id string 案例ID bj_name
|
||||
* @return_param bj_name string 案例分类名称
|
||||
* @return_param notice string 案例标题
|
||||
* @return_param cover_pic_arr string 案例图片/案例视频
|
||||
* @remark
|
||||
*/
|
||||
public function actionBox()
|
||||
{
|
||||
@ -245,14 +259,23 @@ class StoreController extends Controller
|
||||
|
||||
$form->page = $get['page'] ?? 1;
|
||||
$form->limit = $get['limit'] ?? 99;
|
||||
$form->keywords = $get['keywords'] ?? 99;
|
||||
|
||||
$form->keywords = $get['keywords'] ?? '';
|
||||
$form->bj_id = $get['bj_id'] ?? '';
|
||||
$data = $form->search();
|
||||
return $this->responseHandler($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 案例列表
|
||||
* showdoc
|
||||
* @catalog 案例分类
|
||||
* @title 案例分类
|
||||
* @description 案例分类
|
||||
* @method get
|
||||
* @url /api/store/box-list
|
||||
* @return {"code":0,"msg":"ok","data":[{"id":"1","name":"222","is_delete":"0","deleted_at":"0","status":"1","created_at":"1682405261","updated_at":"1682409972"},{"id":"2","name":"测试分类","is_delete":"0","deleted_at":"0","status":"1","created_at":"1701153131","updated_at":"1701153131"}]}
|
||||
* @return_param name string 分类名称
|
||||
* @return_param id string 分类ID
|
||||
* @remark
|
||||
*/
|
||||
public function actionBoxList()
|
||||
{
|
||||
|
||||
@ -624,12 +624,12 @@ class UserController extends Controller
|
||||
|
||||
/**
|
||||
* showdoc
|
||||
* @catalog 用户收藏列表
|
||||
* @title 用户收藏列表
|
||||
* @description 用户收藏列表
|
||||
* @catalog 热门收藏冠军
|
||||
* @title 热门收藏冠军
|
||||
* @description 热门收藏冠军
|
||||
* @method get
|
||||
* @url /api/user/user-collect-list
|
||||
* @return {"code":0,"msg":"ok","data":{}}
|
||||
* @url /api/user/user-collect-hot
|
||||
* @return {"code":0,"msg":"ok","data":[{"goods_id":"2","cover_pic":"http://cxgj.com/upload/0/1/upload/image/2023/1127/1701077471438838.jpg"},{"goods_id":"1","cover_pic":"http://cxgj.com/upload/0/1/upload/image/2023/1127/1701072071337970.jpg"}],"count":"2"}
|
||||
*/
|
||||
public function actionUserCollectHot()
|
||||
{
|
||||
@ -645,7 +645,7 @@ class UserController extends Controller
|
||||
* @description 用户收藏
|
||||
* @method get
|
||||
* @url /api/user/user-collect
|
||||
* @return {"code":0,"msg":"ok","data":{}}
|
||||
* @return {"code":0,"msg":"收藏成功","data":{}}
|
||||
*/
|
||||
public function actionUserCollect()
|
||||
{
|
||||
@ -662,10 +662,14 @@ class UserController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* 取消收藏
|
||||
* @return array
|
||||
* @throws \Throwable
|
||||
* @throws \yii\db\StaleObjectException
|
||||
* showdoc
|
||||
* @catalog 用户取消收藏
|
||||
* @title 用户取消收藏
|
||||
* @description 用户取消收藏
|
||||
* @method get
|
||||
* @url /api/user/user-collect
|
||||
* @param id 必选 string 对应收藏列表的ID
|
||||
* @return {"code":0,"msg":"取消收藏成功","data":{}}
|
||||
*/
|
||||
public function actionUserCollectDel()
|
||||
{
|
||||
|
||||
@ -38,20 +38,24 @@ class GoodsController extends Controller
|
||||
|
||||
/**
|
||||
* hidedoc
|
||||
* @catalog 积分商城/商品
|
||||
* @title 商品列表
|
||||
* @description 本接口提供积分商品列表
|
||||
* @catalog 冠军列表
|
||||
* @title 冠军列表
|
||||
* @description 本接口提供冠军列表
|
||||
* @method get
|
||||
* @url /api/mall/integral/goods/index
|
||||
* @param keywords 非必选 string 关键词
|
||||
* @param keywords 非必选 string 关键词(冠军姓名)
|
||||
* @param goods_id 非必选 string 冠军详情搜索
|
||||
* @param page 必选 int 页码
|
||||
* @param limit 非必选 int 每页记录数
|
||||
* @return {"code":0,"msg":"ok","data":[{"id":"2","price":"100.00","goods_stock":"2100","virtual_sales":"100","sort":"100","created_at":"1633587356","payment_people":"0","payment_amount":"0.00","payment_num":"0","payment_order":"0","sales":"0","viewed_count":"0","name":"商品商品商品商品商品商品","cover_pic":"https://app.tpl.dev.1nww.com/upload/0/1/upload/image/2021/1007/1633576986491549.png","unit":"件","type":"0","integral_num":"1000","created_at_cn":"2021-10-07 14:15:56"}],"count":"3","page_size":20,"page_count":1,"page_no":1,"end_flag":false}
|
||||
* @return_param count int 记录条数
|
||||
* @return_param page_size int 每页记录数
|
||||
* @return_param page_count int 总页数
|
||||
* @return_param page_no int 当前页码
|
||||
* @return_param end_flag bool 是否加载结束
|
||||
* @return {"code":0,"msg":"ok","data":[{"id":"2","price":"111.00","date":"2023-11-27","sort":"100","subtitle":"111","created_at":"1701077489","name":"李四","cover_pic":"http://cxgj.com/upload/0/1/upload/image/2023/1127/1701077471438838.jpg","video_url":"","pic_urls":"[\"/upload/0/1/upload/image/2023/1127/1701077483860358.jpg\",\"/upload/0/1/upload/image/2023/1127/1701077486913290.jpg\",\"/upload/0/1/upload/image/2023/1127/1701077502452397.jpg\"]","created_at_cn":"2023-11-27 17:31:29","pic_arr":["http://cxgj.com/upload/0/1/upload/image/2023/1127/1701077483860358.jpg","http://cxgj.com/upload/0/1/upload/image/2023/1127/1701077486913290.jpg","http://cxgj.com/upload/0/1/upload/image/2023/1127/1701077502452397.jpg"]}],"count":"1","page_size":20,"page_count":1,"page_no":1,"end_flag":false}
|
||||
* @return_param id int 冠军ID
|
||||
* @return_param price string 签约价格
|
||||
* @return_param date int 出生日期
|
||||
* @return_param subtitle int 代表奖项
|
||||
* @return_param name string 冠军姓名
|
||||
* @return_param cover_pic string 封面图
|
||||
* @return_param video_url string 视频
|
||||
* @return_param pic_arr string 详情图
|
||||
* @remark
|
||||
*/
|
||||
public function actionIndex()
|
||||
|
||||
@ -60,7 +60,7 @@ class BoxForm extends ApiModel
|
||||
->leftJoin(['goods' => Goods::tableName()], 'b.goods_id=goods.id')
|
||||
->leftJoin(['goodHub' => GoodsHub::tableName()], 'goods.goods_hub_id=goodHub.id')
|
||||
->leftJoin(['storeBj' => StoreBj::tableName()], 'b.bj_id=storeBj.id')
|
||||
->select('b.id,b.created_at,b.cover_pic,b.status,goodHub.name as goods_name,storeBj.name as bj_name')
|
||||
->select('b.id,b.notice,b.created_at,b.cover_pic,b.status,goodHub.name as goods_name,storeBj.name as bj_name')
|
||||
->where([
|
||||
'b.status' => 1,
|
||||
'b.is_delete' => 0
|
||||
|
||||
BIN
vendor.rar
Normal file
BIN
vendor.rar
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user