From 37f7f83d215ea3e65634d43e270c57a2bd7e0d84 Mon Sep 17 00:00:00 2001 From: jiannibang <271381693@qq.com> Date: Fri, 6 Jan 2023 10:19:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Popup/Popup.js | 29 +++++++++++++++++++++-- src/components/Popup/Popup.scss | 14 +++++++++++ src/components/Popup/toDetail.png | Bin 0 -> 2049 bytes src/pages/Coupons/ScanModal/ScanModal.js | 4 ++-- 4 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 src/components/Popup/toDetail.png 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 0000000000000000000000000000000000000000..389aaa8da229b3fa008068362ae1176183174084 GIT binary patch literal 2049 zcmV+c2>$npP)2)u>JNh!r-M{WLiS6A2FhCTL;QmXsOlV@K=TRs^Wm{P@XJB?5th)I=aqf*_bcDcUNS zvCB%FyRh^TZ|12Gx9%x1aZQQ(gZ$(2;2alkWVfGtoBBuOLK`mL5QR815w-dHo1Gyn z6K&+yUqaL$3Nf-jelh3Tv{t0{BczGz>{nuRj}%#OOmDXmgPUc;xn~@yud9s!`rk9# zvaUI>LF%?4oTO;jkI)YP5P8X8Bhh`_*goquhPO*m7S5ODb?{gRze{f)-P0(#*F|-~ zTwk>GW{h3Q-_M{9ZB1_<+9t)o#>Q<3!&=(WAC(?t2D=Kw+qt%kJc(O0{cB9SxYt|v zj2MAXh4&oXoGr*a7@U$5P=In`IFLvdiIdi z)B^STa)=6IT~RPL*N|4J7g-PXN9Ex zUQrsIgMA{kXt)lqr$$=Ofhr3I1(Wz{w^ujuodM2^wTOg7laO`vywHQ9g|oKNW!jL? zyV`wSu4!C%F%Lv2iH8hV2#bd;@}_}}>CPoVrk%~K-HIX({loe3!idM!Pd-Bu&<4ij z@b_l=k03GJR;VNxF3c1V=m@5jE~_KIs6T4lh6NEKaQO@XQ`cx&OCM`zB6O1$?$&b;jI939 z)Sd8hc=ReI0dJMwp>4%8c^ciUHq&tYWn&pYK2m1(gcqyQF@%rg(g7aM76;={%ZY>G zB$MDIdBwXVCk~Xa!#Gi`d$zVN4fr4~7Q73VQ3O0e(P^uTkzMHlCw!5cH1lv}3W<41 zs9DPrUSNV^`w_#gVnpCgFca5A?m}IhW{ZCI7;+zqY22I*M}@tZP%Q~&smPrXDd9yh zQ}^*`<~{w#%(N=r1Y_53ia=7Bx5|rUF-x+QT&!^aH<5U5N8#w6KT*C3JoPxXKZ)u65rmsZ_;^ zg$V}6>?)|1#hYNbxuPM7WAnhHAedyL*Y1!+zO<=NrfNqGD3QOvBzgBke^wQYeSE_f z5tFO!Rq-YmZmbn+h{FxKk}~3XQBjr!u}~g35>4sPe&+66rqfLMtFDf_Xje$$K`bkl zsxw6wEej@Z&8Hbo+B8r$r!;0~+b+>AI_n8q?FN zds*l6OZ=9Z2n13jeiV^6YzUqvkOWOwvG9MYY&tzX+t<-qI~MKO5 { onCode && onCode(code); } ) - .catch(() => { - toast("启动二维码扫描失败"); + .catch((error) => { + toast("启动二维码扫描失败:" + JSON.stringify(error)); onBack && onBack(); }); return () => {