zmp-sdk 2.11.7 → 2.11.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.min.js +9 -7
- package/dist/index.es.js +9 -7
- package/dist/index.js +3 -3
- package/dist/index.umd.js +3 -3
- package/package.json +1 -1
package/dist/browser.min.js
CHANGED
|
@@ -35243,7 +35243,7 @@
|
|
|
35243
35243
|
var data = item.split("=");
|
|
35244
35244
|
if (!data || data.length != 2)
|
|
35245
35245
|
return;
|
|
35246
|
-
params[data[0]] = decodeURIComponent(data[1]);
|
|
35246
|
+
params[data[0]] = decodeURIComponent(data[1].replace(/\+/g, " "));
|
|
35247
35247
|
});
|
|
35248
35248
|
return params;
|
|
35249
35249
|
}
|
|
@@ -35749,7 +35749,7 @@
|
|
|
35749
35749
|
}
|
|
35750
35750
|
};
|
|
35751
35751
|
|
|
35752
|
-
var version = "2.11.
|
|
35752
|
+
var version = "2.11.11";
|
|
35753
35753
|
|
|
35754
35754
|
class Basics {
|
|
35755
35755
|
/**
|
|
@@ -37062,9 +37062,10 @@
|
|
|
37062
37062
|
const inputData = {};
|
|
37063
37063
|
Object.entries(data).forEach(([key, value]) => {
|
|
37064
37064
|
if (!lodash.isUndefined(value) && !lodash.isNull(value)) {
|
|
37065
|
-
inputData[key] =
|
|
37066
|
-
|
|
37067
|
-
|
|
37065
|
+
// inputData[key] = _.isString(value)
|
|
37066
|
+
// ? value.replace(/"/g, '\\"').replace(/'/g, "'")
|
|
37067
|
+
// : JSON.stringify(value).replace(/"/g, '\\"').replace(/'/g, "'");
|
|
37068
|
+
inputData[key] = JSON.stringify(value).replace(/"/g, '\\"').replace(/'/g, "'");
|
|
37068
37069
|
}
|
|
37069
37070
|
});
|
|
37070
37071
|
return yield storage.set(inputData);
|
|
@@ -37742,7 +37743,7 @@
|
|
|
37742
37743
|
const jsToken = cookies.find((cookie) => cookie.name === CONT.COOKIE_NAME.JS_TOKEN);
|
|
37743
37744
|
if (jsToken) {
|
|
37744
37745
|
this.setJSToken(jsToken.value);
|
|
37745
|
-
window.ZJSBridge.setJSToken(jsToken.value);
|
|
37746
|
+
window.ZJSBridge.setJSToken && window.ZJSBridge.setJSToken(jsToken.value);
|
|
37746
37747
|
}
|
|
37747
37748
|
resolve(cookies);
|
|
37748
37749
|
})
|
|
@@ -37857,7 +37858,7 @@
|
|
|
37857
37858
|
__classPrivateFieldGet(this, _ZaloMiniProgramSDK_cache).timer.getToken = window.setInterval(runTimer, expiredIn);
|
|
37858
37859
|
}
|
|
37859
37860
|
this.setZAccSession(__classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken) || '');
|
|
37860
|
-
window.ZJSBridge.setZAccSession(__classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken) || '');
|
|
37861
|
+
window.ZJSBridge.setZAccSession && window.ZJSBridge.setZAccSession(__classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken) || '');
|
|
37861
37862
|
return __classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken);
|
|
37862
37863
|
}
|
|
37863
37864
|
return null;
|
|
@@ -38146,6 +38147,7 @@
|
|
|
38146
38147
|
return Promise.resolve();
|
|
38147
38148
|
};
|
|
38148
38149
|
this.openWebview = (object) => {
|
|
38150
|
+
location.replace(object.url);
|
|
38149
38151
|
return Promise.resolve();
|
|
38150
38152
|
};
|
|
38151
38153
|
this.getRouteParams = Routing.getRouteParams;
|
package/dist/index.es.js
CHANGED
|
@@ -35240,7 +35240,7 @@ function getParamsAsObject(query) {
|
|
|
35240
35240
|
var data = item.split("=");
|
|
35241
35241
|
if (!data || data.length != 2)
|
|
35242
35242
|
return;
|
|
35243
|
-
params[data[0]] = decodeURIComponent(data[1]);
|
|
35243
|
+
params[data[0]] = decodeURIComponent(data[1].replace(/\+/g, " "));
|
|
35244
35244
|
});
|
|
35245
35245
|
return params;
|
|
35246
35246
|
}
|
|
@@ -35746,7 +35746,7 @@ const apiResponse = {
|
|
|
35746
35746
|
}
|
|
35747
35747
|
};
|
|
35748
35748
|
|
|
35749
|
-
var version = "2.11.
|
|
35749
|
+
var version = "2.11.11";
|
|
35750
35750
|
|
|
35751
35751
|
class Basics {
|
|
35752
35752
|
/**
|
|
@@ -37059,9 +37059,10 @@ class StorageCreator {
|
|
|
37059
37059
|
const inputData = {};
|
|
37060
37060
|
Object.entries(data).forEach(([key, value]) => {
|
|
37061
37061
|
if (!lodash.isUndefined(value) && !lodash.isNull(value)) {
|
|
37062
|
-
inputData[key] =
|
|
37063
|
-
|
|
37064
|
-
|
|
37062
|
+
// inputData[key] = _.isString(value)
|
|
37063
|
+
// ? value.replace(/"/g, '\\"').replace(/'/g, "'")
|
|
37064
|
+
// : JSON.stringify(value).replace(/"/g, '\\"').replace(/'/g, "'");
|
|
37065
|
+
inputData[key] = JSON.stringify(value).replace(/"/g, '\\"').replace(/'/g, "'");
|
|
37065
37066
|
}
|
|
37066
37067
|
});
|
|
37067
37068
|
return yield storage.set(inputData);
|
|
@@ -37739,7 +37740,7 @@ class ZaloMiniProgramSDK extends ZJSBridgeProvider {
|
|
|
37739
37740
|
const jsToken = cookies.find((cookie) => cookie.name === CONT.COOKIE_NAME.JS_TOKEN);
|
|
37740
37741
|
if (jsToken) {
|
|
37741
37742
|
this.setJSToken(jsToken.value);
|
|
37742
|
-
window.ZJSBridge.setJSToken(jsToken.value);
|
|
37743
|
+
window.ZJSBridge.setJSToken && window.ZJSBridge.setJSToken(jsToken.value);
|
|
37743
37744
|
}
|
|
37744
37745
|
resolve(cookies);
|
|
37745
37746
|
})
|
|
@@ -37854,7 +37855,7 @@ class ZaloMiniProgramSDK extends ZJSBridgeProvider {
|
|
|
37854
37855
|
__classPrivateFieldGet(this, _ZaloMiniProgramSDK_cache).timer.getToken = window.setInterval(runTimer, expiredIn);
|
|
37855
37856
|
}
|
|
37856
37857
|
this.setZAccSession(__classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken) || '');
|
|
37857
|
-
window.ZJSBridge.setZAccSession(__classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken) || '');
|
|
37858
|
+
window.ZJSBridge.setZAccSession && window.ZJSBridge.setZAccSession(__classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken) || '');
|
|
37858
37859
|
return __classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken);
|
|
37859
37860
|
}
|
|
37860
37861
|
return null;
|
|
@@ -38143,6 +38144,7 @@ class MockSDK {
|
|
|
38143
38144
|
return Promise.resolve();
|
|
38144
38145
|
};
|
|
38145
38146
|
this.openWebview = (object) => {
|
|
38147
|
+
location.replace(object.url);
|
|
38146
38148
|
return Promise.resolve();
|
|
38147
38149
|
};
|
|
38148
38150
|
this.getRouteParams = Routing.getRouteParams;
|