45
chenyc
2022-11-01 e0b8b033b1c2483367dddb556ca82f906c217185
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
<template>
    <div class="app-view">
        <router-view></router-view>
    </div>
</template>
 
 
<script setup lang="ts">
    import { Session } from '@/utils/storage'
    import { userInfoStore } from '@/stores/userInfo'
    import { ajaxPost} from '@/utils/axios'
    const userInfo = userInfoStore()
    const token =Session.get('token')
    // const token='eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJQQVRfU0ZfUEFUMjQ0MTUyMTM4MzcwMjgyN19TRl8iLCJhdXRoIjpbeyJhdXRob3JpdHkiOiJhZG1pbiJ9XSwiaWF0IjoxNjY3MjcwNTc5LCJleHAiOjE2Njc2MzA1Nzl9.3_K8avdonSTtFhPErO0M0JVan0KtnHxdACJno9B-PWg'
    // console.log('token到底等于机',token)
    if (token){
        Session.set('token', token)
        console.log('token='+Session.get('token '))
        ajaxPost('/patient/info/getPatientInfo','').then((re:any)=>{
            console.log(re,'得到患者的信息getUserinfo')
            userInfo.setPatient(re)
        })
 
    } else {
        console.log('token为空')
    }
</script>
 
<style scoped lang="scss">
.app-view {
    display: grid;
    background-color:#F6FAFF;
}
 
</style>