作者 lyh

gx数据

@@ -843,8 +843,11 @@ function ends_with($string, $suffix) @@ -843,8 +843,11 @@ function ends_with($string, $suffix)
843 * @method :post 843 * @method :post
844 * @time :2025/6/21 9:57 844 * @time :2025/6/21 9:57
845 */ 845 */
846 -function getCustomRouteMap($module_route,$route = '') 846 +function getCustomRouteMap($module_route,$route = '',$is_upgrade = 0)
847 { 847 {
  848 + if($is_upgrade == 0){
  849 + return $route;
  850 + }
848 if($module_route == $route){ 851 if($module_route == $route){
849 $resultRoute = $route; 852 $resultRoute = $route;
850 }else{ 853 }else{
@@ -42,7 +42,7 @@ class CustomModuleCategoryController extends BaseController @@ -42,7 +42,7 @@ class CustomModuleCategoryController extends BaseController
42 $template_id = $this->getModuleTemplateId($this->param['module_id']); 42 $template_id = $this->getModuleTemplateId($this->param['module_id']);
43 foreach ($list as $k => $v){ 43 foreach ($list as $k => $v){
44 $v['is_renovation'] = $this->getIsRenovation($v['module_id'],BTemplate::IS_LIST,$template_id,$v['id'],BTemplate::IS_CUSTOM); 44 $v['is_renovation'] = $this->getIsRenovation($v['module_id'],BTemplate::IS_LIST,$template_id,$v['id'],BTemplate::IS_CUSTOM);
45 - $v['url'] = $this->user['domain'].getCustomRouteMap($moduleInfo['route'],$v['route']); 45 + $v['url'] = $this->user['domain'].getCustomRouteMap($moduleInfo['route'],$v['route'],$this->user['is_upgrade']);
46 $list[$k] = $v; 46 $list[$k] = $v;
47 } 47 }
48 } 48 }
@@ -225,7 +225,7 @@ class CustomModuleCategoryLogic extends BaseLogic @@ -225,7 +225,7 @@ class CustomModuleCategoryLogic extends BaseLogic
225 //获取模块路由 225 //获取模块路由
226 $customModuleModel = new CustomModule(); 226 $customModuleModel = new CustomModule();
227 $moduleInfo = $customModuleModel->read(['id'=>$info['module_id']]); 227 $moduleInfo = $customModuleModel->read(['id'=>$info['module_id']]);
228 - $this->curlDelRoute(['old_route'=>$info['route'],'path'=>getCustomRouteMap($moduleInfo['route'],$info['route'])]); 228 + $this->curlDelRoute(['old_route'=>$info['route'],'path'=>getCustomRouteMap($moduleInfo['route'],$info['route'],$this->user['is_upgrade'])]);
229 return $this->success(); 229 return $this->success();
230 } 230 }
231 231