wupengfei 2 years ago
parent
commit
ee86e39b62
2 changed files with 25 additions and 0 deletions
  1. 17 0
      application/api/controller/Expedite.php
  2. 8 0
      application/common/model/TopSearch.php

+ 17 - 0
application/api/controller/Expedite.php

@@ -6,6 +6,7 @@ use AlibabaCloud\Client\AlibabaCloud;
 use AlibabaCloud\Client\Exception\ClientException;
 use AlibabaCloud\Client\Exception\ServerException;
 use app\common\model\StoreBanner;
+use app\common\model\TopSearch;
 use app\common\model\UserLevel;
 use app\common\model\UserTrack;
 use Dm\Request\V20151123 as Dm;
@@ -68,6 +69,22 @@ class Expedite extends Base
 
 
     /**
+     * @title 获取热搜设置
+     * @desc  获取热搜设置
+     * @author  qc
+     * @url /api/Expedite/getTopSearch
+     * @method GET
+     * @return name:title type:string default:-- desc:标题
+     */
+    public function getTopSearch()
+    {
+        $list = TopSearch::field('id,title')->where(['status'=>1,'is_deleted'=>0])->order('sort desc,id desc')->select()->toArray();
+        $this->success('ok',['list'=>$list]);
+    }
+
+
+
+    /**
      * @title 发送短信验证码
      * @desc 发送短信验证码
      * @author qc

+ 8 - 0
application/common/model/TopSearch.php

@@ -0,0 +1,8 @@
+<?php
+namespace app\common\model;
+use think\Model;
+// 商品热搜
+class TopSearch extends Model
+{
+
+}