正在显示
3 个修改的文件
包含
12 行增加
和
12 行删除
| @@ -131,10 +131,10 @@ class CustomModuleCategoryLogic extends BaseLogic | @@ -131,10 +131,10 @@ class CustomModuleCategoryLogic extends BaseLogic | ||
| 131 | public function categoryAdd(){ | 131 | public function categoryAdd(){ |
| 132 | try { | 132 | try { |
| 133 | $id = $this->model->addReturnId($this->param); | 133 | $id = $this->model->addReturnId($this->param); |
| 134 | - $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE_CATE.$this->param['module_id'], | 134 | + $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE_CATE, |
| 135 | $id, $this->user['project_id']); | 135 | $id, $this->user['project_id']); |
| 136 | $this->handleAddSon($id); | 136 | $this->handleAddSon($id); |
| 137 | - $this->addUpdateNotify(RouteMap::SOURCE_MODULE_CATE.$this->param['module_id'],$route); | 137 | + $this->addUpdateNotify(RouteMap::SOURCE_MODULE_CATE,$route); |
| 138 | $this->curlDelRoute(['new_route'=>$route]); | 138 | $this->curlDelRoute(['new_route'=>$route]); |
| 139 | $this->edit(['route' => $route], ['id' => $id]); | 139 | $this->edit(['route' => $route], ['id' => $id]); |
| 140 | //处理上级分类商品 | 140 | //处理上级分类商品 |
| @@ -153,7 +153,7 @@ class CustomModuleCategoryLogic extends BaseLogic | @@ -153,7 +153,7 @@ class CustomModuleCategoryLogic extends BaseLogic | ||
| 153 | * @time :2023/12/5 10:55 | 153 | * @time :2023/12/5 10:55 |
| 154 | */ | 154 | */ |
| 155 | public function categoryEdit(){ | 155 | public function categoryEdit(){ |
| 156 | - $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE_CATE.$this->param['module_id'], | 156 | + $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE_CATE, |
| 157 | $this->param['id'], $this->user['project_id']); | 157 | $this->param['id'], $this->user['project_id']); |
| 158 | $this->editHandleCategory($this->param['id'],$this->param['pid']); | 158 | $this->editHandleCategory($this->param['id'],$this->param['pid']); |
| 159 | $this->editRoute($this->param['id'],$route); | 159 | $this->editRoute($this->param['id'],$route); |
| @@ -218,7 +218,7 @@ class CustomModuleCategoryLogic extends BaseLogic | @@ -218,7 +218,7 @@ class CustomModuleCategoryLogic extends BaseLogic | ||
| 218 | //生成一条删除路由记录 | 218 | //生成一条删除路由记录 |
| 219 | $info = $this->model->read(['id' => $id], ['id', 'route']); | 219 | $info = $this->model->read(['id' => $id], ['id', 'route']); |
| 220 | if ($info['route'] != $route) { | 220 | if ($info['route'] != $route) { |
| 221 | - $this->addUpdateNotify(RouteMap::SOURCE_MODULE_CATE.$this->param['module_id'],$route); | 221 | + $this->addUpdateNotify(RouteMap::SOURCE_MODULE_CATE,$route); |
| 222 | $this->curlDelRoute(['route'=>$info['route'],'new_route'=>$route]); | 222 | $this->curlDelRoute(['route'=>$info['route'],'new_route'=>$route]); |
| 223 | } | 223 | } |
| 224 | return true; | 224 | return true; |
| @@ -300,7 +300,7 @@ class CustomModuleCategoryLogic extends BaseLogic | @@ -300,7 +300,7 @@ class CustomModuleCategoryLogic extends BaseLogic | ||
| 300 | public function delRoute($id) | 300 | public function delRoute($id) |
| 301 | { | 301 | { |
| 302 | $info = $this->model->read(['id' => $id], ['id', 'route','module_id']); | 302 | $info = $this->model->read(['id' => $id], ['id', 'route','module_id']); |
| 303 | - RouteMap::delRoute(RouteMap::SOURCE_MODULE_CATE.$info['module_id'], $id, $this->user['project_id']); | 303 | + RouteMap::delRoute(RouteMap::SOURCE_MODULE_CATE, $id, $this->user['project_id']); |
| 304 | //通知 | 304 | //通知 |
| 305 | $this->curlDelRoute(['route'=>$info['route']]); | 305 | $this->curlDelRoute(['route'=>$info['route']]); |
| 306 | return $this->success(); | 306 | return $this->success(); |
| @@ -152,9 +152,9 @@ class CustomModuleContentLogic extends BaseLogic | @@ -152,9 +152,9 @@ class CustomModuleContentLogic extends BaseLogic | ||
| 152 | public function contentAdd(){ | 152 | public function contentAdd(){ |
| 153 | try { | 153 | try { |
| 154 | $id = $this->model->addReturnId($this->param); | 154 | $id = $this->model->addReturnId($this->param); |
| 155 | - $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE.$this->param['module_id'], | 155 | + $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE, |
| 156 | $id, $this->user['project_id']); | 156 | $id, $this->user['project_id']); |
| 157 | - $this->addUpdateNotify(RouteMap::SOURCE_MODULE.$this->param['module_id'],$route); | 157 | + $this->addUpdateNotify(RouteMap::SOURCE_MODULE,$route); |
| 158 | $this->curlDelRoute(['new_route'=>$route]); | 158 | $this->curlDelRoute(['new_route'=>$route]); |
| 159 | $this->edit(['route' => $route], ['id' => $id]); | 159 | $this->edit(['route' => $route], ['id' => $id]); |
| 160 | }catch (\Exception $e){ | 160 | }catch (\Exception $e){ |
| @@ -171,7 +171,7 @@ class CustomModuleContentLogic extends BaseLogic | @@ -171,7 +171,7 @@ class CustomModuleContentLogic extends BaseLogic | ||
| 171 | * @time :2023/12/7 15:04 | 171 | * @time :2023/12/7 15:04 |
| 172 | */ | 172 | */ |
| 173 | public function contentEdit(){ | 173 | public function contentEdit(){ |
| 174 | - $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE.$this->param['module_id'], | 174 | + $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE, |
| 175 | $this->param['id'], $this->user['project_id']); | 175 | $this->param['id'], $this->user['project_id']); |
| 176 | $this->editRoute($this->param['id'],$route); | 176 | $this->editRoute($this->param['id'],$route); |
| 177 | $rs = $this->model->edit($this->param,['id'=>$this->param['id']]); | 177 | $rs = $this->model->edit($this->param,['id'=>$this->param['id']]); |
| @@ -214,7 +214,7 @@ class CustomModuleContentLogic extends BaseLogic | @@ -214,7 +214,7 @@ class CustomModuleContentLogic extends BaseLogic | ||
| 214 | //生成一条删除路由记录 | 214 | //生成一条删除路由记录 |
| 215 | $info = $this->model->read(['id' => $id], ['id', 'route']); | 215 | $info = $this->model->read(['id' => $id], ['id', 'route']); |
| 216 | if ($info['route'] != $route) { | 216 | if ($info['route'] != $route) { |
| 217 | - $this->addUpdateNotify(RouteMap::SOURCE_MODULE.$this->param['module_id'],$route); | 217 | + $this->addUpdateNotify(RouteMap::SOURCE_MODULE,$route); |
| 218 | $this->curlDelRoute(['route'=>$info['route'],'new_route'=>$route]); | 218 | $this->curlDelRoute(['route'=>$info['route'],'new_route'=>$route]); |
| 219 | } | 219 | } |
| 220 | return true; | 220 | return true; |
| @@ -320,7 +320,7 @@ class CustomModuleContentLogic extends BaseLogic | @@ -320,7 +320,7 @@ class CustomModuleContentLogic extends BaseLogic | ||
| 320 | */ | 320 | */ |
| 321 | public function delRoute($id) | 321 | public function delRoute($id) |
| 322 | { | 322 | { |
| 323 | - RouteMap::delRoute(RouteMap::SOURCE_MODULE.$this->param['module_id'], $id, $this->user['project_id']); | 323 | + RouteMap::delRoute(RouteMap::SOURCE_MODULE, $id, $this->user['project_id']); |
| 324 | //通知 | 324 | //通知 |
| 325 | $info = $this->model->read(['id' => $id], ['id', 'url']); | 325 | $info = $this->model->read(['id' => $id], ['id', 'url']); |
| 326 | $this->curlDelRoute(['route'=>$info['url']]); | 326 | $this->curlDelRoute(['route'=>$info['url']]); |
| @@ -39,10 +39,10 @@ class RouteMap extends Base | @@ -39,10 +39,10 @@ class RouteMap extends Base | ||
| 39 | const SOURCE_NAV = 'nav'; | 39 | const SOURCE_NAV = 'nav'; |
| 40 | 40 | ||
| 41 | //自定义模块 | 41 | //自定义模块 |
| 42 | - const SOURCE_MODULE = 'module_'; | 42 | + const SOURCE_MODULE = 'module'; |
| 43 | 43 | ||
| 44 | //自定义模块分类 | 44 | //自定义模块分类 |
| 45 | - const SOURCE_MODULE_CATE = 'module_cate_'; | 45 | + const SOURCE_MODULE_CATE = 'module_category'; |
| 46 | /** | 46 | /** |
| 47 | * 生成路由标识 | 47 | * 生成路由标识 |
| 48 | * @param $title | 48 | * @param $title |
-
请 注册 或 登录 后发表评论