配置修改
This commit is contained in:
@ -169,7 +169,7 @@ class ShopLogic extends Logic
|
|||||||
['status', '=', GoodsEnum::STATUS_SHELVES], // 上架中
|
['status', '=', GoodsEnum::STATUS_SHELVES], // 上架中
|
||||||
['audit_status', '=', GoodsEnum::AUDIT_STATUS_OK], // 审核通过
|
['audit_status', '=', GoodsEnum::AUDIT_STATUS_OK], // 审核通过
|
||||||
];
|
];
|
||||||
$shop['on_sale_count'] = Goods::where($onSaleWhere)->where('shop_id', $shopId)->count();
|
$shop['on_sale_count'] = Goods::where($onSaleWhere)->where('shop_id', $shop['id'])->count();
|
||||||
|
|
||||||
// 店铺推荐商品
|
// 店铺推荐商品
|
||||||
$shop['goods_list'] = Goods::field('id,image,name,min_price,market_price')
|
$shop['goods_list'] = Goods::field('id,image,name,min_price,market_price')
|
||||||
@ -185,20 +185,20 @@ class ShopLogic extends Logic
|
|||||||
// 用户是否关注店铺
|
// 用户是否关注店铺
|
||||||
$shop['shop_follow_status'] = 0;
|
$shop['shop_follow_status'] = 0;
|
||||||
if($userId) { // 用户已登录
|
if($userId) { // 用户已登录
|
||||||
$shopFollow = ShopFollow::where(['user_id'=>$userId, 'shop_id'=>$shopId])->findOrEmpty();
|
$shopFollow = ShopFollow::where(['user_id'=>$userId, 'shop_id'=>$shop['id']])->findOrEmpty();
|
||||||
if(!$shopFollow->isEmpty()) {
|
if(!$shopFollow->isEmpty()) {
|
||||||
$shop['shop_follow_status'] = $shopFollow['status'];
|
$shop['shop_follow_status'] = $shopFollow['status'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$shop['follow_num'] = ShopFollow::where(['shop_id' => $shopId,'status' => 1])->count('id');
|
$shop['follow_num'] = ShopFollow::where(['shop_id' => $shop['id'],'status' => 1])->count('id');
|
||||||
$image = ConfigServer::get('shop_customer_service', 'image', '', $shopId);
|
$image = ConfigServer::get('shop_customer_service', 'image', '', $shop['id']);
|
||||||
$shop['customer_image'] = $image ? UrlServer::getFileUrl($image) : '';
|
$shop['customer_image'] = $image ? UrlServer::getFileUrl($image) : '';
|
||||||
$shop['customer_wechat'] = ConfigServer::get('shop_customer_service', 'wechat', '', $shopId);
|
$shop['customer_wechat'] = ConfigServer::get('shop_customer_service', 'wechat', '', $shop['id']);
|
||||||
$shop['customer_phone'] = ConfigServer::get('shop_customer_service', 'phone', '', $shopId);
|
$shop['customer_phone'] = ConfigServer::get('shop_customer_service', 'phone', '', $shop['id']);
|
||||||
|
|
||||||
// 店铺广告
|
// 店铺广告
|
||||||
$adWhere = [
|
$adWhere = [
|
||||||
[ 'shop_id', '=', $shopId ],
|
[ 'shop_id', '=', $shop['id'] ],
|
||||||
[ 'status', '=', 1 ],
|
[ 'status', '=', 1 ],
|
||||||
];
|
];
|
||||||
$shop['ad'] = [
|
$shop['ad'] = [
|
||||||
|
|||||||
Reference in New Issue
Block a user