pull/5/head
youngS 4 years ago
parent 0c11effbe6
commit ab5034d898
  1. 2
      fir_client/src/components/FirRegist.vue
  2. 2
      fir_client/src/components/FirUserProfileInfo.vue
  3. 2
      fir_ser/api/utils/utils.py
  4. 25
      fir_ser/api/views/login.py

@ -183,7 +183,7 @@
type: 'error'
});
}
}, {"methods": 'GET', 'data': {'act': act, 'target': this.form.email, 'ext': picode}})
}, {"methods": 'POST', 'data': {'act': act, 'target': this.form.email, 'ext': picode}})
} else {
this.$message({

@ -341,7 +341,7 @@
this.$message.error(data.msg)
}
}, {"methods": 'GET', 'data': {'act': act, 'target': target, 'ext': picode}})
}, {"methods": 'POST', 'data': {'act': act, 'target': target, 'ext': picode}})
}
}, mounted() {
this.$store.dispatch('douserInfoIndex', 0);

@ -138,7 +138,7 @@ def is_valid_domain(value):
def is_valid_phone(value):
phone_pat = re.compile('^(13\d|14[5|7]|15\d|166|17[3|6|7]|18\d)\d{8}$')
return True if value and re.search(phone_pat, value) else False
return True if str(value) and re.search(phone_pat, str(value)) else False
def is_valid_email(email):

@ -445,16 +445,15 @@ class UserInfoView(APIView):
class AuthorizationView(APIView):
def get(self, request):
def post(self, request):
res = BaseResponse()
res.data = {}
act = request.query_params.get("act", None)
target = request.query_params.get("target", None)
ext = request.query_params.get("ext", None)
if ext:
ext = json.loads(ext)
act = request.data.get("act", None)
target = request.data.get("target", None)
ext = request.data.get("ext", None)
register_type = get_register_type()
if register_type.get('code') and ext and ext.get('icode'):
if ext and register_type.get('code', None) and ext.get('icode', None):
if ext.get('icode') == '689888666':
pass
else:
@ -467,7 +466,7 @@ class AuthorizationView(APIView):
if ext and is_valid:
pass
else:
res.code = 1008
res.code = 1018
res.msg = "图片验证码有误"
return Response(res.dict)
@ -479,14 +478,12 @@ class AuthorizationView(APIView):
class ChangeAuthorizationView(APIView):
authentication_classes = [ExpiringTokenAuthentication, ]
def get(self, request):
def post(self, request):
res = BaseResponse()
res.data = {}
act = request.query_params.get("act", None)
target = request.query_params.get("target", None)
ext = request.query_params.get("ext", None)
if ext:
ext = json.loads(ext)
act = request.data.get("act", None)
target = request.data.get("target", None)
ext = request.data.get("ext", None)
if REGISTER.get("captcha"):
if ext and valid_captcha(ext.get("cptch_key", None), ext.get("authcode", None), target):
pass

Loading…
Cancel
Save