diff --git a/src/components/Popup/Popup.js b/src/components/Popup/Popup.js index 7b7ab17..f2c9841 100644 --- a/src/components/Popup/Popup.js +++ b/src/components/Popup/Popup.js @@ -5,6 +5,7 @@ import "./Popup.scss"; import navpng from "./nav.png"; import arpng from "./ar.png"; import couponTop from "./couponTop.png"; +import toDetail from "./toDetail.png"; const Popup = ({ showPopup, defaultPopup, @@ -46,8 +47,32 @@ const Popup = ({
{shop.name}
- {shop.shopFormat ? shop.shopFormat : " "} - {shop.floorName} + + {shop.shopFormat ? shop.shopFormat : " "} + + + {shop.floorName} + {shop.webUrl && ( + { + if (window.my) { + window.my.navigateTo({ + url: `../detail/detail?url=${encodeURIComponent( + shop.webUrl + )}`, + }); + } else + window.wx.miniProgram.navigateTo({ + url: `/pages/detail/index?url=${encodeURIComponent( + shop.webUrl + )}`, + }); + }} + /> + )} +
diff --git a/src/components/Popup/Popup.scss b/src/components/Popup/Popup.scss index 3253f05..b5bdd32 100644 --- a/src/components/Popup/Popup.scss +++ b/src/components/Popup/Popup.scss @@ -76,6 +76,20 @@ font-size: 14px; line-height: 20px; color: #a1a5b3; + .popupformat { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + width: calc(100vw - 245px + 70px + 16px); + &.hasDetail { + width: calc(100vw - 245px); + } + } + .toDetail { + width: 70px; + height: 21px; + margin-left: 16px; + } } } diff --git a/src/components/Popup/toDetail.png b/src/components/Popup/toDetail.png new file mode 100644 index 0000000..389aaa8 Binary files /dev/null and b/src/components/Popup/toDetail.png differ diff --git a/src/pages/Coupons/ScanModal/ScanModal.js b/src/pages/Coupons/ScanModal/ScanModal.js index 489fe46..39b5b45 100644 --- a/src/pages/Coupons/ScanModal/ScanModal.js +++ b/src/pages/Coupons/ScanModal/ScanModal.js @@ -24,8 +24,8 @@ const ScanModal = ({ onBack, onCode }) => { onCode && onCode(code); } ) - .catch(() => { - toast("启动二维码扫描失败"); + .catch((error) => { + toast("启动二维码扫描失败:" + JSON.stringify(error)); onBack && onBack(); }); return () => {