修改
This commit is contained in:
parent
f91a5d2612
commit
16859e855b
@ -3,7 +3,7 @@
|
|||||||
<view class="centercontent">
|
<view class="centercontent">
|
||||||
<view class="Commodity" @tap="uploadImag()">
|
<view class="Commodity" @tap="uploadImag()">
|
||||||
头像
|
头像
|
||||||
<image class="picture" :src="appPersonallist.avatar" mode=""></image>
|
<image class="picture" :src="img" mode=""></image>
|
||||||
<image class="pictureA" src="../../static/jiantou.png" mode=""></image>
|
<image class="pictureA" src="../../static/jiantou.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
@ -11,15 +11,15 @@
|
|||||||
<span class="">
|
<span class="">
|
||||||
昵称:
|
昵称:
|
||||||
</span>
|
</span>
|
||||||
<input type="text" placeholder="请填写" v-model="appPersonallist.userName" />
|
<input type="text" maxlength="10" placeholder="请填写" v-model="appPersonallist.userName" />
|
||||||
</view>
|
</view>
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<span>姓名:</span>
|
<span>姓名:</span>
|
||||||
<input type="text" placeholder="请输入" v-model="appPersonallist.nickName" />
|
<input type="text" maxlength="10" placeholder="请输入" v-model="appPersonallist.nickName" />
|
||||||
</view>
|
</view>
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<span>电话:</span>
|
<span>电话:</span>
|
||||||
<input type="text" placeholder="请输入" v-model="appPersonallist.phonenumber" />
|
<input type="text" maxlength="11" placeholder="请输入" v-model="appPersonallist.phonenumber" />
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="nursetype name" style="border: none;" @tap='show=true'>
|
<!-- <view class="nursetype name" style="border: none;" @tap='show=true'>
|
||||||
护理站:{{getNurseStationName(appPersonallist)}}
|
护理站:{{getNurseStationName(appPersonallist)}}
|
||||||
@ -47,6 +47,8 @@
|
|||||||
return {
|
return {
|
||||||
show: false,
|
show: false,
|
||||||
baseurl: '', //url
|
baseurl: '', //url
|
||||||
|
img: null,
|
||||||
|
image: null,
|
||||||
NurseStationList: [], //护理站list
|
NurseStationList: [], //护理站list
|
||||||
appPersonallist: {
|
appPersonallist: {
|
||||||
userId: '',
|
userId: '',
|
||||||
@ -56,6 +58,7 @@
|
|||||||
avatar: '',
|
avatar: '',
|
||||||
File: '',
|
File: '',
|
||||||
},
|
},
|
||||||
|
timer: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -64,11 +67,11 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.info();
|
||||||
|
this.baseurl = baseurl;
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
let that = this
|
let that = this
|
||||||
// try {
|
|
||||||
// const value = uni.getStorageSync('nursePersonId');
|
|
||||||
// if (value) {} else {}
|
|
||||||
// } catch (e) {}
|
|
||||||
try {
|
try {
|
||||||
const value = uni.getStorageSync('phonenumber');
|
const value = uni.getStorageSync('phonenumber');
|
||||||
if (value) {
|
if (value) {
|
||||||
@ -82,10 +85,7 @@
|
|||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
this.myInfo()
|
this.myInfo()
|
||||||
this.info();
|
|
||||||
this.baseurl = baseurl;
|
|
||||||
},
|
},
|
||||||
onLoad(options) {},
|
|
||||||
methods: {
|
methods: {
|
||||||
//上传头像
|
//上传头像
|
||||||
uploadImag() {
|
uploadImag() {
|
||||||
@ -96,48 +96,79 @@
|
|||||||
sourceType: ['album'],
|
sourceType: ['album'],
|
||||||
success(res) {
|
success(res) {
|
||||||
that.appPersonallist.avatar = res.tempFilePaths[0]
|
that.appPersonallist.avatar = res.tempFilePaths[0]
|
||||||
|
that.img = res.tempFilePaths[0]
|
||||||
|
that.image = res.tempFilePaths[0]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
myInfo() {
|
myInfo() {
|
||||||
nursePerson(this.phonenumber, this.password).then(res => {
|
nursePerson(this.phonenumber, this.password).then(res => {
|
||||||
res.data.avatar = baseurl + res.data.avatar
|
this.img = baseurl + res.data.avatar
|
||||||
this.appPersonallist = res.data
|
this.appPersonallist = res.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
gofinish() {
|
gofinish() {
|
||||||
var that = this
|
var that = this
|
||||||
uni.uploadFile({
|
if (this.image) {
|
||||||
url: baseurl + '/nurseApp/personLogin/updateHeadAvatarHead',
|
uni.uploadFile({
|
||||||
filePath: that.appPersonallist.avatar, //file: 二进制(filePath)
|
url: baseurl + '/nurseApp/personLogin/updateHeadAvatarHead',
|
||||||
name: 'file',
|
filePath: that.image, //file: 二进制(filePath)
|
||||||
formData: { //多余值
|
name: 'file',
|
||||||
'userId': that.appPersonallist.userId,
|
formData: { //多余值
|
||||||
},
|
'userId': that.appPersonallist.userId,
|
||||||
timeout: 5000,
|
},
|
||||||
success(res) {
|
timeout: 5000,
|
||||||
that.appPersonallist.avatar = JSON.parse(res.data).imgUrl
|
success(res) {
|
||||||
userPassWord(that.appPersonallist).then(res => {
|
that.appPersonallist.avatar = JSON.parse(res.data).imgUrl
|
||||||
if (res.code == 200) {
|
userPassWord(that.appPersonallist).then(res => {
|
||||||
that.$refs.uToast.show({
|
if (res.code == 200) {
|
||||||
title: '修改成功',
|
that.$refs.uToast.show({
|
||||||
type: 'success',
|
title: '修改成功',
|
||||||
duration: '1500',
|
type: 'success',
|
||||||
})
|
duration: '1500',
|
||||||
setTimeout(e => {
|
|
||||||
uni.navigateBack({
|
|
||||||
delta: 1
|
|
||||||
})
|
})
|
||||||
}, 1500)
|
if (that.timer) {
|
||||||
} else {
|
clearTimeout(that.timer)
|
||||||
that.$refs.uToast.show({
|
}
|
||||||
title: res.msg,
|
that.timer = setTimeout(e => {
|
||||||
type: 'error'
|
uni.navigateBack({
|
||||||
})
|
delta: 1
|
||||||
|
})
|
||||||
|
}, 1500)
|
||||||
|
} else {
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
userPassWord(that.appPersonallist).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.code == 200) {
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '修改成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: '1500',
|
||||||
|
})
|
||||||
|
if (that.timer) {
|
||||||
|
clearTimeout(that.timer)
|
||||||
}
|
}
|
||||||
})
|
that.timer = setTimeout(e => {
|
||||||
}
|
uni.navigateBack({
|
||||||
})
|
delta: 1
|
||||||
|
})
|
||||||
|
}, 1500)
|
||||||
|
} else {
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
confirm(e) {
|
confirm(e) {
|
||||||
this.appPersonallist.nurseStationSysUserVOList[0].nurseStationId = e[0].value
|
this.appPersonallist.nurseStationSysUserVOList[0].nurseStationId = e[0].value
|
||||||
@ -197,13 +228,15 @@
|
|||||||
line-height: 100rpx;
|
line-height: 100rpx;
|
||||||
border-bottom: 1rpx solid #D8D4D4;
|
border-bottom: 1rpx solid #D8D4D4;
|
||||||
position: relative;
|
position: relative;
|
||||||
span{
|
|
||||||
|
span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top:50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
line-height: 100rpx;
|
line-height: 100rpx;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="loginbtn" @tap='pwdlogin'>
|
<view class="loginbtn" @tap='pwdlogin'>
|
||||||
登录
|
确定
|
||||||
</view>
|
</view>
|
||||||
<u-toast ref="uToast" />
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
@ -42,8 +42,8 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
phonenumber: '18963146613',
|
phonenumber: '',
|
||||||
password: '23456',
|
password: '',
|
||||||
newpassword: '',
|
newpassword: '',
|
||||||
getCodeText: '获取验证码', //获取验证码的文字
|
getCodeText: '获取验证码', //获取验证码的文字
|
||||||
getCodeBtnColor: "#4C7BC9", //获取验证码的color
|
getCodeBtnColor: "#4C7BC9", //获取验证码的color
|
||||||
|
|||||||
@ -24,20 +24,17 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
电话:{{appPersonallist.phonenumber }}
|
电话:{{appPersonallist.phonenumber }}
|
||||||
</view>
|
|
||||||
<view class="item" style="height:100%">
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="item" style="border:none;" v-if="appPersonallist.nurseStationSysUserVOList">
|
<view class="item" style="border:none;" v-if="appPersonallist.nurseStationSysUserVOList">
|
||||||
护理站: {{appPersonallist.nurseStationSysUserVOList[0].nurseStationName}}
|
护理站: {{appPersonallist.nurseStationSysUserVOList[0].nurseStationName}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="External" style="margin: 100rpx auto 0;">
|
<!-- <view class="External" style="margin: 100rpx auto 0;">
|
||||||
<view class="lefttext">
|
<view class="lefttext">
|
||||||
我的设备
|
我的设备
|
||||||
</view>
|
</view>
|
||||||
<image src="../../static/jiantou.png" mode=""></image>
|
<image src="../../static/jiantou.png" mode=""></image>
|
||||||
</view>
|
</view> -->
|
||||||
<!-- <view class="External">
|
<!-- <view class="External">
|
||||||
<view class="lefttext">
|
<view class="lefttext">
|
||||||
修改密码
|
修改密码
|
||||||
@ -87,6 +84,7 @@
|
|||||||
myInfo() {
|
myInfo() {
|
||||||
nursePerson(this.phonenumber, this.password).then(res => {
|
nursePerson(this.phonenumber, this.password).then(res => {
|
||||||
this.appPersonallist = res.data
|
this.appPersonallist = res.data
|
||||||
|
console.log(this.appPersonallist)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
updatainfo() {
|
updatainfo() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user