作者 jinglong
1 个管道 的构建 通过 耗费 1 秒

修改大牌专区15条

@@ -120,7 +120,7 @@ class Cars extends Api @@ -120,7 +120,7 @@ class Cars extends Api
120 ->alias('c') 120 ->alias('c')
121 ->join('goods g','c.g_id = g.id','LEFT') 121 ->join('goods g','c.g_id = g.id','LEFT')
122 ->where(['c.uid'=>$this->uid]) 122 ->where(['c.uid'=>$this->uid])
123 - ->field('c.id,c.g_id goods_id,c.style,c.price,c.goods_number,c.style,g.name,g.image,g.stock,g.introduce') 123 + ->field('c.id,c.g_id goods_id,c.price,c.goods_number,c.style,g.name,g.image,g.stock,g.introduce')
124 ->useSoftDelete('g.deletetime') 124 ->useSoftDelete('g.deletetime')
125 ->select(); 125 ->select();
126 $total_price = 0; 126 $total_price = 0;
@@ -195,8 +195,7 @@ class Common @@ -195,8 +195,7 @@ class Common
195 * 查找多条数据(软删除,无条件,限制条数) 195 * 查找多条数据(软删除,无条件,限制条数)
196 * @ApiInternal 196 * @ApiInternal
197 */ 197 */
198 - public static function selectSoftLimitData($table,$field,$order='id desc'){  
199 - $limit = config('verify.limit'); 198 + public static function selectSoftLimitData($table,$field,$limit,$order='id desc'){
200 $res = Db::name($table) 199 $res = Db::name($table)
201 ->field($field) 200 ->field($field)
202 ->limit($limit) 201 ->limit($limit)
@@ -119,14 +119,16 @@ class Index extends Api @@ -119,14 +119,16 @@ class Index extends Api
119 $arr['res_design'] = $res_design; 119 $arr['res_design'] = $res_design;
120 120
121 //用户晒单 121 //用户晒单
122 - $res_u_list = Common::selectSoftLimitData('ulist','id,images,title,nickname,address'); 122 + $limit = config('verify.limit');
  123 + $res_u_list = Common::selectSoftLimitData('ulist','id,images,title,nickname,address',$limit);
123 foreach ($res_u_list as &$u_value){ 124 foreach ($res_u_list as &$u_value){
124 $u_value['images'] = $this->auth->absolutionUrl($u_value['images']); 125 $u_value['images'] = $this->auth->absolutionUrl($u_value['images']);
125 } 126 }
126 $arr['res_u_list'] = $res_u_list; 127 $arr['res_u_list'] = $res_u_list;
127 128
128 //大牌专区 129 //大牌专区
129 - $res_b_type = Common::selectSoftLimitData('btype','id,image,name,address,introduce'); 130 + $brand_limit = config('verify.brand_limit');
  131 + $res_b_type = Common::selectSoftLimitData('btype','id,image,name,address,introduce',$brand_limit);
130 foreach ($res_b_type as &$t_value){ 132 foreach ($res_b_type as &$t_value){
131 $t_value['image'] = $this->auth->absolutionUrlOne($t_value['image']); 133 $t_value['image'] = $this->auth->absolutionUrlOne($t_value['image']);
132 } 134 }
@@ -37,6 +37,8 @@ return [ @@ -37,6 +37,8 @@ return [
37 'limit' => 10, 37 'limit' => 10,
38 //商品分页 38 //商品分页
39 'goods_limit' => 20, 39 'goods_limit' => 20,
  40 + //大牌专区
  41 + 'brand_limit' => 15,
40 //小程序登录 42 //小程序登录
41 'user' => [ 43 'user' => [
42 'rule' => [ 44 'rule' => [