Procházet zdrojové kódy

Merge branch 'master' of http://git.bjzxtw.org.cn:3000/zxt/public_producer

rkljw před 5 dny
rodič
revize
47d6b009b7

+ 182 - 180
app/JsonRpc/PublicRpcService.php

@@ -26,9 +26,9 @@ use App\Model\Sector;
 use App\Model\Component;
 use App\Model\Link;
 use App\Model\FooterCategory;
+use App\Model\Size;
 
 use function Hyperf\Support\retry;
-use App\Model\Company;
 use Hyperf\Paginator\Paginator;
 use App\Model\User;
 #[RpcService(name: "PublicRpcService", protocol: "jsonrpc-http", server: "jsonrpc-http")]
@@ -772,21 +772,31 @@ class PublicRpcService implements PublicRpcServiceInterface
         if($template->type == 1){
             return Result::error("默认风格不能删除", 0);
         }
-        $result = TemplateClass::where($where)->delete();
-        if (empty($result)) {
-            return Result::error("删除失败", 0);
-        } else {
-            return Result::success($result);
+        
+        try{
+            // 默认风格   1
+            $template = Template::where('template_class_id',$data['id'])->update(['template_class_id'=>1]);
+            if(empty($template)){
+                Db::rollBack();
+                return Result::error("删除失败", 0);
+            }
+            $result = TemplateClass::where($where)->delete();
+        }catch (\Exception $e){
+            return Result::error("删除失败".$e->getMessage(), 0);
         }
+        return Result::success($result);
     }
     /**
-     * 获取getTemplateClass
+     * 根据风格名称-获取获取所有风格
      * @param array $data
      * @return array
      */
     public function getTemplateClass(array $data): array
     {
-        $result = TemplateClass::get();
+        $result = TemplateClass::where('name','like','%'.$data['template_name'].'%')->get();
+        if(empty($result)){
+            return Result::error("暂无风格", 0);
+        }
         return Result::success($result);
     }
     /**
@@ -807,7 +817,7 @@ class PublicRpcService implements PublicRpcServiceInterface
             array_push($where, ['template_keyword', 'like', '%'. $data['template_keyword']. '%']);
         }
         $result = Template::where($where)
-            ->leftJoin('template_class', 'template.template_class_id', 'template_class.id')
+            ->leftJoin('template_class', 'template.template_class_id', 'template_class.class_id')
             ->select('template.*', 'template_class.name as template_class_name')
             ->orderBy('template.id', 'desc')
             ->paginate($data['page_size'], ['*'], 'mypage_name', $data['page']);
@@ -819,7 +829,7 @@ class PublicRpcService implements PublicRpcServiceInterface
     public function getTemplateInfo(array $data): array
     {
         $result = Template::where('template.id', $data['id'])
-            ->leftJoin('template_class', 'template.template_class_id', 'template_class.id')
+            ->leftJoin('template_class', 'template.template_class_id', 'template_class.class_id')
             ->select('template.*', 'template_class.name as template_class_name')
             ->first();
         if(empty($result)){
@@ -857,8 +867,12 @@ class PublicRpcService implements PublicRpcServiceInterface
      * @param array $data
      * @return array
      */
-    public function delTemplate(array $data): array
+    public function delTemplate(array $data): array 
     {
+        $rector = Sector::where('template_id', $data['id'])->first();
+        if (!empty($rector)) {
+            return Result::error("此皮肤已被绑定,不可删除", 0);
+        }
         $result = Template::where('id', $data['id'])->delete();
         var_dump($result, '-------------------delete');
         if ($result) {
@@ -900,42 +914,74 @@ class PublicRpcService implements PublicRpcServiceInterface
             return Result::success('更新成功');
         }
     }
