连云港陪玩陪聊
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.

167 lines
3.4 KiB

3 months ago
<template>
<view class="zhuxiao">
<view class="title">注销后你账号将</view>
1 month ago
<view class="content" v-html="content">
3 months ago
</view>
<view class="fd">
<view class="xieyi" @click="toToggle()">
1 month ago
<image v-if="isCheck ==false" src="@/static/icon-select.png"></image>
3 months ago
<image v-else src="@/static/icon-select-on.png"></image>我已认真阅读且同意注销账号需要注意的内容
</view>
<view class="btns">
1 month ago
<view class="cancle" @click="toCancle">取消</view>
<view class="sure" @click="toClick">确定</view>
3 months ago
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
1 month ago
isCheck: false,
content: ""
3 months ago
};
1 month ago
},
onLoad() {
this.getInfo()
},
methods: {
toToggle() {
this.isCheck = !this.isCheck
},
toClick() {
const that = this;
if(this.isCheck == false){
uni.showToast({
icon: "none",
position: "bottom",
title: "请选择注销内容协议"
})
return ;
}
uni.showModal({
title: "温馨提示",
content: "是否要注销当前账号?",
async success( res) {
4 weeks ago
if(res.confirm){
const res = await that.$api.cancelAccount({userId: uni.getStorageSync("userInfo").id});
console.log(res)
if(res.code == 200){
uni.showToast({
title: "注销成功",
1 month ago
})
4 weeks ago
uni.clearStorageSync();
uni.closeSocket();
setTimeout(()=>{
uni.reLaunch({
url: "/pages/login/index"
})
},2000)
}else{
uni.showToast({
icon: "none",
position: "bottom",
title: res.msg
})
}
1 month ago
}
}
})
},
toCancle() {
uni.navigateBack({
delta: 1
})
},
async getInfo() {
const { code,data } = await this.$api.getConfigData({dictType: 'CONFIG_CANCEL_ACCOUNT'});
if(code == 200){
this.content = data.content.replace(/style=""/g, '')
.replace(/<img " src=/g, '<img src=')
.replace(/<img src=/g, '<img style="width: 100%; height:100%; display:block" src=');
}
},
3 months ago
}
}
</script>
<style scoped lang="scss">
1 month ago
.zhuxiao{
min-height: 100vh;
3 months ago
background-color: #fff;
1 month ago
padding: 30rpx 30rpx 400rpx;
overflow: hidden;
box-sizing: border-box;
3 months ago
.title{
font-weight: 500;
font-size: 36rpx;
color: #222222;
line-height: 40rpx;
margin-top: 20rpx;
}
.content{
font-weight: 500;
font-size: 26rpx;
color: #666666;
line-height: 40rpx;
text-align: left;
margin-top: 40rpx;
}
.fd{
width: 100%;
font-weight: 500;
font-size: 24rpx;
color: #222222;
position: fixed;
left: 0;
bottom: 100rpx;
z-index: 22;
padding: 0 30rpx;
box-sizing: border-box;
.xieyi{
display: flex;
align-items: center;
justify-content: flex-start;
image{
width: 35rpx;
height: 35rpx;
margin-right: 10rpx;
}
}
.btns{
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 50rpx;
text-align: center;
.cancle{
width: 300rpx;
height: 90rpx;
line-height: 90rpx;
background: #EDEDED;
border-radius: 90rpx;
font-weight: 500;
font-size: 30rpx;
color: #222222;
}
.sure{
width: 300rpx;
height: 90rpx;
line-height: 90rpx;
background: linear-gradient(0deg, #000000, #3D3B38);
border-radius: 90rpx;
font-weight: 500;
font-size: 30rpx;
color: #fff;
}
}
}
}
</style>