|
@@ -33,9 +33,16 @@ class TemplateController extends Controller {
|
33
|
33
|
if(!$t_id) $t_id = 1;
|
34
|
34
|
//查询未离职销售
|
35
|
35
|
$_open_ids = Admin::where('is_use', 1)->where('is_qrcode_use', 1)->lists('id');
|
36
|
|
- //获取背景图
|
37
|
|
- $back_img = TemplatesSource::where('id', $t_id)->pluck('back_img');
|
38
|
|
- $new_context = TemplatesSource::where('id', $t_id)->pluck('new_context');
|
|
36
|
+ //获取背景图
|
|
37
|
+ $source_info = TemplatesSource::where('id', $t_id)->first();
|
|
38
|
+ $back_img = $source_info->back_img;
|
|
39
|
+ $new_context = $source_info->new_context;
|
|
40
|
+ #假如是自定义文章模板,获取html代码
|
|
41
|
+ $is_html = $source_info->is_html;
|
|
42
|
+ $article_html = null;
|
|
43
|
+ if( $is_html == 1 ){
|
|
44
|
+ $article_html = Templates::where('id', $source_info->t_id)->pluck('article_html');
|
|
45
|
+ }
|
39
|
46
|
$new_data = array();
|
40
|
47
|
$title = '';
|
41
|
48
|
if(!empty($new_context)){
|
|
@@ -83,7 +90,7 @@ class TemplateController extends Controller {
|
83
|
90
|
|
84
|
91
|
$qrcode = Admin::where('id', $saler_id)->pluck('qrcode');
|
85
|
92
|
$qrcodes = Admin::whereIn('id', $saler_ids)->lists('qrcode');
|
86
|
|
- return self::returnValue(['qrcode'=>$qrcode, 'ip'=>$ip, 'saler_id'=>$saler_id, 'qrcodes'=>$qrcodes, 'back_img'=>$back_img, 'title'=>$title, 'new_context'=>$new_data]);
|
|
93
|
+ return self::returnValue(['qrcode'=>$qrcode, 'ip'=>$ip, 'saler_id'=>$saler_id, 'qrcodes'=>$qrcodes, 'back_img'=>$back_img, 'title'=>$title, 'new_context'=>$new_data, 'is_html'=>$is_html, 'article_html'=>$article_html]);
|
87
|
94
|
}
|
88
|
95
|
|
89
|
96
|
/**
|