|
@@ -86,6 +86,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<button class="btn exit" @click="exitLogin()">退出登录</button>
|
|
|
+ <button class="btn exit" @click="cancelAccount()">注销账号</button>
|
|
|
</view>
|
|
|
<view class="version">
|
|
|
<view>
|
|
@@ -211,6 +212,30 @@
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ },
|
|
|
+ cancelAccount() {
|
|
|
+ let param = {
|
|
|
+ id: this.getUser().id
|
|
|
+ };
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定注销账号?',
|
|
|
+ success: res => {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.removeStorageSync('token');
|
|
|
+ uni.removeStorageSync('info');
|
|
|
+ uni.removeStorageSync('menu');
|
|
|
+ uni.redirectTo({
|
|
|
+ url: '/pages/login/login'
|
|
|
+ });
|
|
|
+ this.http.request({
|
|
|
+ url: '/sp-admin/app/AppUser/delete',
|
|
|
+ data: param,
|
|
|
+ success: res => {}
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -289,4 +314,4 @@
|
|
|
color: #888484;
|
|
|
text-align: center;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|