cocos creator 跳转其他小游戏
微信小游戏 appid 要填写在 game.json里才能跳转成功
"navigateToMiniProgramAppIdList": [
"appid0",
"appid1"
]
为icon添加按钮点击事件
//icon 被点击
onGameIconClick(e, cutomData) {
let appid = this.setAppid(cutomData);
if (typeof (wx) == "underfined") return;
wx.navigateToMiniProgram({
appId: appid,
path: '',
success(res) {
// 打开成功
}
})
},