|
|
@ -1211,6 +1211,19 @@ Page({ |
|
|
|
|
|
|
|
|
// 预览图片
|
|
|
// 预览图片
|
|
|
previewImage(e) { |
|
|
previewImage(e) { |
|
|
|
|
|
// 登录验证
|
|
|
|
|
|
const userInfo = wx.getStorageSync('userInfo') || null |
|
|
|
|
|
const userId = wx.getStorageSync('userId') || null |
|
|
|
|
|
if (!userInfo || !userId) { |
|
|
|
|
|
// 未登录,显示授权登录弹窗
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
showAuthModal: true, |
|
|
|
|
|
pendingUserType: 'buyer' |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 已登录,执行图片预览
|
|
|
const { urls, index } = e.currentTarget.dataset |
|
|
const { urls, index } = e.currentTarget.dataset |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
showImagePreview: true, |
|
|
showImagePreview: true, |
|
|
@ -1221,6 +1234,19 @@ Page({ |
|
|
|
|
|
|
|
|
// 预览图片
|
|
|
// 预览图片
|
|
|
previewImage(e) { |
|
|
previewImage(e) { |
|
|
|
|
|
// 登录验证
|
|
|
|
|
|
const userInfo = wx.getStorageSync('userInfo') || null |
|
|
|
|
|
const userId = wx.getStorageSync('userId') || null |
|
|
|
|
|
if (!userInfo || !userId) { |
|
|
|
|
|
// 未登录,显示授权登录弹窗
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
showAuthModal: true, |
|
|
|
|
|
pendingUserType: 'buyer' |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 已登录,执行图片预览
|
|
|
const { urls, index } = e.currentTarget.dataset |
|
|
const { urls, index } = e.currentTarget.dataset |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
showImagePreview: true, |
|
|
showImagePreview: true, |
|
|
|