+    /**
+     * 根据皮肤名称-获取所有皮肤
+     * @param array $data
+     * @return array
+     */
+    public function getAllTemplate(array $data): array
+    {
+        $result = Template::where('template_name','like','%'.$data['template_name'].'%')->get();
+        if(empty($result)){
+            return Result::error("暂无皮肤", 0);
+        }
+        return Result::success($result);
+    }
+    /**
+     * 获取通栏列表
+     * @param array $data
+     * @return array
+     */
     public function getSectorList(array $data): array
     {
         $where = [];
-        if (!empty($data['template_class_id'])) {
-            $where['template_class.id'] = $data['template_class_id'];
+        if (isset($data['template_class_id']) && !empty($data['template_class_id'])) {
+            $where['template_class_id'] = $data['template_class_id'];
         }
-        if (!empty($data['template_class_name'])) {
-            $where[] = ['template_class.name', 'like', '%' . $data['template_class_name'] . '%'];
+        if (isset($data['template_id']) && !empty($data['template_id'])) {
+            array_push($where, ['template_id', $data['template_id']]);
         }
-
-        if (!empty($data['sector_name'])) {
-            if (!empty($data['sector_name'])) {
-                // $where['sector_name'] = $data['sector_name'];
-                $where[] = ['sector.sector_name', 'like', '%' . $data['sector_name'] . '%'];
-            }
+        if (isset($data['sector_name']) && !empty($data['sector_name'])) {
+            array_push($where, ['sector.sector_name', 'like', '%' . $data['sector_name'] . '%']);
         }
-
+        if (isset($data['width']) && !empty($data['width']) && isset($data['height']) && !empty($data['height'])){
+            $size_id = Size::where('width','like','%' .$data['width'].'%')->where('height','like','%' .$data['height'].'%')->pluck('id');
+        } else if( isset($data['width']) && !empty($data['width'])){
+            $size_id = Size::where('width','like','%' .$data['width'].'%')->pluck('id');
+        }else if( isset($data['height']) && !empty($data['height'])){
+            $size_id = Size::where('height','like','%' .$data['height'].'%')->pluck('id');
+        }else{
+            $size_id = [];
+        }
+        // $size_id = $size_id->toArray();
         $result = Sector::where($where)
-            ->leftJoin('template', 'template.id', '=', 'sector.template_id')
-            ->leftJoin('template_class', 'template_class.id', '=', 'sector.template_id') // 添加这一行
-            ->select('sector.*', 'sector.sector_name', 'template.template_name', 'template_class.name as template_class_name', 'template_class.id as template_class_id') // 修改这一行
+            ->when(!empty($size_id), function ($query) use ($size_id) {
+                $query->whereIn('size_id', $size_id);
+            })
+            ->leftJoin('size', 'size.id', '=', 'sector.size_id')
+            ->select('sector.*', 'size.width','size.height')
             ->orderBy('sector.id', 'desc')
-            ->paginate($data['page_size'], ['*'], 'mypage_name', $data['page']);
-
+            ->paginate($data['page_size'], ['*'], 'page', $data['page']);
         return Result::success($result);
     }
+    /**
+     * 获取通栏详情
+     * @param array $data
+     * @return array
+     */
+
     public function getSectorInfo(array $data): array
     {
         $where = [];
         $where[] = ['sector.id', '=', $data['id']];
         $result = Sector::where($where)
-            ->leftJoin('template', 'template.id', '=', 'sector.template_id')
-            ->leftJoin('template_class', 'template_class.id', '=', 'template.template_class_id') // 添加这一行
-            ->select('sector.*', 'template.template_name', 'template_class.name as template_class_name', 'template_class.id as template_class_id') // 修改这一行
+            ->leftJoin('size', 'size.id', '=', 'sector.size_id')
+            ->select('sector.*', 'size.width','size.height')
             ->orderBy('sector.id', 'desc')
-            ->get();
+            ->first();
+        if(empty($result)){
+            return Result::error('此通栏不存在!');
+        }
         return Result::success($result);
     }
 
@@ -1014,16 +1060,52 @@ class PublicRpcService implements PublicRpcServiceInterface
         $result = $calendar->solar($data['year'], $data['month'], $data['day'], $data['hour']); // 阳历
         return Result::success($result);
     }
-
+    /**
+     * 添加通栏
+     * @param array $data
+     * @return array
+     */
     public function addSector(array $data): array
     {
         unset($data['user_id']);
-        // $data['page_type'] = json_encode($data['page_type']);
+        // 对传入的 page_type 数组进行去重、转换为整数并重新索引
+        $data['page_type'] = array_values(array_unique(array_map('intval', $data['page_type'])));
+        $data['page_type'] = json_encode($data['page_type']);
+        $template = Template::where('template_id', $data['template_id'])
+            ->whereRaw("JSON_CONTAINS(template.page_type, ?)", [$data['page_type']])
+            ->first();
+        if(empty($template)){
+            return Result::error('皮肤不存在!');
+        }
+        // 皮肤相关信息
+        $data['template_name'] = $template['template_name'];
+        $data['template_id'] = $template['template_id'];
+        // 风格相关信息
+        $template_class = TemplateClass::where('class_id',$template['template_class_id'])->first();
+        if(empty($template_class)){
+            return Result::error('所属风格不存在!');
+        }
+        // $data['sector_keyword'] = json_encode($data['sector_keyword']);
+       $data['template_class_id'] = $template_class['class_id'];
+       $data['template_class_name'] = $template_class['name'];
+
         $result = Sector::insertGetId($data);
-        return Result::success();
+        if(empty($result)){
+            return Result::error('添加失败');
+        }
+        return Result::success($result);
     }
+    /**
+     * 删除通栏
+     * @param array $data
+     * @return array
+     */
     public function delSector(array $data): array
     {
+        $component_id = Component::where('sector_id', $data['id'])->pluck('id')->toArray();
+        if(!empty($component_id)){
+            return Result::error('请先删除相关组件!');
+        }
         $result = Sector::where('id', $data['id'])->delete();
         if ($result == 1) {
             return Result::success('删除成功');
@@ -1031,9 +1113,38 @@ class PublicRpcService implements PublicRpcServiceInterface
             return Result::error('删除失败');
         }
     }
+    /**
+     * 修改通栏
+     * @param array $data
+     * @return array
+     */
     public function updateSector(array $data): array
     {
         unset($data['user_id']);
+        $sector = Sector::where('id', $data['id'])->first();
+        if(empty($sector)){
+            return Result::error('通栏不存在!');
+        }
+        // 对传入的 page_type 数组进行去重、转换为整数并重新索引
+        $data['page_type'] = array_values(array_unique(array_map('intval', $data['page_type'])));
+        $data['page_type'] = json_encode($data['page_type']);
+        $template = Template::where('template_id', $data['template_id'])
+            ->whereRaw("JSON_CONTAINS(template.page_type, ?)", [$data['page_type']])
+            ->first();
+        if(empty($template)){
+            return Result::error('皮肤不存在!');
+        }
+        // 皮肤相关信息
+        $data['template_name'] = $template['template_name'];
+        $data['template_id'] = $template['template_id'];
+        // 风格相关信息
+        $template_class = TemplateClass::where('class_id',$template['template_class_id'])->first();
+        if(empty($template_class)){
+            return Result::error('所属风格不存在!');
+        }
+        // $data['sector_keyword'] = json_encode($data['sector_keyword']);
+       $data['template_class_id'] = $template_class['class_id'];
+       $data['template_class_name'] = $template_class['name'];
         $result = Sector::where('id', $data['id'])->update($data);
         if ($result == 1) {
             return Result::success('修改成功');
@@ -1131,9 +1242,18 @@ class PublicRpcService implements PublicRpcServiceInterface
         if(empty($footer_category->toArray())){
             return Result::error('暂无底部导航数据!');
         }
+        $page_type = WebsiteTemplateInfo::where('website_id', $data['website_id'])->value('page_type');
+        $page_type = json_decode($page_type,true);
+        // '网站页面类型(存数组)1:首页 2:分类页 3:列表页 4:详情页 5:搜索页 6:特殊列表 7:特殊详情页
+        if(isset($page_type) && in_array(5,$page_type)){
+            $page_type = 1;
+        }else{
+            $page_type = 0;
+        }
         $result = [
             'friend_link' => $friend_link,
             'footer_category' => $footer_category,
+            'page_type' => $page_type,
         ];
         return Result::success($result);
     }
@@ -1144,6 +1264,7 @@ class PublicRpcService implements PublicRpcServiceInterface
      */
     public function addWebPageType(array $data): array
     {
+        // return Result::success($data);
         // 1:首页 2:频道页 3:列表页 4:详情页 5:搜索页 6:特殊列表 7:特殊详情页'
         if($data['is_search'] == 1){
             $page_type = json_encode([1,2,3,4,5,6,7]);
@@ -1151,7 +1272,19 @@ class PublicRpcService implements PublicRpcServiceInterface
             $page_type = json_encode([1,2,3,4,6,7]);
         }
         // 0:未构建;1:已填写基础信息;2:已选择模板;    action_id
-        $result = WebsiteTemplateInfo::where('website_id', $data['website_id'])->update(['page_type' => $page_type],['action_id' => 1]);
+        $website_template_info = WebsiteTemplateInfo::where('website_id', $data['website_id'])->first();
+        // return Result::success($website_template_info);
+        
+        // return Result::success(empty($website_template_info));
+        if(empty($website_template_info)){
+            $result = WebsiteTemplateInfo::insertGetId(['website_id' => $data['website_id'], 'page_type' => $page_type, 'user_id' => $data['user_id']]);
+                
+        }else{
+            if($website_template_info['action_id'] == 2){
+                return Result::error('网站已应用,不可再次修改!');
+            }
+            $result = WebsiteTemplateInfo::where('website_id', $data['website_id'])->update(['page_type' => $page_type],['action_id' => 1,'user_id' => $data['user_id']]);
+        }
         if ($result) {
             return Result::success($result);
         } else {
@@ -1216,6 +1349,12 @@ class PublicRpcService implements PublicRpcServiceInterface
             $result['template'] = Template::orderBy('updated_at','desc')
                 ->paginate($data['page_size'], ['*'], 'page', $data['page']);
         }
+        $template = WebsiteTemplateInfo::where('website_id', $data['website_id'])->value('template_id');
+        if($template){
+            $result['template_id'] = $template;
+        }else{
+            $result['template_id'] = 0;
+        }
         return Result::success($result);
     }
     /**
@@ -1246,7 +1385,7 @@ class PublicRpcService implements PublicRpcServiceInterface
         }
     }
     /**
-     * 自助建站---流程---5.选择组件
+     * 自助建站---流程---5.保存模版
      * @param array $data
      * @return array
      */
@@ -1263,9 +1402,13 @@ class PublicRpcService implements PublicRpcServiceInterface
         if($website_template_info['action_id'] != 2){
             return Result::error('请完成之前的步骤!');
         }
-        $template_info = WebsiteTemplateInfo::where('website_id', $data['website_id'])->first();
+        $template_info = WebsiteTemplate::where('website_id', $data['website_id'])->first();
+        var_dump($data['template_data']);
         if(empty($template_info)){
-            $template = WebsiteTemplate::insertGetId(['website_id' => $data['website_id'],'template_data' => $data['template_data']]);
+            $template = WebsiteTemplate::insertGetId([
+                'website_id' => $data['website_id'],
+                'template_data' => $data['template_data']
+            ]);
         }else{
             $template = WebsiteTemplate::where('website_id', $data['website_id'])->update(['template_data' => $data['template_data']]);
         }
@@ -1275,146 +1418,5 @@ class PublicRpcService implements PublicRpcServiceInterface
             return Result::success($template);
         }
     }
-    /**
-     * 企业管理
-     * @param array $data
-     * @return array
-     */
-    public function getCompanyList(array $data): array
-    {
-        $where = [];
-        $user = User::where('id', $data['user_id'])->first();
-        if(empty($user)){
-            return Result::error('用户不存在!');
-        }
-        if($user['type_id']!= 10000){
-            $where['user_id'] = $data['user_id'];
-        }
-        if(isset($data['title']) && $data['title']){
-            array_push($where, ['title', 'like', '%'. $data['title']. '%']);
-        }
-        if(isset($data['website_id']) && $data['website_id']){
-            $where['website_id'] = $data['website_id'];
-        }
-        // 状态:0:未审核 1:已审核 2:已拒绝
-        $pageSize = isset($data['pageSize']) ? (int)$data['pageSize'] : 10; // 默认每页 10 条记录
-        $page = isset($data['page']) ? (int)$data['page'] : 1; // 默认第 1 页
-        if(isset($data['ischeck']) && !empty($data['ischeck'])){
-            if($data['ischeck'] == 1){
-                $query =  Company::whereIn('status', [0,2]);
-            }else{
-                $query =  Company::where('status', 1);
-            }
-        }
-        $result = $query->where($where)->paginate($pageSize, ['*'], 'page', $page);
-        if(empty($result)){
-            return Result::error("暂无企业", 0);
-        }
-        return Result::success($result);
-    }
-    /**
-     * 添加企业
-     * @param array $data
-     * @return array
-     */
-    public function addCompany(array $data): array
-    {
-        $data['category_id'] = isset($data['cat_arr_id']) ? end($data['cat_arr_id']) : '';
-        $data['cat_arr_id'] = isset($data['cat_arr_id']) ? json_encode($data['cat_arr_id']) : '';
-        $user = User::where('id', $data['user_id'])->first();
-        if(empty($user)){
-            return Result::error('用户不存在!');
-        }
-        if($user['type_id']== 10000){
-            $data['status'] = 1;
-        }
-        $result = Company::insertGetId($data);
-        if ($result) {
-            return Result::success($result);
-        } else {
-            return Result::error('添加失败');
-        }
-    }
-    /**
-     * 更新企业
-     * @param array $data
-     * @return array
-     */
-    public function upCompany(array $data): array
-    {
-        $data['category_id'] = isset($data['cat_arr_id']) ? end($data['cat_arr_id']) : '';
-        $data['cat_arr_id'] = isset($data['cat_arr_id']) ? json_encode($data['cat_arr_id']) : '';
-        $user = User::where('id', $data['user_id'])->first();
-        if(empty($user)){
-            return Result::error('用户不存在!');
-        }
-        if($user['type_id']== 10000){
-            $data['status'] = 1;
-        }else{
-            $data['status'] = 0;
-        }
-        $result = Company::where('id', $data['id'])->update($data);
-        if ($result) {
-            return Result::success($result);
-        } else {
-            return Result::error('修改失败');
-        }
-    }
-    /**
-     * 删除企业
-     * @param array $data
-     * @return array
-     */
-    public function delCompany(array $data): array
-    {
-        $result = Company::where('id', $data['id'])->delete();
-        if ($result) {
-            return Result::success($result);
-        } else {
-            return Result::error('删除失败');
-        }
-    }
-    /**
-     * 审核企业
-     * @param array $data
-     * @return array
-     */
-    public function checkCompany(array $data): array
-    {
-        $user = User::where('id', $data['user_id'])->first();
-        if(empty($user)){
-            return Result::error('用户不存在!');
-        }
-        if($user['type_id'] != 10000){
-            return Result::error('用户权限不足!');
-        }
-        $company = Company::where('id', $data['id'])->first();
-        if(empty($company)){
-            return Result::error('企业不存在!');
-        }
-        // 状态:0:未审核 1:已审核 2:已拒绝
-        if($company['status'] == 0){
-            switch ($data['status']) {
-                case 0:
-                    return Result::error('请选择审核状态!');
-                    break;
-                case 1:
-                    $result = Company::where('id', $data['id'])->update(['status' => $data['status']]);
-                    break;
-                case 2:
-                    $result = Company::where('id', $data['id'])->update(['status' => $data['status'],'reject_reason'=> $data['reject_reason']]);
-                    break;
-                default:
-                    return Result::error('请选择审核状态!');
-                    break;
-            }
-        }else{
-            return Result::error('企业已审核!');
-        }
-        if(empty($result)){
-            return Result::error('审核失败!');
-        }else{
-            return Result::success($result);
-        } 
-    }
+    
 }

