diff --git a/admin/controllers/app/material/Template.php b/admin/controllers/app/material/Template.php index 3cd53e94..3c1bf699 100644 --- a/admin/controllers/app/material/Template.php +++ b/admin/controllers/app/material/Template.php @@ -150,7 +150,7 @@ class Template extends HD_Controller $value['img'] = $value['img_url'] = ''; } else { $value['img_url'] = $value['img'] ? build_qiniu_image_url($value['img']) : ''; - $value['video_file_url'] = $value['video_url'] = $value['video_cover'] = ''; + $value['video_file_url'] = $value['video_url'] = $value['video_cover'] = $value['width'] = $value['height'] = ''; } } else if ($re['type'] == 2 || $re['type'] == 4) { $value['img_url'] = $value['img'] ? build_qiniu_image_url($value['img']) : ''; @@ -242,6 +242,9 @@ class Template extends HD_Controller if ($value['video_type'] == 1) { $value['video'] = $value['video_file_url']; unset($value['img']); + } else { + unset($value['width']); + unset($value['height']); } unset($value['video_file_url']); unset($value['video_url']); @@ -299,6 +302,9 @@ class Template extends HD_Controller if ($value['video_type'] == 1) { $value['video'] = $value['video_file_url']; unset($value['img']); + } else { + unset($value['width']); + unset($value['height']); } unset($value['video_file_url']); unset($value['video_url']); diff --git a/admin/views/app/material/template/edit.php b/admin/views/app/material/template/edit.php index 33ae02f4..0748fc55 100644 --- a/admin/views/app/material/template/edit.php +++ b/admin/views/app/material/template/edit.php @@ -195,7 +195,18 @@ -
+
+ +
+ +
+
+ +
+
+
load->library('receiver/customers_entity'); foreach ($res_c as $key => $value) { $c_id = $value['id']; $level = $value['level']; @@ -158,8 +159,11 @@ class Licheb extends HD_Controller $count >= 4 && $up_level = 'C'; } if ($up_level) {//降级更新 - $this->mdCustomers->update(array('level' => $up_level), array('id' => $c_id)); - $log[] = array('id' => $c_id, 'level' => $level, 'up_level' => $up_level); + $ret = $this->mdCustomers->update(array('level' => $up_level), array('id' => $c_id)); + if ($ret) { + $this->customers_entity->add_log($c_id, 0, '系统', '客户等级从' . $level . '降级到' . $up_level); + $log[] = array('id' => $c_id, 'level' => $level, 'up_level' => $up_level); + } } } $redis->save($redisVisit, $c_id);//保存最后客户id diff --git a/api/controllers/wxapp/material/Topic.php b/api/controllers/wxapp/material/Topic.php index 597bac63..7f1ed712 100644 --- a/api/controllers/wxapp/material/Topic.php +++ b/api/controllers/wxapp/material/Topic.php @@ -68,6 +68,8 @@ class Topic extends Wxapp if ($value['video_type'] == 1) { $setValue['video'] = $value['video'] ? build_qiniu_image_url($value['video'], 0, 0, 'video') : ''; $setValue['video_cover'] = $value['video'] ? $value['video'] . '?vframe/jpg/offset/1' : ''; + $setValue['width'] = $value['width'] ? $value['width'] : 16; + $setValue['height'] = $value['height'] ? $value['height'] : 9; } else { $setValue['img'] = $value['img'] ? build_qiniu_image_url($value['img']) : ''; $setValue['link'] = $value['link'];