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

修改大牌专区15条

... ... @@ -120,7 +120,7 @@ class Cars extends Api
->alias('c')
->join('goods g','c.g_id = g.id','LEFT')
->where(['c.uid'=>$this->uid])
->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')
->field('c.id,c.g_id goods_id,c.price,c.goods_number,c.style,g.name,g.image,g.stock,g.introduce')
->useSoftDelete('g.deletetime')
->select();
$total_price = 0;
... ...
... ... @@ -195,8 +195,7 @@ class Common
* 查找多条数据(软删除,无条件,限制条数)
* @ApiInternal
*/
public static function selectSoftLimitData($table,$field,$order='id desc'){
$limit = config('verify.limit');
public static function selectSoftLimitData($table,$field,$limit,$order='id desc'){
$res = Db::name($table)
->field($field)
->limit($limit)
... ...
... ... @@ -119,14 +119,16 @@ class Index extends Api
$arr['res_design'] = $res_design;
//用户晒单
$res_u_list = Common::selectSoftLimitData('ulist','id,images,title,nickname,address');
$limit = config('verify.limit');
$res_u_list = Common::selectSoftLimitData('ulist','id,images,title,nickname,address',$limit);
foreach ($res_u_list as &$u_value){
$u_value['images'] = $this->auth->absolutionUrl($u_value['images']);
}
$arr['res_u_list'] = $res_u_list;
//大牌专区
$res_b_type = Common::selectSoftLimitData('btype','id,image,name,address,introduce');
$brand_limit = config('verify.brand_limit');
$res_b_type = Common::selectSoftLimitData('btype','id,image,name,address,introduce',$brand_limit);
foreach ($res_b_type as &$t_value){
$t_value['image'] = $this->auth->absolutionUrlOne($t_value['image']);
}
... ...
... ... @@ -37,6 +37,8 @@ return [
'limit' => 10,
//商品分页
'goods_limit' => 20,
//大牌专区
'brand_limit' => 15,
//小程序登录
'user' => [
'rule' => [
... ...