+ 1 - 7
app/JsonRpc/PublicRpcServiceInterface.php

@@ -181,11 +181,5 @@ interface PublicRpcServiceInterface
 
     public function chooseWebsiteTemplate(array $data): array;
     public function saveWebsiteTemplate(array $data): array;
-    
-    // --------------企业管理-----------
-    public function getCompanyList(array $data): array;
-    public function addCompany(array $data): array;
-    public function upCompany(array $data): array;
-    public function delCompany(array $data): array;
-    public function checkCompany(array $data): array;
+    public function getAllTemplate(array $data): array;
 }

+ 25 - 59
app/JsonRpc/WebsiteService.php

@@ -1688,11 +1688,11 @@ class WebsiteService implements WebsiteServiceInterface
     }
 
     /**
-     * 添加网站基础信息
+     * 自助建站-验证搭建网站
      * @param array $data
      * @return array
      */
-    public function addWebsiteTemplateintel(array $data): array
+    public function checkWebsiteBuild(array $data): array
     {
         $website = Website::where('website.id', $data['website_id'])->first();
         if (empty($website)) {
@@ -1705,10 +1705,16 @@ class WebsiteService implements WebsiteServiceInterface
         $foot_type = FooterCategory::where('website_id', $data['website_id'])->pluck('type')->toArray();
         if (empty($foot_type)) {
             return Result::error("请先关联底部导航池!", 0);
-        } elseif (in_array(1, $foot_type)) {
-            $foot_type = 1;
-        } else {
-            $foot_type = 0;
+        }
+        if (!in_array(1, $foot_type) ) {
+            $missingTypes[] = "列表型底部导航";
+        } 
+        if (!in_array(0, $foot_type) ) {
+            $missingTypes[] = "内容型底部导航";
+        } 
+        if (!empty($missingTypes)) {
+            $errorMessage = "请先添加" . implode(" 和 ", $missingTypes) . "!";
+            return Result::error($errorMessage, 0);
         }
         $result['foot_type'] = $foot_type;
         //  友情链接类型'1:图片 2:文字 3:底部';
@@ -1727,70 +1733,30 @@ class WebsiteService implements WebsiteServiceInterface
             $errorMessage = "请先添加 " . implode(" 和 ", $missingTypes) . "!";
             return Result::error($errorMessage, 0);
         }
-        if (isset($data['page_type'])) {
-            // 删除重复元素并重新索引数组
-            $data['page_type'] = array_unique($data['page_type']);
-            $data['page_type'] = array_values($data['page_type']);
-            // 1:首页 2:分类页 3:列表页 4:详情页 5:搜索页 6:特殊列表 7:特殊详情页
-            if (in_array(1, $data['page_type']) && in_array(7, $data['page_type'])) {
-                // 数组中同时包含值为 1(首页) 和值为 7 (底部导航详情页)的元素
-                $info = WebsiteTemplateInfo::where('website_id', $data['website_id'])->first();
-                if (empty($info)) {
-                    // 将数组转换为 JSON 字符串
-                    $data['page_type'] = json_encode($data['page_type']) ?? '';
-                    // 操作状态:1:填写完成基础信息;2:选择完成模板;0:未构建
-                    $data['action_id'] = 1;
-                    try {
-                        $result = WebsiteTemplateInfo::insertGetId($data);
-                    } catch (\Exception $e) {
-                        if ($e->getCode() == 22001) {
-                            $errorMessage = $e->getMessage();
-                            return Result::error("请检查表单,某个字段超出了长度限制!");
-                        } else {
-                            // 处理其他类型的数据库错误
-                            return Result::error("插入操作失败: " . $e->getMessage());
-                        }
-                        return Result::error("添加失败!", 0);
-                    }
-                } else {
-                    return Result::error("该网站已经构建过了!", 0);
-                }
-            } else {
-                return Result::error("请先选择首页和底部导航详情页!", 0);
-            }
-        }
-        if (empty($result)) {
-            return Result::error("添加失败!", 0);
-        } else {
-            return Result::success($result);
-        }
+        return Result::success($result);
     }
     /**
-     * 获取网站基础信息
+     * 自助建站-验证编辑网站
      * @return array
      * 
      */
