|
@@ -53,24 +53,23 @@ class QappUserService
|
|
|
$isNewRegister = true;
|
|
|
$qapp_user = $this->createQuickAppUser($data);
|
|
|
}
|
|
|
- $user = $qapp_user->user;
|
|
|
- $uid = $user->id;
|
|
|
- $time = strtotime("+1 month");
|
|
|
- $token = JWTAuth::fromUser($user);
|
|
|
- if ($data['send_order_id']) {
|
|
|
- UserService::setUserSendOrder((int)$uid, (int)$data['send_order_id']);
|
|
|
- }
|
|
|
- // 新注册统计
|
|
|
- if ($isNewRegister && $qapp_user) {
|
|
|
- // 注册统计
|
|
|
- QappAddDeskTopService::incrAddDeskTop($uid, QuickConst::FIELD_REGISTER);
|
|
|
-
|
|
|
- // 释放锁
|
|
|
- // if ($lockToken) {
|
|
|
- // LockCache::releaseLock($lockToken);
|
|
|
- // }
|
|
|
+ if ($qapp_user) {
|
|
|
+ $user = $qapp_user->user;
|
|
|
+ $uid = $user->id;
|
|
|
+ $time = strtotime("+1 month");
|
|
|
+ $token = JWTAuth::fromUser($user);
|
|
|
+ if ($data['send_order_id']) {
|
|
|
+ UserService::setUserSendOrder((int)$uid, (int)$data['send_order_id']);
|
|
|
+ }
|
|
|
+ // 新注册统计
|
|
|
+ if ($isNewRegister && $qapp_user) {
|
|
|
+ // 注册统计
|
|
|
+ QappAddDeskTopService::incrAddDeskTop($uid, QuickConst::FIELD_REGISTER);
|
|
|
+ }
|
|
|
+ return compact('token', 'time', 'uid');
|
|
|
+ } else {
|
|
|
+ return [];
|
|
|
}
|
|
|
- return compact('token', 'time', 'uid');
|
|
|
}
|
|
|
|
|
|
public function getGolableUser()
|