home.vue
1.4 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
<template>
<div class="main">
<el-row class="w100">
<el-col v-if="obj.IFBASE" :span="type=='否'?8:12">
<left-page :obj="obj" :type="type" :url="result"/>
</el-col>
<el-col v-if="type=='否'" :span="8">
<center-page :obj="obj" :type="type=='否'" :url="result"/>
</el-col>
<el-col v-if="obj.IFBASE" :span="type=='否'?8:12">
<right-page :obj="obj" :type="type" :url="result"/>
</el-col>
</el-row>
</div>
</template>
<script setup>
import LeftPage from "@/viewsPc/vip/leftPage"
import CenterPage from "@/viewsPc/vip/centerPage"
import RightPage from "@/viewsPc/vip/rightPage"
import {getYS000} from '@/api/server.js'
import {ref, onMounted, getCurrentInstance} from 'vue'
import {useRouter} from 'vue-router'
const type = ref('是')
const url = ref()
const obj = ref({})
const result = ref()
// const router = useRouter()
url.value = 'http://192.168.1.152:8899/login/sid=0210d28d-3d3b-4534-bdcf-d81aef6e9325#/'
// url.value = window.location.href
result.value = url.value?.split('=')[1]?.split('#')[0];
onMounted(() => {
console.log(url.value)
console.log(result.value)
if (result.value) {
handelGetYS000()
} else {
router.push('/401')
}
})
async function handelGetYS000() {
const res = await getYS000(result.value)
type.value = res.data?.IFBASE || '是'
obj.value = res.data || {}
}
</script>
<style lang="scss" scoped>
</style>