|
|
@ -107,7 +107,7 @@ class Auth extends BaseController |
|
|
|
} |
|
|
|
} |
|
|
|
$user = $repository->mainUser($user); |
|
|
|
$user = $repository->mainUser($user); |
|
|
|
$pid = $this->request->param('spread', 0); |
|
|
|
$pid = $this->request->param('spread', 0); |
|
|
|
$repository->bindSpread($user, intval($pid)); |
|
|
|
$repository->bindSpread($user, intval($pid),1); |
|
|
|
|
|
|
|
|
|
|
|
$tokenInfo = $repository->createToken($user); |
|
|
|
$tokenInfo = $repository->createToken($user); |
|
|
|
$repository->loginAfter($user); |
|
|
|
$repository->loginAfter($user); |
|
|
@ -153,7 +153,7 @@ class Auth extends BaseController |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function userInfo() |
|
|
|
public function userInfo() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$user = $this->request->userInfo()->hidden(['label_id', 'group_id', 'pwd', 'addres', 'card_id', 'last_time', 'last_ip', 'create_time', 'mark', 'status', 'spread_uid', 'spread_time', 'real_name', 'birthday', 'brokerage_price']); |
|
|
|
$user = $this->request->userInfo()->hidden(['label_id', 'group_id', 'pwd', 'addres', 'card_id', 'last_time', 'last_ip', 'create_time', 'mark', 'status', 'spread_time', 'real_name', 'birthday', 'brokerage_price']); |
|
|
|
$user->append(['service', 'topService', 'total_collect_product', 'total_collect_store', 'total_coupon', 'total_visit_product', 'total_unread', 'total_recharge', 'lock_integral', 'total_integral']); |
|
|
|
$user->append(['service', 'topService', 'total_collect_product', 'total_collect_store', 'total_coupon', 'total_visit_product', 'total_unread', 'total_recharge', 'lock_integral', 'total_integral']); |
|
|
|
$data = $user->toArray(); |
|
|
|
$data = $user->toArray(); |
|
|
|
$data['total_consume'] = $user['pay_price']; |
|
|
|
$data['total_consume'] = $user['pay_price']; |
|
|
@ -229,7 +229,7 @@ class Auth extends BaseController |
|
|
|
|
|
|
|
|
|
|
|
$pid = $this->request->param('spread', 0); |
|
|
|
$pid = $this->request->param('spread', 0); |
|
|
|
|
|
|
|
|
|
|
|
$userRepository->bindSpread($user[1], intval($pid)); |
|
|
|
$userRepository->bindSpread($user[1], intval($pid),1); |
|
|
|
|
|
|
|
|
|
|
|
$tokenInfo = $userRepository->createToken($user[1]); |
|
|
|
$tokenInfo = $userRepository->createToken($user[1]); |
|
|
|
$userRepository->loginAfter($user[1]); |
|
|
|
$userRepository->loginAfter($user[1]); |
|
|
@ -301,7 +301,7 @@ class Auth extends BaseController |
|
|
|
if ($code && ($info = app()->make(RoutineQrcodeRepository::class)->getRoutineQrcodeFindType($code))) { |
|
|
|
if ($code && ($info = app()->make(RoutineQrcodeRepository::class)->getRoutineQrcodeFindType($code))) { |
|
|
|
$data['spread_spid'] = $info['third_id']; |
|
|
|
$data['spread_spid'] = $info['third_id']; |
|
|
|
} |
|
|
|
} |
|
|
|
$userRepository->bindSpread($user[1], intval($data['spread_spid'])); |
|
|
|
$userRepository->bindSpread($user[1], intval($data['spread_spid']),1); |
|
|
|
$tokenInfo = $userRepository->createToken($user[1]); |
|
|
|
$tokenInfo = $userRepository->createToken($user[1]); |
|
|
|
$userRepository->loginAfter($user[1]); |
|
|
|
$userRepository->loginAfter($user[1]); |
|
|
|
|
|
|
|
|
|
|
@ -376,7 +376,7 @@ class Auth extends BaseController |
|
|
|
$repository->syncBaseAuth($auth, $user); |
|
|
|
$repository->syncBaseAuth($auth, $user); |
|
|
|
} |
|
|
|
} |
|
|
|
$user = $repository->mainUser($user); |
|
|
|
$user = $repository->mainUser($user); |
|
|
|
$repository->bindSpread($user, intval($data['spread'])); |
|
|
|
$repository->bindSpread($user, intval($data['spread']),1); |
|
|
|
|
|
|
|
|
|
|
|
$tokenInfo = $repository->createToken($user); |
|
|
|
$tokenInfo = $repository->createToken($user); |
|
|
|
$repository->loginAfter($user); |
|
|
|
$repository->loginAfter($user); |
|
|
@ -434,7 +434,7 @@ class Auth extends BaseController |
|
|
|
$repository->syncBaseAuth($auth, $user); |
|
|
|
$repository->syncBaseAuth($auth, $user); |
|
|
|
} |
|
|
|
} |
|
|
|
$user = $repository->mainUser($user); |
|
|
|
$user = $repository->mainUser($user); |
|
|
|
$repository->bindSpread($user, intval($data['spread'])); |
|
|
|
$repository->bindSpread($user, intval($data['spread']),1); |
|
|
|
|
|
|
|
|
|
|
|
$tokenInfo = $repository->createToken($user); |
|
|
|
$tokenInfo = $repository->createToken($user); |
|
|
|
$repository->loginAfter($user); |
|
|
|
$repository->loginAfter($user); |
|
|
@ -587,7 +587,7 @@ class Auth extends BaseController |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($auth['auth']['spread'] ?? 0) { |
|
|
|
if ($auth['auth']['spread'] ?? 0) { |
|
|
|
$userRepository->bindSpread($user, (int)($auth['auth']['spread'])); |
|
|
|
$userRepository->bindSpread($user, (int)($auth['auth']['spread']),1); |
|
|
|
} |
|
|
|
} |
|
|
|
$tokenInfo = $userRepository->createToken($user); |
|
|
|
$tokenInfo = $userRepository->createToken($user); |
|
|
|
$userRepository->loginAfter($user); |
|
|
|
$userRepository->loginAfter($user); |
|
|
@ -722,7 +722,7 @@ class Auth extends BaseController |
|
|
|
$user->account = $phone; |
|
|
|
$user->account = $phone; |
|
|
|
$user->save(); |
|
|
|
$user->save(); |
|
|
|
if ($auth['spread']) { |
|
|
|
if ($auth['spread']) { |
|
|
|
$userRepository->bindSpread($user, $auth['spread']); |
|
|
|
$userRepository->bindSpread($user, $auth['spread'],1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
$tokenInfo = $userRepository->createToken($user); |
|
|
|
$tokenInfo = $userRepository->createToken($user); |
|
|
|