mirror of
https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git
synced 2025-11-13 03:35:55 +08:00
16 lines
355 B
JavaScript
16 lines
355 B
JavaScript
|
|
/* 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);
|
||
|
|
},
|
||
|
|
};
|