-    public function getWebsiteTemplateintel(array $data): array
+    public function checkWebsiteEdit(array $data): array
     {
 
-        $result = WebsiteTemplateInfo::where('website_template_info.website_id', $data['website_id'])
-            ->leftJoin('footer_category', 'footer_category.website_id', 'website_template_info.website_id')
-            ->leftJoin('website', 'website.id', 'website_template_info.website_id')
-            ->select(
-                "website_template_info.*",
-                "footer_category.type",
-                "website.website_name",
-                "website.id as website_id"
-            )
-            ->first();
-        if (empty($result['website_name'])) {
+        $result = WebsiteTemplateInfo::where('website_template_info.website_id', $data['website_id'])->first();
+        if (empty($result)) {
             return Result::error("请输入正确的网站id!", 0);
         }
-        if ($result) {
+        // 订单状态:1:通过;2:驳回;3:撤回;4:修改;5:过期;6:待审核;7:结束
+        $order = Order::where('website_id', $data['website_id'])->where('status', 1)->first();
+        if(!empty($order)){
+            return Result::error("此网站的广告位正在使用中,暂不可编辑!", 0);
+        }
+        if ($result['page_type']) {
             $result['page_type'] = json_decode($result['page_type'], true);
-            return Result::success($result);
+            return Result::success('网站编辑验证通过!');
         } else {
-            return Result::error("请先添加网站基础信息!", 0);
+            return Result::error("请先选择网站页面类型!", 0);
         }
     }
     /**

+ 2 - 2
app/JsonRpc/WebsiteServiceInterface.php

@@ -114,8 +114,8 @@ interface WebsiteServiceInterface
 
     // --自助建站-----------fr----------------------start
     public function getWebsiteintel(array $data): array;
-    public function addWebsiteTemplateintel(array $data): array;
-    public function getWebsiteTemplateintel(array $data): array;
+    public function checkWebsiteBuild(array $data): array;
+    public function checkWebsiteEdit(array $data): array;
     public function upWebsiteTemplateintel(array $data): array;
     public function getAllTemplateClass(array $data): array;
     public function getWebsiteTemplateList(array $data): array;

+ 0 - 27
app/Model/Company.php

@@ -1,27 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace App\Model;
-
-use Hyperf\DbConnection\Model\Model;
-
-/**
- */
-class Company extends Model
-{
-    /**
-     * The table associated with the model.
-     */
-    protected ?string $table = 'company';
-
-    /**
-     * The attributes that are mass assignable.
-     */
-    protected array $guarded = [];
-
-    /**
-     * The attributes that should be cast to native types.
-     */
-    protected array $casts = [];
-}