|
@@ -2373,7 +2373,8 @@ class v3LoginView(TemplateView):
|
|
|
tko = TokenObject()
|
|
|
res = tko.generate(
|
|
|
data={'userID': userID, 'lang': response.lang, 'user': users['username'], 'm_code': '123413243214',
|
|
|
- 'appBundleId': new_bundle, 'tokenVal': token_val, 'tokenVersion': token_version})
|
|
|
+ 'appBundleId': app_bundle_id, 'tokenVal': token_val, 'tokenVersion': token_version,
|
|
|
+ 'newBundle': new_bundle})
|
|
|
if tko.code != 0:
|
|
|
return response.json(tko.code)
|
|
|
if all([app_bundle_id, app_type, push_type, token_val, m_code, tz]):
|
|
@@ -2470,7 +2471,8 @@ class oneClickLoginView(TemplateView):
|
|
|
'userID': user_qs[0]['userID'],
|
|
|
'lang': response.lang,
|
|
|
'user': user_qs[0]['username'],
|
|
|
- 'appBundleId': new_bundle,
|
|
|
+ 'appBundleId': app_bundle_id,
|
|
|
+ 'newBundle': new_bundle,
|
|
|
'tokenVersion': token_version,
|
|
|
'tokenVal': token_val,
|
|
|
'm_code': '123413243214'
|
|
@@ -2511,7 +2513,8 @@ class oneClickLoginView(TemplateView):
|
|
|
'userID': userID,
|
|
|
'lang': response.lang,
|
|
|
'user': users.username,
|
|
|
- 'appBundleId': new_bundle,
|
|
|
+ 'appBundleId': app_bundle_id,
|
|
|
+ 'newBundle': new_bundle,
|
|
|
'm_code': '123413243214'
|
|
|
}
|
|
|
)
|
|
@@ -2883,7 +2886,8 @@ class wxAuthSignView(TemplateView):
|
|
|
tko = TokenObject()
|
|
|
user_list = user_qs.values("NickName", "userIconUrl", "userIconPath", "username", "userEmail", "phone")
|
|
|
res = tko.generate(data={'userID': userID, 'lang': response.lang, 'user': user_list[0]["username"],
|
|
|
- 'appBundleId': new_bundle, 'tokenVal': token_val, 'tokenVersion': token_version})
|
|
|
+ 'appBundleId': app_bundle_id, 'tokenVal': token_val, 'tokenVersion': token_version,
|
|
|
+ 'newBundle': new_bundle})
|
|
|
# 增加角色
|
|
|
user_qs[0].role.add(Role.objects.get(rid=1))
|
|
|
role_dict = ModelService.own_role(userID=userID)
|
|
@@ -3524,6 +3528,8 @@ class SingleLoginView(TemplateView):
|
|
|
salt = request_dict.get('salt', None)
|
|
|
password_version = request_dict.get('pwdVersion', 'V1')
|
|
|
authcode = request_dict.get('authcode', None)
|
|
|
+ app_bundle_id = request_dict.get('appBundleId', None)
|
|
|
+ new_bundle = APP_MAPPING.get(app_bundle_id, None)
|
|
|
if password is None or authcode is None:
|
|
|
return response.json(444, 'password,authcode')
|
|
|
authcode = CommonService.decode_data(authcode.strip())
|
|
@@ -4197,7 +4203,8 @@ class Image_Code_RegisterView(TemplateView):
|
|
|
user_list = user_qs.values("NickName", "userIconUrl", "userIconPath", "username", "userEmail", "phone")
|
|
|
new_bundle = APP_MAPPING.get(app_bundle_id, None)
|
|
|
res = tko.generate(data={'userID': userID, 'lang': response.lang, 'user': user_list[0]["username"],
|
|
|
- 'appBundleId': new_bundle, 'tokenVal': token_val, 'tokenVersion': token_version})
|
|
|
+ 'appBundleId': app_bundle_id, 'tokenVal': token_val, 'tokenVersion': token_version,
|
|
|
+ 'newBundle': new_bundle})
|
|
|
# 增加角色
|
|
|
user_qs[0].role.add(Role.objects.get(rid=1))
|
|
|
role_dict = ModelService.own_role(userID=userID)
|
|
@@ -4437,7 +4444,8 @@ class v3LoginByCodeView(View):
|
|
|
tko = TokenObject()
|
|
|
res = tko.generate(
|
|
|
data={'userID': userID, 'lang': response.lang, 'user': users['username'], 'tokenVersion': token_version,
|
|
|
- 'm_code': '123413243214', 'appBundleId': new_bundle, 'tokenVal': token_val})
|
|
|
+ 'm_code': '123413243214', 'appBundleId': app_bundle_id, 'tokenVal': token_val,
|
|
|
+ 'newBundle': new_bundle})
|
|
|
# 添加用户登录类型
|
|
|
oauth_qs = UserOauth2Model.objects.filter(userID__userID=userID)
|
|
|
auth_type = 0
|
|
@@ -4671,7 +4679,8 @@ class AppleAuthLogin(View):
|
|
|
user_list = user_qs.values("NickName", "userIconUrl", "userIconPath", "username", "userEmail", "phone")
|
|
|
new_bundle = APP_MAPPING.get(app_bundle_id, None)
|
|
|
res = tko.generate(data={'userID': userID, 'lang': response.lang, 'user': user_list[0]["username"],
|
|
|
- 'appBundleId': new_bundle, 'tokenVal': token_val, 'tokenVersion': token_version})
|
|
|
+ 'appBundleId': app_bundle_id, 'tokenVal': token_val, 'tokenVersion': token_version,
|
|
|
+ 'newBundle': new_bundle})
|
|
|
# 增加角色
|
|
|
user_qs[0].role.add(Role.objects.get(rid=1))
|
|
|
role_dict = ModelService.own_role(userID=userID)
|