index.vue
1.51 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
<template>
<div style="width: 100%; height: 100%; position: relative" v-if="imgShow">
<el-image
:src="url"
fit="fill"
style="display: block; width: 100%; height: 100%; opacity: 0.9"
lazy
></el-image>
<div class="model"></div>
</div>
</template>
<script>
import indexBackground from "@/assets/images/indexBackground.jpg";
import { getLoginType } from "@/utils/auth";
export default {
props: {},
data() {
return {
url: "",
imgShow: false,
fcl: false,
};
},
created() {
getLoginType() ? (this.fcl = true) : (this.fcl = false);
this.checkImgType();
},
methods: {
checkImgType() {
let interval = setInterval(() => {
if (
this.$store.getters.userData.organization &&
this.$store.getters.userData.organization.code == "customer"
// ||getToken().split(".")[0] == "2"
) {
clearInterval(interval);
if (this.fcl) {
} else {
this.imgShow = false;
this.url = "";
this.$router.push({
path: "/newui_noentrySreach_parent/newui_noentrySreach_leaf",
});
}
} else if (
this.$store.getters.userData.organization &&
this.$store.getters.userData.organization.code != "customer"
) {
clearInterval(interval);
this.url = indexBackground;
this.imgShow = true;
}
}, 500);
},
},
};
</script>
<style rel="stylesheet/scss" lang="scss"></style>