try {
wx.reportGameEvent({
eventId: eventId,
costTime: costTime,
success: () => { console.log(`[埋点] ✔成功 eventId:${eventId} costTime:${costTime}`); },
fail: (res: any) => { console.error(`[埋点] ❌失败 eventId:${eventId} 原因:${res.errMsg}`); }
});
} catch (error) {
console.warn(error);
}
为什么最后在试玩环境下还是出现了TypeError: wx.reportGameEvent is not a function错误,
