diff --git a/pages/invoiceDetail/index.js b/pages/invoiceDetail/index.js index 7aa75fd..6aeb534 100644 --- a/pages/invoiceDetail/index.js +++ b/pages/invoiceDetail/index.js @@ -85,8 +85,26 @@ Page({ }, fail: function (e) { - alertError("打开失败") - console.log('打开失败错误为', e) + // alertError("打开失败") + // console.log('打开失败错误为', e) + wx.showModal({ + title: '提示', + content: '打开失败,请复制链接后通过浏览器打开', + complete: (res) => { + if (res.cancel) { + + } + + if (res.confirm) { + wx.setClipboardData({ + data: data, + success: () => { + alertSuccess("复制成功") + } + }) + } + } + }) } }) } diff --git a/utils/request.js b/utils/request.js index ed79254..cb87401 100644 --- a/utils/request.js +++ b/utils/request.js @@ -80,7 +80,11 @@ const request = async function (options, config = {}) { const parseResponse = function (response, url) { console.log('response', response) if (!response) { - alertError("服务无响应") + wx.redirectTo({ + url: '/pages/login/index', + }) + wx.clearStorageSync() + alertError("无响应,请重试") return }