introduce_322_2
This commit is contained in:
@@ -97,8 +97,9 @@ class Introduce extends HD_Controller
|
||||
$s_name = $map_series[$value['s_id']];
|
||||
$title = "{$brand_name}-{$s_name}";
|
||||
$scene = "{$value['id']}_{$params['biz_id']}";
|
||||
$page = 'pages/storeInfo/index';//pages/modelShow/index
|
||||
$page = 'pages/modelShow/index';
|
||||
$name = $params['biz_name'] . '_' . $title;
|
||||
//$name && $name = preg_replace('# #', '', $name);//正则去除所有空格
|
||||
$qr_code = $this->qrcode($scene, $page, '1280px', $name);
|
||||
$list[] = [
|
||||
'title' => $title,
|
||||
@@ -168,14 +169,15 @@ class Introduce extends HD_Controller
|
||||
if (!$info['brand_id'] || !$info['s_id']) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '请选择车型!');
|
||||
}
|
||||
if (!$info['video_file_url']) {
|
||||
if (!$info['video_file_url'] && !$info['video']) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '请上传视频!');
|
||||
}
|
||||
$re = $this->mdAutoIntroduce->get(array('brand_id' => $info['brand_id'], 's_id' => $info['s_id']));
|
||||
if ($re) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '车型已存在了!');
|
||||
}
|
||||
$this->mdAutoIntroduce->add(['brand_id' => $info['brand_id'], 's_id' => $info['s_id'], 'video' => $info['video_file_url']
|
||||
$video = $info['video_file_url'] ? $info['video_file_url'] : $info['video'];
|
||||
$this->mdAutoIntroduce->add(['brand_id' => $info['brand_id'], 's_id' => $info['s_id'], 'video' => $video
|
||||
, 'content' => $info['content'], 'c_time' => time()]);
|
||||
return $this->show_json(SYS_CODE_SUCCESS, '新增成功', '/auto/introduce');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user