Files
RentWeAppFront/pages/profile/setting.vue

88 lines
1.5 KiB
Vue

<template>
<view>
<u-navbar :is-back="true" title="设置" :border-bottom="false">
</u-navbar>
<view class="setting-content">
<u-cell-group>
<u-cell-item title="个人信息" @click="profile"></u-cell-item>
<u-cell-item title="修改密码" @click="changePassword"></u-cell-item>
</u-cell-group>
</view>
<view class="btn">
<u-button @click="logout" plain>退出登录</u-button>
</view>
<view class="version">Version {{vuex_version}}</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
},
methods: {
profile() {
this.$u.route('/pages/profile/profile')
},
logout() {
// 登录成功修改token与用户信息
this.$u.vuex('vuex_token', '');
this.$u.vuex('vuex_user', {});
return uni.reLaunch({
url: '../index/index'
})
},
changePassword() {
this.$u.route('/pages/profile/password')
}
}
}
</script>
<style lang="scss">
.setting-content {
padding: 0rpx 20rpx;
border-radius: 10rpx;
background: #FFFFFF;
width: 94%;
margin: 20rpx auto;
&::v-deep .u-cell{
color: #222222 !important;
}
&::v-deep .u-cell_title{
font-size: 30rpx !important;
}
}
.btn {
width: 94%;
margin: 30rpx auto;
&::v-deep .u-btn {
border-radius: 10rpx;
font-size: 36rpx !important;
color: #EA4047 !important;
border: 0 !important;
}
&::v-deep .u-hairline-border:after {
border: 0 !important;
}
}
.version {
position: absolute;
bottom: 20rpx;
width: 100%;
text-align: center;
}
</style>