Commit 31c26cbc by 冷斌

fix bug

parent af0ff581
...@@ -2212,8 +2212,7 @@ class Api_User extends PhalApi_Api ...@@ -2212,8 +2212,7 @@ class Api_User extends PhalApi_Api
protected function _getPayImage($uid) protected function _getPayImage($uid)
{ {
$users_auth_pay = DI()->notorm->users_auth_pay; return DI()->notorm->users_auth_pay->where("uid={$uid}")->fetchOne();
return $users_auth_pay->where("uid={$uid}")->fetchOne();
} }
public function getPayImage() public function getPayImage()
...@@ -2252,7 +2251,21 @@ class Api_User extends PhalApi_Api ...@@ -2252,7 +2251,21 @@ class Api_User extends PhalApi_Api
$rs['msg'] = '您的登陆状态失效,请重新登陆!'; $rs['msg'] = '您的登陆状态失效,请重新登陆!';
return $rs; return $rs;
} }
if ($this->_getPayImage($uid)) {
DI()->notorm->users_auth_pay->insert([
'uid' => $uid,
'reason' => '',
'addtime' => time(),
'status' => 0,
'alipay_pay' => $this->alipay_pay,
'wx_pay' => $this->wx_pay,
]);
} else {
DI()->notorm->users_auth_pay->where("uid={$uid}")->update([
'alipay_pay' => $this->alipay_pay,
'wx_pay' => $this->wx_pay,
]);
}
$rs['info'] = []; $rs['info'] = [];
return $rs; return $rs;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment