We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
我用的另一个把vue项目构件成electron项目的工具,然后构件vue-admin-template,也是打包后在production环境下,点击登录,跨域服务器可以处理登陆信息,但是登陆界面不会跳转到dashboard
Sorry, something went wrong.
开发环境下没问题,不知道是啥原因
原因:electron 不支持 Cookies,这就导致在auth.js中使用的js-cookie失效。 解决方法:将Cookies改成sessionStorage或localStorage。前者是当窗口关闭后需要重新登陆,后者是登录一次后就无需再次登录,除非登出。两者的区别参见: sessionStorage localStorage
示例代码:
// auth.js const TokenKey = 'vue_admin_template_token' export function getToken() { return sessionStorage.getItem(TokenKey) } export function setToken(token) { return sessionStorage.setItem(TokenKey, token) } export function removeToken() { return sessionStorage.removeItem(TokenKey) }
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: