- Android 发送动态消息特性无效(发出去仍然为普通的消息)
而iOS一切正常。我想应该不会有设备平台的区分配置吧? wx.updateShareMenu
2020-12-11 - 如何修改动态消息?
我是这么用的: wx.cloud.callFunction({ name: 'CreateActivity' }).then(succ => { console.log('CreateActivity', succ); let activityId = succ.result; Global.UNG.Temp.ActivityId = activityId; wx.updateShareMenu({ withShareTicket: true, isUpdatableMessage: true, // isPrivateMessage: true, activityId: activityId, // 活动 ID templateInfo: { parameterList: [{ name: 'member_count', value: '1' }, { name: 'room_limit', value: '2' }] } }); WeAppService.shareAppMessage({ title: '{}想和你进行决斗 (比赛:{})'.format(nickname, r), imageUrl: 'wx-res/share_225_180.png', query: `stageId=${stageId}&roomKey=${roomKey}&gameuidv2=${gameuidv2}&nn=${nickname}&lv=${lv}&avatar=${avatar}&avatarUrl=${avatarUrl}`, }); }); 我遇到的问题是动态消息没法修改 不知道哪里错了,返回ok: // 云函数入口函数 exports.main = async (event, context) => { return new Promise((resolve, reject) => { let { userInfo, activityId } = event cloud.openapi.updatableMessage.setUpdatableMsg({ activityId: activityId, targetState: 1, templateInfo: { parameterList: [{ name: 'member_count', value: '2' }, { name: 'room_limit', value: '2' }] } }).then(_ => { resolve(_); }).catch(err => { reject(err); }); }); }
2020-12-04