diff --git a/src/pages/index.wpy b/src/pages/index.wpy index 1ad706cc9a4909368861f6a363af79da95bcd137..ce7c9f46b0d0f45d61513f02a76173ec4a0bf6c8 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: () => { + } + }) } }); }