@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.es.js
CHANGED
|
@@ -46239,16 +46239,17 @@ var LinkJumpWay;
|
|
|
46239
46239
|
i2.PopUp = "POP_UP", i2.NewWindow = "NEW_WINDOW", i2.CurrentWindow = "CURRENT_WINDOW";
|
|
46240
46240
|
})(LinkJumpWay || (LinkJumpWay = {}));
|
|
46241
46241
|
function openAppWithFallback(i2) {
|
|
46242
|
-
const { iosLink: n2, androidLink: o2, harmonyLink: e, fallbackUrl: t2 } = i2,
|
|
46243
|
-
let
|
|
46244
|
-
const
|
|
46245
|
-
|
|
46246
|
-
};
|
|
46247
|
-
let
|
|
46248
|
-
window.addEventListener("blur",
|
|
46249
|
-
|
|
46250
|
-
|
|
46251
|
-
|
|
46242
|
+
const { iosLink: n2, androidLink: o2, harmonyLink: e, fallbackUrl: t2, jumpWay: r2, openLink: a2 } = i2, l2 = Date.now();
|
|
46243
|
+
let s2 = false;
|
|
46244
|
+
const c2 = () => {
|
|
46245
|
+
s2 = true, window.removeEventListener("blur", c2);
|
|
46246
|
+
};
|
|
46247
|
+
let k2;
|
|
46248
|
+
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);
|
|
46249
|
+
window.location.href = k2, setTimeout((() => {
|
|
46250
|
+
console.info("进入到降级逻辑了"), window.removeEventListener("blur", c2);
|
|
46251
|
+
const i3 = Date.now() - l2;
|
|
46252
|
+
!s2 && i3 < 3700 && t2 && (console.info("降级的 url", t2, r2), a2(t2, r2));
|
|
46252
46253
|
}), 3500);
|
|
46253
46254
|
}
|
|
46254
46255
|
function toPlvWebviewBridge(i2) {
|
|
@@ -46259,16 +46260,16 @@ function toPlvWebviewBridge(i2) {
|
|
|
46259
46260
|
}
|
|
46260
46261
|
function toMultiPlatformLink(i2) {
|
|
46261
46262
|
return __awaiter(this, void 0, void 0, (function* () {
|
|
46262
|
-
const { linkData: n2, isWxMiniProgramEnv: o2, toWxMiniProgram: e, openLink: t2, getLinkParams: r2, isMobile: a2 } = i2, { wxMiniprogramLink: l2, pcLink: s2, iosLink: c2, androidLink:
|
|
46263
|
+
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;
|
|
46263
46264
|
console.info("跳转函数收到的数据", n2);
|
|
46264
|
-
let
|
|
46265
|
+
let p2 = false;
|
|
46265
46266
|
try {
|
|
46266
|
-
|
|
46267
|
+
p2 = (yield null == o2 ? void 0 : o2()) || false;
|
|
46267
46268
|
} catch (i3) {
|
|
46268
|
-
|
|
46269
|
+
p2 = false;
|
|
46269
46270
|
}
|
|
46270
|
-
if (
|
|
46271
|
-
|
|
46271
|
+
if (p2 && e) return console.info("进入到小程序 webview 环境 wxMiniprogramLink & link", l2, d2), void (l2 ? e(formatLink(l2, r2)) : t2(formatLink(d2, r2), f2));
|
|
46272
|
+
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);
|
|
46272
46273
|
}));
|
|
46273
46274
|
}
|
|
46274
46275
|
function formatLink(i2, n2) {
|
|
@@ -46280,14 +46281,14 @@ function formatLink(i2, n2) {
|
|
|
46280
46281
|
return concat(i2, o2);
|
|
46281
46282
|
}
|
|
46282
46283
|
function navigateToLink(i2) {
|
|
46283
|
-
const { linkData: n2, usePlvWebviewBridge: o2, openLink: e, isPlvWebview: t2, getPlvWebviewSmallWindowSize: r2, getPlvWebviewBridge: a2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, getLinkParams: c2, isMobile:
|
|
46284
|
-
if (console.info("是否保利威 webview 环境",
|
|
46285
|
-
const { link: i3, iosLink:
|
|
46286
|
-
console.info("保利威 webview 下的 mobileAppLink,link",
|
|
46287
|
-
const
|
|
46288
|
-
return o2 ? void toPlvWebviewBridge({ link: formatLink(
|
|
46284
|
+
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;
|
|
46285
|
+
if (console.info("是否保利威 webview 环境", u2), u2) {
|
|
46286
|
+
const { link: i3, iosLink: t3, androidLink: l3, harmonyLink: s3, mobileAppLink: k3, wxMiniprogramOriginalId: u3, wxMiniprogramLink: d2, jumpWay: f2 } = n2, m2 = k3 || i3;
|
|
46287
|
+
console.info("保利威 webview 下的 mobileAppLink,link", k3, i3), console.info("保利威 webview 下 usePlvWebviewBridge", o2);
|
|
46288
|
+
const L2 = { mobileLink: formatLink(i3, c2), wxMiniprogramOriginalId: u3, wxMiniprogramLink: formatLink(d2, c2), mobileAppLink: formatLink(k3, c2) };
|
|
46289
|
+
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 });
|
|
46289
46290
|
}
|
|
46290
|
-
toMultiPlatformLink({ linkData: n2, getLinkParams: c2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, openLink: e, isMobile:
|
|
46291
|
+
toMultiPlatformLink({ linkData: n2, getLinkParams: c2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, openLink: e, isMobile: k2 });
|
|
46291
46292
|
}
|
|
46292
46293
|
const useTrackEvent = (interactionCore) => {
|
|
46293
46294
|
const { injectData } = useGlobalInject();
|
|
@@ -46593,6 +46594,7 @@ const useProductButton = (options) => {
|
|
|
46593
46594
|
return;
|
|
46594
46595
|
}
|
|
46595
46596
|
const linkData = getLinkData();
|
|
46597
|
+
console.info("injectData 是什么", injectData);
|
|
46596
46598
|
navigateToLink({
|
|
46597
46599
|
linkData,
|
|
46598
46600
|
usePlvWebviewBridge: injectData.usePlvWebviewBridge || false,
|
|
@@ -46607,19 +46609,32 @@ const useProductButton = (options) => {
|
|
|
46607
46609
|
});
|
|
46608
46610
|
});
|
|
46609
46611
|
}
|
|
46612
|
+
function openNewWindowWithFallback(url2) {
|
|
46613
|
+
var _a2;
|
|
46614
|
+
const isPlvWebview = ((_a2 = injectData.isPlvWebview) == null ? void 0 : _a2.call(injectData)) || false;
|
|
46615
|
+
console.info("商品库是否处于 webview 环境:", isPlvWebview);
|
|
46616
|
+
if (isPlvWebview) {
|
|
46617
|
+
window.location.href = url2;
|
|
46618
|
+
} else {
|
|
46619
|
+
window.open(url2, "_blank", "noopener=yes");
|
|
46620
|
+
}
|
|
46621
|
+
}
|
|
46610
46622
|
function openLink(url2, jumpWay) {
|
|
46623
|
+
console.info("我进入到 openLink 了");
|
|
46611
46624
|
switch (jumpWay) {
|
|
46612
|
-
case LinkJumpWay.NewWindow:
|
|
46613
|
-
|
|
46625
|
+
case LinkJumpWay.NewWindow: {
|
|
46626
|
+
openNewWindowWithFallback(url2);
|
|
46614
46627
|
break;
|
|
46628
|
+
}
|
|
46615
46629
|
case LinkJumpWay.CurrentWindow:
|
|
46616
46630
|
window.location.href = url2;
|
|
46617
46631
|
break;
|
|
46618
46632
|
case LinkJumpWay.PopUp:
|
|
46619
46633
|
getEmitter().emit(productEvents.OpenProductIframeLinkPopup, url2);
|
|
46620
46634
|
break;
|
|
46621
|
-
default:
|
|
46622
|
-
|
|
46635
|
+
default: {
|
|
46636
|
+
openNewWindowWithFallback(url2);
|
|
46637
|
+
}
|
|
46623
46638
|
}
|
|
46624
46639
|
}
|
|
46625
46640
|
function toDirectBuy() {
|
|
@@ -47959,8 +47974,8 @@ console.log(
|
|
|
47959
47974
|
"%c@polyv/product-ui",
|
|
47960
47975
|
"background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff",
|
|
47961
47976
|
"[component: product-list]",
|
|
47962
|
-
"[version: 1.8.0-rc-20251204.
|
|
47963
|
-
"[buildTime: 2025-12-
|
|
47977
|
+
"[version: 1.8.0-rc-20251204.2]",
|
|
47978
|
+
"[buildTime: 2025-12-11 08:25:20]"
|
|
47964
47979
|
);
|
|
47965
47980
|
export {
|
|
47966
47981
|
productList as default
|