From 2abf5dffa095b830194416633785ccaf2a02f8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=A3=9E=E6=B4=8B?= <15778543+xufeiyang6017@user.noreply.gitee.com> Date: Fri, 5 Dec 2025 17:18:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E8=97=8F=E9=A1=B5=E9=9D=A2=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E6=9D=A1=E5=92=8C=E6=BB=9A=E5=8A=A8=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/seller/index.js | 29 ++++++++++++----------------- pages/seller/index.wxml | 12 +++++++----- pages/seller/index.wxss | 10 ++++++++++ 3 files changed, 29 insertions(+), 22 deletions(-) diff --git a/pages/seller/index.js b/pages/seller/index.js index 672c21b..c5f37c8 100644 --- a/pages/seller/index.js +++ b/pages/seller/index.js @@ -1625,12 +1625,7 @@ Page({ draftSupplies }); - // 显示搜索结果提示 - wx.showToast({ - title: `找到${filteredSupplies.length}个货源`, - icon: 'none', - duration: 1500 - }); + }, // 下拉刷新处理函数 @@ -1798,12 +1793,7 @@ Page({ draftSupplies }); - // 显示搜索结果提示 - wx.showToast({ - title: `找到${filteredSupplies.length}个货源`, - icon: 'none', - duration: 1500 - }); + }, // 修改图片URL处理函数 @@ -2561,9 +2551,9 @@ Page({ }, 500) }, - // 导航到全屏创建货源页面 + // 显示添加货源弹窗 showAddSupply(e) { - console.log('点击创建新货源按钮,导航到全屏页面'); + console.log('点击创建新货源按钮'); // 阻止事件冒泡,防止触发父元素的点击事件 if (e && e.stopPropagation) { @@ -2573,10 +2563,15 @@ Page({ // 从本地存储加载之前保存的货源数据 const savedSupply = wx.getStorageSync('newSupplyDraft') || { name: '', price: '', minOrder: '', yolk: '', spec: '', imageUrls: [] }; - // 导航到新的全屏创建货源页面 - wx.navigateTo({ - url: '/pages/create-supply/index' + // 直接显示创建货源弹窗,无需登录验证 + this.setData({ + showImagePreview: false, + showModal: true, + newSupply: savedSupply }); + + // 锁定页面滚动 + this.disablePageScroll(); }, // 隐藏弹窗 diff --git a/pages/seller/index.wxml b/pages/seller/index.wxml index c935b1c..124e0c2 100644 --- a/pages/seller/index.wxml +++ b/pages/seller/index.wxml @@ -472,11 +472,11 @@ - + × - + 创建货源 @@ -545,6 +545,8 @@ + + @@ -555,7 +557,7 @@ × - + 编辑货源 @@ -695,7 +697,7 @@