作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

@@ -45,26 +45,25 @@ class CNoticeController extends BaseController @@ -45,26 +45,25 @@ class CNoticeController extends BaseController
45 'url' => $request->input('url', []), 45 'url' => $request->input('url', []),
46 'language'=> $request->input('language', []), 46 'language'=> $request->input('language', []),
47 ]; 47 ];
48 - $result = http_post($url, json_encode($param));  
49 - return $this->response('更新中请稍后, 更新完成将会发送站内信通知更新结果!');  
50 -  
51 - $updateProgressModel = new UpdateProgress();  
52 - $progressInfo = $updateProgressModel->formatQuery(['project_id'=>$this->user['project_id'],'type'=>$this->param['type']])->orderBy('id','desc')->first();  
53 - if((!empty($progressInfo))){  
54 - $progressInfo = $progressInfo->toArray();  
55 - if(($progressInfo['total_num'] > $progressInfo['current_num'])){  
56 - $this->response('当前页面正在生成了,请完成后再点击',Code::SUCCESS,$progressInfo);  
57 - }  
58 - }  
59 - //通知更新  
60 - if($this->param['type'] == UpdateNotify::TYPE_MASTER){  
61 - $this->updateMaster();  
62 - }else{  
63 - $this->updateMinorLanguages();  
64 - }  
65 - $urlStr = $this->getString($this->param['type'],$this->param['page']);  
66 - curlGet($urlStr);  
67 - $this->response('更新成功'); 48 + http_post($url, json_encode($param));
  49 + $this->response('更新中请稍后, 更新完成将会发送站内信通知更新结果!');
  50 +// $updateProgressModel = new UpdateProgress();
  51 +// $progressInfo = $updateProgressModel->formatQuery(['project_id'=>$this->user['project_id'],'type'=>$this->param['type']])->orderBy('id','desc')->first();
  52 +// if((!empty($progressInfo))){
  53 +// $progressInfo = $progressInfo->toArray();
  54 +// if(($progressInfo['total_num'] > $progressInfo['current_num'])){
  55 +// $this->response('当前页面正在生成了,请完成后再点击',Code::SUCCESS,$progressInfo);
  56 +// }
  57 +// }
  58 +// //通知更新
  59 +// if($this->param['type'] == UpdateNotify::TYPE_MASTER){
  60 +// $this->updateMaster();
  61 +// }else{
  62 +// $this->updateMinorLanguages();
  63 +// }
  64 +// $urlStr = $this->getString($this->param['type'],$this->param['page']);
  65 +// curlGet($urlStr);
  66 +// $this->response('更新成功');
