From 79654f772392e3444798cd9a1c71cce42a95b7a0 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期二, 25 十月 2022 16:35:47 +0800
Subject: [PATCH] 45
---
src/views/home/index.vue | 26 +++++++++++++++++++-------
1 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index ebc15d4..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,6 +146,18 @@
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')
--
Gitblit v1.8.0