作者 lyh

gx

@@ -63,4 +63,15 @@ class BTemplateController extends BaseController @@ -63,4 +63,15 @@ class BTemplateController extends BaseController
63 $this->response('success'); 63 $this->response('success');
64 } 64 }
65 65
  66 + /**
  67 + * @remark :可视化装修数据类型设置
  68 + * @name :moduleSetting
  69 + * @author :lyh
  70 + * @method :post
  71 + * @time :2023/7/17 15:55
  72 + */
  73 + public function getTypeSetting(BTemplateLogic $BTemplateLogic){
  74 + $list = $BTemplateLogic->getModuleType();
  75 + $this->response('success',Code::SUCCESS,$list);
  76 + }
66 } 77 }
@@ -142,6 +142,7 @@ class ImageController @@ -142,6 +142,7 @@ class ImageController
142 'size' => $res->getSize(), 142 'size' => $res->getSize(),
143 'hash' => $hash, 143 'hash' => $hash,
144 'type'=>$files->getClientOriginalExtension(), 144 'type'=>$files->getClientOriginalExtension(),
  145 + 'refer'=>$this->request->post('refer') ?? '',
145 ]; 146 ];
146 $rs = $imageModel->add($data); 147 $rs = $imageModel->add($data);
147 if ($rs === false) { 148 if ($rs === false) {
@@ -203,6 +204,7 @@ class ImageController @@ -203,6 +204,7 @@ class ImageController
203 'size' => $res->getSize(), 204 'size' => $res->getSize(),
204 'hash' => $hash, 205 'hash' => $hash,
205 'type'=>$file->getClientOriginalExtension(), 206 'type'=>$file->getClientOriginalExtension(),
  207 + 'refer'=>$this->request->post('refer') ?? '',
206 ]; 208 ];
207 $data[] = ['image'=>$hash]; 209 $data[] = ['image'=>$hash];
208 } 210 }
@@ -101,8 +101,8 @@ class BTemplateLogic extends BaseLogic @@ -101,8 +101,8 @@ class BTemplateLogic extends BaseLogic
101 $info = $this->model->read( 101 $info = $this->model->read(
102 [ 102 [
103 'project_id'=>$this->user['project_id'], 103 'project_id'=>$this->user['project_id'],
104 - 'source'=>$this->param['source'],  
105 - 'source_id'=>$this->param['source_id'], 104 + 'source'=>$this->param['source'] ?? 'index',
  105 + 'source_id'=>$this->param['source_id'] ?? 0,
106 'template_id'=>$this->param['template_id'], 106 'template_id'=>$this->param['template_id'],
107 ] 107 ]
108 ); 108 );
@@ -135,4 +135,15 @@ class BTemplateLogic extends BaseLogic @@ -135,4 +135,15 @@ class BTemplateLogic extends BaseLogic
135 $this->param['head_css'] = characterTruncation($this->param['html'],'/<style id="vvvebjs-header">(.*?)<\/style>/s'); 135 $this->param['head_css'] = characterTruncation($this->param['html'],'/<style id="vvvebjs-header">(.*?)<\/style>/s');
136 $this->param['footer_css'] = characterTruncation($this->param['html'],'/<style id="vvvebjs-footer">(.*?)<\/style>/s'); 136 $this->param['footer_css'] = characterTruncation($this->param['html'],'/<style id="vvvebjs-footer">(.*?)<\/style>/s');
137 } 137 }
  138 +
  139 + /**
  140 + * @remark :获取类型
  141 + * @name :getModuleType
  142 + * @author :lyh
  143 + * @method :post
  144 + * @time :2023/7/17 16:03
  145 + */
  146 + public function getModuleType($type){
  147 +// $moduleTypeModel = new
  148 + }
138 } 149 }
  1 +<?php
  2 +
  3 +namespace App\Models\Template;
  4 +
  5 +use App\Models\Base;
  6 +
  7 +/**
  8 + * @remark :可视化装修设置
  9 + * @class :ModuleSetting.php
  10 + * @author :lyh
  11 + * @time :2023/7/17 15:50
  12 + */
  13 +class ModuleSetting extends Base
  14 +{
  15 + protected $table = 'gl_public_module_setting';
  16 +}