admin_material_1203
This commit is contained in:
@@ -42,6 +42,7 @@ class Topic extends Wxapp
|
||||
if (!$re || empty($re)) {
|
||||
throw new Hd_exception('专题不存在', API_CODE_FAIL);
|
||||
}
|
||||
$biz_info = ['pop' => 0];
|
||||
if ($biz_id) {
|
||||
$re_biz = $this->mdMaterialBiz->get(array('app_id' => $this->app_id, 't_id' => $id, 'biz_id' => $biz_id));
|
||||
if (!$re_biz || empty($re_biz)) {
|
||||
@@ -61,10 +62,25 @@ class Topic extends Wxapp
|
||||
$this->mdBizStatistics->add($where_s);
|
||||
$this->app_redis->save($key, 1, 24 * 3600);//有效期1天
|
||||
}
|
||||
|
||||
}
|
||||
$lists = array();
|
||||
if ($re['json_data']) {
|
||||
$json_data = json_decode($re['json_data'], true);
|
||||
if ($json_data['biz_pop']) {//授权弹窗
|
||||
$biz_info['pop'] = $json_data['biz_pop'];
|
||||
$biz_info['biz_name'] = '';
|
||||
$biz_info['headimg'] = 'https://qs.haodian.cn/wechat_app/liche/common/dark-logo2.jpg';
|
||||
$biz_info['pop_content'] = '您好,欢迎您访问狸车。授权手机号后将给您提供最新的新能源汽车资讯和优惠活动哦~';
|
||||
if ($biz_id) {
|
||||
$this->load->model("biz/biz_model", 'mdBiz');
|
||||
$re_biz = $this->mdBiz->get(array('id' => $biz_id, 'status' => 1));
|
||||
if ($re_biz) {
|
||||
$biz_info['biz_name'] = $re_biz['biz_name'];
|
||||
$re_biz['headimg'] && $biz_info['headimg'] = build_qiniu_image_url($re_biz['headimg']);
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($json_data['lists'] as $key => $value) {
|
||||
$setValue = array();
|
||||
$setValue['title'] = $value['title'];
|
||||
@@ -90,6 +106,7 @@ class Topic extends Wxapp
|
||||
$this->data['type'] = $re['type'];
|
||||
$this->data['sign_up'] = 1;
|
||||
$this->data['lists'] = $lists;
|
||||
$this->data['biz_info'] = $biz_info;
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user