若干优化

This commit is contained in:
袁涛
2025-08-13 18:05:03 +08:00
parent a57e4b0a39
commit dc2d0ccc41
5 changed files with 23 additions and 142 deletions

View File

@@ -2976,21 +2976,15 @@
wx.config({ debug, appId, timestamp, nonceStr, signature, jsApiList: jsApiLists, openTagList: openTagLists })
wx.ready(() => {
new Promise(next => {
if (wx.onMenuShareTimeline) {
const { title, link, imgUrl } = timeLine
const { success, error } = callback
wx.onMenuShareTimeline({ title, link, imgUrl, success, error })
} else {
if (wx.updateTimelineShareData) {
const { title, link, imgUrl } = timeLine
console.log('timeLine', timeLine)
const { success, error } = callback
wx.updateTimelineShareData({ title, link, imgUrl, success, error })
}
if (wx.onMenuShareAppMessage) {
const { title, link, imgUrl, desc } = friend
const { success, error } = callback
wx.onMenuShareAppMessage({ title, desc, link, imgUrl, success, error })
} else {
if (wx.updateAppMessageShareData) {
const { title, link, imgUrl, desc } = friend
console.log('friend', friend)
const { success, error } = callback
wx.updateAppMessageShareData({ title, desc, link, imgUrl, success, error })
}