活动id都是对的,后端更新也都正常
https://developers.weixin.qq.com/minigame/dev/guide/open-ability/share/updatable-message.html
wx.updateShareMenu({
withShareTicket: true,
isUpdatableMessage: true,
activityId: activityId, // 活动 ID
// targetState: 0,
templateInfo: {
parameterList: [{
name: 'member_count',
value: res.data.memberCount
}, {
name: 'room_limit',
value: res.data.roomLimit
}]
},
success(res) {
console.log('updateShareMenu success', res);
shareAppMessage();
},
fail(res) {
console.log('updateShareMenu fail', res);
shareAppMessage();
},
complete(res) {
console.log('updateShareMenu complete', res);
}
})
export function shareAppMessage(){
let title = "";
title = getShareTitle(getGameType());
wx.shareAppMessage({
toCurrentGroup: false,
title: title,
query: 'roomId=' + getRoomId() + '&gameType=' + getGameType()
})
}
前端打印的日志是
updateShareMenu success
updateShareMenu complete
但转发出来仍然是普通消息。
后端api获取活动id和更新动态消息接口都返回正常。
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
wx.shareAppMessage({
toCurrentGroup: false,
title: title,
query: ''
})