|
|
@@ -231,7 +231,7 @@ class MemberService extends BaseService
|
|
|
}
|
|
|
|
|
|
$info = $this->model->with(['parent'])->where(['id' => $userId, 'mark' => 1])
|
|
|
- ->select(['id', 'nickname', 'code', 'member_level', 'usdt', 'sbt', 'performance', 'profit', 'profit_total', 'pledge_profit', 'manage_profit', 'share_profit', 'pj_profit', 'global_profit', 'parent_id', 'wallet_url', 'wallet_token', 'recharge_url', 'bonus_rate', 'pledge_auto', 'trade_status', 'status'])
|
|
|
+ ->select(['id', 'nickname', 'code', 'member_level', 'usdt', 'sbt', 'performance', 'profit', 'profit_total', 'pledge_profit', 'manage_profit', 'share_profit', 'pj_profit', 'global_profit', 'parent_id', 'wallet_url', 'wallet_token', 'recharge_url','recharge_token', 'bonus_rate', 'pledge_auto', 'trade_status', 'status'])
|
|
|
->first();
|
|
|
$info = $info ? $info->toArray() : [];
|
|
|
if (empty($info)) {
|
|
|
@@ -247,6 +247,13 @@ class MemberService extends BaseService
|
|
|
}
|
|
|
|
|
|
$rechargeUrl = isset($info['recharge_url']) ? $info['recharge_url'] : '';
|
|
|
+ if(empty($rechargeUrl)){
|
|
|
+ $rechargeUrl = CregisPayService::make()->createAddress(1000);
|
|
|
+ if($rechargeUrl){
|
|
|
+ $rechargeToken = make_wallet_token($rechargeUrl, $userId);
|
|
|
+ $this->model->where(['id'=>$userId])->update(['recharge_url'=> $rechargeUrl,'recharge_token'=>$rechargeToken,'update_time'=>time()]);
|
|
|
+ }
|
|
|
+ }
|
|
|
$rechargeToken = isset($info['recharge_token']) ? $info['recharge_token'] : '';
|
|
|
if ($type == 2 && $rechargeUrl && $rechargeToken != make_wallet_token($rechargeUrl, $userId)) {
|
|
|
$info['error'] = '钱包地址已被修改';
|