作者 刘锟

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

... ... @@ -224,27 +224,4 @@ class ATemplateController extends BaseController
$this->response('success',Code::SUCCESS,$info);
}
/**
* @remark :私有公共模板详情
* @name :getProjectPublicTemplate
* @author :lyh
* @method :post
* @time :2023/6/28 16:34
*/
public function getProjectPublicTemplate(){
$aTemplateModel = new Template();
$filed = ['id','name','image','url','status','sort','deleted_status','test_model','project_id','created_at','project_id'];
$this->map['project_id'] = ['!=',0];
$this->map['deleted_status'] = 0;
$this->map['test_model'] = 2;
$lists = $aTemplateModel->lists($this->map,$this->page,$this->row,$this->order,$filed);
if(!empty($lists) && !empty($lists['list'])){
foreach ($lists['list'] as $k => $v){
$v['image_link'] = getImageUrl($v['image']);
$lists['list'][$k] = $v;
}
}
$this->response('success',Code::SUCCESS,$lists);
}
}
... ...
... ... @@ -309,7 +309,6 @@ class ProductController extends BaseController
}elseif($v['type'] == 4){
$arr1 = json_decode($info['values']);
foreach ($arr1 as $k1=>$v1){
$v1 = (array)$v1;
$v1 = getFileUrl($v1);
$arr1[$k1] = $v1;
}
... ...
... ... @@ -28,7 +28,6 @@ class ATemplateLogic extends BaseLogic
* @time :2023/6/28 17:03
*/
public function aTemplateList($map,$page,$row,$order = ['created_at'],$filed = ['*']){
$map['project_id'] = 0;
$map['deleted_status'] = 0;
$map['status'] = 0;
$lists = $this->model->lists($map,$page,$row,$order,$filed);
... ... @@ -79,7 +78,7 @@ class ATemplateLogic extends BaseLogic
* @time :2023/6/28 17:15
*/
public function aTemplateStatus(){
$rs = $this->model->edit(['status'=>$this->param['status']],['id'=>$this->param['id']]);
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
if($rs === false){
$this->fail('error');
}
... ...
... ... @@ -287,7 +287,7 @@ class BTemplateLogic 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'=>$param['template_id']]);
return $this->success();
}
... ...
... ... @@ -50,6 +50,8 @@ class ProductLogic extends BaseLogic
if(isset($this->param['category_id']) && !empty($this->param['category_id'])) {
$category_ids = $this->getLastCategoryArr($this->param['category_id']);
$this->param['category_id'] = ','.implode(',',$category_ids).',';
}else{
$this->param['category_id'] = '';
}
DB::connection('custom_mysql')->beginTransaction();
try {
... ...
... ... @@ -311,7 +311,6 @@ Route::middleware(['aloginauth'])->group(function () {
Route::any('/setHeadFooter', [Aside\Template\ATemplateController::class, 'setHeadFooter'])->name('admin.template_setHeadFooter');
Route::any('/getHeadFooter', [Aside\Template\ATemplateController::class, 'getHeadFooter'])->name('admin.template_getHeadFooter');
Route::any('/setPublicTemplate', [Aside\Template\ATemplateController::class, 'setPublicTemplate'])->name('admin.template_setPublicTemplate');
Route::any('/getProjectPublicTemplate', [Aside\Template\ATemplateController::class, 'getProjectPublicTemplate'])->name('admin.template_getProjectPublicTemplate');
// 左侧模块
Route::prefix('module')->group(function () {
Route::any('/', [Aside\Template\ATemplateModuleController::class, 'lists'])->name('admin.ATemplateModule_lists');
... ...