68 } 67 }
69 68
70 /** 69 /**
@@ -226,15 +226,9 @@ class ComController extends BaseController @@ -226,15 +226,9 @@ class ComController extends BaseController
226 case 'news': 226 case 'news':
227 $url_link = $this->user['domain'].RouteMap::SOURCE_NEWS.'/'; 227 $url_link = $this->user['domain'].RouteMap::SOURCE_NEWS.'/';
228 break; 228 break;
229 - case 'news_category':  
230 - $url_link = $this->user['domain'].RouteMap::PATH_NEWS_CATE.'/';  
231 - break;  
232 case 'blog': 229 case 'blog':
233 $url_link = $this->user['domain'].RouteMap::SOURCE_BLOG.'/'; 230 $url_link = $this->user['domain'].RouteMap::SOURCE_BLOG.'/';
234 break; 231 break;
235 - case 'blog_category':  
236 - $url_link = $this->user['domain'].RouteMap::PATH_BLOG_CATE.'/';  
237 - break;  
238 default: 232 default:
239 $url_link = $this->user['domain']; 233 $url_link = $this->user['domain'];
240 } 234 }
@@ -284,7 +284,7 @@ class ProductController extends BaseController @@ -284,7 +284,7 @@ class ProductController extends BaseController
284 */ 284 */
285 public function getExtendInfo($product_id){ 285 public function getExtendInfo($product_id){
286 $extendModel = new Extend(); 286 $extendModel = new Extend();
287 - $list = $extendModel->list([],'id',['type','key','title']); 287 + $list = $extendModel->list([],'id',['id','type','key','title']);
288 if(empty($list)){ 288 if(empty($list)){
289 return []; 289 return [];
290 } 290 }
@@ -526,6 +526,7 @@ class BTemplateLogic extends BaseLogic @@ -526,6 +526,7 @@ class BTemplateLogic extends BaseLogic
526 $this->param['project_id'] = $this->user['project_id']; 526 $this->param['project_id'] = $this->user['project_id'];
527 $this->param['test_model'] = 2;//未审核模版 527 $this->param['test_model'] = 2;//未审核模版
528 $this->param['operator_id'] = $this->user['manager_id'] ?? 0; 528 $this->param['operator_id'] = $this->user['manager_id'] ?? 0;
  529 + $this->param['html'] = characterTruncation($this->param['html'],'/<style id="globalsojs-header">(.*?)<\/footer>/s');
529 $this->param = $this->stringProcessing($this->param); 530 $this->param = $this->stringProcessing($this->param);
530 $publicTemplateModel = new Template(); 531 $publicTemplateModel = new Template();
531 $rs = $publicTemplateModel->add($this->param); 532 $rs = $publicTemplateModel->add($this->param);
@@ -273,6 +273,9 @@ class VisualizationLogic extends BaseLogic @@ -273,6 +273,9 @@ class VisualizationLogic extends BaseLogic
273 * @time :2023/11/15 11:47 273 * @time :2023/11/15 11:47
274 */ 274 */
275 public function saveHtml(){ 275 public function saveHtml(){
  276 + if(!isset($this->user['is_visualization']->page_array)){
  277 + $this->fail('当前为定制项目,请先选择定制界面');
  278 + }
276 $page_array = (array)$this->user['is_visualization']->page_array; 279 $page_array = (array)$this->user['is_visualization']->page_array;
277 $type = $this->getType($this->param['source'],$this->param['source_id']); 280 $type = $this->getType($this->param['source'],$this->param['source_id']);
278 try { 281 try {
@@ -369,7 +372,7 @@ class VisualizationLogic extends BaseLogic @@ -369,7 +372,7 @@ class VisualizationLogic extends BaseLogic
369 $templateCommonModel->edit($data,['id'=>$info['id']]); 372 $templateCommonModel->edit($data,['id'=>$info['id']]);
370 } 373 }
371 //更新所有界面的other 374 //更新所有界面的other
372 - $templateCommonModel->edit(['other'=>$other],['project_id'=>$this->user['project_id']]); 375 + $templateCommonModel->edit(['other'=>$other],['project_id'=>$this->user['project_id'],'template_id'=>$template_id]);
373 return $this->success(); 376 return $this->success();
374 } 377 }
375 378
@@ -238,6 +238,7 @@ Route::middleware(['bloginauth'])->group(function () { @@ -238,6 +238,7 @@ Route::middleware(['bloginauth'])->group(function () {
238 //扩展字段 238 //扩展字段
239 Route::any('extend', [\App\Http\Controllers\Bside\Product\ExtendController::class, 'lists'])->name('product_extend'); 239 Route::any('extend', [\App\Http\Controllers\Bside\Product\ExtendController::class, 'lists'])->name('product_extend');
240 Route::any('extend/save', [\App\Http\Controllers\Bside\Product\ExtendController::class, 'save'])->name('product_extend_save'); 240 Route::any('extend/save', [\App\Http\Controllers\Bside\Product\ExtendController::class, 'save'])->name('product_extend_save');
  241 + Route::any('extend/del', [\App\Http\Controllers\Bside\Product\ExtendController::class, 'del'])->name('product_extend_del');
241 }); 242 });
242 243
243 244