From 4184b50aa0f50790f21932b226da2e50d106250d Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期五, 21 十月 2022 15:47:38 +0800
Subject: [PATCH] 45
---
src/views/home/index.vue | 28 +++++++++++++++++++++-------
1 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 0f484ac..366bd30 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -2,13 +2,13 @@
<div class="page">
<div class="box_1">
<div class="userinfo">
- <div class="name">张三丰</div>
- <div class="userCode">卡号:202324224242 </div>
+ <div class="name">{{patientInfo.patientInfo.patientName}}</div>
+ <div class="userCode">卡号:{{patientInfo.patientInfo.patientCardNo}} </div>
<div class="userQRcode">
<img
style=" width: 60px;height: 60px;margin-left: 8%; margin-top: 20px;"
referrerpolicy="no-referrer"
- src="@/views/home/assets/img/SketchPng011ef35b32ef075413b756766208370cde43357dffc3333d2acf29b70793c15d.png"
+ :src="patientInfo.patientInfo.patientAvatarIcon"
/>
</div>
</div>
@@ -17,7 +17,7 @@
round
width="78px"
height="78px"
- src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
+ :src="Info.headimgurl"
/>
</div>
<div class="meuns">
@@ -64,14 +64,14 @@
<div class="viewInfo">
<div class="box">
<div class="crainfo">
- <div class="tizhong">86</div>
+ <div class="tizhong">{{patientInfo.weight}}</div>
</div>
<div class="hanzhi">体重(kg)</div>
<div class="yinyu">Patient weight data</div>
</div>
<div class="box">
<div class="crainfo">
- <div class="xueya">138/88</div>
+ <div class="xueya">{{patientInfo.pressure}}</div>
</div>
<div class="hanzhi">血压(mmHg)</div>
<div class="yinyu">Patient blood pressure data</div>
@@ -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,24 @@
console.log('sss')
router.push(url)
}
+ const patientInfo=computed(() => {
+ return userInfo.patient
+ })
+ const Info=computed(() => {
+ return userInfo.info
+ })
+ 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