修改
This commit is contained in:
parent
dd3cb07fc3
commit
021551d3b6
@ -42,7 +42,9 @@
|
||||
login() {
|
||||
getPersonWeChatUserInfo(this.logincode, this.phonecode).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.setStorageSync("nursePersonId", res.data.nurseStationPersonId)
|
||||
if (res.data.personRoleLoginFlag == 'nursePersonRole') {
|
||||
uni.setStorageSync("nursePersonId", res.data.nurseStationPersonId)
|
||||
}
|
||||
uni.setStorageSync("personRoleLoginFlag", res.data.personRoleLoginFlag)
|
||||
this.$refs.uToast.show({
|
||||
title: '登录成功',
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<image class="circular" :src="beijingurl" mode=""></image>
|
||||
<view class="user" v-if="Personallist">
|
||||
<view class="user" v-if="Personallist&&personRoleLoginFlag == 'nursePersonRole'">
|
||||
<image class="img" :src="baseurl+Personallist.avatar" mode=""></image>
|
||||
<view class="phone" v-if="Personallist.nursePersonName">
|
||||
{{Personallist.nursePersonName}}
|
||||
@ -10,14 +10,20 @@
|
||||
{{Personallist.phone}}
|
||||
</view>
|
||||
<view class="nickname" v-if="Personallist.evaluateStarCount>=0">
|
||||
<u-rate :count="5" v-model="Personallist.evaluateStarCount" disabled active-color='#F4EA2A'></u-rate>
|
||||
<u-rate :count="5" v-model="Personallist.evaluateStarCount" disabled active-color='#F4EA2A'>
|
||||
</u-rate>
|
||||
</view>
|
||||
<view class="modify" @tap='goModifyinformation'>
|
||||
<image src="../../static/xg.png" mode="" style="padding-right: 15rpx;"></image>
|
||||
修改信息
|
||||
</view>
|
||||
</view>
|
||||
<view class="user" v-else>
|
||||
<view class="user" v-if="personRoleLoginFlag == 'stationRole'">
|
||||
<view class="phone">
|
||||
暂无
|
||||
</view>
|
||||
</view>
|
||||
<view class="user" v-if="!Personallist&&!personRoleLoginFlag">
|
||||
<image class="img" src="../../static/user.png" mode=""></image>
|
||||
<view class="login" @tap='gologin'>
|
||||
登录
|
||||
@ -89,35 +95,41 @@
|
||||
nursePersonId: null, //护理员id
|
||||
baseurl: null, //url
|
||||
Personallist: null, //获取个人信息
|
||||
personRoleLoginFlag: null,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.beijingurl = baseurl + '/profile/nursePersonAppletPicture/person_center.png'
|
||||
this.baseurl = baseurl;
|
||||
let that = this
|
||||
const value = uni.getStorageSync('nursePersonId');
|
||||
if (value) {
|
||||
that.nursePersonId = value
|
||||
that.myInfo()
|
||||
} else {}
|
||||
this.personRoleLoginFlag = uni.getStorageSync('personRoleLoginFlag');
|
||||
if (this.personRoleLoginFlag == 'nursePersonRole') {
|
||||
const value = uni.getStorageSync('nursePersonId');
|
||||
if (value) {
|
||||
that.nursePersonId = value
|
||||
that.myInfo()
|
||||
} else {}
|
||||
} else if (this.personRoleLoginFlag == 'stationRole') {}
|
||||
},
|
||||
onLoad(options) {},
|
||||
methods: {
|
||||
//点击状态
|
||||
tapstatus(item) {
|
||||
const value = uni.getStorageSync('nursePersonId');
|
||||
if (value) {
|
||||
var obj = {
|
||||
id: this.nursePersonId,
|
||||
workStatus: item
|
||||
}
|
||||
updateNursePersonWorkStatus(obj).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.myInfo()
|
||||
if (this.personRoleLoginFlag == 'nursePersonRole') {
|
||||
const value = uni.getStorageSync('nursePersonId');
|
||||
if (value) {
|
||||
var obj = {
|
||||
id: this.nursePersonId,
|
||||
workStatus: item
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
updateNursePersonWorkStatus(obj).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.myInfo()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
}
|
||||
},
|
||||
myInfo() {
|
||||
@ -147,13 +159,15 @@
|
||||
},
|
||||
//我的收益
|
||||
goMyBenefits() {
|
||||
const value = uni.getStorageSync('nursePersonId');
|
||||
if (value) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/MyBenefits/MyBenefits'
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
if (this.personRoleLoginFlag == 'nursePersonRole') {
|
||||
const value = uni.getStorageSync('nursePersonId');
|
||||
if (value) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/MyBenefits/MyBenefits'
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user