113 lines
2.8 KiB
Vue
113 lines
2.8 KiB
Vue
<template>
|
||
<view class="user-container">
|
||
<view class="flex-col page">
|
||
<view class="flex-col justify-start relative section">
|
||
<view class="shrink-0 section_2"></view>
|
||
<u-avatar class="shrink-0 image pos" :showLoading="true" size="64px"
|
||
src="/static/images/icon/app.png"
|
||
@click="avatarClick"></u-avatar>
|
||
<text class="text pos_2">{{name}}</text>
|
||
<view class="flex-row items-center section_3 pos_3">
|
||
<image class="image_2"
|
||
src="https://ide.code.fun/api/image?token=661f6554a17dbc0011549df2&name=e9f03cae38a2e6362ae08df54c42ba39.png" />
|
||
<text class="text_2">编辑资料</text>
|
||
</view>
|
||
<view class="flex-row justify-between section_4 pos_4">
|
||
<text class="font">部门:工程师</text>
|
||
<text class="font">岗位:工程师</text>
|
||
</view>
|
||
</view>
|
||
<uni-card>
|
||
<u-grid :border="false" @click="gridClick" col="3">
|
||
<u-grid-item v-for="(baseListItem,baseListIndex) in gridList" :key="baseListIndex">
|
||
<u-icon :customStyle="{paddingTop:20+'rpx'}" :name="baseListItem.name" :size="48"></u-icon>
|
||
<text class="grid-text">{{baseListItem.title}}</text>
|
||
</u-grid-item>
|
||
</u-grid>
|
||
</uni-card>
|
||
<u-cell-group>
|
||
<u-cell icon="setting-fill" title="个人设置"></u-cell>
|
||
<u-cell icon="integral-fill" title="会员等级" value="新版本"></u-cell>
|
||
<u-cell icon="setting-fill" title="个人设置"></u-cell>
|
||
<u-cell icon="integral-fill" title="会员等级" value="新版本"></u-cell>
|
||
</u-cell-group>
|
||
<view class="out-button-box">
|
||
<u-modal :show="outLoginShow" title="退出登录" showCancelButton content='是否注销,并退出登录?'
|
||
@cancel="outLoginShow = false" @confirm="outLogin"></u-modal>
|
||
<u-button type="primary" text="退出登录" @click="outLoginShow = true"></u-button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
</template>
|
||
|
||
<script>
|
||
import {
|
||
mapGetters
|
||
} from 'vuex'
|
||
import {
|
||
mapActions
|
||
} from 'vuex'
|
||
export default {
|
||
components: {},
|
||
props: {},
|
||
computed: {
|
||
// 使用对象展开运算符将 getter 混入 computed 对象中
|
||
...mapGetters([
|
||
'name',
|
||
'avatar',
|
||
])
|
||
},
|
||
onLoad() {
|
||
console.log(this.name, this.avatar);
|
||
},
|
||
data() {
|
||
return {
|
||
outLoginShow: false,
|
||
userInfo: {
|
||
|
||
},
|
||
gridList: [{
|
||
name: 'photo',
|
||
title: '消息'
|
||
},
|
||
{
|
||
name: 'lock',
|
||
title: '帮助'
|
||
},
|
||
{
|
||
name: 'star',
|
||
title: '客服'
|
||
},
|
||
]
|
||
};
|
||
},
|
||
|
||
methods: {
|
||
...mapActions([
|
||
'LogOut',
|
||
'GetInfo'
|
||
]),
|
||
avatarClick() {
|
||
|
||
},
|
||
gridClick() {
|
||
|
||
},
|
||
// 退出登录
|
||
outLogin() {
|
||
this.LogOut();
|
||
this.outLoginShow = false;
|
||
setTimeout(() => {
|
||
uni.reLaunch({
|
||
url: '/pages/login/login'
|
||
});
|
||
}, 500)
|
||
}
|
||
},
|
||
};
|
||
</script>
|
||
|
||
<style scoped>
|
||
@import url("user.css");
|
||
</style> |