1
This commit is contained in:
48
pages/me/index.vue
Normal file
48
pages/me/index.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="x-f pb20 pt20">
|
||||
<u-avatar src=""></u-avatar> <view class="user-name"><span>您好!</span>{{ userInfo.realname }}</view>
|
||||
</view>
|
||||
<u-cell-group>
|
||||
<u-cell icon="setting-fill" title="切换系统" :isLink="true" @click="handleTo('/pages/index/index')"></u-cell>
|
||||
<u-cell icon="info-circle-fill" title="关于我们" :isLink="true" @click="handleTo('/pages/me/aboutMe')"></u-cell>
|
||||
</u-cell-group>
|
||||
<u-button class="mt40" type="warning" :plain="true" text="退出当前账号" @click="handleLoginOut"></u-button>
|
||||
<my-tabBar :currentTab="1" />
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import { computed, reactive } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import nx from '@/nx'
|
||||
|
||||
const userInfo = computed(() => nx.$store('user').userInfo)
|
||||
|
||||
function handleTo(url) {
|
||||
nx.$router.go(url)
|
||||
}
|
||||
function handleLoginOut() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `确定退出登录吗?`,
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
nx.$store('user').logout()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
padding: 0 30px;
|
||||
.user-name {
|
||||
padding-left: 30px;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
::v-deep .u-button__text {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user