From eecdc357c40807b9535db405bc6e10a9360215cb 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: Thu, 4 Dec 2025 10:54:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dseller=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=90=8E=E8=A1=A8=E5=8D=95=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/seller/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/seller/index.js b/pages/seller/index.js index 579dae6..f4ed25e 100644 --- a/pages/seller/index.js +++ b/pages/seller/index.js @@ -1211,10 +1211,12 @@ Page({ wx.switchTab({ url: '/pages/buyer/index' }) } else { // 卖家登录成功后,重新显示创建货源弹窗 + // 从本地存储加载保存的表单数据 + const savedSupply = wx.getStorageSync('newSupplyDraft') || { name: '', price: '', minOrder: '', yolk: '', spec: '', imageUrls: [] }; this.setData({ showImagePreview: false, showModal: true, - newSupply: { name: '', price: '', minOrder: '', yolk: '', spec: '', imageUrls: [] } + newSupply: savedSupply }); this.disablePageScroll(); } @@ -1401,6 +1403,8 @@ Page({ if (!userId || !openid || !userInfo) { console.log('用户未登录,显示登录提示'); + // 登录前保存当前表单数据到本地存储 + wx.setStorageSync('newSupplyDraft', this.data.newSupply); // 用户未登录,显示未授权提示弹窗 wx.showModal({ title: '登录提示',