|
|
@ -1211,10 +1211,12 @@ Page({ |
|
|
wx.switchTab({ url: '/pages/buyer/index' }) |
|
|
wx.switchTab({ url: '/pages/buyer/index' }) |
|
|
} else { |
|
|
} else { |
|
|
// 卖家登录成功后,重新显示创建货源弹窗
|
|
|
// 卖家登录成功后,重新显示创建货源弹窗
|
|
|
|
|
|
// 从本地存储加载保存的表单数据
|
|
|
|
|
|
const savedSupply = wx.getStorageSync('newSupplyDraft') || { name: '', price: '', minOrder: '', yolk: '', spec: '', imageUrls: [] }; |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
showImagePreview: false, |
|
|
showImagePreview: false, |
|
|
showModal: true, |
|
|
showModal: true, |
|
|
newSupply: { name: '', price: '', minOrder: '', yolk: '', spec: '', imageUrls: [] } |
|
|
newSupply: savedSupply |
|
|
}); |
|
|
}); |
|
|
this.disablePageScroll(); |
|
|
this.disablePageScroll(); |
|
|
} |
|
|
} |
|
|
@ -1401,6 +1403,8 @@ Page({ |
|
|
|
|
|
|
|
|
if (!userId || !openid || !userInfo) { |
|
|
if (!userId || !openid || !userInfo) { |
|
|
console.log('用户未登录,显示登录提示'); |
|
|
console.log('用户未登录,显示登录提示'); |
|
|
|
|
|
// 登录前保存当前表单数据到本地存储
|
|
|
|
|
|
wx.setStorageSync('newSupplyDraft', this.data.newSupply); |
|
|
// 用户未登录,显示未授权提示弹窗
|
|
|
// 用户未登录,显示未授权提示弹窗
|
|
|
wx.showModal({ |
|
|
wx.showModal({ |
|
|
title: '登录提示', |
|
|
title: '登录提示', |
|
|
|