修复验证码无法显示问题

pull/2/head
李强 2021-03-15 20:08:48 +08:00
parent e21ee557bc
commit 2dc390d716
3 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ class CaptchaRefresh(APIView):
new_key = CaptchaStore.pick()
to_json_response = {
"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,
}
return SuccessResponse(to_json_response)

View File

@ -96,5 +96,5 @@ class RedisOpAuthJwtAuthentication(OpAuthJwtAuthentication):
if redis_token == token:
return user, token
else:
return None
raise exceptions.AuthenticationFailed("登录信息失效,请重新登录!")
return None

View File

@ -2,8 +2,8 @@
ENV = 'development'
# 若依管理系统/开发环境
# VUE_APP_BASE_API = 'https://api.django-vue-admin.com/'
VUE_APP_BASE_API = 'http://127.0.0.1:8000/'
# VUE_APP_BASE_API = 'https://api.django-vue-admin.com'
VUE_APP_BASE_API = 'http://127.0.0.1:8000'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true