<template>
|
|
<view class="setting">
|
|
<u-navbar
|
|
:title="$t('page.setting.title')"
|
|
:safeAreaInsetTop="false"
|
|
placeholder
|
|
@leftClick="leftClick"
|
|
>
|
|
</u-navbar>
|
|
<view class="line">
|
|
|
|
<u-cell class="celi"
|
|
url="updatePassword"
|
|
:title="$t('page.setting.updatePassword.title')"
|
|
isLink></u-cell>
|
|
|
|
<u-cell class="celi"
|
|
url="updatePayPassword"
|
|
:title="$t('page.setting.updatePayPassword.title')"
|
|
isLink></u-cell>
|
|
|
|
|
|
<u-cell class="celi"
|
|
@click="logout"
|
|
:title="$t('page.setting.logout')"
|
|
isLink></u-cell>
|
|
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
|
|
};
|
|
},
|
|
methods : {
|
|
leftClick(){
|
|
uni.switchTab({
|
|
url: '/pages/user/user'
|
|
})
|
|
},
|
|
logout(){
|
|
localStorage.removeItem('token')
|
|
localStorage.removeItem('uid')
|
|
localStorage.removeItem('account')
|
|
localStorage.removeItem('money')
|
|
uni.$u.toast(this.$t('success-operation'))
|
|
setTimeout(()=>{
|
|
uni.navigateTo({
|
|
url: '/pages/login/login'
|
|
})
|
|
},500)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.setting{
|
|
.line{
|
|
background-color: #fff;
|
|
margin-top: 10px;
|
|
.celi{
|
|
// background-color: #F8F8F8;
|
|
border-radius: 10px;
|
|
padding: 5px 10px;
|
|
}
|
|
}
|
|
}
|
|
</style>
|