修复错误5

This commit is contained in:
mkm 2023-04-20 14:20:09 +08:00
parent 51abdcb80b
commit d0ee2cd178
2 changed files with 4 additions and 1 deletions

View File

@ -124,6 +124,7 @@ class MerchantIntentionRepository extends BaseRepository
'category_id' => $intention['merchant_category_id'],
'type_id' => $intention['mer_type_id'],
'real_name' => $intention['name'],
'uid'=>$intention['uid'],
'status' => 1,
'is_audit' => 1,
'is_bro_room' => $config['broadcast_room_type'] == 1 ? 0 : 1,

View File

@ -174,14 +174,16 @@ class Auth extends BaseController
$data['merchant_login'] = $this->request->domain().'/merchant';
$data['is_wsxx'] = 0;
$data['mer_info']=[];
// 判断是否是商户,并且有没有完善信息
//这里有点小问题以后要修改
$store_service=Db::name('store_service')->where('uid',$data['uid'])->find();
if ($store_service){
$mer_arr = Db::name('merchant')->where('mer_id',$store_service['mer_id'])->where('is_del',0)->where('status',1)->field('mer_avatar,mer_banner,mer_info,service_phone,mer_address')->find();
$mer_arr = Db::name('merchant')->where('mer_id',$store_service['mer_id'])->where('is_del',0)->where('status',1)->field('type_id,mer_avatar,mer_banner,mer_info,service_phone,mer_address,uid,mer_name')->find();
if($mer_arr && $mer_arr['mer_avatar']!=''&& $mer_arr['mer_banner'] !='' && $mer_arr['mer_info'] && $mer_arr['service_phone']!=''&& $mer_arr['mer_address']!=''){
$data['is_wsxx'] = 1;
}
$data['mer_info']=$mer_arr;
}
return app('json')->success($data);