diff --git a/frontend/mini-app/pages/manager/supplier-text/supplier-text.js b/frontend/mini-app/pages/manager/supplier-text/supplier-text.js index c244705..6125052 100644 --- a/frontend/mini-app/pages/manager/supplier-text/supplier-text.js +++ b/frontend/mini-app/pages/manager/supplier-text/supplier-text.js @@ -95,7 +95,8 @@ Page({ that.setData({ textContent: data.text_content, templateType: data.template_type, actionLoading: false }); } }).catch(function (error) { - that.setData({ textContent: "", actionLoading: false, message: error.message || "加载失败" }); + that.setData({ textContent: "", actionLoading: false }); + wx.showToast({ title: error.message || "加载失败", icon: "none" }); }); }, @@ -106,6 +107,10 @@ Page({ handleCopyAndSend: function () { var that = this; if (!that.data.currentOrderId || !that.data.currentSupplierId) return; + if (!that.data.textContent || !that.data.textContent.trim()) { + wx.showToast({ title: "文案内容为空,无法下发", icon: "none" }); + return; + } wx.showModal({ title: "确认下发", content: "即将复制文案到剪贴板,并将订单 " + that.data.currentOrderNo + " 状态变更为待发厂。", diff --git a/frontend/mini-manager/pages/supplier-text.js b/frontend/mini-manager/pages/supplier-text.js index c244705..6125052 100644 --- a/frontend/mini-manager/pages/supplier-text.js +++ b/frontend/mini-manager/pages/supplier-text.js @@ -95,7 +95,8 @@ Page({ that.setData({ textContent: data.text_content, templateType: data.template_type, actionLoading: false }); } }).catch(function (error) { - that.setData({ textContent: "", actionLoading: false, message: error.message || "加载失败" }); + that.setData({ textContent: "", actionLoading: false }); + wx.showToast({ title: error.message || "加载失败", icon: "none" }); }); }, @@ -106,6 +107,10 @@ Page({ handleCopyAndSend: function () { var that = this; if (!that.data.currentOrderId || !that.data.currentSupplierId) return; + if (!that.data.textContent || !that.data.textContent.trim()) { + wx.showToast({ title: "文案内容为空,无法下发", icon: "none" }); + return; + } wx.showModal({ title: "确认下发", content: "即将复制文案到剪贴板,并将订单 " + that.data.currentOrderNo + " 状态变更为待发厂。",