<template>
|
|
<view class="page">
|
|
<navbar title="设置" leftClick @leftClick="$utils.navigateBack" />
|
|
|
|
<view class="content">
|
|
<view class="card flex operate" @click="$refs.popup.open('user_ys')">
|
|
<text>隐私政策</text>
|
|
<uv-icon name="arrow-right" color="#000000" size="28rpx"></uv-icon>
|
|
</view>
|
|
|
|
<button v-if="isLogined" plain class="btn-logout" @click="onLogout">退出登录</button>
|
|
</view>
|
|
|
|
<configPopup ref="popup"></configPopup>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
isLogined: false
|
|
}
|
|
},
|
|
onShow() {
|
|
this.isLogined = !!uni.getStorageSync('token')
|
|
},
|
|
methods: {
|
|
onLogout() {
|
|
this.$store.commit('logout')
|
|
}
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.page {
|
|
background-color: $uni-bg-color;
|
|
position: relative;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
}
|
|
|
|
.content {
|
|
padding: 20rpx;
|
|
}
|
|
|
|
.operate {
|
|
padding: 28rpx 22rpx 28rpx 20rpx;
|
|
justify-content: space-between;
|
|
|
|
color: #1B1B1B;
|
|
font-weight: 500;
|
|
font-size: 32rpx;
|
|
}
|
|
|
|
.btn-logout {
|
|
width: calc(100% - 40rpx);
|
|
height: 90rpx;
|
|
background-color: $uni-bg-color-highlight;
|
|
color: $uni-text-color-highlight;
|
|
font-size: 36rpx;
|
|
border-radius: 45rpx;
|
|
|
|
position: absolute;
|
|
left: 20rpx;
|
|
bottom: 159rpx;
|
|
}
|
|
</style>
|