redjrectLogin.vue
2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<template>
<div class="relogin" v-loading="loading"></div>
</template>
<script>
import {
getToken,
setToken,
removeToken,
setLoginType,
setEntrySreachType,
} from "@/utils/auth.js";
import { checkUserName, getUnlock } from "@/api/system/user.js";
export default {
data() {
return {
url: "",
loading: false,
};
},
mounted() {
this.loading = true;
if (this.$route.query.token) {
//外部登录
removeToken();
// /relogin?token=&consignmentCode= magic测试地址
setToken(decodeURI(this.$route.query.token));
// if (
// Number(this.$route.query.consignmentCode) != 1 ||
// this.$route.query.consignmentCode == undefined
// ) {
// setLoginType(
// JSON.stringify({
// consignmentCode:
// this.$route.query.consignmentCode == undefined
// ? "noCode"
// : this.$route.query.consignmentCode.replace(/\s+/g, ""),
// status:
// this.$route.query.consignmentCode == undefined ? "" : "magicFcl",
// })
// );
// }
this.$store.dispatch("GetDict");
location.replace(process.env.VUE_APP_BASE_ROUTE);
} else {
this.$router.push({ path: "/login" });
this.loading = false;
}
},
methods: {
//运单申报使用字典
async setDict() {
// this.$store.dispatch("GetDistrict");
// this.$store.dispatch("GetPort", { name: "", type: "all" });
// let arr = [
// "VehicleWayCode",
// "supervisionMode",
// "natureExemption",
// "ClinchType",
// "NewPackageType",
// "Country",
// "levyType",
// "currencySystem",
// "ENTRY_METHOD",
// "pickUpCity",
// "consType",
// "brandType",
// "exportBenefits",
// ];
// arr.forEach((item, index) => {
// this.$store.dispatch("GetDict", {
// dictionaryCode: item,
// extIndex: "",
// extVal: "",
// });
// });
},
},
};
</script>
<style lang="scss" scoped>
.relogin {
width: 100%;
height: 100%;
background-color: #fff;
}
</style>