export function showShareImageMenu(path, that) {
uni.$emit('imagePreview', [path])
return
const { windowInfo } = getApp().globalData
const { isPc } = getApp().globalData
if (isPc) {
uni.previewImage({
urls: [path],
current: 0,
})
return
}
wx.showShareImageMenu({
path,
style: windowInfo.screenWidth > 500 ? 'v2' : 'default',
needShowEntrance: false,
fail: ({ errMsg }) => {
if (errMsg.includes('not supported')) {
that.$showModal({
title: '目前设备暂不支持分享图片格式',
content:
'解决方法:1、点击保存到相册然后发送给客户;\n2、在设置中使用网页链接分享;\n3、使用手机操作分享',
})
}
},
})
}
选择分享给朋友之后没有回调接口,要自己手动关闭wx.showShareImageMenu出现的窗口