InspectionCleaning/pages/my/account/logout_account.vue

83 lines
1.7 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="content">
<view class="u-content">
<u-parse :html="content"></u-parse>
</view>
<view class="tipsArea">
<view class="operation">
<u-checkbox v-model="agree">我同意<<退出协议>>提交后帐号将不再恢复</u-checkbox>
</view>
<view class="btn">
<u-button type="primary" style="width: 98%;margin-bottom: 15rpx;" @click="confirme">退出帐号</u-button>
</view>
</view>
<u-modal v-model="showModal" showCancelButton title="退出" content='确定要退出帐号吗?' @cancel="closeShowModal" @confirm="confirmOperation"></u-modal>
</view>
</template>
<script>
import {toast, clearStorageSync, setStorageSync, getStorageSync, useRouter} from '@/utils/utils.js'
export default {
data() {
return {
content: '',
show:true,
agree : false,
showModal: false
}
},
onLoad(op) {
//this.id = op.id
this.getPage()
},
onShow() {
},
onReady() {
},
methods: {
getPage(){
const param={
id:6
}
this.$api.page(param).then(res => {
if (res.code ==1 ) {
this.content = res.data.content
}
})
},
confirme(){
if(!this.agree) return toast('请查看并同意相关协议');
this.showModal = true
},
confirmOperation() {
this.$api.logout_account().then(res => {
if (res.code ==0 ) {
toast(res.msg);
}
})
},
closeShowModal(){
this.showModal = false
}
}
}
</script>
<style lang="scss">
.u-content{
padding: 20rpx;
color: $u-content-color;
font-size: 28rpx;
line-height: 1.8;
padding-bottom: 250rpx;
}
.tipsArea{position: fixed; bottom: 0;background: #fdf6ec;width: 100%;}
.operation{padding:20rpx;padding-top: 20rpx;
}
</style>