You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hezhiying/pages/Setting/Setting.vue

137 lines
2.7 KiB

1 year ago
<template>
<view class="page">
1 year ago
1 year ago
<!-- 设置列表 -->
<view class="setting-list">
<view class="list" @click="onSetting('account')">
<view class="title">
1 year ago
<text>账户与安全</text>
1 year ago
</view>
<view class="more-content">
<text class="iconfont icon-more more"></text>
</view>
</view>
1 year ago
<view class="list" @click="goText(3)">
1 year ago
<view class="title">
1 year ago
<text>关于</text>
1 year ago
</view>
<view class="more-content">
<text class="iconfont icon-more more"></text>
</view>
</view>
</view>
1 year ago
1 year ago
<!-- 退出 -->
<view class="quit-login" @click="onQuitLogin">
<text>退出登录</text>
</view>
1 year ago
<view class="agreeText">
<view class="link" @click="goText(1)">
合之赢用户协议
1 year ago
</view><text></text><view class="link" @click="goText(2)">
1 year ago
合之赢隐私协议
</view>
</view>
1 year ago
<!-- 提示框 -->
<DialogBox ref="DialogBox"></DialogBox>
</view>
</template>
<script>
1 year ago
import {removeAll} from '@/common/auth.js'
import {logout} from '@/common/api.js'
1 year ago
export default {
data() {
return {
};
},
methods:{
1 year ago
goText(id){
uni.navigateTo({
url:`/pages/my/richText?id=${id}`
})
},
1 year ago
/**
* 用户信息点击
*/
onUserInfo(){
uni.navigateTo({
url: '/pages/Information/Information'
})
},
/**
* 地址点击
*/
onAddress(){
uni.navigateTo({
url: '/pages/AddressList/AddressList',
})
},
/**
* 设置列表点击
* @param {String} type
*/
onSetting(type){
switch(type) {
case 'account':
uni.navigateTo({
url: '/pages/AccountSecurity/AccountSecurity'
})
break;
case 'pay':
uni.navigateTo({
url: '/pages/PaymentPassword/PaymentPassword'
})
break;
case 'invoice':
uni.navigateTo({
url: '/pages/InvoiceList/InvoiceList'
})
break;
case 'vip':
uni.navigateTo({
url: '/pages/MyMemberInterest/MyMemberInterest'
})
break;
case 'common':
uni.navigateTo({
url: '/pages/SettingCommon/SettingCommon'
})
break;
case 'about':
uni.navigateTo({
url: '/pages/AboutUs/AboutUs'
})
break;
}
},
/**
* 退出点击
*/
onQuitLogin(){
this.$refs['DialogBox'].confirm({
title: '提示',
content: '是否要退出登录?',
DialogType: 'inquiry',
animation: 0
}).then(()=>{
1 year ago
logout().then(res=>{
if(res.code==1){
removeAll()
uni.switchTab({
url:'/pages/home/home'
})
}
})
1 year ago
})
}
}
}
</script>
<style scoped lang="scss">
@import 'Setting.scss';
</style>