NurseStationPersonApp/pages/personal/personal.vue
2022-11-03 18:16:30 +08:00

223 lines
4.2 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="app">
<view class="user">
<view class="img">
<image :src="baseurl+appPersonallist.avatar" mode=""></image>
</view>
<view class="phone">
电话{{appPersonallist.phonenumber}}
</view>
<view class="nickname">
点此设置昵称
</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">
姓名{{appPersonallist.nickName}}
</view>
<view class="item">
电话{{appPersonallist.phonenumber }}
</view>
<view class="item" style="height:100%">
</view>
<view class="item" style="border:none;" v-if="appPersonallist.nurseStationSysUserVOList">
护理站: {{appPersonallist.nurseStationSysUserVOList[0].nurseStationName}}
</view>
</view>
<view class="External" style="margin: 100rpx auto 0;">
<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 {
nursePerson,
} from '@/api/personnal/personal.js';
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {
baseurl: '', //url
phonenumber: '',
avatar:'',
password: '',
userId:'',
appPersonallist: [], //获取个人信息
nurseStationSysUserVOList: [],
}
},
onLoad(options) {
//获取传值
const that=this
this.baseurl = baseurl;
uni.getStorage({
key: 'phonenumber',
success: function(res) {
that.phonenumber = res.data
console.log(that.phonenumber)
}
});
uni.getStorage({
key: 'password',
success: function(res) {
that.password = res.data
console.log(that.password)
}
});
console.log(that.password,'-----',that.phonenumber)
this.myInfo()
},
methods: {
myInfo() {
console.log(this.phonenumber)
nursePerson(this.phonenumber, this.password).then(res => {
this.appPersonallist = res.data
})
},
updatainfo() {
console.log()
uni.navigateTo({
url: `/pages/Modifyinformation/Modifyinformation`
})
}
}
}
</script>
<style lang="scss">
.app {
padding: 0;
font-size: 35rpx;
height: 100vh;
.External {
width: 94%;
height: 100rpx;
line-height: 100rpx;
margin: 20rpx auto;
padding-left: 5%;
background: #FFFFFF;
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
position: relative;
.righttext {
position: absolute;
right: 12%;
top: 50%;
color: #969394;
transform: translateY(-50%);
}
image {
width: 18rpx;
height: 27rpx;
position: absolute;
right: 5%;
top: 50%;
transform: translateY(-50%);
}
.lefttext,
.righttext {
display: inline-block;
}
}
.information {
width: 94%;
background: #FFFFFF;
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
position: absolute;
top: 18%;
left: 3%;
color: #000000;
padding-left: 5%;
overflow: hidden;
font-size: 35rpx;
.item {
// height: 110rpx;
line-height: 110rpx;
border-bottom: 1rpx solid #D8D4D4;
.address {
height: 40rpx;
// font-size: 30rpx;
line-height: 40rpx;
display: inline-block;
width: 80%;
margin-left: 30rpx;
margin-top: 30rpx;
}
}
}
.user {
width: 100%;
height: 500rpx;
background: #4C7BC9;
position: relative;
color: #FFFFFF;
.modify {
font-size: 32rpx;
position: absolute;
right: 3%;
top: 22%;
}
.nickname {
position: absolute;
top: 26%;
left: 33%;
}
.phone {
position: absolute;
top: 13%;
left: 33%;
}
.img {
width: 150rpx;
height: 150rpx;
position: absolute;
top: 10%;
left: 8%;
image {
border-radius: 50%;
width: 130rpx;
margin-left: 50%;
margin-top: 50%;
transform: translate(-50%, -50%);
height: 130rpx;
}
}
}
}
</style>