NurseStationApp/pages/user/user.vue
2022-11-09 16:38:05 +08:00

158 lines
4.0 KiB
Vue

<template>
<view class="app">
<view class="user">
<view v-if="appPersonallist.headPictureUrl">
<image class="img" :src="baseurl+appPersonallist.headPictureUrl" mode=""></image>
</view>
<view class="img" v-else>
<image src="../../static/users.png" mode=""></image>
</view>
<view class="phone" v-if="appPersonallist.patientName!=null">
{{appPersonallist.patientName}}
</view>
<view class="nickname">
<!-- {{appPersonallist.phone}} -->
</view>
<view class="modify" @tap='updatainfo()'>
修改信息
<u-icon name="arrow-right" color="#ffffff" size="32"></u-icon>
</view>
</view>
<view class="information">
<view class="item" v-if="appPersonallist.patientName!=null">
姓名:{{appPersonallist.patientName}}
</view>
<view class="item" v-else>
姓名:
</view>
<view class="item" v-if="appPersonallist.phone!=null">
电话:{{appPersonallist.phone}}
</view>
<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>
<view class="item" style="height:100%">
<view class="" style="display: inline-block;">
地址:
</view>
<view class="address" v-if="appPersonallist.address!=null">
{{appPersonallist.address}}
</view>
</view>
<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;"
v-for="(item,index) in appPersonallist.patientDiseaseInfoList"
:key="index">{{item.diseaseName}}</span>
</view>
</view>
<!-- <view class="External" style="margin: 200rpx auto 0;">
<view class="lefttext">
积分:
</view>
<view class="righttext">
{{appPersonallist.integral}}
</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>
</view> -->
</view>
</template>
<script>
import {
appPersonal,
} from '@/api/user/user.js';
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {
baseurl: '',
appPersonallist: [], //获取个人信息
}
},
onLoad(options) {
this.baseurl = baseurl
//获取传值
this.myInfo()
},
methods: {
//获取个人信息
myInfo() {
var that = this
try {
const value = uni.getStorageSync('patientId');
if (value) {
appPersonal(value).then(res => {
that.appPersonallist = res.data
})
}
} catch (e) {
// error
}
// uni.getStorage({
// key: 'patientId',
// success: function(res) {
// appPersonal(res.data).then(res => {
// that.appPersonallist = res.data
// })
// }
// });
},
updatainfo() {
uni.navigateTo({
url: `/pages/modify/modify?appPersonallist=${JSON.stringify(this.appPersonallist)}`
})
}
},
onBackPress(options) {
console.log(options)
// if (options.from === 'navigateBack') {
// return false;
// }
// this.back();
// return true;
},
}
</script>
<style lang="scss">
@import "./user.scss";
</style>