Commit fe2f12fb authored by 14699's avatar 14699

注销账号调整

parent 347ea28c
......@@ -111,10 +111,6 @@
<div slot="name">当前版本</div>
<div slot="content">{{ currentVersion }}</div>
</item>-->
<item @click.native="unRegiester">
<img slot="left-icon" src="@/assets/myInfo/exit.png" class="left-icon" >
<div slot="name">注销账号</div>
</item>
<item @click.native="logOut">
<img slot="left-icon" src="@/assets/myInfo/exit.png" class="left-icon" >
<div slot="name">退出登录</div>
......@@ -1182,43 +1178,6 @@ export default {
name: 'ContactUs',
})
},
unRegiester () {
let vm = this
hlsPopup.showConfirm({
title: '提示',
content: '确认注销?',
onConfirm: function (index) {
if (index === 1) {
let phone = window.localStorage.getItem('user_phone') ? window.localStorage.getItem('user_phone') : ''
if (!phone) return hlsPopup.showLongCenter('当前用户未绑定手机号,无法注销!')
let url = process.env.basePath + 'app_user_delete'
let params = {
phone: phone,
}
hlsHttp.post(url, params).then(function (res) {
if (res.result === 'S') {
hlsPopup.showLongCenter('注销成功')
setTimeout(function () {
let width = window.localStorage.getItem('width')
let height = window.localStorage.getItem('height')
if (window.localStorage.isReadPolicy === 'false') {
window.localStorage.clear()
} else if (window.localStorage.isReadPolicy === 'true') {
window.localStorage.clear()
window.localStorage.setItem('isReadPolicy', true)
} else {
window.localStorage.clear()
}
window.localStorage.setItem('width', width)
window.localStorage.setItem('height', height)
vm.$router.push('/login')
}, 100)
}
})
}
},
})
},
},
}
</script>
......
......@@ -33,6 +33,10 @@
</div>
<div slot="right-icon" style="float:right;color:#383F45;opacity:0.4;">当前版本&nbsp;&nbsp;{{ currentVersion }}</div>
</item>
<item @click.native="unRegiester()">
<div slot="name" style="color:red;">注销账号</div>
<div class="arrow_right"><img src="@/assets/myInfo/exit.png"></div>
</item>
<!-- <item v-if="user_bp_type!='MANAGER'" @click.native="unBind()">
<div slot="name" style="color:#656464;">解除绑定</div>
<div class="arrow_right"><img src="@/assets/myinfo/arrow_right.png"></div>
......@@ -586,6 +590,43 @@ export default {
hlsPopup.hideLoading()
}
},
unRegiester () {
let vm = this
hlsPopup.showConfirm({
title: '提示',
content: '确认注销?',
onConfirm: function (index) {
if (index === 1) {
let phone = window.localStorage.getItem('user_phone') ? window.localStorage.getItem('user_phone') : ''
if (!phone) return hlsPopup.showLongCenter('当前用户未绑定手机号,无法注销!')
let url = process.env.basePath + 'app_user_delete'
let params = {
phone: phone,
}
hlsHttp.post(url, params).then(function (res) {
if (res.result === 'S') {
hlsPopup.showLongCenter('注销成功')
setTimeout(function () {
let width = window.localStorage.getItem('width')
let height = window.localStorage.getItem('height')
if (window.localStorage.isReadPolicy === 'false') {
window.localStorage.clear()
} else if (window.localStorage.isReadPolicy === 'true') {
window.localStorage.clear()
window.localStorage.setItem('isReadPolicy', true)
} else {
window.localStorage.clear()
}
window.localStorage.setItem('width', width)
window.localStorage.setItem('height', height)
vm.$router.push('/login')
}, 100)
}
})
}
},
})
},
},
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment