| | |
| | | public function getDetail($data, $user) |
| | | { |
| | | $detail = $this->alias('s')->where(['shop_supplier_id' => $data['shop_supplier_id']]) |
| | | ->field("name as store_name,shop_supplier_id,logo_id,category_id,server_score,fav_count,user_id,product_sales,address,notice") |
| | | ->field("name as store_name,shop_supplier_id,logo_id,category_id,server_score,fav_count,user_id,product_sales,address,notice,description") |
| | | ->with(['logo', 'category']) |
| | | ->find(); |
| | | if ($detail) { |
| | |
| | | ->where('s.is_delete', '=', '0') |
| | | ->where('s.is_recycle', '=', 0) |
| | | //->where('s.is_full', '=', 1) |
| | | ->field("s.shop_supplier_id,s.name,s.fav_count,logo_id,category_id,server_score,product_sales,address,link_phone") |
| | | ->field("s.shop_supplier_id,s.name,s.fav_count,logo_id,category_id,server_score,product_sales,address,link_phone,longitude,latitude") |
| | | ->order($sort) |
| | | ->paginate($param); |
| | | $product_model = new ProductModel(); |
| | |
| | | $v['productList'] = $productList; |
| | | $v['logos'] = isset($v['logo'])?$v['logo']['file_path']:''; |
| | | $v['category_name'] = $v['category']['name']; |
| | | $v['latitude'] = (float)$v['latitude']; |
| | | $v['longitude'] = (float)$v['longitude']; |
| | | unset($v['logo']); |
| | | unset($v['category']); |
| | | } |