Files
plugin-library/Assets/12.WeixinMinigame/Runtime/wechat-default/unity-sdk/module-helper.js

16 lines
355 B
JavaScript
Raw Normal View History

2026-04-19 00:16:03 +08:00
/* eslint-disable no-underscore-dangle */
import { MODULE_NAME } from './conf';
export default {
_send: null,
init() {
this._send = GameGlobal.Module.SendMessage;
},
send(method, str = '') {
if (!this._send) {
this.init();
}
// @ts-ignore
this._send(MODULE_NAME, method, str);
},
};