@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-detail.es.js
CHANGED
|
@@ -6633,16 +6633,17 @@ var LinkJumpWay;
|
|
|
6633
6633
|
i2.PopUp = "POP_UP", i2.NewWindow = "NEW_WINDOW", i2.CurrentWindow = "CURRENT_WINDOW";
|
|
6634
6634
|
})(LinkJumpWay || (LinkJumpWay = {}));
|
|
6635
6635
|
function openAppWithFallback(i2) {
|
|
6636
|
-
const { iosLink: n2, androidLink: o2, harmonyLink: e, fallbackUrl: t2 } = i2,
|
|
6637
|
-
let
|
|
6638
|
-
const
|
|
6639
|
-
|
|
6640
|
-
};
|
|
6641
|
-
let
|
|
6642
|
-
window.addEventListener("blur",
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6636
|
+
const { iosLink: n2, androidLink: o2, harmonyLink: e, fallbackUrl: t2, jumpWay: r2, openLink: a2 } = i2, l2 = Date.now();
|
|
6637
|
+
let s2 = false;
|
|
6638
|
+
const c2 = () => {
|
|
6639
|
+
s2 = true, window.removeEventListener("blur", c2);
|
|
6640
|
+
};
|
|
6641
|
+
let k2;
|
|
6642
|
+
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);
|
|
6643
|
+
window.location.href = k2, setTimeout((() => {
|
|
6644
|
+
console.info("进入到降级逻辑了"), window.removeEventListener("blur", c2);
|
|
6645
|
+
const i3 = Date.now() - l2;
|
|
6646
|
+
!s2 && i3 < 3700 && t2 && (console.info("降级的 url", t2, r2), a2(t2, r2));
|
|
6646
6647
|
}), 3500);
|
|
6647
6648
|
}
|
|
6648
6649
|
function toPlvWebviewBridge(i2) {
|
|
@@ -6653,16 +6654,16 @@ function toPlvWebviewBridge(i2) {
|
|
|
6653
6654
|
}
|
|
6654
6655
|
function toMultiPlatformLink(i2) {
|
|
6655
6656
|
return __awaiter(this, void 0, void 0, (function* () {
|
|
6656
|
-
const { linkData: n2, isWxMiniProgramEnv: o2, toWxMiniProgram: e, openLink: t2, getLinkParams: r2, isMobile: a2 } = i2, { wxMiniprogramLink: l2, pcLink: s2, iosLink: c2, androidLink:
|
|
6657
|
+
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;
|
|
6657
6658
|
console.info("跳转函数收到的数据", n2);
|
|
6658
|
-
let
|
|
6659
|
+
let p2 = false;
|
|
6659
6660
|
try {
|
|
6660
|
-
|
|
6661
|
+
p2 = (yield null == o2 ? void 0 : o2()) || false;
|
|
6661
6662
|
} catch (i3) {
|
|
6662
|
-
|
|
6663
|
+
p2 = false;
|
|
6663
6664
|
}
|
|
6664
|
-
if (
|
|
6665
|
-
|
|
6665
|
+
if (p2 && e) return console.info("进入到小程序 webview 环境 wxMiniprogramLink & link", l2, d2), void (l2 ? e(formatLink(l2, r2)) : t2(formatLink(d2, r2), f2));
|
|
6666
|
+
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);
|
|
6666
6667
|
}));
|
|
6667
6668
|
}
|
|
6668
6669
|
function formatLink(i2, n2) {
|
|
@@ -6674,14 +6675,14 @@ function formatLink(i2, n2) {
|
|
|
6674
6675
|
return concat$1(i2, o2);
|
|
6675
6676
|
}
|
|
6676
6677
|
function navigateToLink(i2) {
|
|
6677
|
-
const { linkData: n2, usePlvWebviewBridge: o2, openLink: e, isPlvWebview: t2, getPlvWebviewSmallWindowSize: r2, getPlvWebviewBridge: a2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, getLinkParams: c2, isMobile:
|
|
6678
|
-
if (console.info("是否保利威 webview 环境",
|
|
6679
|
-
const { link: i3, iosLink:
|
|
6680
|
-
console.info("保利威 webview 下的 mobileAppLink,link",
|
|
6681
|
-
const
|
|
6682
|
-
return o2 ? void toPlvWebviewBridge({ link: formatLink(
|
|
6678
|
+
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;
|
|
6679
|
+
if (console.info("是否保利威 webview 环境", u2), u2) {
|
|
6680
|
+
const { link: i3, iosLink: t3, androidLink: l3, harmonyLink: s3, mobileAppLink: k3, wxMiniprogramOriginalId: u3, wxMiniprogramLink: d2, jumpWay: f2 } = n2, m2 = k3 || i3;
|
|
6681
|
+
console.info("保利威 webview 下的 mobileAppLink,link", k3, i3), console.info("保利威 webview 下 usePlvWebviewBridge", o2);
|
|
6682
|
+
const L2 = { mobileLink: formatLink(i3, c2), wxMiniprogramOriginalId: u3, wxMiniprogramLink: formatLink(d2, c2), mobileAppLink: formatLink(k3, c2) };
|
|
6683
|
+
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 });
|
|
6683
6684
|
}
|
|
6684
|
-
toMultiPlatformLink({ linkData: n2, getLinkParams: c2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, openLink: e, isMobile:
|
|
6685
|
+
toMultiPlatformLink({ linkData: n2, getLinkParams: c2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, openLink: e, isMobile: k2 });
|
|
6685
6686
|
}
|
|
6686
6687
|
const useTrackEvent = (interactionCore) => {
|
|
6687
6688
|
const { injectData } = useGlobalInject$1();
|
|
@@ -7010,6 +7011,7 @@ const useProductButton = (options) => {
|
|
|
7010
7011
|
return;
|
|
7011
7012
|
}
|
|
7012
7013
|
const linkData = getLinkData();
|
|
7014
|
+
console.info("injectData 是什么", injectData);
|
|
7013
7015
|
navigateToLink({
|
|
7014
7016
|
linkData,
|
|
7015
7017
|
usePlvWebviewBridge: injectData.usePlvWebviewBridge || false,
|
|
@@ -7024,19 +7026,32 @@ const useProductButton = (options) => {
|
|
|
7024
7026
|
});
|
|
7025
7027
|
});
|
|
7026
7028
|
}
|
|
7029
|
+
function openNewWindowWithFallback(url2) {
|
|
7030
|
+
var _a2;
|
|
7031
|
+
const isPlvWebview = ((_a2 = injectData.isPlvWebview) == null ? void 0 : _a2.call(injectData)) || false;
|
|
7032
|
+
console.info("商品库是否处于 webview 环境:", isPlvWebview);
|
|
7033
|
+
if (isPlvWebview) {
|
|
7034
|
+
window.location.href = url2;
|
|
7035
|
+
} else {
|
|
7036
|
+
window.open(url2, "_blank", "noopener=yes");
|
|
7037
|
+
}
|
|
7038
|
+
}
|
|
7027
7039
|
function openLink(url2, jumpWay) {
|
|
7040
|
+
console.info("我进入到 openLink 了");
|
|
7028
7041
|
switch (jumpWay) {
|
|
7029
|
-
case LinkJumpWay.NewWindow:
|
|
7030
|
-
|
|
7042
|
+
case LinkJumpWay.NewWindow: {
|
|
7043
|
+
openNewWindowWithFallback(url2);
|
|
7031
7044
|
break;
|
|
7045
|
+
}
|
|
7032
7046
|
case LinkJumpWay.CurrentWindow:
|
|
7033
7047
|
window.location.href = url2;
|
|
7034
7048
|
break;
|
|
7035
7049
|
case LinkJumpWay.PopUp:
|
|
7036
7050
|
getEmitter().emit(productEvents.OpenProductIframeLinkPopup, url2);
|
|
7037
7051
|
break;
|
|
7038
|
-
default:
|
|
7039
|
-
|
|
7052
|
+
default: {
|
|
7053
|
+
openNewWindowWithFallback(url2);
|
|
7054
|
+
}
|
|
7040
7055
|
}
|
|
7041
7056
|
}
|
|
7042
7057
|
function toDirectBuy() {
|
|
@@ -50784,8 +50799,8 @@ console.log(
|
|
|
50784
50799
|
"%c@polyv/product-ui",
|
|
50785
50800
|
"background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff",
|
|
50786
50801
|
"[component: product-detail]",
|
|
50787
|
-
"[version: 1.8.0-rc-20251204.
|
|
50788
|
-
"[buildTime: 2025-12-
|
|
50802
|
+
"[version: 1.8.0-rc-20251204.2]",
|
|
50803
|
+
"[buildTime: 2025-12-11 08:26:13]"
|
|
50789
50804
|
);
|
|
50790
50805
|
export {
|
|
50791
50806
|
productDetail as default
|