幼教产品B2B生态平台小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
1.6 KiB

12 months ago
<template>
<view>
<uni-list>
12 months ago
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="accountIcon" title="姓名" :rightText="realName" clickable @click="toPage('../userName/userName')" />
12 months ago
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="phoneIcon" title="手机号" :rightText="info.phone" clickable @click="toPage('../phone/phone')" />
</uni-list>
<view class="logout" @click="logout">退出登录</view>
</view>
</template>
<script>
12 months ago
import { authenticationOrNot } from '@/apis/modules/user.js'
12 months ago
export default {
data() {
return {
phoneIcon: {
color: '#007eff',
size: '22',
type: 'phone'
},
accountIcon: {
color: '#007eff',
size: '22',
type: 'person'
},
12 months ago
realName: '',
12 months ago
info: {
account: '',
phone: '',
email: ''
},
}
},
onShow() {
12 months ago
// this.getInfo()
12 months ago
},
methods: {
// 获取个人信息
12 months ago
async getInfo() {
const res = await authenticationOrNot()
if (res.authenticationInformation) {
this.realName = res.authenticationInformation.realName
}
12 months ago
},
toPage(path) {
this.$util.to(path)
},
// 退出登录
logout() {
const that = this
uni.showModal({
title: '提示',
content: '确定要退出账号吗?',
success(res) {
if (res.confirm) {
uni.clearStorageSync()
that.$util.to('/pages/login/login')
}
}
})
}
}
}
</script>
<style scoped lang="scss">
.logout {
padding: 30rpx 0;
margin-top: 30rpx;
font-size: 28rpx;
color: #333;
text-align: center;
background-color: #fff;
}
</style>