lyfO_o
2022-04-20 2c5e4445f405ba7b7c61a2e12fc1ef60a62e9bf7
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
<template>
    <div class="app-container">
        <el-alert
            :title="message"
            :type="flag?'success':'error'">
        </el-alert>
 
    </div>
 
</template>
 
<script>
    import {getExamAuth} from '@/api/exam'
    import {getToken} from "@/utils/auth"
    import Cookies from 'js-cookie'
    import request from '@/utils/request'
    export default {
        name: "current",
 
        created(){
            this.getExamAuth()
        },
        data(){
            return {
                pass:false,
                message: ''
            }
        },
        methods:{
            queryHandle(){
            },
            getExamAuth(){
                getExamAuth({token:getToken()})
                    .then(res=>{
                        if (res.data.code === 'failure') {
                            this.flag = false
                            this.message = res.data.message;
                        }
                        if (res.data.code === 'success') {
                            this.flag = true
                            this.message = res.data.message
                            Cookies.set('JSESSIONID',res.data.data.ssid)
                            window.open(process.env.NANO_API + "/foreground/system/noLogin/redirect?sessionId="+res.data.data.ssid )
 
                        }
                    })
                    .catch(err=>{
                        console.log(err)
                        this.flag = false
                        this.message = '请求出现问题,请联系管理员'
                    })
 
            }
 
        }
    }
</script>
 
<style scoped>
    .span-filter-label{
        font-size: 15px;
        color: #606266;
        margin-right: 4px;
        margin-left: 7px;
    }
 
    .basic_search{
        margin-bottom: 15px;
    }
</style>