@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-item.es.js
CHANGED
|
@@ -44781,16 +44781,17 @@ var LinkJumpWay;
|
|
|
44781
44781
|
i2.PopUp = "POP_UP", i2.NewWindow = "NEW_WINDOW", i2.CurrentWindow = "CURRENT_WINDOW";
|
|
44782
44782
|
})(LinkJumpWay || (LinkJumpWay = {}));
|
|
44783
44783
|
function openAppWithFallback(i2) {
|
|
44784
|
-
const { iosLink: n2, androidLink: o2, harmonyLink: e, fallbackUrl: t2 } = i2,
|
|
44785
|
-
let
|
|
44786
|
-
const
|
|
44787
|
-
|
|
44788
|
-
};
|
|
44789
|
-
let
|
|
44790
|
-
window.addEventListener("blur",
|
|
44791
|
-
|
|
44792
|
-
|
|
44793
|
-
|
|
44784
|
+
const { iosLink: n2, androidLink: o2, harmonyLink: e, fallbackUrl: t2, jumpWay: r2, openLink: a2 } = i2, l2 = Date.now();
|
|
44785
|
+
let s2 = false;
|
|
44786
|
+
const c2 = () => {
|
|
44787
|
+
s2 = true, window.removeEventListener("blur", c2);
|
|
44788
|
+
};
|
|
44789
|
+
let k2;
|
|
44790
|
+
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);
|
|
44791
|
+
window.location.href = k2, setTimeout((() => {
|
|
44792
|
+
console.info("进入到降级逻辑了"), window.removeEventListener("blur", c2);
|
|
44793
|
+
const i3 = Date.now() - l2;
|
|
44794
|
+
!s2 && i3 < 3700 && t2 && (console.info("降级的 url", t2, r2), a2(t2, r2));
|
|
44794
44795
|
}), 3500);
|
|
44795
44796
|
}
|
|
44796
44797
|
function toPlvWebviewBridge(i2) {
|
|
@@ -44801,16 +44802,16 @@ function toPlvWebviewBridge(i2) {
|
|
|
44801
44802
|
}
|
|
44802
44803
|
function toMultiPlatformLink(i2) {
|
|
44803
44804
|
return __awaiter(this, void 0, void 0, (function* () {
|
|
44804
|
-
const { linkData: n2, isWxMiniProgramEnv: o2, toWxMiniProgram: e, openLink: t2, getLinkParams: r2, isMobile: a2 } = i2, { wxMiniprogramLink: l2, pcLink: s2, iosLink: c2, androidLink:
|
|
44805
|
+
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;
|
|
44805
44806
|
console.info("跳转函数收到的数据", n2);
|
|
44806
|
-
let
|
|
44807
|
+
let p2 = false;
|
|
44807
44808
|
try {
|
|
44808
|
-
|
|
44809
|
+
p2 = (yield null == o2 ? void 0 : o2()) || false;
|
|
44809
44810
|
} catch (i3) {
|
|
44810
|
-
|
|
44811
|
+
p2 = false;
|
|
44811
44812
|
}
|
|
44812
|
-
if (
|
|
44813
|
-
|
|
44813
|
+
if (p2 && e) return console.info("进入到小程序 webview 环境 wxMiniprogramLink & link", l2, d2), void (l2 ? e(formatLink(l2, r2)) : t2(formatLink(d2, r2), f2));
|
|
44814
|
+
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);
|
|
44814
44815
|
}));
|
|
44815
44816
|
}
|
|
44816
44817
|
function formatLink(i2, n2) {
|
|
@@ -44822,14 +44823,14 @@ function formatLink(i2, n2) {
|
|
|
44822
44823
|
return concat(i2, o2);
|
|
44823
44824
|
}
|
|
44824
44825
|
function navigateToLink(i2) {
|
|
44825
|
-
const { linkData: n2, usePlvWebviewBridge: o2, openLink: e, isPlvWebview: t2, getPlvWebviewSmallWindowSize: r2, getPlvWebviewBridge: a2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, getLinkParams: c2, isMobile:
|
|
44826
|
-
if (console.info("是否保利威 webview 环境",
|
|
44827
|
-
const { link: i3, iosLink:
|
|
44828
|
-
console.info("保利威 webview 下的 mobileAppLink,link",
|
|
44829
|
-
const
|
|
44830
|
-
return o2 ? void toPlvWebviewBridge({ link: formatLink(
|
|
44826
|
+
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;
|
|
44827
|
+
if (console.info("是否保利威 webview 环境", u2), u2) {
|
|
44828
|
+
const { link: i3, iosLink: t3, androidLink: l3, harmonyLink: s3, mobileAppLink: k3, wxMiniprogramOriginalId: u3, wxMiniprogramLink: d2, jumpWay: f2 } = n2, m2 = k3 || i3;
|
|
44829
|
+
console.info("保利威 webview 下的 mobileAppLink,link", k3, i3), console.info("保利威 webview 下 usePlvWebviewBridge", o2);
|
|
44830
|
+
const L2 = { mobileLink: formatLink(i3, c2), wxMiniprogramOriginalId: u3, wxMiniprogramLink: formatLink(d2, c2), mobileAppLink: formatLink(k3, c2) };
|
|
44831
|
+
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 });
|
|
44831
44832
|
}
|
|
44832
|
-
toMultiPlatformLink({ linkData: n2, getLinkParams: c2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, openLink: e, isMobile:
|
|
44833
|
+
toMultiPlatformLink({ linkData: n2, getLinkParams: c2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, openLink: e, isMobile: k2 });
|
|
44833
44834
|
}
|
|
44834
44835
|
const emitFunc = () => (() => true);
|
|
44835
44836
|
const useTrackEvent = (interactionCore) => {
|
|
@@ -45136,6 +45137,7 @@ const useProductButton = (options) => {
|
|
|
45136
45137
|
return;
|
|
45137
45138
|
}
|
|
45138
45139
|
const linkData = getLinkData();
|
|
45140
|
+
console.info("injectData 是什么", injectData);
|
|
45139
45141
|
navigateToLink({
|
|
45140
45142
|
linkData,
|
|
45141
45143
|
usePlvWebviewBridge: injectData.usePlvWebviewBridge || false,
|
|
@@ -45150,19 +45152,32 @@ const useProductButton = (options) => {
|
|
|
45150
45152
|
});
|
|
45151
45153
|
});
|
|
45152
45154
|
}
|
|
45155
|
+
function openNewWindowWithFallback(url2) {
|
|
45156
|
+
var _a2;
|
|
45157
|
+
const isPlvWebview = ((_a2 = injectData.isPlvWebview) == null ? void 0 : _a2.call(injectData)) || false;
|
|
45158
|
+
console.info("商品库是否处于 webview 环境:", isPlvWebview);
|
|
45159
|
+
if (isPlvWebview) {
|
|
45160
|
+
window.location.href = url2;
|
|
45161
|
+
} else {
|
|
45162
|
+
window.open(url2, "_blank", "noopener=yes");
|
|
45163
|
+
}
|
|
45164
|
+
}
|
|
45153
45165
|
function openLink(url2, jumpWay) {
|
|
45166
|
+
console.info("我进入到 openLink 了");
|
|
45154
45167
|
switch (jumpWay) {
|
|
45155
|
-
case LinkJumpWay.NewWindow:
|
|
45156
|
-
|
|
45168
|
+
case LinkJumpWay.NewWindow: {
|
|
45169
|
+
openNewWindowWithFallback(url2);
|
|
45157
45170
|
break;
|
|
45171
|
+
}
|
|
45158
45172
|
case LinkJumpWay.CurrentWindow:
|
|
45159
45173
|
window.location.href = url2;
|
|
45160
45174
|
break;
|
|
45161
45175
|
case LinkJumpWay.PopUp:
|
|
45162
45176
|
getEmitter().emit(productEvents.OpenProductIframeLinkPopup, url2);
|
|
45163
45177
|
break;
|
|
45164
|
-
default:
|
|
45165
|
-
|
|
45178
|
+
default: {
|
|
45179
|
+
openNewWindowWithFallback(url2);
|
|
45180
|
+
}
|
|
45166
45181
|
}
|
|
45167
45182
|
}
|
|
45168
45183
|
function toDirectBuy() {
|
|
@@ -46458,8 +46473,8 @@ console.log(
|
|
|
46458
46473
|
"%c@polyv/product-ui",
|
|
46459
46474
|
"background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff",
|
|
46460
46475
|
"[component: product-item]",
|
|
46461
|
-
"[version: 1.8.0-rc-20251204.
|
|
46462
|
-
"[buildTime: 2025-12-
|
|
46476
|
+
"[version: 1.8.0-rc-20251204.2]",
|
|
46477
|
+
"[buildTime: 2025-12-11 08:25:38]"
|
|
46463
46478
|
);
|
|
46464
46479
|
export {
|
|
46465
46480
|
productItem as default
|