79 lines
1.9 KiB
Vue
79 lines
1.9 KiB
Vue
|
|
<template>
|
||
|
|
<view class="container">
|
||
|
|
<uni-list>
|
||
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="昵称"
|
||
|
|
:rightText="userInfo.nickname" />
|
||
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" title="手机号码"
|
||
|
|
:rightText="userInfo.mobile" />
|
||
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" title="邮箱" :rightText="'-'" />
|
||
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="岗位" :rightText="'-'" />
|
||
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="角色" :rightText="'-'" />
|
||
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="创建日期" :rightText="'-'" />
|
||
|
|
</uni-list>
|
||
|
|
<!-- <view class="button" @click="handlerLogout">
|
||
|
|
<u-button type="error" text="退出登录"></u-button>
|
||
|
|
</view> -->
|
||
|
|
</view>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
import {
|
||
|
|
getUserProfile
|
||
|
|
} from "@/api/system/user"
|
||
|
|
|
||
|
|
export default {
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
user: {},
|
||
|
|
roleGroup: "",
|
||
|
|
postGroup: "",
|
||
|
|
userInfo: JSON.parse(uni.getStorageSync('App-UserInfo'))
|
||
|
|
}
|
||
|
|
},
|
||
|
|
onLoad() {
|
||
|
|
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
handlerLogout () {
|
||
|
|
let _this = this;
|
||
|
|
uni.showModal({
|
||
|
|
title: '提示',
|
||
|
|
content: '确认退出当前账号?',
|
||
|
|
cancelText: '取消',
|
||
|
|
confirmText: '确认',
|
||
|
|
success: (res) => {
|
||
|
|
console.log(res)
|
||
|
|
if (res.confirm) {
|
||
|
|
this.$store.dispatch('LogOut').then((res) => {
|
||
|
|
uni.reLaunch({
|
||
|
|
url: '/pages/login',
|
||
|
|
complete() {
|
||
|
|
setTimeout(() => {
|
||
|
|
uni.showToast({
|
||
|
|
icon: 'none',
|
||
|
|
title: '操作成功!'
|
||
|
|
})
|
||
|
|
}, 500)
|
||
|
|
}
|
||
|
|
})
|
||
|
|
})
|
||
|
|
}
|
||
|
|
}
|
||
|
|
})
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="scss">
|
||
|
|
page {
|
||
|
|
background-color: #ffffff;
|
||
|
|
}
|
||
|
|
.button {
|
||
|
|
position: fixed;
|
||
|
|
bottom: 20rpx;
|
||
|
|
left: 20rpx;
|
||
|
|
right: 20rpx;
|
||
|
|
}
|
||
|
|
</style>
|