ztt 8 months ago
parent 81f81d4f52
commit e0a4c32a45
  1. 15
      addons/shopro/controller/user/WalletLog.php

@ -4,7 +4,9 @@ namespace addons\shopro\controller\user;
use addons\shopro\controller\Common;
use addons\shopro\service\Wallet as WalletService;
use app\admin\model\shopro\user\User as UserModel;
use app\admin\model\shopro\user\WalletLog as UserWalletLogModel;
use app\common\library\Sms;
use think\Db;
class WalletLog extends Common
@ -69,9 +71,16 @@ class WalletLog extends Common
$user = auth_user();
$user_id = $user->id;
$exchange_user = \app\common\model\User::get(['phone' => $params['exchange_phone']]);
if (!$exchange_user) {
$this->error('转让人不存在');
if (!Sms::check($params['exchange_phone'], $params['code'], 'mobilelogin')) {
$this->error(__('Captcha is incorrect'));
}
$exchange_user = UserModel::getByMobile($params['exchange_phone']);
if ($user) {
if ($user->status != 'normal') {
$this->error(__('Account is locked'));
}
}else {
$this->error('该手机号暂未注册');
}

Loading…
Cancel
Save