Przeglądaj źródła

所有confirm_msg_sign_name函数传参phone

locky 4 miesięcy temu
rodzic
commit
2158e0f22e
2 zmienionych plików z 5 dodań i 5 usunięć
  1. 4 4
      Controller/UserController.py
  2. 1 1
      Service/CommonService.py

+ 4 - 4
Controller/UserController.py

@@ -1524,7 +1524,7 @@ class v2forgetPwdCodeView(TemplateView):
         if phone is not None:
             phone = phone.strip()
             # 短信签名
-            sign_name = CommonService.confirm_msg_sign_name(sign_name)
+            sign_name = CommonService.confirm_msg_sign_name(sign_name, phone)
             if country_code is None:
                 return self.do_send_phone_code(phone, response, sign_name, number, lang)
             else:
@@ -3050,7 +3050,7 @@ class OauthAuthCodeView(TemplateView):
         elif phone is not None:
             phone = phone.strip()
             # 短信签名
-            sign_name = CommonService.confirm_msg_sign_name(sign_name)
+            sign_name = CommonService.confirm_msg_sign_name(sign_name, phone)
             if country_code is None:
                 return self.phoneCode(phone, response, sign_name)
             else:
@@ -3392,7 +3392,7 @@ class SingleLoginView(TemplateView):
                 phone = phone.strip()
                 country_code = str(country_code.strip())
                 # 短信签名
-                sign_name = CommonService.confirm_msg_sign_name(sign_name)
+                sign_name = CommonService.confirm_msg_sign_name(sign_name, phone)
                 return self.get_phone_code(country_code, phone, sign_name, code_type, uid, response)
         except Exception as e:
             return response.json(500, 'error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
@@ -4347,7 +4347,7 @@ class loginCodeView(View):
                 login_code = RandomStr(6, True)
                 aliSms = AliSmsObject()
                 # 短信签名
-                sign_name = CommonService.confirm_msg_sign_name(sign_name)
+                sign_name = CommonService.confirm_msg_sign_name(sign_name, phone)
 
                 res = aliSms.send_code_sms(phone=phone, code=login_code, sign_name=sign_name, temp_msg='SMS_151675022')
 

+ 1 - 1
Service/CommonService.py

@@ -894,7 +894,7 @@ GCqvlyw5dfxNA+EtxNE2wCW/LW7ENJlACgcfgPlBZtpLheWoZB/maw4=
             pass
 
     @classmethod
-    def confirm_msg_sign_name(cls, sign_name, phone=''):
+    def confirm_msg_sign_name(cls, sign_name, phone):
         """
         确认短信签名
         @param sign_name: app签名标识