From a48cc7442795c4e989e7eca60b3949cd142a2cbb Mon Sep 17 00:00:00 2001 From: limengyang <2509946015@qq.com> Date: Mon, 27 Nov 2023 14:56:43 +0800 Subject: [PATCH] =?UTF-8?q?token=E8=BF=87=E6=9C=9F=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index.wpy | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/pages/index.wpy b/src/pages/index.wpy index 1ad706c..ce7c9f4 100644 --- a/src/pages/index.wpy +++ b/src/pages/index.wpy @@ -208,7 +208,15 @@ wepy.page({ success: (res) => { if (res.data.success) { this.orderList = res.data.data - } else { + } else if(res.statusCode === 401) { + wx.showModal({ + title: '提示', + content: '重新扫码登录', + showCancel: false, + success: () => { + } + }) + } else { this.orderList = [] } wx.hideLoading() @@ -216,7 +224,13 @@ wepy.page({ }); }, fail: function() { - console.log('用户未登录'); + wx.showModal({ + title: '提示', + content: '重新扫码登录', + showCancel: false, + success: () => { + } + }) } }); } @@ -379,7 +393,13 @@ wepy.page({ this.getList() }, fail: function() { - console.log('用户未登录'); + wx.showModal({ + title: '提示', + content: '重新扫码登录', + showCancel: false, + success: () => { + } + }) } }); } -- 2.24.1