35
chenyc
2025-02-28 206eb1f47082bcc28ebf8093e2899d5875e5ad0c
src/App.vue
@@ -6,29 +6,13 @@
<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.eyJzdWIiOiJQQVRfU0ZfUEFUMjQ0MTUyMTM4MzcwMjgyN19TRl8iLCJhdXRoIjpbeyJhdXRob3JpdHkiOiJhZG1pbiJ9XSwiaWF0IjoxNjY2ODQ4OTI4LCJleHAiOjE2NjcyMDg5Mjh9.R7BtrJHJJFywW6bytMWB6EVVYdD5rpMZQAcVnQG-8t4'
    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;
    background-color: #f6faff;
}
</style>