|
|
@@ -3,7 +3,7 @@
|
|
|
<div>
|
|
|
<form>
|
|
|
<div class="module-com input-line-wrap" style="padding:20upx 26upx 0upx 26upx;font-size:32upx;">
|
|
|
- 您正在申请离职,如你之前有注册过门店,离职后将会回到你自己的门店。如没有注册过,离职后将退出登录状态。
|
|
|
+ 您正在申请离职,如你之前有注册过门店,离职后将会回到你自己的门店。如没有注册过,离职后将退出登录。
|
|
|
</div>
|
|
|
<div class="confirm-btn">
|
|
|
<button class="admin-button-com big blue" @click="confirmDim()">确认离职</button>
|
|
|
@@ -37,14 +37,17 @@ export default {
|
|
|
let that = this
|
|
|
// 显示加载提示
|
|
|
uni.showLoading({ title: '处理中...' })
|
|
|
-
|
|
|
delStaff().then(res => {
|
|
|
uni.hideLoading()
|
|
|
if(res.code == 1){
|
|
|
- that.$msg('离职成功')
|
|
|
- // 清理本地数据
|
|
|
- uni.clearStorage()
|
|
|
- that.$store.commit("setLoginInfo", {})
|
|
|
+
|
|
|
+ that.$msg('操作成功')
|
|
|
+
|
|
|
+ if(res.data.hasShop == 0){
|
|
|
+ // 没有门店,清理本地数据
|
|
|
+ uni.clearStorage()
|
|
|
+ that.$store.commit("setLoginInfo", {})
|
|
|
+ }
|
|
|
|
|
|
// 根据不同平台处理重启
|
|
|
// #ifdef APP-PLUS
|
|
|
@@ -56,13 +59,7 @@ export default {
|
|
|
// #ifdef H5
|
|
|
window.location.reload()
|
|
|
// #endif
|
|
|
- } else {
|
|
|
- that.$msg(res.msg || '离职失败,请重试')
|
|
|
}
|
|
|
- }).catch(err => {
|
|
|
- uni.hideLoading()
|
|
|
- console.error('离职API调用失败:', err)
|
|
|
- that.$msg('网络错误,请重试')
|
|
|
})
|
|
|
}
|
|
|
}
|