@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
|
@@ -7628,16 +7628,17 @@ var LinkJumpWay;
|
|
|
7628
7628
|
i2.PopUp = "POP_UP", i2.NewWindow = "NEW_WINDOW", i2.CurrentWindow = "CURRENT_WINDOW";
|
|
7629
7629
|
})(LinkJumpWay || (LinkJumpWay = {}));
|
|
7630
7630
|
function openAppWithFallback(i2) {
|
|
7631
|
-
const { iosLink: n2, androidLink: o2, harmonyLink: e, fallbackUrl: t2 } = i2,
|
|
7632
|
-
let
|
|
7633
|
-
const
|
|
7634
|
-
|
|
7635
|
-
};
|
|
7636
|
-
let
|
|
7637
|
-
window.addEventListener("blur",
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
|
|
7631
|
+
const { iosLink: n2, androidLink: o2, harmonyLink: e, fallbackUrl: t2, jumpWay: r2, openLink: a2 } = i2, l2 = Date.now();
|
|
7632
|
+
let s2 = false;
|
|
7633
|
+
const c2 = () => {
|
|
7634
|
+
s2 = true, window.removeEventListener("blur", c2);
|
|
7635
|
+
};
|
|
7636
|
+
let k2;
|
|
7637
|
+
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);
|
|
7638
|
+
window.location.href = k2, setTimeout((() => {
|
|
7639
|
+
console.info("进入到降级逻辑了"), window.removeEventListener("blur", c2);
|
|
7640
|
+
const i3 = Date.now() - l2;
|
|
7641
|
+
!s2 && i3 < 3700 && t2 && (console.info("降级的 url", t2, r2), a2(t2, r2));
|
|
7641
7642
|
}), 3500);
|
|
7642
7643
|
}
|
|
7643
7644
|
function toPlvWebviewBridge(i2) {
|
|
@@ -7648,16 +7649,16 @@ function toPlvWebviewBridge(i2) {
|
|
|
7648
7649
|
}
|
|
7649
7650
|
function toMultiPlatformLink(i2) {
|
|
7650
7651
|
return __awaiter(this, void 0, void 0, (function* () {
|
|
7651
|
-
const { linkData: n2, isWxMiniProgramEnv: o2, toWxMiniProgram: e, openLink: t2, getLinkParams: r2, isMobile: a2 } = i2, { wxMiniprogramLink: l2, pcLink: s2, iosLink: c2, androidLink:
|
|
7652
|
+
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;
|
|
7652
7653
|
console.info("跳转函数收到的数据", n2);
|
|
7653
|
-
let
|
|
7654
|
+
let p2 = false;
|
|
7654
7655
|
try {
|
|
7655
|
-
|
|
7656
|
+
p2 = (yield null == o2 ? void 0 : o2()) || false;
|
|
7656
7657
|
} catch (i3) {
|
|
7657
|
-
|
|
7658
|
+
p2 = false;
|
|
7658
7659
|
}
|
|
7659
|
-
if (
|
|
7660
|
-
|
|
7660
|
+
if (p2 && e) return console.info("进入到小程序 webview 环境 wxMiniprogramLink & link", l2, d2), void (l2 ? e(formatLink(l2, r2)) : t2(formatLink(d2, r2), f2));
|
|
7661
|
+
L2 ? uaInfo$1.client.isWx || uaInfo$1.client.isWxWork || uaInfo$1.client.isDing || uaInfo$1.client.isQQ || uaInfo$1.client.isWeibo || uaInfo$1.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);
|
|
7661
7662
|
}));
|
|
7662
7663
|
}
|
|
7663
7664
|
function formatLink(i2, n2) {
|
|
@@ -7669,14 +7670,14 @@ function formatLink(i2, n2) {
|
|
|
7669
7670
|
return concat$1(i2, o2);
|
|
7670
7671
|
}
|
|
7671
7672
|
function navigateToLink(i2) {
|
|
7672
|
-
const { linkData: n2, usePlvWebviewBridge: o2, openLink: e, isPlvWebview: t2, getPlvWebviewSmallWindowSize: r2, getPlvWebviewBridge: a2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, getLinkParams: c2, isMobile:
|
|
7673
|
-
if (console.info("是否保利威 webview 环境",
|
|
7674
|
-
const { link: i3, iosLink:
|
|
7675
|
-
console.info("保利威 webview 下的 mobileAppLink,link",
|
|
7676
|
-
const
|
|
7677
|
-
return o2 ? void toPlvWebviewBridge({ link: formatLink(
|
|
7673
|
+
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;
|
|
7674
|
+
if (console.info("是否保利威 webview 环境", u2), u2) {
|
|
7675
|
+
const { link: i3, iosLink: t3, androidLink: l3, harmonyLink: s3, mobileAppLink: k3, wxMiniprogramOriginalId: u3, wxMiniprogramLink: d2, jumpWay: f2 } = n2, m2 = k3 || i3;
|
|
7676
|
+
console.info("保利威 webview 下的 mobileAppLink,link", k3, i3), console.info("保利威 webview 下 usePlvWebviewBridge", o2);
|
|
7677
|
+
const L2 = { mobileLink: formatLink(i3, c2), wxMiniprogramOriginalId: u3, wxMiniprogramLink: formatLink(d2, c2), mobileAppLink: formatLink(k3, c2) };
|
|
7678
|
+
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 });
|
|
7678
7679
|
}
|
|
7679
|
-
toMultiPlatformLink({ linkData: n2, getLinkParams: c2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, openLink: e, isMobile:
|
|
7680
|
+
toMultiPlatformLink({ linkData: n2, getLinkParams: c2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, openLink: e, isMobile: k2 });
|
|
7680
7681
|
}
|
|
7681
7682
|
const useTrackEvent = (interactionCore) => {
|
|
7682
7683
|
const { injectData } = useGlobalInject$1();
|
|
@@ -8005,6 +8006,7 @@ const useProductButton = (options) => {
|
|
|
8005
8006
|
return;
|
|
8006
8007
|
}
|
|
8007
8008
|
const linkData = getLinkData();
|
|
8009
|
+
console.info("injectData 是什么", injectData);
|
|
8008
8010
|
navigateToLink({
|
|
8009
8011
|
linkData,
|
|
8010
8012
|
usePlvWebviewBridge: injectData.usePlvWebviewBridge || false,
|
|
@@ -8019,19 +8021,32 @@ const useProductButton = (options) => {
|
|
|
8019
8021
|
});
|
|
8020
8022
|
});
|
|
8021
8023
|
}
|
|
8024
|
+
function openNewWindowWithFallback(url2) {
|
|
8025
|
+
var _a2;
|
|
8026
|
+
const isPlvWebview = ((_a2 = injectData.isPlvWebview) == null ? void 0 : _a2.call(injectData)) || false;
|
|
8027
|
+
console.info("商品库是否处于 webview 环境:", isPlvWebview);
|
|
8028
|
+
if (isPlvWebview) {
|
|
8029
|
+
window.location.href = url2;
|
|
8030
|
+
} else {
|
|
8031
|
+
window.open(url2, "_blank", "noopener=yes");
|
|
8032
|
+
}
|
|
8033
|
+
}
|
|
8022
8034
|
function openLink(url2, jumpWay) {
|
|
8035
|
+
console.info("我进入到 openLink 了");
|
|
8023
8036
|
switch (jumpWay) {
|
|
8024
|
-
case LinkJumpWay.NewWindow:
|
|
8025
|
-
|
|
8037
|
+
case LinkJumpWay.NewWindow: {
|
|
8038
|
+
openNewWindowWithFallback(url2);
|
|
8026
8039
|
break;
|
|
8040
|
+
}
|
|
8027
8041
|
case LinkJumpWay.CurrentWindow:
|
|
8028
8042
|
window.location.href = url2;
|
|
8029
8043
|
break;
|
|
8030
8044
|
case LinkJumpWay.PopUp:
|
|
8031
8045
|
getEmitter().emit(productEvents.OpenProductIframeLinkPopup, url2);
|
|
8032
8046
|
break;
|
|
8033
|
-
default:
|
|
8034
|
-
|
|
8047
|
+
default: {
|
|
8048
|
+
openNewWindowWithFallback(url2);
|
|
8049
|
+
}
|
|
8035
8050
|
}
|
|
8036
8051
|
}
|
|
8037
8052
|
function toDirectBuy() {
|
|
@@ -50965,8 +50980,8 @@ console.log(
|
|
|
50965
50980
|
"%c@polyv/product-ui",
|
|
50966
50981
|
"background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff",
|
|
50967
50982
|
"[component: product-detail-popup]",
|
|
50968
|
-
"[version: 1.8.0-rc-20251204.
|
|
50969
|
-
"[buildTime: 2025-12-
|
|
50983
|
+
"[version: 1.8.0-rc-20251204.2]",
|
|
50984
|
+
"[buildTime: 2025-12-11 08:26:31]"
|
|
50970
50985
|
);
|
|
50971
50986
|
export {
|
|
50972
50987
|
productDetailPopup as default
|