From d239fea7cafc2db4f6fb27cb2a1331b885c5e820 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期五, 21 十月 2022 15:22:53 +0800
Subject: [PATCH] 34
---
src/views/home/index.vue | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 0f484ac..36b5316 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -122,7 +122,7 @@
</div>
</template>
<script lang="ts" setup>
- import { onMounted,ref } from 'vue'
+ import { onMounted,ref,computed,watch } from 'vue'
import { userInfoStore } from '@/stores/userInfo'
import { Image as VanImage,Tabbar as VanTabbar , TabbarItem as VanTabbarItem } from 'vant'
import {useRouter} from 'vue-router'
@@ -146,10 +146,21 @@
console.log('sss')
router.push(url)
}
+ const patientInfo=computed(() => {
+ return userInfo.patient
+ })
+ watch(
+ ()=>patientInfo,
+ ()=>{
+ console.log('患者变化了')
+ }
+ )
onMounted(() => {
if (userInfo.info.openid===''){
router.push('login')
}
+ console.log(userInfo.patient,'患者信息')
+ console.log(userInfo.info,'微信账号信息')
})
</script>
<style scoped lang="css" src="./assets/index.scss" />
\ No newline at end of file
--
Gitblit v1.8.0