Merge branch 'dev' of https://gitea.lihaink.cn/mkm/multi-store into dev
This commit is contained in:
commit
b46af51480
@ -192,8 +192,21 @@ class OrderLogic extends BaseLogic
|
|||||||
$store['near_store'] = $nearestStore;
|
$store['near_store'] = $nearestStore;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$store_id = getenv('STORE_ID') ?? 1;
|
if(empty($user)){
|
||||||
$store['near_store'] =SystemStore::where('id', $store_id)->field('id,name,phone,address,detailed_address,latitude,longitude')->find()??[];
|
$store_id = getenv('STORE_ID') ?? 1;
|
||||||
|
$store['near_store'] =SystemStore::where('id', $store_id)->field('id,name,phone,address,detailed_address,latitude,longitude')->find()??[];
|
||||||
|
}else{
|
||||||
|
$checkOrderStore = StoreOrder::where('uid',$user['id'])->field('id,store_id')
|
||||||
|
->order('id','desc')->find();
|
||||||
|
if($checkOrderStore){
|
||||||
|
$store['near_store'] =SystemStore::where('id', $checkOrderStore['store_id'])->field('id,name,phone,address,detailed_address,latitude,longitude')->find()??[];
|
||||||
|
}else{
|
||||||
|
$store_id = getenv('STORE_ID') ?? 1;
|
||||||
|
$store['near_store'] =SystemStore::where('id', $store_id)->field('id,name,phone,address,detailed_address,latitude,longitude')->find()??[];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
self::setError($e->getMessage());
|
self::setError($e->getMessage());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user