feat(core): 将Mixly.MJSON调整为Mixly.MJson

This commit is contained in:
王立帮
2025-04-27 15:49:16 +08:00
parent 291667cccf
commit d04ec7bfc7
13 changed files with 76 additions and 59 deletions

View File

@@ -2,7 +2,7 @@
goog.require('Mixly.Env');
goog.require('Mixly.Config');
goog.require('Mixly.MJSON');
goog.require('Mixly.MJson');
goog.require('Mixly.WebSocket');
goog.require('Mixly.LayerExt');
goog.require('Mixly.Command');
@@ -11,7 +11,7 @@ goog.provide('Mixly.WebSocket.Socket');
const {
Env,
Config,
MJSON,
MJson,
LayerExt,
Command
} = Mixly;
@@ -130,7 +130,7 @@ Socket.init = (onopenFunc = (data) => {}, doFunc = () => {}) => {
WS.obj.onmessage = (event) => {
heartCheck.reset().start();
let command = Command.parse(event.data);
command = MJSON.decode(command);
command = MJson.decode(command);
if (Socket.debug)
console.log('receive -> ', event.data);
Command.run(command);
@@ -170,7 +170,7 @@ Socket.sendCommand = (command) => {
let commandStr = '';
try {
commandStr = JSON.stringify(MJSON.encode(command));
commandStr = JSON.stringify(MJson.encode(command));
if (Socket.debug)
console.log('send -> ', commandStr);
} catch (e) {