Vue前端开发——解决谷歌Bug
1、添加代码
created(){// 当刷新页面,组件创建成功之后,立刻检测本地储存中是否存在用户对象this.userDTO = JSON.parse( localStorage.getItem("user") );if(this.userDTO != null){this.isLogin = true; // 已登录}else{// 去检测微信是否登录过this.axios.get("http://localhost:80/user/checkWxStatus").then( (result)=>{this.userDTO = result.data;this.phone = this.userDTO.content.phone;this.password = this.userDTO.content.password;this.login();// 走普通登录}).catch( (error)=>{//this.$message.error("登录失败!");});}// 解决谷歌浏览器bug!(function(a, b, c) {function d(a) {var c = "default";a.self_redirect === !0? (c = "true"): a.self_redirect === !1 && (c = "false");var d = b.creat
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
