@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/big-card-popup.es.js
CHANGED
|
@@ -45873,16 +45873,17 @@ var LinkJumpWay;
|
|
|
45873
45873
|
i2.PopUp = "POP_UP", i2.NewWindow = "NEW_WINDOW", i2.CurrentWindow = "CURRENT_WINDOW";
|
|
45874
45874
|
})(LinkJumpWay || (LinkJumpWay = {}));
|
|
45875
45875
|
function openAppWithFallback(i2) {
|
|
45876
|
-
const { iosLink: n2, androidLink: o2, harmonyLink: e, fallbackUrl: t2 } = i2,
|
|
45877
|
-
let
|
|
45878
|
-
const
|
|
45879
|
-
|
|
45880
|
-
};
|
|
45881
|
-
let
|
|
45882
|
-
window.addEventListener("blur",
|
|
45883
|
-
|
|
45884
|
-
|
|
45885
|
-
|
|
45876
|
+
const { iosLink: n2, androidLink: o2, harmonyLink: e, fallbackUrl: t2, jumpWay: r2, openLink: a2 } = i2, l2 = Date.now();
|
|
45877
|
+
let s2 = false;
|
|
45878
|
+
const c2 = () => {
|
|
45879
|
+
s2 = true, window.removeEventListener("blur", c2);
|
|
45880
|
+
};
|
|
45881
|
+
let k2;
|
|
45882
|
+
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);
|
|
45883
|
+
window.location.href = k2, setTimeout((() => {
|
|
45884
|
+
console.info("进入到降级逻辑了"), window.removeEventListener("blur", c2);
|
|
45885
|
+
const i3 = Date.now() - l2;
|
|
45886
|
+
!s2 && i3 < 3700 && t2 && (console.info("降级的 url", t2, r2), a2(t2, r2));
|
|
45886
45887
|
}), 3500);
|
|
45887
45888
|
}
|
|
45888
45889
|
function toPlvWebviewBridge(i2) {
|
|
@@ -45893,16 +45894,16 @@ function toPlvWebviewBridge(i2) {
|
|
|
45893
45894
|
}
|
|
45894
45895
|
function toMultiPlatformLink(i2) {
|
|
45895
45896
|
return __awaiter(this, void 0, void 0, (function* () {
|
|
45896
|
-
const { linkData: n2, isWxMiniProgramEnv: o2, toWxMiniProgram: e, openLink: t2, getLinkParams: r2, isMobile: a2 } = i2, { wxMiniprogramLink: l2, pcLink: s2, iosLink: c2, androidLink:
|
|
45897
|
+
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;
|
|
45897
45898
|
console.info("跳转函数收到的数据", n2);
|
|
45898
|
-
let
|
|
45899
|
+
let p2 = false;
|
|
45899
45900
|
try {
|
|
45900
|
-
|
|
45901
|
+
p2 = (yield null == o2 ? void 0 : o2()) || false;
|
|
45901
45902
|
} catch (i3) {
|
|
45902
|
-
|
|
45903
|
+
p2 = false;
|
|
45903
45904
|
}
|
|
45904
|
-
if (
|
|
45905
|
-
|
|
45905
|
+
if (p2 && e) return console.info("进入到小程序 webview 环境 wxMiniprogramLink & link", l2, d2), void (l2 ? e(formatLink(l2, r2)) : t2(formatLink(d2, r2), f2));
|
|
45906
|
+
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);
|
|
45906
45907
|
}));
|
|
45907
45908
|
}
|
|
45908
45909
|
function formatLink(i2, n2) {
|
|
@@ -45914,14 +45915,14 @@ function formatLink(i2, n2) {
|
|
|
45914
45915
|
return concat(i2, o2);
|
|
45915
45916
|
}
|
|
45916
45917
|
function navigateToLink(i2) {
|
|
45917
|
-
const { linkData: n2, usePlvWebviewBridge: o2, openLink: e, isPlvWebview: t2, getPlvWebviewSmallWindowSize: r2, getPlvWebviewBridge: a2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, getLinkParams: c2, isMobile:
|
|
45918
|
-
if (console.info("是否保利威 webview 环境",
|
|
45919
|
-
const { link: i3, iosLink:
|
|
45920
|
-
console.info("保利威 webview 下的 mobileAppLink,link",
|
|
45921
|
-
const
|
|
45922
|
-
return o2 ? void toPlvWebviewBridge({ link: formatLink(
|
|
45918
|
+
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;
|
|
45919
|
+
if (console.info("是否保利威 webview 环境", u2), u2) {
|
|
45920
|
+
const { link: i3, iosLink: t3, androidLink: l3, harmonyLink: s3, mobileAppLink: k3, wxMiniprogramOriginalId: u3, wxMiniprogramLink: d2, jumpWay: f2 } = n2, m2 = k3 || i3;
|
|
45921
|
+
console.info("保利威 webview 下的 mobileAppLink,link", k3, i3), console.info("保利威 webview 下 usePlvWebviewBridge", o2);
|
|
45922
|
+
const L2 = { mobileLink: formatLink(i3, c2), wxMiniprogramOriginalId: u3, wxMiniprogramLink: formatLink(d2, c2), mobileAppLink: formatLink(k3, c2) };
|
|
45923
|
+
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 });
|
|
45923
45924
|
}
|
|
45924
|
-
toMultiPlatformLink({ linkData: n2, getLinkParams: c2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, openLink: e, isMobile:
|
|
45925
|
+
toMultiPlatformLink({ linkData: n2, getLinkParams: c2, isWxMiniProgramEnv: l2, toWxMiniProgram: s2, openLink: e, isMobile: k2 });
|
|
45925
45926
|
}
|
|
45926
45927
|
const useTrackEvent = (interactionCore) => {
|
|
45927
45928
|
const { injectData } = useGlobalInject$1();
|
|
@@ -46227,6 +46228,7 @@ const useProductButton = (options) => {
|
|
|
46227
46228
|
return;
|
|
46228
46229
|
}
|
|
46229
46230
|
const linkData = getLinkData();
|
|
46231
|
+
console.info("injectData 是什么", injectData);
|
|
46230
46232
|
navigateToLink({
|
|
46231
46233
|
linkData,
|
|
46232
46234
|
usePlvWebviewBridge: injectData.usePlvWebviewBridge || false,
|
|
@@ -46241,19 +46243,32 @@ const useProductButton = (options) => {
|
|
|
46241
46243
|
});
|
|
46242
46244
|
});
|
|
46243
46245
|
}
|
|
46246
|
+
function openNewWindowWithFallback(url2) {
|
|
46247
|
+
var _a2;
|
|
46248
|
+
const isPlvWebview = ((_a2 = injectData.isPlvWebview) == null ? void 0 : _a2.call(injectData)) || false;
|
|
46249
|
+
console.info("商品库是否处于 webview 环境:", isPlvWebview);
|
|
46250
|
+
if (isPlvWebview) {
|
|
46251
|
+
window.location.href = url2;
|
|
46252
|
+
} else {
|
|
46253
|
+
window.open(url2, "_blank", "noopener=yes");
|
|
46254
|
+
}
|
|
46255
|
+
}
|
|
46244
46256
|
function openLink(url2, jumpWay) {
|
|
46257
|
+
console.info("我进入到 openLink 了");
|
|
46245
46258
|
switch (jumpWay) {
|
|
46246
|
-
case LinkJumpWay.NewWindow:
|
|
46247
|
-
|
|
46259
|
+
case LinkJumpWay.NewWindow: {
|
|
46260
|
+
openNewWindowWithFallback(url2);
|
|
46248
46261
|
break;
|
|
46262
|
+
}
|
|
46249
46263
|
case LinkJumpWay.CurrentWindow:
|
|
46250
46264
|
window.location.href = url2;
|
|
46251
46265
|
break;
|
|
46252
46266
|
case LinkJumpWay.PopUp:
|
|
46253
46267
|
getEmitter().emit(productEvents.OpenProductIframeLinkPopup, url2);
|
|
46254
46268
|
break;
|
|
46255
|
-
default:
|
|
46256
|
-
|
|
46269
|
+
default: {
|
|
46270
|
+
openNewWindowWithFallback(url2);
|
|
46271
|
+
}
|
|
46257
46272
|
}
|
|
46258
46273
|
}
|
|
46259
46274
|
function toDirectBuy() {
|
|
@@ -47017,8 +47032,8 @@ console.log(
|
|
|
47017
47032
|
"%c@polyv/product-ui",
|
|
47018
47033
|
"background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff",
|
|
47019
47034
|
"[component: big-card-popup]",
|
|
47020
|
-
"[version: 1.8.0-rc-20251204.
|
|
47021
|
-
"[buildTime: 2025-12-
|
|
47035
|
+
"[version: 1.8.0-rc-20251204.2]",
|
|
47036
|
+
"[buildTime: 2025-12-11 08:27:08]"
|
|
47022
47037
|
);
|
|
47023
47038
|
export {
|
|
47024
47039
|
bigCardPopup as default
|