From ff22e520ceff42957ccc07fc93ad8364a042f41e Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Mon, 4 Mar 2024 18:20:11 +0800 Subject: [PATCH] 11 --- package1/other/logistics.vue | 36 +++++++++------ package1/other/logisticsAddress.vue | 70 ++++++++++++++++++----------- 2 files changed, 68 insertions(+), 38 deletions(-) diff --git a/package1/other/logistics.vue b/package1/other/logistics.vue index 9f9109b..5551271 100644 --- a/package1/other/logistics.vue +++ b/package1/other/logistics.vue @@ -165,20 +165,30 @@ content: "确定退出登录吗?", success: function(res) { if (res.confirm) { - that.tui.request("/auth/loginOutOfCompany", "POST", { - companyId:this.id, - companyName:this.companyName - }, false, false).then((res) => { - if (res.code == 200) { - that.tui.toast("退出登录成功") - uni.clearStorage(); - uni.navigateTo({ - url: '/pages/login/login' - }) - } else { - that.tui.toast(res.message) + uni.request({ + url: that.tui.interfaceUrl() + '/auth/loginOutOfCompany', + data: { + companyId:that.id, + companyName:that.companyName + }, + header: { + 'content-type': 'application/x-www-form-urlencoded', + 'appWLToken': that.tui.getToken() + }, + method: 'POST', //'GET','POST' + dataType: 'json', + success: (res) => { + if (res.data.code == 401){ + that.tui.toast("退出登录成功") + uni.clearStorage(); + uni.navigateTo({ + url: '/pages/login/login' + }) + } + }, + fail: (res) => { + that.tui.toast("网络不给力,请稍后再试~") } - }) } } diff --git a/package1/other/logisticsAddress.vue b/package1/other/logisticsAddress.vue index 758328b..2e913b8 100644 --- a/package1/other/logisticsAddress.vue +++ b/package1/other/logisticsAddress.vue @@ -1,7 +1,7 @@