From d27fa31ac7f73ce7f00280266b8e87f7b83a0f72 Mon Sep 17 00:00:00 2001 From: qiaomu <3520484422@qq.com> Date: Wed, 14 May 2025 09:57:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=97=A0=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/invoiceDetail/index.js | 22 ++++++++++++++++++++-- utils/request.js | 6 +++++- 2 files changed, 25 insertions(+), 3 deletions(-) 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 }