From a9dc80440c97b2415affef79e80a6c54b8d03150 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期五, 16 十二月 2022 16:57:50 +0800
Subject: [PATCH] #
---
pages/business/cstmr/addCsmtr.vue | 9 +++++++++
pages/business/cstmr/csmtr.vue | 18 +++++++++++++++---
2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/pages/business/cstmr/addCsmtr.vue b/pages/business/cstmr/addCsmtr.vue
index 10f7e33..6c4624f 100644
--- a/pages/business/cstmr/addCsmtr.vue
+++ b/pages/business/cstmr/addCsmtr.vue
@@ -227,6 +227,15 @@
var res = result.data
if (res.code === 200) {
uni.navigateBack()
+ } else if (res.code === 403) {
+ uni.showToast({title: res.msg, icon: "none", position: 'top'})
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '../../login/login'
+ });
+ }, 1000);
+ } else {
+ uni.showToast({title: res.msg, icon: "none",position: 'top'})
}
}
})
diff --git a/pages/business/cstmr/csmtr.vue b/pages/business/cstmr/csmtr.vue
index 652e3c0..4421362 100644
--- a/pages/business/cstmr/csmtr.vue
+++ b/pages/business/cstmr/csmtr.vue
@@ -25,14 +25,18 @@
}
},
onReady() {
- this.baseUrl = uni.getStorageSync('baseUrl')
- this.getCsmtr()
+
+ // this.getCsmtr()
},
// 鏂板缓鎸夐挳浜嬩欢
onNavigationBarButtonTap(e) {
uni.navigateTo({
url:'/pages/business/cstmr/addCsmtr',
})
+ },
+ onShow() {
+ this.baseUrl = uni.getStorageSync('baseUrl')
+ this.getCsmtr()
},
methods: {
getCsmtr() {
@@ -48,8 +52,16 @@
var res = result.data
if (res.code === 200) {
that.csmtrList = res.data.records
+ } else if (res.code === 403) {
+ uni.showToast({title: res.msg, icon: "none", position: 'top'})
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '../../login/login'
+ });
+ }, 1000);
+ } else {
+ uni.showToast({title: res.msg, icon: "none",position: 'top'})
}
- console.log(that.csmtrList);
}
})
}
--
Gitblit v1.9.1