|
@@ -123,6 +123,26 @@ class BTemplateLogLogic extends BaseLogic |
|
@@ -123,6 +123,26 @@ class BTemplateLogLogic extends BaseLogic |
|
123
|
$this->fail('当前数据不存在,或已被删除');
|
123
|
$this->fail('当前数据不存在,或已被删除');
|
|
124
|
}
|
124
|
}
|
|
125
|
if($this->user['is_customized'] != BTemplate::IS_VISUALIZATION){
|
125
|
if($this->user['is_customized'] != BTemplate::IS_VISUALIZATION){
|
|
|
|
126
|
+ $html = $this->getTemplateHtml($info);
|
|
|
|
127
|
+ }else{
|
|
|
|
128
|
+ $page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面
|
|
|
|
129
|
+ if (in_array(1, $page_array)) {//首页是定制界面
|
|
|
|
130
|
+ $html = $info['text'];
|
|
|
|
131
|
+ }else{
|
|
|
|
132
|
+ $html = $this->getTemplateHtml($info);
|
|
|
|
133
|
+ }
|
|
|
|
134
|
+ }
|
|
|
|
135
|
+ return $this->success(['html'=>$html]);
|
|
|
|
136
|
+ }
|
|
|
|
137
|
+
|
|
|
|
138
|
+ /**
|
|
|
|
139
|
+ * @remark :生成界面
|
|
|
|
140
|
+ * @name :getTemplateHtml
|
|
|
|
141
|
+ * @author :lyh
|
|
|
|
142
|
+ * @method :post
|
|
|
|
143
|
+ * @time :2024/4/3 17:11
|
|
|
|
144
|
+ */
|
|
|
|
145
|
+ public function getTemplateHtml($info){
|
|
126
|
if(empty($info['other'])){
|
146
|
if(empty($info['other'])){
|
|
127
|
$footer_other = str_replace('<header','',characterTruncation($info['text'],'/<style id="globalsojs-footer">(.*?)<header/s'));
|
147
|
$footer_other = str_replace('<header','',characterTruncation($info['text'],'/<style id="globalsojs-footer">(.*?)<header/s'));
|
|
128
|
$info['other'] = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other);
|
148
|
$info['other'] = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other);
|
|
@@ -140,13 +160,6 @@ class BTemplateLogLogic extends BaseLogic |
|
@@ -140,13 +160,6 @@ class BTemplateLogLogic extends BaseLogic |
|
140
|
$html = $html.$v['values'];
|
160
|
$html = $html.$v['values'];
|
|
141
|
}
|
161
|
}
|
|
142
|
}
|
162
|
}
|
|
143
|
- }else{
|
|
|
|
144
|
- $page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面
|
|
|
|
145
|
- if (in_array(1, $page_array)) {//首页是定制界面
|
|
|
|
146
|
- $html = $info['text'];
|
|
|
|
147
|
- }
|
163
|
+ return $this->success($html);
|
|
148
|
}
|
164
|
}
|
|
149
|
- return $this->success(['html'=>$html]);
|
|
|
|
150
|
- }
|
|
|
|
151
|
-
|
|
|
|
152
|
} |
165
|
} |