crh-jssdk 0.10.2 → 0.10.4
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.
|
@@ -269,9 +269,10 @@ exports.default = {
|
|
|
269
269
|
/**
|
|
270
270
|
* 通过pageId打开新的webview打开外部链接
|
|
271
271
|
*/
|
|
272
|
-
goWebview: function (
|
|
272
|
+
goWebview: function (params) {
|
|
273
|
+
var sdk = params.sdk, h5 = params.h5, _a = params.h5url, h5url = _a === void 0 ? '' : _a;
|
|
273
274
|
var jsonObj = {
|
|
274
|
-
indexUrl:
|
|
275
|
+
indexUrl: h5,
|
|
275
276
|
uploadPicUrl: "",
|
|
276
277
|
cookieDomain: "",
|
|
277
278
|
closeBusiness: "closeCallBack",
|
|
@@ -279,12 +280,16 @@ exports.default = {
|
|
|
279
280
|
identifier: "zt",
|
|
280
281
|
};
|
|
281
282
|
var jsonStr = JSON.stringify(jsonObj);
|
|
283
|
+
if (!this.isApp()) {
|
|
284
|
+
window.location.href = h5url;
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
282
287
|
if (webviewType.isNewLeZhuan) {
|
|
283
|
-
actionMap.callAction(207, { pageId:
|
|
288
|
+
actionMap.callAction(207, { pageId: sdk || "1", needLogin: "0" });
|
|
284
289
|
}
|
|
285
290
|
else if (webviewType.isNewJuCai) {
|
|
286
291
|
actionMap.callJuCaiAction("gotoClientPage", {
|
|
287
|
-
pageId: utils_1.ios ? String(
|
|
292
|
+
pageId: utils_1.ios ? String(sdk) : sdk,
|
|
288
293
|
needLogin: "0",
|
|
289
294
|
});
|
|
290
295
|
}
|
|
@@ -430,7 +435,7 @@ exports.default = {
|
|
|
430
435
|
isPhoneLogin = true;
|
|
431
436
|
}
|
|
432
437
|
}
|
|
433
|
-
resolve(__assign(__assign({}, response), { device_flag: webviewType.isNewLeZhuan
|
|
438
|
+
resolve(__assign(__assign({}, response), { isLogin: isLogin, device_flag: webviewType.isNewLeZhuan
|
|
434
439
|
? "a"
|
|
435
440
|
: webviewType.isNewJuCai || webviewType.isOldJuCai
|
|
436
441
|
? "f"
|
|
@@ -801,7 +806,6 @@ exports.default = {
|
|
|
801
806
|
*/
|
|
802
807
|
queryCollect: function (params) {
|
|
803
808
|
var _this = this;
|
|
804
|
-
console.log(params, "params===");
|
|
805
809
|
var sdkParams = {
|
|
806
810
|
productNo: params.productNo,
|
|
807
811
|
productCode: params.productCode,
|
|
@@ -814,7 +818,6 @@ exports.default = {
|
|
|
814
818
|
if (((_a = params === null || params === void 0 ? void 0 : params.versionList) === null || _a === void 0 ? void 0 : _a.indexOf(this.getVersion())) == -1 &&
|
|
815
819
|
webviewType.isNewLeZhuan) {
|
|
816
820
|
window["callAfterSeachFavor".concat(params.productNo)] = function (actionId, data) {
|
|
817
|
-
console.log(data, params, "ret");
|
|
818
821
|
resolve(__assign({ error_no: "0", error_info: "" }, data));
|
|
819
822
|
};
|
|
820
823
|
actionMap.callAction(107, sdkParams, "callAfterSeachFavor".concat(params.productNo));
|
|
@@ -868,25 +871,31 @@ exports.default = {
|
|
|
868
871
|
* @param {string} params.message 内容
|
|
869
872
|
*/
|
|
870
873
|
share: function (params) {
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
return
|
|
889
|
-
|
|
890
|
-
|
|
874
|
+
var _this = this;
|
|
875
|
+
if (webviewType.isLeZhuan) {
|
|
876
|
+
var shareParam = {
|
|
877
|
+
img_url: params.img_url || cx_share_png_1.default,
|
|
878
|
+
url: params.url,
|
|
879
|
+
title: params.title,
|
|
880
|
+
message: params.message,
|
|
881
|
+
};
|
|
882
|
+
if (webviewType.isNewLeZhuan) {
|
|
883
|
+
actionMap.callAction(900, shareParam, "");
|
|
884
|
+
}
|
|
885
|
+
else {
|
|
886
|
+
this.businessAlertView("http://action:900/?target=2¶m=".concat(encodeURIComponent(JSON.stringify(shareParam))));
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
else {
|
|
890
|
+
return new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
|
|
891
|
+
return __generator(this, function (_a) {
|
|
892
|
+
resolve({
|
|
893
|
+
error_no: "-3",
|
|
894
|
+
error_info: "当前APP不支持分享",
|
|
895
|
+
});
|
|
896
|
+
return [2 /*return*/];
|
|
897
|
+
});
|
|
898
|
+
}); });
|
|
899
|
+
}
|
|
891
900
|
},
|
|
892
901
|
};
|
|
@@ -396,6 +396,7 @@ export default {
|
|
|
396
396
|
}
|
|
397
397
|
resolve({
|
|
398
398
|
...response,
|
|
399
|
+
isLogin,
|
|
399
400
|
device_flag: webviewType.isNewLeZhuan
|
|
400
401
|
? "a"
|
|
401
402
|
: webviewType.isNewJuCai || webviewType.isOldJuCai
|
|
@@ -781,7 +782,7 @@ export default {
|
|
|
781
782
|
* @param {string} params.title 标题
|
|
782
783
|
* @param {string} params.message 内容
|
|
783
784
|
*/
|
|
784
|
-
|
|
785
|
+
share(params: {
|
|
785
786
|
img_url?: any;
|
|
786
787
|
url?: string;
|
|
787
788
|
title?: string;
|
|
@@ -803,6 +804,13 @@ export default {
|
|
|
803
804
|
)}`
|
|
804
805
|
);
|
|
805
806
|
}
|
|
807
|
+
} else {
|
|
808
|
+
return new Promise(async (resolve) => {
|
|
809
|
+
resolve({
|
|
810
|
+
error_no: "-3",
|
|
811
|
+
error_info: "当前APP不支持分享",
|
|
812
|
+
})
|
|
813
|
+
})
|
|
806
814
|
}
|
|
807
815
|
},
|
|
808
816
|
};
|