56
chenyc
2022-10-27 3e0c374256cb8abdde99ff274c4c3d70abe27ca0
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" />