NurseStationApp/pages/user/user.vue

140 lines
3.6 KiB
Vue
Raw Normal View History

2022-10-24 16:30:14 +08:00
<template>
<view class="app">
<view class="user">
2022-11-03 17:26:15 +08:00
<view class="img" v-if="appPersonallist.headPictureUrl">
<image :src="baseurl+appPersonallist.headPictureUrl" mode=""></image>
</view>
<view class="img" v-else>
2022-10-24 16:30:14 +08:00
<image src="../../static/users.png" mode=""></image>
</view>
2022-11-03 17:26:15 +08:00
<view class="phone" v-if="appPersonallist.patientName!=null">
{{appPersonallist.patientName}}
2022-10-24 16:30:14 +08:00
</view>
<view class="nickname">
2022-11-03 17:26:15 +08:00
<!-- {{appPersonallist.phone}} -->
2022-10-24 16:30:14 +08:00
</view>
2022-11-01 14:54:09 +08:00
<view class="modify" @tap='updatainfo()'>
2022-10-24 16:30:14 +08:00
修改信息
<u-icon name="arrow-right" color="#ffffff" size="32"></u-icon>
</view>
</view>
<view class="information">
2022-11-03 17:26:15 +08:00
<view class="item" v-if="appPersonallist.patientName!=null">
2022-11-01 14:54:09 +08:00
姓名{{appPersonallist.patientName}}
2022-10-24 16:30:14 +08:00
</view>
2022-11-03 17:26:15 +08:00
<view class="item" v-else>
姓名
</view>
<view class="item" v-if="appPersonallist.phone!=null">
2022-11-01 14:54:09 +08:00
电话{{appPersonallist.phone}}
2022-10-24 16:30:14 +08:00
</view>
2022-11-03 17:26:15 +08:00
<view class="item" v-else>
电话
</view>
<view class="item" v-if="appPersonallist.cardNo!=null">
身份证{{appPersonallist.cardNo}}
</view>
<view class="item" v-else>
身份证
</view>
<view class="item" v-if="appPersonallist.streetName">
区域{{appPersonallist.regionName}}-{{appPersonallist.streetName}}
</view>
<view class="item" v-else>
区域
</view>
2022-11-01 14:54:09 +08:00
<view class="item" style="height:100%">
<view class="" style="display: inline-block;">
地址:
</view>
2022-11-03 17:26:15 +08:00
<view class="address" v-if="appPersonallist.address!=null">
2022-11-01 14:54:09 +08:00
{{appPersonallist.address}}
</view>
2022-10-24 16:30:14 +08:00
</view>
2022-11-03 17:26:15 +08:00
<view class="item" style="height:100%">
<view class="" style="display: inline-block;">
位置:
</view>
<view class="address" v-if="appPersonallist.homeLatitude&&appPersonallist.homeLongitude">
东经:{{appPersonallist.homeLongitude}}--北纬:{{ appPersonallist.homeLatitude}}
</view>
</view>
<view class="disease" style="border:none;">
<view class="" style="line-height: 110rpx;">
疾病类型:
</view>
<span style="padding-right: 15rpx;font-size: 32rpx;"
2022-11-01 14:54:09 +08:00
v-for="(item,index) in appPersonallist.patientDiseaseInfoList"
:key="index">{{item.diseaseName}}</span>
2022-10-24 16:30:14 +08:00
</view>
</view>
2022-11-03 17:26:15 +08:00
<!-- <view class="External" style="margin: 200rpx auto 0;">
2022-10-24 16:30:14 +08:00
<view class="lefttext">
积分:
</view>
<view class="righttext">
2022-11-01 14:54:09 +08:00
{{appPersonallist.integral}}
2022-10-24 16:30:14 +08:00
</view>
<image src="../../static/jiantou.png" mode=""></image>
</view>
<view class="External">
<view class="lefttext">
健康档案
</view>
<view class="righttext">
</view>
<image src="../../static/jiantou.png" mode=""></image>
</view>
<view class="External">
<view class="lefttext">
我的设备
</view>
<view class="righttext">
</view>
<image src="../../static/jiantou.png" mode=""></image>
2022-11-03 17:26:15 +08:00
</view> -->
2022-10-24 16:30:14 +08:00
</view>
</template>
<script>
2022-11-01 14:54:09 +08:00
import {
appPersonal,
} from '@/api/user/user.js';
import baseurl from '@/api/baseurl.js'
2022-10-24 16:30:14 +08:00
export default {
data() {
return {
2022-11-03 17:26:15 +08:00
baseurl: '',
2022-11-01 14:54:09 +08:00
appPersonallist: [], //获取个人信息
2022-10-24 16:30:14 +08:00
}
2022-11-01 14:54:09 +08:00
},
onLoad(options) {
2022-11-03 17:26:15 +08:00
this.baseurl = baseurl
2022-11-01 14:54:09 +08:00
//获取传值
this.myInfo()
},
methods: {
//获取个人信息
myInfo() {
2022-11-03 17:26:15 +08:00
var that = this
uni.getStorage({
key: 'patientId',
success: function(res) {
appPersonal(res.data).then(res => {
that.appPersonallist = res.data
})
}
});
2022-11-01 14:54:09 +08:00
},
updatainfo() {
2022-11-03 17:26:15 +08:00
uni.navigateTo({
url: `/pages/modify/modify?appPersonallist=${JSON.stringify(this.appPersonallist)}`
})
2022-10-24 16:30:14 +08:00
}
}
}
2022-11-01 14:54:09 +08:00
</script>
<style lang="scss">
@import "./user.scss";
2022-10-24 16:30:14 +08:00
</style>