1.新增了本地生活我的订单
2.修改了我的本地生活商家判断
This commit is contained in:
parent
862efe6348
commit
04c2f47c8d
@ -37,7 +37,7 @@ class LocalStoreLogic extends Logic
|
||||
// var_dump($sql);
|
||||
$lists = Db::query($sql);
|
||||
foreach($lists as $key=>$value){
|
||||
$lists[$key]['distance'] = round($this->distance($data['latitude'], $data['longitude'], $value['latitude'], $value['longitude'])/1000,1)."公里";
|
||||
$lists[$key]['distance'] = round($this->distance($data['latitude'], $data['longitude'], $value['latitude'], $value['longitude'])/1000,2)."公里";
|
||||
$lists[$key]['store_nickname'] = $value["shopName"];
|
||||
}
|
||||
$data = [
|
||||
|
||||
@ -101,8 +101,8 @@ class UserLogic extends Logic
|
||||
// 获取集采信息
|
||||
$procurement = Mprocurement::where(['user_id' => $user_id, 'u_examine_state' => 1, 'u_state' => 1])->find();
|
||||
// 查询是否建立本地商家
|
||||
$local = Db::name("local_store")->where("user_id",$user_id)->where("is_delete",0)->where("state",1)->select()->toArray();
|
||||
if(empty($local)){
|
||||
$local = Db::name("local_store")->where("user_id",$user_id)->where("is_delete",0)->where("store_state",1)->find();
|
||||
if($local == null){
|
||||
$user['local'] = 0;
|
||||
}else{
|
||||
$user['local'] = 1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user