@polyv/product-ui 1.8.0-rc-20251204.1 → 1.8.0-rc-20251204.2
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/address-edit.cjs.js +1 -1
- package/address-edit.es.js +2 -2
- package/address-edit.umd.js +1 -1
- package/address-item.cjs.js +1 -1
- package/address-item.es.js +2 -2
- package/address-item.umd.js +1 -1
- package/address-list.cjs.js +1 -1
- package/address-list.es.js +2 -2
- package/address-list.umd.js +1 -1
- package/big-card-popup.cjs.js +1 -1
- package/big-card-popup.es.js +44 -29
- package/big-card-popup.umd.js +1 -1
- package/index.cjs.js +2 -2
- package/index.es.js +44 -29
- package/index.umd.js +2 -2
- package/mobile-product-pendant.cjs.js +1 -1
- package/mobile-product-pendant.es.js +2 -2
- package/mobile-product-pendant.umd.js +1 -1
- package/order-confirm.cjs.js +1 -1
- package/order-confirm.es.js +2 -2
- package/order-confirm.umd.js +1 -1
- package/order-detail.cjs.js +1 -1
- package/order-detail.es.js +2 -2
- package/order-detail.umd.js +1 -1
- package/order-item.cjs.js +1 -1
- package/order-item.es.js +2 -2
- package/order-item.umd.js +1 -1
- package/order-list-popup.cjs.js +1 -1
- package/order-list-popup.es.js +2 -2
- package/order-list-popup.umd.js +1 -1
- package/order-list.cjs.js +1 -1
- package/order-list.es.js +2 -2
- package/order-list.umd.js +1 -1
- package/order-popup.cjs.js +1 -1
- package/order-popup.es.js +2 -2
- package/order-popup.umd.js +1 -1
- package/package.json +1 -1
- package/pc-product-pendant.cjs.js +1 -1
- package/pc-product-pendant.es.js +2 -2
- package/pc-product-pendant.umd.js +1 -1
- package/product-button.cjs.js +2 -2
- package/product-button.es.js +43 -28
- package/product-button.umd.js +2 -2
- package/product-detail-popup.cjs.js +2 -2
- package/product-detail-popup.es.js +44 -29
- package/product-detail-popup.umd.js +2 -2
- package/product-detail.cjs.js +2 -2
- package/product-detail.es.js +44 -29
- package/product-detail.umd.js +2 -2
- package/product-iframe-link-popup.cjs.js +1 -1
- package/product-iframe-link-popup.es.js +2 -2
- package/product-iframe-link-popup.umd.js +1 -1
- package/product-item.cjs.js +1 -1
- package/product-item.es.js +44 -29
- package/product-item.umd.js +1 -1
- package/product-list-popup.cjs.js +1 -1
- package/product-list-popup.es.js +44 -29
- package/product-list-popup.umd.js +1 -1
- package/product-list.cjs.js +1 -1
- package/product-list.es.js +44 -29
- package/product-list.umd.js +1 -1
- package/small-card.cjs.js +1 -1
- package/small-card.es.js +44 -29
- package/small-card.umd.js +1 -1
package/product-list-popup.es.js
CHANGED
|
@@ -46871,16 +46871,17 @@ var LinkJumpWay;
|
|
|
46871
46871
|
i2.PopUp = "POP_UP", i2.NewWindow = "NEW_WINDOW", i2.CurrentWindow = "CURRENT_WINDOW";
|
|
46872
46872
|
})(LinkJumpWay || (LinkJumpWay = {}));
|
|
46873
46873
|
function openAppWithFallback(i2) {
|
|
46874
|
-
const { iosLink: n2, androidLink: o2, harmonyLink: e, fallbackUrl: t2 } = i2,
|
|
46875
|
-
let
|
|
46876
|
-
const
|
|
46877
|
-
|
|
46878
|
-
};
|
|
46879
|
-
let
|
|
46880
|
-
window.addEventListener("blur",
|
|
46881
|
-
|
|
46882
|
-
|
|
46883
|
-
|
|
46874
|
+
const { iosLink: n2, androidLink: o2, harmonyLink: e, fallbackUrl: t2, jumpWay: r2, openLink: a2 } = i2, l2 = Date.now();
|
|
46875
|
+
let s2 = false;
|
|
46876
|
+
const c2 = () => {
|
|
46877
|
+
s2 = true, window.removeEventListener("blur", c2);
|
|
46878
|
+
};
|
|
46879
|
+
let k2;
|
|
46880
|
+
if (window.addEventListener("blur", c2), console.info(`ios:${isIOS},Android:${isAndroid},harmony:${isHarmony}`), isIOS ? (console.info("iOSLink", n2), k2 = n2) : isAndroid ? (console.info("Android link", o2), k2 = o2) : isHarmony && (console.info("harmony link", e), k2 = e), !k2) return console.info("没有配置多平台链接,使用降级链接", t2), void a2(t2, r2);
|
|
46881
|
+
window.location.href = k2, setTimeout((() => {
|
|
46882
|
+
console.info("进入到降级逻辑了"), window.removeEventListener("blur", c2);
|
|
46883
|
+
const i3 = Date.now() - l2;
|
|
46884
|
+
!s2 && i3 < 3700 && t2 && (console.info("降级的 url", t2, r2), a2(t2, r2));
|
|
46884
46885
|
}), 3500);
|
|
46885
46886
|
}
|
|
46886
46887
|
function toPlvWebviewBridge(i2) {
|
|
@@ -46891,16 +46892,16 @@ function toPlvWebviewBridge(i2) {
|
|
|
46891
46892
|
}
|
|
46892
46893
|
function toMultiPlatformLink(i2) {
|
|
46893
46894
|
return __awaiter(this, void 0, void 0, (function* () {
|
|
46894
|
-
const { linkData: n2, isWxMiniProgramEnv: o2, toWxMiniProgram: e, openLink: t2, getLinkParams: r2, isMobile: a2 } = i2, { wxMiniprogramLink: l2, pcLink: s2, iosLink: c2, androidLink:
|
|
46895
|
+
const { linkData: n2, isWxMiniProgramEnv: o2, toWxMiniProgram: e, openLink: t2, getLinkParams: r2, isMobile: a2 } = i2, { wxMiniprogramLink: l2, pcLink: s2, iosLink: c2, androidLink: k2, harmonyLink: u2, link: d2, jumpWay: f2, mobileAppLink: m2 } = n2, L2 = (null == a2 ? void 0 : a2()) || isPortable;
|
|
46895
46896
|
console.info("跳转函数收到的数据", n2);
|
|
46896
|
-
let
|
|
46897
|
+
let p2 = false;
|
|
46897
46898
|
try {
|
|
46898
|
-
|
|
46899
|
+
p2 = (yield null == o2 ? void 0 : o2()) || false;
|
|
46899
46900
|
} catch (i3) {
|
|
46900
|
-
|
|
46901
|
+
p2 = false;
|
|
46901
46902
|
}
|
|
46902
|
-
if (
|
|
46903
|
-
|
|
46903
|
+
if (p2 && e) return console.info("进入到小程序 webview 环境 wxMiniprogramLink & link", l2, d2), void (l2 ? e(formatLink(l2, r2)) : t2(formatLink(d2, r2), f2));
|
|
46904
|
+
L2 ? uaInfo.client.isWx || uaInfo.client.isWxWork || uaInfo.client.isDing || uaInfo.client.isQQ || uaInfo.client.isWeibo || uaInfo.client.isBaiduApp ? t2(formatLink(d2, r2), f2) : openAppWithFallback({ iosLink: c2, androidLink: k2, harmonyLink: u2, fallbackUrl: formatLink(m2 || d2, r2), jumpWay: f2, openLink: t2 }) : t2(formatLink(s2 || d2, r2), f2);
|
|
46904
46905
|
}));
|
|
46905
46906
|
}
|
|
46906
46907
|
function formatLink(i2, n2) {
|
|
@@ -46912,14 +46913,14 @@ function formatLink(i2, n2) {
|
|
|
46912
46913
|
return concat(i2, o2);
|
|
46913
46914
|
}
|
|
46914
46915
|
function navigateToLink(i2) {
|
|
46915
|
-
const { linkData: n2, usePlvWebviewBridge: o2, openLink: e, isPlvWebview: t2, getPlvWebviewSmallWindowSize: r2, getPlvWebviewBridge: a2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, getLinkParams: c2, isMobile:
|
|
46916
|
-
if (console.info("是否保利威 webview 环境",
|
|
46917
|
-
const { link: i3, iosLink:
|
|
46918
|
-
console.info("保利威 webview 下的 mobileAppLink,link",
|
|
46919
|
-
const
|
|
46920
|
-
return o2 ? void toPlvWebviewBridge({ link: formatLink(
|
|
46916
|
+
const { linkData: n2, usePlvWebviewBridge: o2, openLink: e, isPlvWebview: t2, getPlvWebviewSmallWindowSize: r2, getPlvWebviewBridge: a2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, getLinkParams: c2, isMobile: k2 } = i2, u2 = (null == t2 ? void 0 : t2()) || false;
|
|
46917
|
+
if (console.info("是否保利威 webview 环境", u2), u2) {
|
|
46918
|
+
const { link: i3, iosLink: t3, androidLink: l3, harmonyLink: s3, mobileAppLink: k3, wxMiniprogramOriginalId: u3, wxMiniprogramLink: d2, jumpWay: f2 } = n2, m2 = k3 || i3;
|
|
46919
|
+
console.info("保利威 webview 下的 mobileAppLink,link", k3, i3), console.info("保利威 webview 下 usePlvWebviewBridge", o2);
|
|
46920
|
+
const L2 = { mobileLink: formatLink(i3, c2), wxMiniprogramOriginalId: u3, wxMiniprogramLink: formatLink(d2, c2), mobileAppLink: formatLink(k3, c2) };
|
|
46921
|
+
return o2 ? void toPlvWebviewBridge({ link: formatLink(m2, c2), data: L2, getPlvWebviewSmallWindowSize: r2, getPlvWebviewBridge: a2 }) : void openAppWithFallback({ iosLink: t3, androidLink: l3, harmonyLink: s3, fallbackUrl: formatLink(k3 || i3, c2), jumpWay: f2, openLink: e });
|
|
46921
46922
|
}
|
|
46922
|
-
toMultiPlatformLink({ linkData: n2, getLinkParams: c2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, openLink: e, isMobile:
|
|
46923
|
+
toMultiPlatformLink({ linkData: n2, getLinkParams: c2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, openLink: e, isMobile: k2 });
|
|
46923
46924
|
}
|
|
46924
46925
|
const useTrackEvent = (interactionCore) => {
|
|
46925
46926
|
const { injectData } = useGlobalInject$1();
|
|
@@ -47225,6 +47226,7 @@ const useProductButton = (options) => {
|
|
|
47225
47226
|
return;
|
|
47226
47227
|
}
|
|
47227
47228
|
const linkData = getLinkData();
|
|
47229
|
+
console.info("injectData 是什么", injectData);
|
|
47228
47230
|
navigateToLink({
|
|
47229
47231
|
linkData,
|
|
47230
47232
|
usePlvWebviewBridge: injectData.usePlvWebviewBridge || false,
|
|
@@ -47239,19 +47241,32 @@ const useProductButton = (options) => {
|
|
|
47239
47241
|
});
|
|
47240
47242
|
});
|
|
47241
47243
|
}
|
|
47244
|
+
function openNewWindowWithFallback(url2) {
|
|
47245
|
+
var _a2;
|
|
47246
|
+
const isPlvWebview = ((_a2 = injectData.isPlvWebview) == null ? void 0 : _a2.call(injectData)) || false;
|
|
47247
|
+
console.info("商品库是否处于 webview 环境:", isPlvWebview);
|
|
47248
|
+
if (isPlvWebview) {
|
|
47249
|
+
window.location.href = url2;
|
|
47250
|
+
} else {
|
|
47251
|
+
window.open(url2, "_blank", "noopener=yes");
|
|
47252
|
+
}
|
|
47253
|
+
}
|
|
47242
47254
|
function openLink(url2, jumpWay) {
|
|
47255
|
+
console.info("我进入到 openLink 了");
|
|
47243
47256
|
switch (jumpWay) {
|
|
47244
|
-
case LinkJumpWay.NewWindow:
|
|
47245
|
-
|
|
47257
|
+
case LinkJumpWay.NewWindow: {
|
|
47258
|
+
openNewWindowWithFallback(url2);
|
|
47246
47259
|
break;
|
|
47260
|
+
}
|
|
47247
47261
|
case LinkJumpWay.CurrentWindow:
|
|
47248
47262
|
window.location.href = url2;
|
|
47249
47263
|
break;
|
|
47250
47264
|
case LinkJumpWay.PopUp:
|
|
47251
47265
|
getEmitter().emit(productEvents.OpenProductIframeLinkPopup, url2);
|
|
47252
47266
|
break;
|
|
47253
|
-
default:
|
|
47254
|
-
|
|
47267
|
+
default: {
|
|
47268
|
+
openNewWindowWithFallback(url2);
|
|
47269
|
+
}
|
|
47255
47270
|
}
|
|
47256
47271
|
}
|
|
47257
47272
|
function toDirectBuy() {
|
|
@@ -48072,8 +48087,8 @@ console.log(
|
|
|
48072
48087
|
"%c@polyv/product-ui",
|
|
48073
48088
|
"background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff",
|
|
48074
48089
|
"[component: product-list-popup]",
|
|
48075
|
-
"[version: 1.8.0-rc-20251204.
|
|
48076
|
-
"[buildTime: 2025-12-
|
|
48090
|
+
"[version: 1.8.0-rc-20251204.2]",
|
|
48091
|
+
"[buildTime: 2025-12-11 08:25:55]"
|
|
48077
48092
|
);
|
|
48078
48093
|
export {
|
|
48079
48094
|
productListPopup as default
|