zmp-sdk 2.11.6 → 2.11.10
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 +11 -5
- package/dist/index.es.js +11 -5
- package/dist/index.js +3 -3
- package/dist/index.umd.js +3 -3
- package/package.json +1 -1
package/dist/browser.min.js
CHANGED
|
@@ -35749,7 +35749,7 @@
|
|
|
35749
35749
|
}
|
|
35750
35750
|
};
|
|
35751
35751
|
|
|
35752
|
-
var version = "2.11.
|
|
35752
|
+
var version = "2.11.10";
|
|
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);
|
|
@@ -37740,7 +37741,10 @@
|
|
|
37740
37741
|
.then((data) => {
|
|
37741
37742
|
const cookies = (data && data.cookiesOAuthLogins) || [];
|
|
37742
37743
|
const jsToken = cookies.find((cookie) => cookie.name === CONT.COOKIE_NAME.JS_TOKEN);
|
|
37743
|
-
|
|
37744
|
+
if (jsToken) {
|
|
37745
|
+
this.setJSToken(jsToken.value);
|
|
37746
|
+
window.ZJSBridge.setJSToken && window.ZJSBridge.setJSToken(jsToken.value);
|
|
37747
|
+
}
|
|
37744
37748
|
resolve(cookies);
|
|
37745
37749
|
})
|
|
37746
37750
|
.catch((error) => {
|
|
@@ -37854,6 +37858,7 @@
|
|
|
37854
37858
|
__classPrivateFieldGet(this, _ZaloMiniProgramSDK_cache).timer.getToken = window.setInterval(runTimer, expiredIn);
|
|
37855
37859
|
}
|
|
37856
37860
|
this.setZAccSession(__classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken) || '');
|
|
37861
|
+
window.ZJSBridge.setZAccSession && window.ZJSBridge.setZAccSession(__classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken) || '');
|
|
37857
37862
|
return __classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken);
|
|
37858
37863
|
}
|
|
37859
37864
|
return null;
|
|
@@ -38142,6 +38147,7 @@
|
|
|
38142
38147
|
return Promise.resolve();
|
|
38143
38148
|
};
|
|
38144
38149
|
this.openWebview = (object) => {
|
|
38150
|
+
location.replace(object.url);
|
|
38145
38151
|
return Promise.resolve();
|
|
38146
38152
|
};
|
|
38147
38153
|
this.getRouteParams = Routing.getRouteParams;
|
package/dist/index.es.js
CHANGED
|
@@ -35746,7 +35746,7 @@ const apiResponse = {
|
|
|
35746
35746
|
}
|
|
35747
35747
|
};
|
|
35748
35748
|
|
|
35749
|
-
var version = "2.11.
|
|
35749
|
+
var version = "2.11.10";
|
|
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);
|
|
@@ -37737,7 +37738,10 @@ class ZaloMiniProgramSDK extends ZJSBridgeProvider {
|
|
|
37737
37738
|
.then((data) => {
|
|
37738
37739
|
const cookies = (data && data.cookiesOAuthLogins) || [];
|
|
37739
37740
|
const jsToken = cookies.find((cookie) => cookie.name === CONT.COOKIE_NAME.JS_TOKEN);
|
|
37740
|
-
|
|
37741
|
+
if (jsToken) {
|
|
37742
|
+
this.setJSToken(jsToken.value);
|
|
37743
|
+
window.ZJSBridge.setJSToken && window.ZJSBridge.setJSToken(jsToken.value);
|
|
37744
|
+
}
|
|
37741
37745
|
resolve(cookies);
|
|
37742
37746
|
})
|
|
37743
37747
|
.catch((error) => {
|
|
@@ -37851,6 +37855,7 @@ class ZaloMiniProgramSDK extends ZJSBridgeProvider {
|
|
|
37851
37855
|
__classPrivateFieldGet(this, _ZaloMiniProgramSDK_cache).timer.getToken = window.setInterval(runTimer, expiredIn);
|
|
37852
37856
|
}
|
|
37853
37857
|
this.setZAccSession(__classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken) || '');
|
|
37858
|
+
window.ZJSBridge.setZAccSession && window.ZJSBridge.setZAccSession(__classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken) || '');
|
|
37854
37859
|
return __classPrivateFieldGet(this, _ZaloMiniProgramSDK_accessToken);
|
|
37855
37860
|
}
|
|
37856
37861
|
return null;
|
|
@@ -38139,6 +38144,7 @@ class MockSDK {
|
|
|
38139
38144
|
return Promise.resolve();
|
|
38140
38145
|
};
|
|
38141
38146
|
this.openWebview = (object) => {
|
|
38147
|
+
location.replace(object.url);
|
|
38142
38148
|
return Promise.resolve();
|
|
38143
38149
|
};
|
|
38144
38150
|
this.getRouteParams = Routing.getRouteParams;
|