|
@@ -81,6 +81,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<button class="btn exit" @click="exitLogin()">退出登录</button>
|
|
|
+ <button class="btn exit" @click="cancelAccount()">注销账号</button>
|
|
|
</view>
|
|
|
<view class="version">版本号:{{version}}</view>
|
|
|
</view>
|
|
@@ -201,6 +202,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 => {}
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -278,4 +303,4 @@
|
|
|
bottom: 70px;
|
|
|
color: #888484;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|