...
|
...
|
@@ -70,15 +70,21 @@ class Store extends Backend |
|
|
$row->getRelation('user')->visible(['username']);
|
|
|
}
|
|
|
$list = collection($list)->toArray();
|
|
|
foreach ($list as &$v){
|
|
|
foreach ($list as $key =>$v){
|
|
|
//判断vip类型
|
|
|
$viptype = 1;
|
|
|
if($v['svip_passtime'] > time()){
|
|
|
$viptype = 2;
|
|
|
}
|
|
|
$list[$key]['viptype'] = $viptype;
|
|
|
$province_ids = [];
|
|
|
$user_province = Db::name('user_province')->where(['expiration_time'=>['gt',time()],'user_id'=>$v['user_id']])->select();
|
|
|
foreach($user_province as $key => $u_p){
|
|
|
foreach($user_province as $key2 => $u_p){
|
|
|
$province_ids[] = $u_p['province_id'];
|
|
|
}
|
|
|
$v['province_ids'] = Db::name('province')->whereIn('id',$province_ids)->column('name');
|
|
|
if($v['viptype'] == 2){
|
|
|
$v['province_ids'] = '全部';
|
|
|
$list[$key]['province_ids'] = Db::name('province')->whereIn('id',$province_ids)->column('name');
|
|
|
if($viptype == 2){
|
|
|
$list[$key]['province_ids'] = '全部';
|
|
|
}
|
|
|
}
|
|
|
$result = array("total" => $total, "rows" => $list);
|
...
|
...
|
|