diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index 9aac3b8c..fccaca7d 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -311,14 +311,14 @@ class MerchantIntention extends BaseController public function changeIdentity() { $data = $this->request->params([ - 'type', + 'type','mer_id' ]); if(empty($data['type'])){ return app('json')->fail('参数缺失请检查'); } - if ($this->userInfo) $data['uid'] = $this->userInfo->uid; - $merchantInfo = Merchant::getDB()->where('uid',$this->userInfo->uid)->find(); + $merchantInfo = Merchant::getDB()->where('mer_id',$data['mer_id'])->find(); if(empty($merchantInfo)) return app('json')->fail('没有该商户'); + $data['uid'] = $merchantInfo->uid; $data['phone'] = $merchantInfo->mer_phone; $data['mer_name'] = $merchantInfo->mer_name; $data['name'] = $merchantInfo->real_name;