作者 刘锟

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

@@ -224,27 +224,4 @@ class ATemplateController extends BaseController @@ -224,27 +224,4 @@ class ATemplateController extends BaseController
224 $this->response('success',Code::SUCCESS,$info); 224 $this->response('success',Code::SUCCESS,$info);
225 } 225 }
226 226
227 - /**  
228 - * @remark :私有公共模板详情  
229 - * @name :getProjectPublicTemplate  
230 - * @author :lyh  
231 - * @method :post  
232 - * @time :2023/6/28 16:34  
233 - */  
234 - public function getProjectPublicTemplate(){  
235 - $aTemplateModel = new Template();  
236 - $filed = ['id','name','image','url','status','sort','deleted_status','test_model','project_id','created_at','project_id'];  
237 - $this->map['project_id'] = ['!=',0];  
238 - $this->map['deleted_status'] = 0;  
239 - $this->map['test_model'] = 2;  
240 - $lists = $aTemplateModel->lists($this->map,$this->page,$this->row,$this->order,$filed);  
241 - if(!empty($lists) && !empty($lists['list'])){  
242 - foreach ($lists['list'] as $k => $v){  
243 - $v['image_link'] = getImageUrl($v['image']);  
244 - $lists['list'][$k] = $v;  
245 - }  
246 - }  
247 - $this->response('success',Code::SUCCESS,$lists);  
248 - }  
249 -  
250 } 227 }
@@ -309,7 +309,6 @@ class ProductController extends BaseController @@ -309,7 +309,6 @@ class ProductController extends BaseController
309 }elseif($v['type'] == 4){ 309 }elseif($v['type'] == 4){
310 $arr1 = json_decode($info['values']); 310 $arr1 = json_decode($info['values']);
311 foreach ($arr1 as $k1=>$v1){ 311 foreach ($arr1 as $k1=>$v1){
312 - $v1 = (array)$v1;  
313 $v1 = getFileUrl($v1); 312 $v1 = getFileUrl($v1);
314 $arr1[$k1] = $v1; 313 $arr1[$k1] = $v1;
315 } 314 }
@@ -28,7 +28,6 @@ class ATemplateLogic extends BaseLogic @@ -28,7 +28,6 @@ class ATemplateLogic extends BaseLogic
28 * @time :2023/6/28 17:03 28 * @time :2023/6/28 17:03
29 */ 29 */
30 public function aTemplateList($map,$page,$row,$order = ['created_at'],$filed = ['*']){ 30 public function aTemplateList($map,$page,$row,$order = ['created_at'],$filed = ['*']){
31 - $map['project_id'] = 0;  
32 $map['deleted_status'] = 0; 31 $map['deleted_status'] = 0;
33 $map['status'] = 0; 32 $map['status'] = 0;
34 $lists = $this->model->lists($map,$page,$row,$order,$filed); 33 $lists = $this->model->lists($map,$page,$row,$order,$filed);
@@ -79,7 +78,7 @@ class ATemplateLogic extends BaseLogic @@ -79,7 +78,7 @@ class ATemplateLogic extends BaseLogic
79 * @time :2023/6/28 17:15 78 * @time :2023/6/28 17:15
80 */ 79 */
81 public function aTemplateStatus(){ 80 public function aTemplateStatus(){
82 - $rs = $this->model->edit(['status'=>$this->param['status']],['id'=>$this->param['id']]); 81 + $rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
83 if($rs === false){ 82 if($rs === false){
84 $this->fail('error'); 83 $this->fail('error');
85 } 84 }
@@ -287,7 +287,7 @@ class BTemplateLogic extends BaseLogic @@ -287,7 +287,7 @@ class BTemplateLogic extends BaseLogic
287 $templateCommonModel->edit($data,['id'=>$info['id']]); 287 $templateCommonModel->edit($data,['id'=>$info['id']]);
288 } 288 }
289 //更新所有界面的other 289 //更新所有界面的other
290 - $templateCommonModel->edit(['other'=>$other],['project_id'=>$this->user['project_id']]); 290 + $templateCommonModel->edit(['other'=>$other],['project_id'=>$this->user['project_id'],'template_id'=>$param['template_id']]);
291 return $this->success(); 291 return $this->success();
292 } 292 }
293 293
@@ -50,6 +50,8 @@ class ProductLogic extends BaseLogic @@ -50,6 +50,8 @@ class ProductLogic extends BaseLogic
50 if(isset($this->param['category_id']) && !empty($this->param['category_id'])) { 50 if(isset($this->param['category_id']) && !empty($this->param['category_id'])) {
51 $category_ids = $this->getLastCategoryArr($this->param['category_id']); 51 $category_ids = $this->getLastCategoryArr($this->param['category_id']);
52 $this->param['category_id'] = ','.implode(',',$category_ids).','; 52 $this->param['category_id'] = ','.implode(',',$category_ids).',';
  53 + }else{
  54 + $this->param['category_id'] = '';
53 } 55 }
54 DB::connection('custom_mysql')->beginTransaction(); 56 DB::connection('custom_mysql')->beginTransaction();
55 try { 57 try {
@@ -311,7 +311,6 @@ Route::middleware(['aloginauth'])->group(function () { @@ -311,7 +311,6 @@ Route::middleware(['aloginauth'])->group(function () {
311 Route::any('/setHeadFooter', [Aside\Template\ATemplateController::class, 'setHeadFooter'])->name('admin.template_setHeadFooter'); 311 Route::any('/setHeadFooter', [Aside\Template\ATemplateController::class, 'setHeadFooter'])->name('admin.template_setHeadFooter');
312 Route::any('/getHeadFooter', [Aside\Template\ATemplateController::class, 'getHeadFooter'])->name('admin.template_getHeadFooter'); 312 Route::any('/getHeadFooter', [Aside\Template\ATemplateController::class, 'getHeadFooter'])->name('admin.template_getHeadFooter');
313 Route::any('/setPublicTemplate', [Aside\Template\ATemplateController::class, 'setPublicTemplate'])->name('admin.template_setPublicTemplate'); 313 Route::any('/setPublicTemplate', [Aside\Template\ATemplateController::class, 'setPublicTemplate'])->name('admin.template_setPublicTemplate');
314 - Route::any('/getProjectPublicTemplate', [Aside\Template\ATemplateController::class, 'getProjectPublicTemplate'])->name('admin.template_getProjectPublicTemplate');  
315 // 左侧模块 314 // 左侧模块
316 Route::prefix('module')->group(function () { 315 Route::prefix('module')->group(function () {
317 Route::any('/', [Aside\Template\ATemplateModuleController::class, 'lists'])->name('admin.ATemplateModule_lists'); 316 Route::any('/', [Aside\Template\ATemplateModuleController::class, 'lists'])->name('admin.ATemplateModule_lists');