...
|
...
|
@@ -145,8 +145,8 @@ class User extends Api |
|
|
$total_money = bcadd($total_money,$v['money'],2);
|
|
|
}
|
|
|
}
|
|
|
$store = \app\api\model\Store::where('user_id',$this->auth->id)->order('id','DESC')->value('status');
|
|
|
if($store == 3) {
|
|
|
$store = \app\api\model\Store::where('user_id',$this->auth->id)->order('id','DESC')->find();
|
|
|
if($store && $store['status'] == 3) {
|
|
|
$where_house = [
|
|
|
'user_id' => $this->auth->id,
|
|
|
'store_id' => $store['id'],
|
...
|
...
|
@@ -154,12 +154,11 @@ class User extends Api |
|
|
// 'end_time' => ['>',time()]
|
|
|
];
|
|
|
$store_house = Db::name('store_house')->where($where_house)->count();
|
|
|
$this->success('成功', $where_house);
|
|
|
if(!$store_house) {
|
|
|
$store_house = 2;
|
|
|
}
|
|
|
} else {
|
|
|
$store_house = $store ? $store : 0;
|
|
|
$store_house = $store ? $store['status'] : 0;
|
|
|
}
|
|
|
$data = [
|
|
|
// 当前小区信息
|
...
|
...
|
@@ -173,8 +172,7 @@ class User extends Api |
|
|
->where('is_read_user',2)
|
|
|
->count(),
|
|
|
// 是否入驻店铺
|
|
|
'is_store' => $store_house,
|
|
|
'sql' => Db::name('store_house')->getLastSql()
|
|
|
'is_store' => $store_house
|
|
|
];
|
|
|
$user = $user->visible([
|
|
|
'id',
|
...
|
...
|
|