1
This commit is contained in:
parent
0f1585a23e
commit
17f5975f30
@ -35,7 +35,7 @@ class GoodsController extends Controller
|
|||||||
'class' => LoginBehavior::className(),
|
'class' => LoginBehavior::className(),
|
||||||
'ignore' => [
|
'ignore' => [
|
||||||
'api/mall/integral/goods/index',
|
'api/mall/integral/goods/index',
|
||||||
// 'api/mall/integral/goods/index-one',
|
'api/mall/integral/goods/index-one',
|
||||||
|
|
||||||
'api/mall/integral/goods/index-cat',
|
'api/mall/integral/goods/index-cat',
|
||||||
'api/mall/integral/goods/tree',
|
'api/mall/integral/goods/tree',
|
||||||
@ -135,7 +135,7 @@ class GoodsController extends Controller
|
|||||||
$form->cx_mch_id = $this->cx_mch_id;
|
$form->cx_mch_id = $this->cx_mch_id;
|
||||||
$form->status = Goods::STATUS_ONLINE;
|
$form->status = Goods::STATUS_ONLINE;
|
||||||
$form->plugin_sign = SysConst::$cxPluginSceneIntegralMall;
|
$form->plugin_sign = SysConst::$cxPluginSceneIntegralMall;
|
||||||
$form->setFields('g.id,g.price,g.date,g.sort,gh.subtitle,gh.banner_urls,g.created_at,gh.name,gh.cover_pic,gh.video_url,gh.pic_urls');
|
$form->setFields('g.id,g.price,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');
|
||||||
$data = $form->search();
|
$data = $form->search();
|
||||||
|
|
||||||
foreach ($data['data'] as $key => $value) {
|
foreach ($data['data'] as $key => $value) {
|
||||||
@ -143,7 +143,6 @@ class GoodsController extends Controller
|
|||||||
$data['data'][$key]['pic_arr'] = [];
|
$data['data'][$key]['pic_arr'] = [];
|
||||||
if ($value['pic_urls'] != null) {
|
if ($value['pic_urls'] != null) {
|
||||||
$pic_arr = json_decode($value['pic_urls'], true);
|
$pic_arr = json_decode($value['pic_urls'], true);
|
||||||
|
|
||||||
if (is_array($pic_arr)) {
|
if (is_array($pic_arr)) {
|
||||||
foreach ($pic_arr as $index => $item) {
|
foreach ($pic_arr as $index => $item) {
|
||||||
// $item = SiteHelper::getFullUrl($item);
|
// $item = SiteHelper::getFullUrl($item);
|
||||||
@ -152,16 +151,17 @@ class GoodsController extends Controller
|
|||||||
$data['data'][$key]['pic_arr'] = $pic_arr;
|
$data['data'][$key]['pic_arr'] = $pic_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);
|
||||||
if (is_array($video_arr)) {
|
$video_banner_urls = json_decode($value['video_banner_urls'], true);
|
||||||
foreach ($video_arr as $index => $item) {
|
|
||||||
// $item = SiteHelper::getFullUrl($item);
|
$video = [];
|
||||||
$video_arr[$index] = $item;
|
foreach ($video_arr as $key1 => $value1) {
|
||||||
}
|
$video[$key1]['img'] = $video_banner_urls[$key1] ?? '';
|
||||||
$data['data'][$key]['video_arr'] = $video_arr;
|
$video[$key1]['video_url'] = $value1 ?? '';
|
||||||
}
|
}
|
||||||
|
$data['data'][$key]['video_arr'] = $video;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$goods_id = \Yii::$app->request->get('goods_id');
|
$goods_id = \Yii::$app->request->get('goods_id');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user