正在显示
4 个修改的文件
包含
8 行增加
和
5 行删除
@@ -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 | } |
-
请 注册 或 登录 后发表评论