edit修改相关内容
This commit is contained in:
parent
5ba376b7aa
commit
a858ccc37f
@ -704,7 +704,7 @@ class GoodsController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------多冠组合-----------------
|
//-----------------------------冠军性别-----------------
|
||||||
|
|
||||||
public function actionCat3()
|
public function actionCat3()
|
||||||
{
|
{
|
||||||
@ -837,7 +837,7 @@ class GoodsController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------交付权益-----------------
|
//-----------------------------业务类型-----------------
|
||||||
|
|
||||||
public function actionCat4()
|
public function actionCat4()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -210,26 +210,26 @@ class Menu
|
|||||||
|
|
||||||
|
|
||||||
[
|
[
|
||||||
'name' => '多冠组合',
|
'name' => '冠军性别',
|
||||||
'is_menu' => true,
|
'is_menu' => true,
|
||||||
'is_show' => true,
|
'is_show' => true,
|
||||||
'route' => 'admin/mall/goods/cat3',
|
'route' => 'admin/mall/goods/cat3',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => '添加多冠组合',
|
'name' => '添加冠军性别',
|
||||||
'is_menu' => false,
|
'is_menu' => false,
|
||||||
'is_show' => false,
|
'is_show' => false,
|
||||||
'route' => 'admin/mall/goods/cat-edit3',
|
'route' => 'admin/mall/goods/cat-edit3',
|
||||||
],
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
'name' => '交付权益',
|
'name' => '业务类型',
|
||||||
'is_menu' => true,
|
'is_menu' => true,
|
||||||
'is_show' => true,
|
'is_show' => true,
|
||||||
'route' => 'admin/mall/goods/cat4',
|
'route' => 'admin/mall/goods/cat4',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => '添加交付权益',
|
'name' => '添加业务类型',
|
||||||
'is_menu' => false,
|
'is_menu' => false,
|
||||||
'is_show' => false,
|
'is_show' => false,
|
||||||
'route' => 'admin/mall/goods/cat-edit4',
|
'route' => 'admin/mall/goods/cat-edit4',
|
||||||
|
|||||||
@ -11,8 +11,8 @@
|
|||||||
*/
|
*/
|
||||||
use app\widgets\PickFile;
|
use app\widgets\PickFile;
|
||||||
|
|
||||||
$this->title = $model->isNewRecord ? '添加多冠组合' : '编辑多冠组合';
|
$this->title = $model->isNewRecord ? '添加冠军性别' : '编辑冠军性别';
|
||||||
$this->params['breadcrumbs'][] = ['label' => '多冠组合' , 'url' => [\Yii::$app->urlManager->createUrl(["admin/mall/goods/cat3"])]];
|
$this->params['breadcrumbs'][] = ['label' => '冠军性别' , 'url' => [\Yii::$app->urlManager->createUrl(["admin/mall/goods/cat3"])]];
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
?>
|
?>
|
||||||
<div class="layui-fluid">
|
<div class="layui-fluid">
|
||||||
|
|||||||
@ -11,8 +11,8 @@
|
|||||||
*/
|
*/
|
||||||
use app\widgets\PickFile;
|
use app\widgets\PickFile;
|
||||||
|
|
||||||
$this->title = $model->isNewRecord ? '添加交付权益' : '编辑交付权益';
|
$this->title = $model->isNewRecord ? '添加业务类型' : '编辑业务类型';
|
||||||
$this->params['breadcrumbs'][] = ['label' => '交付权益' , 'url' => [\Yii::$app->urlManager->createUrl(["admin/mall/goods/cat4"])]];
|
$this->params['breadcrumbs'][] = ['label' => '业务类型' , 'url' => [\Yii::$app->urlManager->createUrl(["admin/mall/goods/cat4"])]];
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
?>
|
?>
|
||||||
<div class="layui-fluid">
|
<div class="layui-fluid">
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
use yii\widgets\LinkPager;
|
use yii\widgets\LinkPager;
|
||||||
use app\models\Cat;
|
use app\models\Cat;
|
||||||
|
|
||||||
$this->title = '多冠组合';
|
$this->title = '冠军性别';
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -24,7 +24,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
<div class="layui-card-header layuiadmin-card-header-auto">
|
<div class="layui-card-header layuiadmin-card-header-auto">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<a class=" layui-btn" href="<?=\Yii::$app->urlManager->createUrl(["admin/mall/goods/cat3-edit"])?>">添加多冠组合</a>
|
<a class=" layui-btn" href="<?=\Yii::$app->urlManager->createUrl(["admin/mall/goods/cat3-edit"])?>">添加冠军性别</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-inline layui-float-right layui-form">
|
<div class="layui-inline layui-float-right layui-form">
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
use yii\widgets\LinkPager;
|
use yii\widgets\LinkPager;
|
||||||
use app\models\Cat;
|
use app\models\Cat;
|
||||||
|
|
||||||
$this->title = '交付权益';
|
$this->title = '业务类型';
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -24,7 +24,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
<div class="layui-card-header layuiadmin-card-header-auto">
|
<div class="layui-card-header layuiadmin-card-header-auto">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<a class=" layui-btn" href="<?=\Yii::$app->urlManager->createUrl(["admin/mall/goods/cat4-edit"])?>">添加交付权益</a>
|
<a class=" layui-btn" href="<?=\Yii::$app->urlManager->createUrl(["admin/mall/goods/cat4-edit"])?>">添加业务类型</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-inline layui-float-right layui-form">
|
<div class="layui-inline layui-float-right layui-form">
|
||||||
|
|
||||||
|
|||||||
@ -106,7 +106,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
|
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label required">多冠组合</label>
|
<label class="layui-form-label required">冠军性别</label>
|
||||||
<div class="layui-input-block" style="width: 200px">
|
<div class="layui-input-block" style="width: 200px">
|
||||||
<select name="cat3_id">
|
<select name="cat3_id">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
@ -119,7 +119,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
|
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label required">交付权益</label>
|
<label class="layui-form-label required">业务类型</label>
|
||||||
<div class="layui-input-block" style="width: 200px">
|
<div class="layui-input-block" style="width: 200px">
|
||||||
<select name="cat4_id">
|
<select name="cat4_id">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
|
|||||||
@ -315,8 +315,8 @@ $cat_id = \Yii::$app->request->get('cat_id');
|
|||||||
, {field: 'cat_list', title: '冠军级别', width: 120, templet: '#catListTpl'}
|
, {field: 'cat_list', title: '冠军级别', width: 120, templet: '#catListTpl'}
|
||||||
, {field: 'cat1_list', title: '冠军分类', width: 120, templet: '#catListTpl1'}
|
, {field: 'cat1_list', title: '冠军分类', width: 120, templet: '#catListTpl1'}
|
||||||
, {field: 'cat2_list', title: '签约价格', width: 120, templet: '#catListTpl2'}
|
, {field: 'cat2_list', title: '签约价格', width: 120, templet: '#catListTpl2'}
|
||||||
, {field: 'cat3_list', title: '多冠组合', width: 120, templet: '#catListTpl3'}
|
, {field: 'cat3_list', title: '冠军性别', width: 120, templet: '#catListTpl3'}
|
||||||
, {field: 'cat4_list', title: '交付权益', width: 120, templet: '#catListTpl4'}
|
, {field: 'cat4_list', title: '业务类型', width: 120, templet: '#catListTpl4'}
|
||||||
, {field: 'price', title: '签约价格', width: 100}
|
, {field: 'price', title: '签约价格', width: 100}
|
||||||
, {field: 'sort', title: '排序', width: 60}
|
, {field: 'sort', title: '排序', width: 60}
|
||||||
, {field: 'date_at_cn', title: '出生日期', width: 120}
|
, {field: 'date_at_cn', title: '出生日期', width: 120}
|
||||||
|
|||||||
@ -81,7 +81,7 @@ class GoodsController extends Controller
|
|||||||
$form->scenario = 'detail';
|
$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();
|
$data = $form->search();
|
||||||
|
|
||||||
foreach ($data['data'] as $key => $value) {
|
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'] = [];
|
$data['data'][$key]['video_arr'] = [];
|
||||||
if ($value['video_url'] != null) {
|
if ($value['video_url'] != null) {
|
||||||
$video_arr = json_decode($value['video_url'], true);
|
$video_arr = json_decode($value['video_url'], true);
|
||||||
$video_banner_urls = json_decode($value['video_banner_urls'], true);
|
$video_banner_urls = json_decode($value['video_banner_urls'], true);
|
||||||
|
|
||||||
$video = [];
|
|
||||||
foreach ($video_arr as $key1 => $value1) {
|
foreach ($video_arr as $key1 => $value1) {
|
||||||
$video[$key1]['img'] = $video_banner_urls[$key1] ?? '';
|
$i++;
|
||||||
$video[$key1]['video_url'] = $value1 ?? '';
|
$video[$i]['img'] = $video_banner_urls[$key1] ?? '';
|
||||||
|
$video[$i]['video_url'] = $value1 ?? '';
|
||||||
|
$video[$i]['type'] = 2;
|
||||||
}
|
}
|
||||||
$data['data'][$key]['video_arr'] = $video;
|
$data['data'][$key]['video_arr'] = $video;
|
||||||
}
|
}
|
||||||
@ -162,7 +179,7 @@ class GoodsController extends Controller
|
|||||||
}
|
}
|
||||||
$video = [];
|
$video = [];
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$video[$i] = [
|
/*$video[$i] = [
|
||||||
'img' => '',
|
'img' => '',
|
||||||
'video_url' => '',
|
'video_url' => '',
|
||||||
'title' => '',
|
'title' => '',
|
||||||
@ -175,7 +192,7 @@ class GoodsController extends Controller
|
|||||||
$video[$i]['video_url'] = $json_de[0]['url']??'';
|
$video[$i]['video_url'] = $json_de[0]['url']??'';
|
||||||
$video[$i]['title'] = $json_de[0]['title']??'';
|
$video[$i]['title'] = $json_de[0]['title']??'';
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
$data['data'][$key]['video_arr'] = [];
|
$data['data'][$key]['video_arr'] = [];
|
||||||
if ($value['video_url'] != null) {
|
if ($value['video_url'] != null) {
|
||||||
$video_arr = json_decode($value['video_url'], true);
|
$video_arr = json_decode($value['video_url'], true);
|
||||||
|
|||||||
@ -70,7 +70,7 @@ class BoxForm extends ApiModel
|
|||||||
['like', 'goodHub.name', $this->keywords]]);
|
['like', 'goodHub.name', $this->keywords]]);
|
||||||
|
|
||||||
$count = $query->count();
|
$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();
|
$list = $query->offset($pagination->offset)->limit($pagination->limit)->orderBy(['b.sort'=>SORT_DESC,'b.id' => SORT_DESC])->asArray()->all();
|
||||||
foreach ($list as $index => $item) {
|
foreach ($list as $index => $item) {
|
||||||
// $item['business'] = $item['begin_time'] . '-' . $item['end_time'];
|
// $item['business'] = $item['begin_time'] . '-' . $item['end_time'];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user