|
@@ -391,8 +391,9 @@ class User extends Base
|
|
|
if($valid->check($param)==false) $this->error($valid->getError());
|
|
|
$acc = $this->model->withJoin(['userinfo','accountitem'],'left')->findOrEmpty($param['id']);
|
|
|
if($acc->isEmpty())$this->error("账户信息不存在",1004);
|
|
|
+ if($acc->userinfo->openId!='')$this->error("账户信息已绑定微信请先解除",1004);
|
|
|
if(substr($acc->mobile,-4,4)!=$param['lastCode'])$this->error('手机后四位不正确!',1004);
|
|
|
- if($param['openId']==''&& $acc->userinfo->openId!=$param['openId'] ){
|
|
|
+ if($param['openId']!==''&& $acc->userinfo->openId!=$param['openId'] ){
|
|
|
$acc->userinfo->openId=$param['openId'];
|
|
|
$this->model->userinfo()->save($acc->userinfo->toArray());
|
|
|
}
|