Files
crmeb-mp/pages/users/user_cancellation/index.vue
karlcarlo a5c5d753b6 feat: 添加静态资源文件及基础组件
- 新增大量图片资源,包括图标、背景图、海报等,用于页面展示
- 添加字体文件及样式配置,支持自定义字体
- 引入 uni-ui 组件库,包括图标、弹窗、日期选择器等常用组件
- 添加网络状态监听、加密工具等基础工具函数
- 配置 Vuex 状态管理,包括购物车数量、热门搜索词等
- 增加页面组件,如用户协议、分销信息、提现状态等
- 配置项目构建和忽略文件,优化开发体验
2026-02-26 17:59:51 +08:00

177 lines
4.0 KiB
Vue
Raw 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="agreement" :style="colorStyle">
<view class="flex-center">
<text class="iconfont icon-a-ic_tanhao1"></text>
</view>
<view class="name text-center">账号注销风险</view>
<view class="content" v-html="agreementData.content"></view>
<view class="footerH"></view>
<view class="footer">
<view class="trip">
<checkbox-group @change="ChangeIsDefault">
<checkbox :class="inAnimation ? 'trembling' : ''" @animationend="inAnimation = false" :checked="protocol ? true : false"
color="#ffffff" backgroundColor="#ffffff"
activeBackgroundColor="var(--view-theme)"
activeBorderColor="var(--view-theme)"/>
我已阅读并同意
<text class="red" @click="privacy('privacy ')">《隐私协议》</text>
</checkbox-group>
</view>
<view class="cancellation flex-aj-center" @click="next">下一步</view>
</view>
<view class="mark" v-show="isCancellation"></view>
<tui-modal :show="isCancellation" maskClosable custom @cancel="isCancellation = false">
<view class="tui-modal-custom">
<view class="fs-32 fw-500 lh-44rpx text-center">是否确认注销</view>
<view class="fs-30 text--w111-666 lh-42rpx text-center mt-22">注销后无法恢复,请谨慎操作</view>
<view class="flex-y-center">
<view class="w-full h-72 rd-36rpx flex-center border b-solid b--w111-ccc text-primary-con fs-26 mt-32 mr-16 clear-btn" @tap="cancelUser">注销</view>
<view class="w-full h-72 rd-36rpx flex-center bg-red fs-26 text--w111-fff mt-32 ml-16" @tap="isCancellation = false">取消</view>
</view>
</view>
</tui-modal>
</view>
</template>
<script>
import colors from '@/mixins/color.js';
import { getUserAgreement, cancelUser, getLogout } from '@/api/user.js';
import tuiModal from '@/components/tui-modal/index.vue';
export default {
mixins: [colors],
components: { tuiModal },
data() {
return {
isCancellation: false,
agreementData: '',
protocol: false,
inAnimation: false,
};
},
onLoad() {
this.getAgreement();
},
onShow() {
uni.removeStorageSync('form_type_cart');
},
methods: {
ChangeIsDefault(e) {
this.$set(this, 'protocol', !this.protocol);
},
getAgreement() {
getUserAgreement('cancel').then((res) => {
this.agreementData = res.data;
});
},
next() {
if (this.protocol) {
this.isCancellation = true;
} else {
this.$util.Tips({
title: '请先阅读隐私协议'
});
}
},
cancelUser() {
cancelUser()
.then((res) => {
this.$store.commit('LOGOUT');
uni.reLaunch({
url: '/pages/index/index'
});
})
.catch((msg) => {
return this.$util.Tips({
title: msg
});
});
},
privacy(type) {
uni.navigateTo({
url: '/pages/users/privacy/index?type=' + type
});
}
}
};
</script>
<style lang="scss" scoped>
/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
border: 1px solid var(--view-theme) !important;
background-color: var(--view-theme) !important;
width: 28rpx;
height: 28rpx;
font-size: 24rpx;
color: #fff !important;
}
.footerH {
height: 250rpx;
}
.agreement {
background-color: #fff;
padding-top: 84rpx;
.content {
padding: 0 30rpx;
}
.name {
padding: 30rpx 0 48rpx;
font-size: 36rpx;
font-weight: 500;
color: #333333;
line-height: 50rpx;
}
}
.top-msg {
display: flex;
align-items: center;
background-color: #fff;
padding: 40rpx 30rpx 40rpx 30rpx;
}
.icon-a-ic_tanhao1 {
font-size: 68rpx;
color: #e93323;
}
.footer {
text-align: center;
z-index: 99;
width: 100%;
background-color: #fafafa;
position: fixed;
padding: 0 30rpx 36rpx 30rpx;
box-sizing: border-box;
border-top: 1rpx solid #eee;
bottom: 0rpx;
.red {
color: #e93323;
}
.trip {
color: #999999;
font-size: 24rpx;
margin: 24rpx 0;
}
.cancellation {
height: 45px;
color: #fff;
font-size: 32rpx;
background: #e93323;
border-radius: 23px;
}
}
.mark {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 99;
}
.clear-btn{
border: 1px solid #E93323;
color: #E93323;
}
</style>