修复验证码无法显示问题
parent
e21ee557bc
commit
2dc390d716
|
@ -35,7 +35,7 @@ class CaptchaRefresh(APIView):
|
||||||
new_key = CaptchaStore.pick()
|
new_key = CaptchaStore.pick()
|
||||||
to_json_response = {
|
to_json_response = {
|
||||||
"key": new_key,
|
"key": new_key,
|
||||||
"image_url": str(captcha_image_url(new_key)).lstrip('/'),
|
"image_url": captcha_image_url(new_key),
|
||||||
"audio_url": captcha_audio_url(new_key) if ca_settings.CAPTCHA_FLITE_PATH else None,
|
"audio_url": captcha_audio_url(new_key) if ca_settings.CAPTCHA_FLITE_PATH else None,
|
||||||
}
|
}
|
||||||
return SuccessResponse(to_json_response)
|
return SuccessResponse(to_json_response)
|
||||||
|
|
|
@ -96,5 +96,5 @@ class RedisOpAuthJwtAuthentication(OpAuthJwtAuthentication):
|
||||||
if redis_token == token:
|
if redis_token == token:
|
||||||
return user, token
|
return user, token
|
||||||
else:
|
else:
|
||||||
return None
|
raise exceptions.AuthenticationFailed("登录信息失效,请重新登录!")
|
||||||
return None
|
return None
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
||||||
# 若依管理系统/开发环境
|
# 若依管理系统/开发环境
|
||||||
# VUE_APP_BASE_API = 'https://api.django-vue-admin.com/'
|
# VUE_APP_BASE_API = 'https://api.django-vue-admin.com'
|
||||||
VUE_APP_BASE_API = 'http://127.0.0.1:8000/'
|
VUE_APP_BASE_API = 'http://127.0.0.1:8000'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|
Loading…
Reference in New Issue