152 lines
3.5 KiB
Vue
152 lines
3.5 KiB
Vue
<template>
|
|
<view class="set">
|
|
<view class="set-menu">
|
|
<view v-for="(item,index) in menuList" :key="index">
|
|
<view class="u-slot-title f-30 flex justify-between align-center" @click="clickFn(item)">
|
|
<view>
|
|
{{item.text}}
|
|
</view>
|
|
<image style="width: 16rpx;height: 28rpx;" src="@/static/images/icon/arrow-right.png" mode="">
|
|
</image>
|
|
</view>
|
|
<u-line color="#f5f5f5"></u-line>
|
|
</view>
|
|
<view>
|
|
<view class="u-slot-title f-30 flex justify-between align-center">
|
|
<view>
|
|
个性化推荐
|
|
<view class="f-16 c999">工单审核状态等系统通知</view>
|
|
</view>
|
|
<view>
|
|
<u-switch activeColor="#13AFA8" v-model="isOpenGeTui" asyncChange @change="asyncChange"></u-switch>
|
|
</view>
|
|
</view>
|
|
<u-line color="#f5f5f5"></u-line>
|
|
</view>
|
|
</view>
|
|
<view class="set-bottom-button">
|
|
<u-button type="primary" plain shape="circle" text="注销" color="#999"
|
|
:customStyle='{height: "88rpx",marginRight: "16rpx",fontSize: "28rpx",fontWeight: 500,marginBottom: "16rpx"}'
|
|
@click="delCommFn(2)"></u-button>
|
|
<u-button type="primary" shape="circle" text="退出登录" color="#13AFA8"
|
|
:customStyle='{height: "88rpx",marginRight: "16rpx",fontSize: "28rpx",fontWeight: 500,}'
|
|
@click="delCommFn(1)"></u-button>
|
|
</view>
|
|
<promptBox ref="pbox" @confirm="disposeShowFn(1)"></promptBox>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
userLogoff,
|
|
getOpenGetui
|
|
} from "@/api/login/index.js"
|
|
import promptBox from "@/components/prompt-box/prompt-box.vue"
|
|
export default {
|
|
components: {
|
|
promptBox
|
|
},
|
|
data() {
|
|
return {
|
|
enType: 1,
|
|
menuList: [
|
|
// {
|
|
// text: '账号安全',
|
|
// path: '/pages/repair/user/changeCall/changeCall'
|
|
// },
|
|
|
|
{
|
|
text: '清除缓存',
|
|
path: '/pages/driver/mine/set/clear'
|
|
},
|
|
{
|
|
text: '常见问题',
|
|
path: '/pages/driver/mine/common_problem/common_problem'
|
|
}, {
|
|
text: '关于我们',
|
|
path: '/pages/driver/mine/about_us/about_us'
|
|
}
|
|
],
|
|
//个推开关
|
|
isOpenGeTui: false,
|
|
};
|
|
},
|
|
onLoad() {
|
|
const userInfo = uni.getStorageSync('userInfo')
|
|
this.isOpenGeTui = userInfo.isOpenGeTui
|
|
},
|
|
methods: {
|
|
asyncChange(e) {
|
|
console.log(e);
|
|
getOpenGetui().then(res => {
|
|
this.isOpenGeTui=e
|
|
})
|
|
},
|
|
//退出登录
|
|
delCommFn(type) {
|
|
this.enType = type
|
|
if (type == 1) {
|
|
this.$refs.pbox.show = true
|
|
this.$refs.pbox.tipContent.content = '您确定要退出登录吗?'
|
|
this.$refs.pbox.tipContent.cancelText = '取消'
|
|
} else {
|
|
this.$refs.pbox.show = true
|
|
this.$refs.pbox.tipContent.content = '您确定要注销此账号吗?'
|
|
this.$refs.pbox.tipContent.cancelText = '取消'
|
|
}
|
|
},
|
|
//url
|
|
clickFn(item) {
|
|
uni.navigateTo({
|
|
url: item.path
|
|
})
|
|
},
|
|
//退出登录
|
|
disposeShowFn() {
|
|
uni.clearStorageSync()
|
|
// #ifdef MP-WEIXIN
|
|
uni.reLaunch({
|
|
url: '/pages/login/weixin-login'
|
|
})
|
|
// #endif
|
|
// #ifdef APP
|
|
uni.reLaunch({
|
|
url: '/pages/login/driver-login'
|
|
})
|
|
// #endif
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
page {
|
|
background-color: #f5f5f5;
|
|
}
|
|
|
|
.u-slot-title {
|
|
padding: 32rpx 0;
|
|
}
|
|
|
|
.set {
|
|
width: 100%;
|
|
height: 100vh;
|
|
}
|
|
|
|
.set-menu {
|
|
width: calc(100% - 48rpx);
|
|
margin: 24rpx;
|
|
border-radius: 8rpx;
|
|
background-color: #fff;
|
|
padding: 0 32rpx 32rpx 32rpx;
|
|
}
|
|
|
|
.set-bottom-button {
|
|
width: 100%;
|
|
position: fixed;
|
|
left: 0;
|
|
bottom: 0;
|
|
padding: 10rpx 24rpx 40rpx 24rpx;
|
|
background: #fff;
|
|
}
|
|
</style> |