@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/index.es.js
CHANGED
|
@@ -3190,16 +3190,17 @@ var LinkJumpWay;
|
|
|
3190
3190
|
i2.PopUp = "POP_UP", i2.NewWindow = "NEW_WINDOW", i2.CurrentWindow = "CURRENT_WINDOW";
|
|
3191
3191
|
})(LinkJumpWay || (LinkJumpWay = {}));
|
|
3192
3192
|
function openAppWithFallback(i2) {
|
|
3193
|
-
const { iosLink: n2, androidLink: o2, harmonyLink: e, fallbackUrl: t2 } = i2,
|
|
3194
|
-
let
|
|
3195
|
-
const
|
|
3196
|
-
|
|
3197
|
-
};
|
|
3198
|
-
let
|
|
3199
|
-
window.addEventListener("blur",
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3193
|
+
const { iosLink: n2, androidLink: o2, harmonyLink: e, fallbackUrl: t2, jumpWay: r2, openLink: a2 } = i2, l2 = Date.now();
|
|
3194
|
+
let s2 = false;
|
|
3195
|
+
const c2 = () => {
|
|
3196
|
+
s2 = true, window.removeEventListener("blur", c2);
|
|
3197
|
+
};
|
|
3198
|
+
let k2;
|
|
3199
|
+
if (window.addEventListener("blur", c2), console.info(`ios:${isIOS},Android:${isAndroid$1},harmony:${isHarmony}`), isIOS ? (console.info("iOSLink", n2), k2 = n2) : isAndroid$1 ? (console.info("Android link", o2), k2 = o2) : isHarmony && (console.info("harmony link", e), k2 = e), !k2) return console.info("没有配置多平台链接,使用降级链接", t2), void a2(t2, r2);
|
|
3200
|
+
window.location.href = k2, setTimeout((() => {
|
|
3201
|
+
console.info("进入到降级逻辑了"), window.removeEventListener("blur", c2);
|
|
3202
|
+
const i3 = Date.now() - l2;
|
|
3203
|
+
!s2 && i3 < 3700 && t2 && (console.info("降级的 url", t2, r2), a2(t2, r2));
|
|
3203
3204
|
}), 3500);
|
|
3204
3205
|
}
|
|
3205
3206
|
function toPlvWebviewBridge(i2) {
|
|
@@ -3210,16 +3211,16 @@ function toPlvWebviewBridge(i2) {
|
|
|
3210
3211
|
}
|
|
3211
3212
|
function toMultiPlatformLink(i2) {
|
|
3212
3213
|
return __awaiter(this, void 0, void 0, (function* () {
|
|
3213
|
-
const { linkData: n2, isWxMiniProgramEnv: o2, toWxMiniProgram: e, openLink: t2, getLinkParams: r2, isMobile: a2 } = i2, { wxMiniprogramLink: l2, pcLink: s2, iosLink: c2, androidLink:
|
|
3214
|
+
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;
|
|
3214
3215
|
console.info("跳转函数收到的数据", n2);
|
|
3215
|
-
let
|
|
3216
|
+
let p2 = false;
|
|
3216
3217
|
try {
|
|
3217
|
-
|
|
3218
|
+
p2 = (yield null == o2 ? void 0 : o2()) || false;
|
|
3218
3219
|
} catch (i3) {
|
|
3219
|
-
|
|
3220
|
+
p2 = false;
|
|
3220
3221
|
}
|
|
3221
|
-
if (
|
|
3222
|
-
|
|
3222
|
+
if (p2 && e) return console.info("进入到小程序 webview 环境 wxMiniprogramLink & link", l2, d2), void (l2 ? e(formatLink(l2, r2)) : t2(formatLink(d2, r2), f2));
|
|
3223
|
+
L2 ? uaInfo$2.client.isWx || uaInfo$2.client.isWxWork || uaInfo$2.client.isDing || uaInfo$2.client.isQQ || uaInfo$2.client.isWeibo || uaInfo$2.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);
|
|
3223
3224
|
}));
|
|
3224
3225
|
}
|
|
3225
3226
|
function formatLink(i2, n2) {
|
|
@@ -3231,14 +3232,14 @@ function formatLink(i2, n2) {
|
|
|
3231
3232
|
return concat$1(i2, o2);
|
|
3232
3233
|
}
|
|
3233
3234
|
function navigateToLink(i2) {
|
|
3234
|
-
const { linkData: n2, usePlvWebviewBridge: o2, openLink: e, isPlvWebview: t2, getPlvWebviewSmallWindowSize: r2, getPlvWebviewBridge: a2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, getLinkParams: c2, isMobile:
|
|
3235
|
-
if (console.info("是否保利威 webview 环境",
|
|
3236
|
-
const { link: i3, iosLink:
|
|
3237
|
-
console.info("保利威 webview 下的 mobileAppLink,link",
|
|
3238
|
-
const
|
|
3239
|
-
return o2 ? void toPlvWebviewBridge({ link: formatLink(
|
|
3235
|
+
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;
|
|
3236
|
+
if (console.info("是否保利威 webview 环境", u2), u2) {
|
|
3237
|
+
const { link: i3, iosLink: t3, androidLink: l3, harmonyLink: s3, mobileAppLink: k3, wxMiniprogramOriginalId: u3, wxMiniprogramLink: d2, jumpWay: f2 } = n2, m2 = k3 || i3;
|
|
3238
|
+
console.info("保利威 webview 下的 mobileAppLink,link", k3, i3), console.info("保利威 webview 下 usePlvWebviewBridge", o2);
|
|
3239
|
+
const L2 = { mobileLink: formatLink(i3, c2), wxMiniprogramOriginalId: u3, wxMiniprogramLink: formatLink(d2, c2), mobileAppLink: formatLink(k3, c2) };
|
|
3240
|
+
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 });
|
|
3240
3241
|
}
|
|
3241
|
-
toMultiPlatformLink({ linkData: n2, getLinkParams: c2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, openLink: e, isMobile:
|
|
3242
|
+
toMultiPlatformLink({ linkData: n2, getLinkParams: c2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, openLink: e, isMobile: k2 });
|
|
3242
3243
|
}
|
|
3243
3244
|
const useTrackEvent = (interactionCore) => {
|
|
3244
3245
|
const { injectData } = useGlobalInject$1();
|
|
@@ -3851,6 +3852,7 @@ const useProductButton = (options) => {
|
|
|
3851
3852
|
return;
|
|
3852
3853
|
}
|
|
3853
3854
|
const linkData = getLinkData();
|
|
3855
|
+
console.info("injectData 是什么", injectData);
|
|
3854
3856
|
navigateToLink({
|
|
3855
3857
|
linkData,
|
|
3856
3858
|
usePlvWebviewBridge: injectData.usePlvWebviewBridge || false,
|
|
@@ -3865,19 +3867,32 @@ const useProductButton = (options) => {
|
|
|
3865
3867
|
});
|
|
3866
3868
|
});
|
|
3867
3869
|
}
|
|
3870
|
+
function openNewWindowWithFallback(url2) {
|
|
3871
|
+
var _a2;
|
|
3872
|
+
const isPlvWebview = ((_a2 = injectData.isPlvWebview) == null ? void 0 : _a2.call(injectData)) || false;
|
|
3873
|
+
console.info("商品库是否处于 webview 环境:", isPlvWebview);
|
|
3874
|
+
if (isPlvWebview) {
|
|
3875
|
+
window.location.href = url2;
|
|
3876
|
+
} else {
|
|
3877
|
+
window.open(url2, "_blank", "noopener=yes");
|
|
3878
|
+
}
|
|
3879
|
+
}
|
|
3868
3880
|
function openLink(url2, jumpWay) {
|
|
3881
|
+
console.info("我进入到 openLink 了");
|
|
3869
3882
|
switch (jumpWay) {
|
|
3870
|
-
case LinkJumpWay.NewWindow:
|
|
3871
|
-
|
|
3883
|
+
case LinkJumpWay.NewWindow: {
|
|
3884
|
+
openNewWindowWithFallback(url2);
|
|
3872
3885
|
break;
|
|
3886
|
+
}
|
|
3873
3887
|
case LinkJumpWay.CurrentWindow:
|
|
3874
3888
|
window.location.href = url2;
|
|
3875
3889
|
break;
|
|
3876
3890
|
case LinkJumpWay.PopUp:
|
|
3877
3891
|
getEmitter().emit(productEvents.OpenProductIframeLinkPopup, url2);
|
|
3878
3892
|
break;
|
|
3879
|
-
default:
|
|
3880
|
-
|
|
3893
|
+
default: {
|
|
3894
|
+
openNewWindowWithFallback(url2);
|
|
3895
|
+
}
|
|
3881
3896
|
}
|
|
3882
3897
|
}
|
|
3883
3898
|
function toDirectBuy() {
|
|
@@ -56643,8 +56658,8 @@ console.log(
|
|
|
56643
56658
|
"%c@polyv/product-ui",
|
|
56644
56659
|
"background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff",
|
|
56645
56660
|
"[component: index]",
|
|
56646
|
-
"[version: 1.8.0-rc-20251204.
|
|
56647
|
-
"[buildTime: 2025-12-
|
|
56661
|
+
"[version: 1.8.0-rc-20251204.2]",
|
|
56662
|
+
"[buildTime: 2025-12-11 08:24:39]"
|
|
56648
56663
|
);
|
|
56649
56664
|
export {
|
|
56650
56665
|
AddressEdit,
|