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