|
@@ -1384,6 +1384,8 @@ class v3registerView(TemplateView):
|
|
Device_User.objects.create(**create_data)
|
|
Device_User.objects.create(**create_data)
|
|
if push_scription:
|
|
if push_scription:
|
|
UserEmailSubscriptions.objects.create(phone=phone, user_id=userID, push_sub_status=1)
|
|
UserEmailSubscriptions.objects.create(phone=phone, user_id=userID, push_sub_status=1)
|
|
|
|
+ else:
|
|
|
|
+ UserEmailSubscriptions.objects.create(phone=phone, user_id=userID, push_sub_status=0)
|
|
|
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
errorInfo = traceback.format_exc()
|
|
errorInfo = traceback.format_exc()
|
|
@@ -1467,6 +1469,8 @@ class v3registerView(TemplateView):
|
|
Device_User.objects.create(**create_data)
|
|
Device_User.objects.create(**create_data)
|
|
if push_scription:
|
|
if push_scription:
|
|
UserEmailSubscriptions.objects.create(user_id=userID, email=email, push_sub_status=1)
|
|
UserEmailSubscriptions.objects.create(user_id=userID, email=email, push_sub_status=1)
|
|
|
|
+ else:
|
|
|
|
+ UserEmailSubscriptions.objects.create(user_id=userID, email=email, push_sub_status=0)
|
|
if email_scription:
|
|
if email_scription:
|
|
subscribers = {
|
|
subscribers = {
|
|
"userEmail": email,
|
|
"userEmail": email,
|
|
@@ -3768,6 +3772,8 @@ class Image_Code_RegisterView(TemplateView):
|
|
region_status = request_dict.get('region_status', None)
|
|
region_status = request_dict.get('region_status', None)
|
|
lang = request_dict.get('lang', None)
|
|
lang = request_dict.get('lang', None)
|
|
response = ResponseObject(lang)
|
|
response = ResponseObject(lang)
|
|
|
|
+ email_scription = request_dict.get('email_scription', None)
|
|
|
|
+ push_scription = request_dict.get('push_scription', None)
|
|
|
|
|
|
if not all([userEmail, password, lang, imageCodeId, valid_code]):
|
|
if not all([userEmail, password, lang, imageCodeId, valid_code]):
|
|
return response.json(444)
|
|
return response.json(444)
|
|
@@ -3844,12 +3850,13 @@ class Image_Code_RegisterView(TemplateView):
|
|
return response.json(103)
|
|
return response.json(103)
|
|
|
|
|
|
# 创建用户
|
|
# 创建用户
|
|
|
|
+ userID = CommonService.getUserID(μs=False, setOTAID=True)
|
|
create_data = {
|
|
create_data = {
|
|
"username": username,
|
|
"username": username,
|
|
"NickName": username,
|
|
"NickName": username,
|
|
"userEmail": userEmail,
|
|
"userEmail": userEmail,
|
|
"password": password,
|
|
"password": password,
|
|
- "userID": CommonService.getUserID(μs=False, setOTAID=True),
|
|
|
|
|
|
+ "userID": userID,
|
|
"is_active": True,
|
|
"is_active": True,
|
|
"user_isValid": True,
|
|
"user_isValid": True,
|
|
"region_status": region_status
|
|
"region_status": region_status
|
|
@@ -3857,6 +3864,18 @@ class Image_Code_RegisterView(TemplateView):
|
|
if number:
|
|
if number:
|
|
create_data["region_country"] = number
|
|
create_data["region_country"] = number
|
|
Device_User.objects.create(**create_data)
|
|
Device_User.objects.create(**create_data)
|
|
|
|
+ if push_scription:
|
|
|
|
+ UserEmailSubscriptions.objects.create(email=userEmail, user_id=userID, push_sub_status=1)
|
|
|
|
+ else:
|
|
|
|
+ UserEmailSubscriptions.objects.create(email=userEmail, user_id=userID, push_sub_status=0)
|
|
|
|
+ if email_scription:
|
|
|
|
+ subscribers = {
|
|
|
|
+ "userEmail": userEmail,
|
|
|
|
+ "region_country": number
|
|
|
|
+ }
|
|
|
|
+ subscription_thread = threading.Thread(target=UserSubscriptionControllerView.subscription,
|
|
|
|
+ args=(subscribers,))
|
|
|
|
+ subscription_thread.start()
|
|
return self.do_login(email_qs, response)
|
|
return self.do_login(email_qs, response)
|
|
|
|
|
|
@staticmethod
|
|
@staticmethod
|