作者 刘锟

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

... ... @@ -45,26 +45,25 @@ class CNoticeController extends BaseController
'url' => $request->input('url', []),
'language'=> $request->input('language', []),
];
$result = http_post($url, json_encode($param));
return $this->response('更新中请稍后, 更新完成将会发送站内信通知更新结果!');
$updateProgressModel = new UpdateProgress();
$progressInfo = $updateProgressModel->formatQuery(['project_id'=>$this->user['project_id'],'type'=>$this->param['type']])->orderBy('id','desc')->first();
if((!empty($progressInfo))){
$progressInfo = $progressInfo->toArray();
if(($progressInfo['total_num'] > $progressInfo['current_num'])){
$this->response('当前页面正在生成了,请完成后再点击',Code::SUCCESS,$progressInfo);
}
}
//通知更新
if($this->param['type'] == UpdateNotify::TYPE_MASTER){
$this->updateMaster();
}else{
$this->updateMinorLanguages();
}
$urlStr = $this->getString($this->param['type'],$this->param['page']);
curlGet($urlStr);
$this->response('更新成功');
http_post($url, json_encode($param));
$this->response('更新中请稍后, 更新完成将会发送站内信通知更新结果!');
// $updateProgressModel = new UpdateProgress();
// $progressInfo = $updateProgressModel->formatQuery(['project_id'=>$this->user['project_id'],'type'=>$this->param['type']])->orderBy('id','desc')->first();
// if((!empty($progressInfo))){
// $progressInfo = $progressInfo->toArray();
// if(($progressInfo['total_num'] > $progressInfo['current_num'])){
// $this->response('当前页面正在生成了,请完成后再点击',Code::SUCCESS,$progressInfo);
// }
// }
// //通知更新
// if($this->param['type'] == UpdateNotify::TYPE_MASTER){
// $this->updateMaster();
// }else{
// $this->updateMinorLanguages();
// }
// $urlStr = $this->getString($this->param['type'],$this->param['page']);
// curlGet($urlStr);
// $this->response('更新成功');
}
/**
... ...
... ... @@ -226,15 +226,9 @@ class ComController extends BaseController
case 'news':
$url_link = $this->user['domain'].RouteMap::SOURCE_NEWS.'/';
break;
case 'news_category':
$url_link = $this->user['domain'].RouteMap::PATH_NEWS_CATE.'/';
break;
case 'blog':
$url_link = $this->user['domain'].RouteMap::SOURCE_BLOG.'/';
break;
case 'blog_category':
$url_link = $this->user['domain'].RouteMap::PATH_BLOG_CATE.'/';
break;
default:
$url_link = $this->user['domain'];
}
... ...
... ... @@ -284,7 +284,7 @@ class ProductController extends BaseController
*/
public function getExtendInfo($product_id){
$extendModel = new Extend();
$list = $extendModel->list([],'id',['type','key','title']);
$list = $extendModel->list([],'id',['id','type','key','title']);
if(empty($list)){
return [];
}
... ...
... ... @@ -526,6 +526,7 @@ class BTemplateLogic extends BaseLogic
$this->param['project_id'] = $this->user['project_id'];
$this->param['test_model'] = 2;//未审核模版
$this->param['operator_id'] = $this->user['manager_id'] ?? 0;
$this->param['html'] = characterTruncation($this->param['html'],'/<style id="globalsojs-header">(.*?)<\/footer>/s');
$this->param = $this->stringProcessing($this->param);
$publicTemplateModel = new Template();
$rs = $publicTemplateModel->add($this->param);
... ...
... ... @@ -273,6 +273,9 @@ class VisualizationLogic extends BaseLogic
* @time :2023/11/15 11:47
*/
public function saveHtml(){
if(!isset($this->user['is_visualization']->page_array)){
$this->fail('当前为定制项目,请先选择定制界面');
}
$page_array = (array)$this->user['is_visualization']->page_array;
$type = $this->getType($this->param['source'],$this->param['source_id']);
try {
... ... @@ -369,7 +372,7 @@ class VisualizationLogic extends BaseLogic
$templateCommonModel->edit($data,['id'=>$info['id']]);
}
//更新所有界面的other
$templateCommonModel->edit(['other'=>$other],['project_id'=>$this->user['project_id']]);
$templateCommonModel->edit(['other'=>$other],['project_id'=>$this->user['project_id'],'template_id'=>$template_id]);
return $this->success();
}
... ...
... ... @@ -238,6 +238,7 @@ Route::middleware(['bloginauth'])->group(function () {
//扩展字段
Route::any('extend', [\App\Http\Controllers\Bside\Product\ExtendController::class, 'lists'])->name('product_extend');
Route::any('extend/save', [\App\Http\Controllers\Bside\Product\ExtendController::class, 'save'])->name('product_extend_save');
Route::any('extend/del', [\App\Http\Controllers\Bside\Product\ExtendController::class, 'del'])->name('product_extend_del');
});
... ...