From 2fb7c3683e687b78d013f103bbf2fd78f22441ea Mon Sep 17 00:00:00 2001 From: wwz <1144797966@qq.com> Date: Sat, 12 Apr 2025 16:12:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E7=A5=A8=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- framework/11-api.js | 23 +++++++++++++++++++---- pages/electric/orderinquiry.vue | 4 ++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/framework/11-api.js b/framework/11-api.js index 59be2be..436e071 100644 --- a/framework/11-api.js +++ b/framework/11-api.js @@ -71,10 +71,25 @@ async function request(options) { // #endif if (res.code != 1) { if (options.toast) { - uni.showToast({ - title: res.message || res.msg, - icon: "none", - }) + try { + if (res.msg.length > 10 || res.message.length > 10) { + uni.showModal({ + title: '提示', //标题 + content: res.message || res.msg, + showCancel: false //不显示取消按钮 + }) + } else { + uni.showToast({ + title: res.message || res.msg, + icon: "none", + }) + } + } catch (error) { + uni.showToast({ + title: res.message || res.msg, + icon: "none", + }) + } setTimeout(res => { uni.hideLoading() }, 1000) diff --git a/pages/electric/orderinquiry.vue b/pages/electric/orderinquiry.vue index 83a2d4c..a68346a 100644 --- a/pages/electric/orderinquiry.vue +++ b/pages/electric/orderinquiry.vue @@ -93,6 +93,10 @@ 发票状态 {{details.status}} + + 失败原因 + {{details.status_note}} + 发票信息