diff --git a/modules/admin/controllers/mall/GoodsController.php b/modules/admin/controllers/mall/GoodsController.php index 7d21a92..9c552f0 100644 --- a/modules/admin/controllers/mall/GoodsController.php +++ b/modules/admin/controllers/mall/GoodsController.php @@ -704,7 +704,7 @@ class GoodsController extends Controller } - //-----------------------------多冠组合----------------- + //-----------------------------冠军性别----------------- public function actionCat3() { @@ -837,7 +837,7 @@ class GoodsController extends Controller } - //-----------------------------交付权益----------------- + //-----------------------------业务类型----------------- public function actionCat4() { diff --git a/modules/admin/models/Menu.php b/modules/admin/models/Menu.php index c2927e9..1ac731f 100644 --- a/modules/admin/models/Menu.php +++ b/modules/admin/models/Menu.php @@ -210,26 +210,26 @@ class Menu [ - 'name' => '多冠组合', + 'name' => '冠军性别', 'is_menu' => true, 'is_show' => true, 'route' => 'admin/mall/goods/cat3', ], [ - 'name' => '添加多冠组合', + 'name' => '添加冠军性别', 'is_menu' => false, 'is_show' => false, 'route' => 'admin/mall/goods/cat-edit3', ], [ - 'name' => '交付权益', + 'name' => '业务类型', 'is_menu' => true, 'is_show' => true, 'route' => 'admin/mall/goods/cat4', ], [ - 'name' => '添加交付权益', + 'name' => '添加业务类型', 'is_menu' => false, 'is_show' => false, 'route' => 'admin/mall/goods/cat-edit4', diff --git a/modules/admin/views/mall/goods/cat-edit3.php b/modules/admin/views/mall/goods/cat-edit3.php index f14b06b..f0d6787 100644 --- a/modules/admin/views/mall/goods/cat-edit3.php +++ b/modules/admin/views/mall/goods/cat-edit3.php @@ -11,8 +11,8 @@ */ use app\widgets\PickFile; -$this->title = $model->isNewRecord ? '添加多冠组合' : '编辑多冠组合'; -$this->params['breadcrumbs'][] = ['label' => '多冠组合' , 'url' => [\Yii::$app->urlManager->createUrl(["admin/mall/goods/cat3"])]]; +$this->title = $model->isNewRecord ? '添加冠军性别' : '编辑冠军性别'; +$this->params['breadcrumbs'][] = ['label' => '冠军性别' , 'url' => [\Yii::$app->urlManager->createUrl(["admin/mall/goods/cat3"])]]; $this->params['breadcrumbs'][] = $this->title; ?>
diff --git a/modules/admin/views/mall/goods/cat-edit4.php b/modules/admin/views/mall/goods/cat-edit4.php index b4c59ea..5b4df20 100644 --- a/modules/admin/views/mall/goods/cat-edit4.php +++ b/modules/admin/views/mall/goods/cat-edit4.php @@ -11,8 +11,8 @@ */ use app\widgets\PickFile; -$this->title = $model->isNewRecord ? '添加交付权益' : '编辑交付权益'; -$this->params['breadcrumbs'][] = ['label' => '交付权益' , 'url' => [\Yii::$app->urlManager->createUrl(["admin/mall/goods/cat4"])]]; +$this->title = $model->isNewRecord ? '添加业务类型' : '编辑业务类型'; +$this->params['breadcrumbs'][] = ['label' => '业务类型' , 'url' => [\Yii::$app->urlManager->createUrl(["admin/mall/goods/cat4"])]]; $this->params['breadcrumbs'][] = $this->title; ?>
diff --git a/modules/admin/views/mall/goods/cat3.php b/modules/admin/views/mall/goods/cat3.php index 3ce762b..b1fb307 100644 --- a/modules/admin/views/mall/goods/cat3.php +++ b/modules/admin/views/mall/goods/cat3.php @@ -12,7 +12,7 @@ use yii\widgets\LinkPager; use app\models\Cat; -$this->title = '多冠组合'; +$this->title = '冠军性别'; $this->params['breadcrumbs'][] = $this->title; ?> @@ -24,7 +24,7 @@ $this->params['breadcrumbs'][] = $this->title;
diff --git a/modules/admin/views/mall/goods/cat4.php b/modules/admin/views/mall/goods/cat4.php index 63bf29c..c0e2482 100644 --- a/modules/admin/views/mall/goods/cat4.php +++ b/modules/admin/views/mall/goods/cat4.php @@ -12,7 +12,7 @@ use yii\widgets\LinkPager; use app\models\Cat; -$this->title = '交付权益'; +$this->title = '业务类型'; $this->params['breadcrumbs'][] = $this->title; ?> @@ -24,7 +24,7 @@ $this->params['breadcrumbs'][] = $this->title;
diff --git a/modules/admin/views/mall/goods/edit.php b/modules/admin/views/mall/goods/edit.php index 8f12662..34659db 100644 --- a/modules/admin/views/mall/goods/edit.php +++ b/modules/admin/views/mall/goods/edit.php @@ -106,7 +106,7 @@ $this->params['breadcrumbs'][] = $this->title;
- +
diff --git a/modules/admin/views/mall/goods/index.php b/modules/admin/views/mall/goods/index.php index 72a0c15..3fc7ed3 100644 --- a/modules/admin/views/mall/goods/index.php +++ b/modules/admin/views/mall/goods/index.php @@ -315,8 +315,8 @@ $cat_id = \Yii::$app->request->get('cat_id'); , {field: 'cat_list', title: '冠军级别', width: 120, templet: '#catListTpl'} , {field: 'cat1_list', title: '冠军分类', width: 120, templet: '#catListTpl1'} , {field: 'cat2_list', title: '签约价格', width: 120, templet: '#catListTpl2'} - , {field: 'cat3_list', title: '多冠组合', width: 120, templet: '#catListTpl3'} - , {field: 'cat4_list', title: '交付权益', width: 120, templet: '#catListTpl4'} + , {field: 'cat3_list', title: '冠军性别', width: 120, templet: '#catListTpl3'} + , {field: 'cat4_list', title: '业务类型', width: 120, templet: '#catListTpl4'} , {field: 'price', title: '签约价格', width: 100} , {field: 'sort', title: '排序', width: 60} , {field: 'date_at_cn', title: '出生日期', width: 120} diff --git a/modules/api/controllers/mall/integral/GoodsController.php b/modules/api/controllers/mall/integral/GoodsController.php index 7e4d624..de9cd14 100644 --- a/modules/api/controllers/mall/integral/GoodsController.php +++ b/modules/api/controllers/mall/integral/GoodsController.php @@ -81,7 +81,7 @@ class GoodsController extends Controller $form->scenario = 'detail'; } - $form->setFields('g.id,g.price,g.attr_groups,g.date,g.sort,gh.subtitle,gh.banner_urls,g.created_at,gh.name,gh.cover_pic,gh.video_url,gh.pic_urls,gh.video_banner_urls'); + $form->setFields('g.id,g.price,g.attr_groups,g.date,g.sort,gh.subtitle,gh.banner_urls,g.created_at,gh.name,gh.cover_pic,gh.video_url,gh.pic_urls,gh.video_banner_urls,gh.video_url_data'); $data = $form->search(); foreach ($data['data'] as $key => $value) { @@ -99,15 +99,32 @@ class GoodsController extends Controller } } + $video = []; + $i = 0; + $video[$i] = [ + 'img' => '', + 'video_url' => '', + 'title' => '', + 'type' => 1, + ]; + if(!empty($value['video_url_data'])){ + $json_de = json_decode($value['video_url_data'],true); + if(!empty($json_de[0]['url'])){ + $video[$i]['img'] = $json_de[0]['img']??''; + $video[$i]['video_url'] = $json_de[0]['url']??''; + $video[$i]['title'] = $json_de[0]['title']??''; + } + } + $data['data'][$key]['video_arr'] = []; if ($value['video_url'] != null) { $video_arr = json_decode($value['video_url'], true); $video_banner_urls = json_decode($value['video_banner_urls'], true); - - $video = []; foreach ($video_arr as $key1 => $value1) { - $video[$key1]['img'] = $video_banner_urls[$key1] ?? ''; - $video[$key1]['video_url'] = $value1 ?? ''; + $i++; + $video[$i]['img'] = $video_banner_urls[$key1] ?? ''; + $video[$i]['video_url'] = $value1 ?? ''; + $video[$i]['type'] = 2; } $data['data'][$key]['video_arr'] = $video; } @@ -162,7 +179,7 @@ class GoodsController extends Controller } $video = []; $i = 0; - $video[$i] = [ + /*$video[$i] = [ 'img' => '', 'video_url' => '', 'title' => '', @@ -175,7 +192,7 @@ class GoodsController extends Controller $video[$i]['video_url'] = $json_de[0]['url']??''; $video[$i]['title'] = $json_de[0]['title']??''; } - } + }*/ $data['data'][$key]['video_arr'] = []; if ($value['video_url'] != null) { $video_arr = json_decode($value['video_url'], true); diff --git a/modules/api/models/BoxForm.php b/modules/api/models/BoxForm.php index c4aaf37..fb13c7b 100644 --- a/modules/api/models/BoxForm.php +++ b/modules/api/models/BoxForm.php @@ -70,7 +70,7 @@ class BoxForm extends ApiModel ['like', 'goodHub.name', $this->keywords]]); $count = $query->count(); - $pagination = new Pagination(['totalCount' => $count, 'pageSize' => $this->limit]); + $pagination = new Pagination(['totalCount' => $count, 'pageSize' => $this->limit, 'page' => $this->page - 1]); $list = $query->offset($pagination->offset)->limit($pagination->limit)->orderBy(['b.sort'=>SORT_DESC,'b.id' => SORT_DESC])->asArray()->all(); foreach ($list as $index => $item) { // $item['business'] = $item['begin_time'] . '-' . $item['end_time'];