|
|
@ -18,6 +18,7 @@ use app\api\model\GoodsSku as GoodsSkuModel; |
|
|
|
use app\api\model\Category as CategoryModel; |
|
|
|
use app\api\model\Category as CategoryModel; |
|
|
|
use app\api\service\User as UserService; |
|
|
|
use app\api\service\User as UserService; |
|
|
|
use app\common\model\store\Shop as ShopModel; |
|
|
|
use app\common\model\store\Shop as ShopModel; |
|
|
|
|
|
|
|
use app\common\model\goods\GoodsHotWord; |
|
|
|
use app\api\service\sharp\Active as ActiveService; |
|
|
|
use app\api\service\sharp\Active as ActiveService; |
|
|
|
use app\common\enum\Setting as SettingEnum; |
|
|
|
use app\common\enum\Setting as SettingEnum; |
|
|
|
use app\common\service\Goods as GoodsService; |
|
|
|
use app\common\service\Goods as GoodsService; |
|
|
@ -203,29 +204,38 @@ class Goods extends GoodsService |
|
|
|
public function cityInfo($storeid): array |
|
|
|
public function cityInfo($storeid): array |
|
|
|
{ |
|
|
|
{ |
|
|
|
$model = new ShopModel; |
|
|
|
$model = new ShopModel; |
|
|
|
$info = $model->where([ |
|
|
|
$info = $model->with(['wechatImage'])->where([ |
|
|
|
'is_delete' => 0, |
|
|
|
'is_delete' => 0, |
|
|
|
'status' => 1, |
|
|
|
'status' => 1, |
|
|
|
'store_id' => $storeid, |
|
|
|
'store_id' => $storeid, |
|
|
|
'is_main' => 1, |
|
|
|
'is_main' => 1, |
|
|
|
])->field('shop_name,star,shop_hours,summary,phone, |
|
|
|
])->field('shop_name,star,shop_hours,summary,phone, |
|
|
|
province_id,city_id,region_id,shop_id,address,latitude,longitude')->find()->toArray(); |
|
|
|
province_id,city_id,region_id,shop_id,address,latitude,longitude,wechat_img_id,history1,history2,history3,remark')->find()->toArray(); |
|
|
|
//todo wmc |
|
|
|
//todo wmc |
|
|
|
$info['remark'] = ['手机选购', '电脑选购']; |
|
|
|
$info['remark'] = json_decode($info['remark']); |
|
|
|
$info['star'] = 5; |
|
|
|
|
|
|
|
$info['fuwu_hours'] = 5; |
|
|
|
$info['fuwu_hours'] = 5; |
|
|
|
$info['fuwu_num'] = 15; |
|
|
|
$info['fuwu_num'] = 15; |
|
|
|
$info['star'] = 5; |
|
|
|
// $info['wechat'] = 'https://www.saas.njrenzhou.com/uploads/10001/20240127/12bb1b1747e652d258443247a5c4777c.png'; |
|
|
|
$info['wechat'] = 'https://www.saas.njrenzhou.com/uploads/10001/20240127/12bb1b1747e652d258443247a5c4777c.png'; |
|
|
|
$history = []; |
|
|
|
$info['history'] = ['time' => '2022-01-01', 'contenmt' => 'yml与2000年成立']; |
|
|
|
if (!empty($info['history1'])) { |
|
|
|
$info['evaluate'] = [ |
|
|
|
$history[] = json_decode($info['history1'], true); |
|
|
|
'image' => 'https://www.saas.njrenzhou.com/uploads/10001/20240116/18adc22ad9ea021ab2586878fe1035b0.png', |
|
|
|
} |
|
|
|
|
|
|
|
if (!empty($info['history2'])) { |
|
|
|
|
|
|
|
$history[] = json_decode($info['history2'], true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!empty($info['history3'])) { |
|
|
|
|
|
|
|
$history[] = json_decode($info['history3'], true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$info['history'] = $history; |
|
|
|
|
|
|
|
// $info['history'] = ['time' => '2023-01-01', 'contenmt' => 'yml上市']; |
|
|
|
|
|
|
|
$info['evaluate'][] = [ |
|
|
|
|
|
|
|
'image' => 'http://qiniu.shop.royaum.com.cn/10001/20240201/13f2e675794e25176352fc039dfb6dcb.jpg', |
|
|
|
'nickname' => 'wmc', |
|
|
|
'nickname' => 'wmc', |
|
|
|
'content' => '很好', |
|
|
|
'content' => '很好', |
|
|
|
]; |
|
|
|
]; |
|
|
|
$info['imageList'] = [ |
|
|
|
$info['imageList'] = [ |
|
|
|
'https://www.saas.njrenzhou.com/uploads/10001/20240116/18adc22ad9ea021ab2586878fe1035b0.png', |
|
|
|
'http://qiniu.shop.royaum.com.cn/10001/20240201/13f2e675794e25176352fc039dfb6dcb.jpg', |
|
|
|
'https://www.saas.njrenzhou.com/uploads/10001/20240116/18adc22ad9ea021ab2586878fe1035b0.png' |
|
|
|
'http://qiniu.shop.royaum.com.cn/10001/20240201/13f2e675794e25176352fc039dfb6dcb.jpg' |
|
|
|
|
|
|
|
|
|
|
|
]; |
|
|
|
]; |
|
|
|
//读取门店停车场 |
|
|
|
//读取门店停车场 |
|
|
@ -238,6 +248,16 @@ class Goods extends GoodsService |
|
|
|
return $info; |
|
|
|
return $info; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function hotWord($page): array |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if(empty($page) || $page == 1){ |
|
|
|
|
|
|
|
$offset = 0; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
$offset = $page * 5; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return GoodsHotWord::order('sort desc')->limit($offset,5)->select()->toArray(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// //抢购会场列表 |
|
|
|
// //抢购会场列表 |
|
|
|
// public function panicList() |
|
|
|
// public function panicList() |
|
|
|
// { |
|
|
|
// { |
|
|
|