This commit is contained in:
曹辉 2023-04-11 10:44:37 +08:00
parent f6ee498b48
commit ba0d799367
2 changed files with 41 additions and 6 deletions

View File

@ -138,7 +138,8 @@
// return data => data?.nurseStationSysUserVOList?. [0]?.nurseStationName || '' // return data => data?.nurseStationSysUserVOList?. [0]?.nurseStationName || ''
// }, // },
}, },
onShow() { onShow() {},
onLoad(options) {
this.image = false this.image = false
this.baseurl = baseurl; this.baseurl = baseurl;
let that = this let that = this
@ -148,7 +149,6 @@
that.myInfo() that.myInfo()
} else {} } else {}
}, },
onLoad(options) {},
methods: { methods: {
// //
delimg(item) { delimg(item) {

View File

@ -25,7 +25,7 @@
{{phone}} {{phone}}
</view> </view>
</view> </view>
<view class="user" v-if="!Personallist&&!personRoleLoginFlag"> <view class="user" v-if="!personRoleLoginFlag">
<image class="img" src="../../static/users.png" mode=""></image> <image class="img" src="../../static/users.png" mode=""></image>
<view class="login" @tap='gologin'> <view class="login" @tap='gologin'>
登录 登录
@ -73,17 +73,16 @@
我的考试 我的考试
</view> </view>
</view> </view>
<view class="bottomitem" @tap='gostudy'> <view class="bottomitem" @tap='goremove'>
<image src="../../static/shezhi.png" mode=""></image> <image src="../../static/shezhi.png" mode=""></image>
<view class=""> <view class="">
设置 退出账号
</view> </view>
</view> </view>
</view> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
import { import {
nurseAppletPersonCenter, nurseAppletPersonCenter,
@ -183,6 +182,42 @@
} }
} }
}, },
//退
goremove() {
let that = this
const value = uni.getStorageSync('nursePersonId');
if (value) {
uni.showModal({
title: '提示',
content: '确认要退出此账号吗',
success: function(res) {
if (res.confirm) {
uni.removeStorageSync('nursePersonId');
uni.removeStorageSync('personRoleLoginFlag');
that.$refs.uToast.show({
title: '退出账号成功',
type: 'success',
duration: '1000'
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.switchTab({
url: '/pages/homepage/homepage'
})
}, 1000)
}
}
});
} else {
that.$refs.uToast.show({
title: '您未登录',
type: 'error',
duration: '1000'
})
}
},
} }
} }
</script> </script>