作者 lyh

Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6 into develop

@@ -121,7 +121,7 @@ class CategoryLogic extends BaseLogic @@ -121,7 +121,7 @@ class CategoryLogic extends BaseLogic
121 * @time :2023/8/21 17:43 121 * @time :2023/8/21 17:43
122 */ 122 */
123 public function handleEditParam(&$param){ 123 public function handleEditParam(&$param){
124 - $category_ids = Category::getChildIdsArr($param['id']); 124 + $category_ids = Category::getChildIdsArr($param['id'] ?? 0);
125 if(in_array($param['pid'], $category_ids)){ 125 if(in_array($param['pid'], $category_ids)){
126 $this->fail('上级分类不能是本分类或子分类'); 126 $this->fail('上级分类不能是本分类或子分类');
127 } 127 }
@@ -31,6 +31,9 @@ class Category extends Base @@ -31,6 +31,9 @@ class Category extends Base
31 */ 31 */
32 public static function getChildIdsArr($id) 32 public static function getChildIdsArr($id)
33 { 33 {
  34 + if(!$id){
  35 + return [];
  36 + }
34 $list = self::where('status', self::STATUS_ACTIVE)->select(['id','pid'])->get()->toArray(); 37 $list = self::where('status', self::STATUS_ACTIVE)->select(['id','pid'])->get()->toArray();
35 $ids = []; 38 $ids = [];
36 Arr::findChildIds($list, $id, $ids); 39 Arr::findChildIds($list, $id, $ids);
@@ -136,6 +136,7 @@ class ProjectServer extends BaseService @@ -136,6 +136,7 @@ class ProjectServer extends BaseService
136 <div class="layout" data-unable="demo01-error404"> 136 <div class="layout" data-unable="demo01-error404">
137 <img src="https://ecdn6.globalso.com/upload/m/image_other/2023-10/6528a87e594db30162.png" /> 137 <img src="https://ecdn6.globalso.com/upload/m/image_other/2023-10/6528a87e594db30162.png" />
138 </div> 138 </div>
  139 + <p style="text-align: center">SORRY. THE PAGE HAS EITHER MOVED OR CANNOT BE FOUND.</p>
139 <style> 140 <style>
140 .section-block-error404 .layout { 141 .section-block-error404 .layout {
141 height: 700px; 142 height: 700px;
@@ -155,7 +156,7 @@ class ProjectServer extends BaseService @@ -155,7 +156,7 @@ class ProjectServer extends BaseService
155 <script> 156 <script>
156 </script> 157 </script>
157 </section> 158 </section>
158 - </main>', 'html_style' => '<style id="globalsojs-styles"></style>','created_at' => $created_at, 'updated_at' => $created_at]; 159 + </main>', 'html_style' => '<style id="globalsojs-styles"></style>','title' => '404-Page not found', 'description' => 'Sorry. The page has either moved or cannot be found.', 'created_at' => $created_at, 'updated_at' => $created_at];
159 $id = DB::connection('custom_mysql')->table('gl_web_custom_template')->insertGetId($data); 160 $id = DB::connection('custom_mysql')->table('gl_web_custom_template')->insertGetId($data);
160 //路由 161 //路由
161 $info = DB::connection('custom_mysql')->table('gl_route_map')->first(); 162 $info = DB::connection('custom_mysql')->table('gl_route_map')->first();