yingzi 2 سال پیش
والد
کامیت
bf8c2ce39d
2فایلهای تغییر یافته به همراه6 افزوده شده و 6 حذف شده
  1. 1 1
      app/api/controller/Pub.php
  2. 5 5
      app/system/controller/ServiceLabel.php

+ 1 - 1
app/api/controller/Pub.php

@@ -210,7 +210,7 @@ class Pub extends BaseController
         $data=null;
         if($totalCount>0){
             $data = (new ServiceLabel)
-                ->field("id,title,content,img")
+                ->field("id,title,type")
                 ->where($where)
                 ->order("seq", "desc")
                 ->page($post["page"], $post["pageSize"])

+ 5 - 5
app/system/controller/ServiceLabel.php

@@ -1,6 +1,6 @@
 <?php
 declare (strict_types = 1);
-namespace app\system\controller\v1;
+titlespace app\system\controller\v1;
 
 use app\BaseController;
 use app\model\api\ServiceLabel as LabelModel;
@@ -28,15 +28,15 @@ class ServiceLabel extends  BaseController{
         $pageSize = 50;
         $post =  UtilService::getMore([
                 ['page',1],
-                ['name',''],
+                ['title',''],
                 ['status',''],
         ],$request);
         $where=[];
         if(in_array((string)$post["status"],['0','1'])){
             $where[]=["status","=",(int)$post["status"]];
         }
-        if(!empty($post["name"])){
-            $where[]=["name","like","%{$post["name"]}%"];
+        if(!empty($post["title"])){
+            $where[]=["title","like","%{$post["title"]}%"];
         }
         $data = (new LabelModel)
                 ->where($where)
@@ -61,7 +61,7 @@ class ServiceLabel extends  BaseController{
     public function add(Request $request){
         $post = UtilService::getMore([
             ['id','0'],
-            ['name','','empty','请输入标签名称'],
+            ['title','','empty','请输入标签名称'],
             ['seq','0'],
             ['type','common'],
             ['status','1']