lqmac 1 year ago
parent 6b906b1b1f
commit 28ee20a475
  1. 13
      application/api/controller/User.php

@ -271,12 +271,15 @@ class User extends Api
if (isset($params['avatar']) && $params['avatar']) { if (isset($params['avatar']) && $params['avatar']) {
$upData['avatar'] = $params['avatar']; $upData['avatar'] = $params['avatar'];
} }
if (isset($params['bank_realname']) || $params['wechat_image'] || $params['alipay_image']) { if ((isset($params['bank_realname']) && $params['bank_realname'] ) || (isset($params['wechat_image']) && $params['wechat_image']) || (isset($params['alipay_image']) && $params['alipay_image'])) {
$user = $this->auth->getUserinfo(); if (isset($params['code']) && $params['code']) {
$ret = Sms::check($user['mobile'], $params['code'], 'notice'); $user = $this->auth->getUserinfo();
if (!$ret) { $ret = Sms::check($user['mobile'], $params['code'], 'notice');
$this->error(__('Captcha is incorrect')); if (!$ret) {
$this->error(__('Captcha is incorrect'));
}
} }
} }
if (!$upData) { if (!$upData) {
$this->success(); $this->success();

Loading…
Cancel
Save