2022年5月29日从svn移到git

This commit is contained in:
daihh
2022-05-29 18:56:34 +08:00
commit b050613020
488 changed files with 68444 additions and 0 deletions

60
src/views/Loading.vue Normal file
View File

@@ -0,0 +1,60 @@
<template>
<div>
<!--页面加载加载完成后-->
</div>
</template>
<script>
import Cookies from 'vue-cookies'
import apiLogin from '@/api/login.js'
import { getToken,setToken } from '@/utils/token'
export default{
mounted(){
this.toUrl=this.$route.query.returnUrl;
let token=getToken();
let $this=this;
if(!token){
//console.log(token,'未获取token');
setTimeout(function(){
$this.curToken=getToken();
if(!$this.curToken){
//console.log(token,'第二次未获取token');
location.href=this.webBaseUrl+process.env.VUE_APP_LOGIN_URL;
}else{
$this.boeLogin();
}
},500);
}else{
this.curToken=token;
this.boeLogin();
}
},
data(){
return {
curToken:'',
toUrl:''
}
},
methods:{
boeLogin(){
apiLogin.boeLogin(this.curToken).then(rs=>{
if(rs.status==200){
//setToken(rs.result.access_token);
if(this.toUrl){
location.href=this.toUrl;
}else{
this.$router.push({ path: "/study/index" })
}
//this.$router.push({ path: "/index" })
}else{
this.$message.error("转化token失败");
}
})
}
}
}
</script>
<style>
</style>