9.18王德鹏/1
This commit is contained in:
23
frontend/unpackage/dist/dev/mp-weixin/app.js
vendored
23
frontend/unpackage/dist/dev/mp-weixin/app.js
vendored
@@ -13,6 +13,7 @@ if (!Math) {
|
||||
"./pages/customer/select.js";
|
||||
"./pages/supplier/select.js";
|
||||
"./pages/account/select.js";
|
||||
"./pages/detail/index.js";
|
||||
}
|
||||
const _sfc_main = {
|
||||
onLaunch: function() {
|
||||
@@ -31,6 +32,28 @@ function createApp() {
|
||||
app
|
||||
};
|
||||
}
|
||||
if (typeof common_vendor.index !== "undefined" && typeof common_vendor.index.connectSocket === "function") {
|
||||
const _connectSocket = common_vendor.index.connectSocket;
|
||||
common_vendor.index.connectSocket = function(options) {
|
||||
const task = _connectSocket.call(this, options);
|
||||
if (task && typeof task.close === "function") {
|
||||
const _close = task.close;
|
||||
task.close = function(params = {}) {
|
||||
if (params && typeof params === "object") {
|
||||
const codeNum = Number(params.code);
|
||||
const isValid = codeNum === 1e3 || codeNum >= 3e3 && codeNum <= 4999;
|
||||
if (!isValid) {
|
||||
params.code = 1e3;
|
||||
if (!params.reason)
|
||||
params.reason = "normalized from invalid close code";
|
||||
}
|
||||
}
|
||||
return _close.call(this, params);
|
||||
};
|
||||
}
|
||||
return task;
|
||||
};
|
||||
}
|
||||
createApp().app.mount("#app");
|
||||
exports.createApp = createApp;
|
||||
//# sourceMappingURL=../.sourcemap/mp-weixin/app.js.map
|
||||
|
||||
Reference in New Issue
Block a user