From 62db07a644f39245c59d9555e3e33683b31a9ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=87?= Date: Thu, 20 Mar 2025 11:47:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E4=BA=AB=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E5=BC=80=E5=90=AF=E5=95=86=E9=93=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/user.js | 1 + app.json | 6 ++++ assets/icon/help/qrcode.png | Bin 0 -> 1526 bytes assets/icon/my/partner-community.png | Bin 1538 -> 1217 bytes assets/icon/shop/phone-black.png | Bin 0 -> 1007 bytes components/modalView/index.js | 1 + components/modalView/index.wxml | 4 +-- components/navbar/index.wxss | 1 + components/shopItem/index.wxml | 4 +-- components/shopItem/index.wxss | 11 +++--- pages/login/login.wxss | 1 + pages/my/index/index.js | 18 ++++++++-- pages/my/index/index.json | 4 ++- pages/my/index/index.wxml | 12 ++++--- pages/my/index/index.wxss | 34 ++++++++++++------ pages/order/index/index.wxml | 4 +-- pages/shop/detail/index.js | 13 +++++++ pages/shop/detail/index.json | 3 +- pages/shop/detail/index.wxml | 16 ++++----- pages/shop/detail/index.wxss | 14 ++++---- pages/shop/index/index.wxml | 52 ++++++++++++++------------- pages/shop/index/index.wxss | 8 ++--- 22 files changed, 134 insertions(+), 73 deletions(-) create mode 100644 assets/icon/help/qrcode.png create mode 100644 assets/icon/shop/phone-black.png diff --git a/api/user.js b/api/user.js index cffeb5d..a5ca471 100644 --- a/api/user.js +++ b/api/user.js @@ -4,6 +4,7 @@ export default { genderKV:{ MALE:'先生',FEMALE:'女士' }, + shareQRCode:()=>request.get('/api/user/qr_code'), getPhoneByCode(code){ return request.post('/api/user/send-code',{}) }, diff --git a/app.json b/app.json index c2546f8..7b62031 100644 --- a/app.json +++ b/app.json @@ -45,6 +45,12 @@ "iconPath": "assets/icon/tabs/tab1.png", "selectedIconPath": "assets/icon/tabs/tab1-active.png" }, + { + "pagePath": "pages/shop/index/index", + "text": "商家", + "iconPath": "assets/icon/tabs/tab2.png", + "selectedIconPath": "assets/icon/tabs/tab2-active.png" + }, { "pagePath": "pages/order/index/index", "text": "订单", diff --git a/assets/icon/help/qrcode.png b/assets/icon/help/qrcode.png new file mode 100644 index 0000000000000000000000000000000000000000..d7e50964e082ad38770ce9ee797aee7806fadb62 GIT binary patch literal 1526 zcmVPx#1am@3R0s$N2z&@+hyVZuph-kQRCt{2on3O`I1tCXWvH6B@eNk7O%;#q36`8- zGdCb7*vSbpoFLf~kQ+>Lg0LqT@|G%sOM3(6ErpSKA7Z8`A{pc~;AHiCl(5zLgT7kb z3P2zb2m}HR0bLbRN*P7b6#&EsvR&Lh!_CQZIw|JeJ7&+vFy`Y_obA-E2Y$Cov=M%jJe#q zRofXzDPQ#tDP>GV{Ug}3PAr75YGf4@j?m3*v|6p+W?8%4mPat<6|UjNC1_(IqDFk# zE`p%USSO_l6e5n9ZHS5J%;)p23PijG0PD)2F6DSFcm2GVpolo0&1Tk_w=P+h^?d|I zMCF>@+wJzna1keJ`by&IdhV6Vw<}t=&s+2M2)O9{|D55C(0(MW-@agGk%+(I-IyBGoi!96T zj4^!x_>71TO<99Zr_+g)@ybKz>REtgBVvJFZHG$N|yaydD+=PVEi1U@QTC#6=a z)gvNV7X2FdxdwdzfVKC75Mojkh1zA{mr}-`K7ER{)^QX?Z<;7vaiuE_0ABv)ZSkj0 zL6amI0l=WXiEmw(_R$ z`HZp^vI$x`RBR3dDTKHOfD^8^TsZROW$7N2`)(hA_ZRwCMV(C3 zbg=JeW>>y^nL#(&XWJ`SCZ#ffta7YbcOrjeSOk53e%{4f{+Xk#D!6xXbzl*+Jg%rb zOBX^|BP~7}Y-4B?Mdw=Ud$4!?>timTgb)+0^^p0syI<8-hv{@W>2x}$#+a)z?=vnN zz033b8&^AZZG$a6hzr(rXlc0hu5pQb76p18)A)LYOk&Jk7dTZfw>UEdhv^O zQc_AODdou#|1rQnRSuOr&o7cB`MGP@B_b+tT-!lJ4;6MiSguH(YppNxJXgE49S8&h cfxyxD52~kDSS=|rYybcN07*qoM6N<$f|(c1NB{r; literal 0 HcmV?d00001 diff --git a/assets/icon/my/partner-community.png b/assets/icon/my/partner-community.png index 34d6b0dcd22d4453a8fab58bd39cf750d5460ec9..c8ac91ef28aac6315e149b3351e63aa0f165f688 100644 GIT binary patch delta 1204 zcmV;l1WWsZ48aK@iBL{Q4GJ0x0000DNk~Le0000y0000y2nGNE06P5Ha*-h)e*|ku zL_t(&f$dw}Y7;>e{>BD25Fyb(ga~n4P*4yn_yF+<8lS-Q2^ycE%@eeJ0^<|3eFA$a zC|D4@P|!6Og%l#&i$Vfh#*1ldvU4^&J99QE*6*&f^z3|d&Ya(kkWxzAAlzE?2Ih_b zg#UFE=Jux3Lm&zv$AS8LsRB{-e}U2}P^ipp8~G9*^dNs90KjLpY7B=L6*?M0M@TROKiD#=n#^J3UO^;PcPQu`z*#f3W=g95_4D zA9y}QV-vX7o-N??P~CZoIJ0>>$6?v;(q!u$rJXdgfYScc_YjRO{n0QPOsNH5G&huGLLs4f4tF_#lyE|hnE5;4a?(Qoou;jPZm&zMQB>~yY@0C;G|*s z;f_X_%gM-(%bFA9kZrHwe~VOc3bi(yM-`1tZA}gjoaI^*rd}@Yy>{Bn6sY(+BYc^{ zUc+(i0<7^8MPDaPMT3m6Cmesd=kw>kae34sX9S;y^GNoW2$`e6Nu)jDc;>@!`d07F z2z$bDjdB$Ylc27RBkT!N4$8GGoJ17rgc-ROk3lKlUK4%e|q{NL#gPNX;InG zi=XbAh(c9?sL5l%A>P zJMgzDKX{j%BNr;Ff4y_vdRhST=~^ zeO*}$Lk&C$cau(Ny0N0(Q6Z4QaoH0d1&}}AnB~u&uabsB z5G&h2y<;Ul8{xAfrCCY?rb&h=Qm%|GX>-D}%$U)sXy|t#`&;BAn?AKM;iM2D8e0HW zL~vrbuTsyrWmyc`jN)+8WN$8H0if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ynamicsStyle}}"> @@ -14,7 +14,7 @@ - {{content}} diff --git a/components/navbar/index.wxss b/components/navbar/index.wxss index 5706c29..6cc5fad 100644 --- a/components/navbar/index.wxss +++ b/components/navbar/index.wxss @@ -50,6 +50,7 @@ .nav-bar-content .share{ width:30rpx;height:34rpx; padding:12rpx 28rpx; + vertical-align: middle; } .nav-bar-content .center{ flex:1; diff --git a/components/shopItem/index.wxml b/components/shopItem/index.wxml index c8de064..0ff0de5 100644 --- a/components/shopItem/index.wxml +++ b/components/shopItem/index.wxml @@ -12,8 +12,8 @@ - - + + diff --git a/components/shopItem/index.wxss b/components/shopItem/index.wxss index a9bd0ab..a46344a 100644 --- a/components/shopItem/index.wxss +++ b/components/shopItem/index.wxss @@ -1,6 +1,9 @@ .shop-item{ display: flex; } +.shop-item:first-child{ + margin-top:0; +} .shop-item .logo{ width:180rpx;height:180rpx; border-radius: 18rpx; @@ -11,12 +14,12 @@ } .shop-item .line1{ line-height: 1.4; - font-size:34rpx; + font-size:32rpx; font-weight: 600; } .shop-item .line2{ line-height: 1.4; - font-size: 26rpx; + font-size: 24rpx; display: flex; color:#888888; margin-top:14rpx; @@ -38,7 +41,7 @@ } .shop-item .promation.buy .coupon::before{ content: '买'; - background-color:#ff0000; + background-color:#FF8C12; } .shop-item .promation .coupon::before{ content: '券'; @@ -49,7 +52,7 @@ color:#fff; } .shop-item .promation.buy .tag{ - color:#ff0000; + color:#FF8C12; } .shop-item .promation .tag{ font-weight: 500; diff --git a/pages/login/login.wxss b/pages/login/login.wxss index e30a7a1..a2ead47 100644 --- a/pages/login/login.wxss +++ b/pages/login/login.wxss @@ -44,4 +44,5 @@ width:100%; text-align: center; color:#999999; + opacity: .1; } \ No newline at end of file diff --git a/pages/my/index/index.js b/pages/my/index/index.js index 8c4a0ae..7fffb9f 100644 --- a/pages/my/index/index.js +++ b/pages/my/index/index.js @@ -1,4 +1,5 @@ const app = getApp(); +import userApi from '../../../api/user'; Page({ @@ -9,9 +10,12 @@ Page({ userInfo:{}, refresherTriggered:true, bgHeight:'100%', - appConfig:{} - }, + appConfig:{}, + isShowQRCode:false, + + shareQRCodeUrl:'' + }, goToCouponList(){ wx.navigateTo({ url: '/pages/my/coupon/index', @@ -50,6 +54,16 @@ Page({ }, shareFriend(){ + }, + showQRCode(){ + userApi.shareQRCode().then((data)=>{ + this.setData({ + shareQRCodeUrl:data.url + }) + }) + this.setData({ + isShowQRCode:true + }) }, /** * 生命周期函数--监听页面初次渲染完成 diff --git a/pages/my/index/index.json b/pages/my/index/index.json index 965b8e8..5915203 100644 --- a/pages/my/index/index.json +++ b/pages/my/index/index.json @@ -1,4 +1,6 @@ { - "usingComponents": {}, + "usingComponents": { + "modal-view":"/components/modalView" + }, "navigationStyle": "custom" } \ No newline at end of file diff --git a/pages/my/index/index.wxml b/pages/my/index/index.wxml index 74a8402..a5a177a 100644 --- a/pages/my/index/index.wxml +++ b/pages/my/index/index.wxml @@ -8,9 +8,7 @@ {{userInfo.nickname}} - - - + @@ -80,4 +78,10 @@ - \ No newline at end of file + + + + + + 邀请好友丨扫码体验 + \ No newline at end of file diff --git a/pages/my/index/index.wxss b/pages/my/index/index.wxss index a455233..927ec34 100644 --- a/pages/my/index/index.wxss +++ b/pages/my/index/index.wxss @@ -29,17 +29,8 @@ flex:1; margin-left:30rpx; } -.user-info .content .setting{ - background: rgba(255, 255, 255, 0.9); - width:66rpx;height:66rpx; - border-radius: 50%; - display: flex; - align-items: center; - padding:18rpx 16rpx; - box-sizing: border-box; -} -.user-info .content .setting .icon{ - width:36rpx;height:30rpx; +.user-info .content .qrcode{ + width:56rpx;height:56rpx; } .property{ @@ -99,3 +90,24 @@ .cell.is-button:hover{ background-color: #fff; } +.modal-view-qrcode{ + position: relative; +} +.modal-view-qrcode .modal-view-main{ + padding:36rpx; +} +.modal-view-qrcode .qrcode{ + width:220px;height: 220px; + vertical-align: middle; +} +.modal-view-qrcode .weui-loading{ + position: absolute; + left:50%;top:44%; + margin-left: -0.5em; +} +.modal-view-qrcode .tips{ + font-size:32rpx; + color: #222222; + text-align: center; + margin-top:26rpx; +} \ No newline at end of file diff --git a/pages/order/index/index.wxml b/pages/order/index/index.wxml index 97600a3..6daa434 100644 --- a/pages/order/index/index.wxml +++ b/pages/order/index/index.wxml @@ -1,6 +1,6 @@ - + diff --git a/pages/shop/detail/index.js b/pages/shop/detail/index.js index 172b92c..6565feb 100644 --- a/pages/shop/detail/index.js +++ b/pages/shop/detail/index.js @@ -67,6 +67,19 @@ Page({ }); }); }, + navToMap(){ + wx.openLocation({ + name:this.data.detail.name, + address:this.data.detail.address, + latitude: this.data.detail.latitude, + longitude: this.data.detail.longitude, + }) + }, + makePhoneCall(){ + wx.makePhoneCall({ + phoneNumber:this.data.detail.phone, + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/shop/detail/index.json b/pages/shop/detail/index.json index 90bcbed..bb284c5 100644 --- a/pages/shop/detail/index.json +++ b/pages/shop/detail/index.json @@ -2,6 +2,5 @@ "usingComponents": { "nav-bar":"/components/navbar", "merchant-order":"/components/merchantOrder" - }, - "navigationStyle": "custom" + } } \ No newline at end of file diff --git a/pages/shop/detail/index.wxml b/pages/shop/detail/index.wxml index 82db7a3..8b60d94 100644 --- a/pages/shop/detail/index.wxml +++ b/pages/shop/detail/index.wxml @@ -1,4 +1,4 @@ - + @@ -13,18 +13,18 @@ {{detail.address}} 距离{{detail.distance}} - + - 地图 - - - - - 导航 + + + + + 电话 + diff --git a/pages/shop/detail/index.wxss b/pages/shop/detail/index.wxss index dada3fe..2c33005 100644 --- a/pages/shop/detail/index.wxss +++ b/pages/shop/detail/index.wxss @@ -69,26 +69,28 @@ text-overflow:ellipsis; overflow: hidden; margin-top:6rpx; + color:#555555; } .shop-info .address .l2{ - font-size: 24rpx; - color: #888888; + font-size: 26rpx; + color: #222222; margin-top:40rpx } .shop-info .address .right{ - font-size:22rpx; - color: #888888; + font-size:26rpx; + color: #555555; text-align: center; margin-left: 44rpx; } .shop-info .address .icon-con{ - padding:8rpx; + padding:10rpx; background: rgba(153, 153, 153, 0.1); display: inline-block; border-radius: 50%; } .shop-info .address .icon{ - width:30rpx;height:30rpx; + width:26rpx;height:26rpx; + vertical-align: middle; } .shop-info .address .right .text{ margin-top:26rpx; diff --git a/pages/shop/index/index.wxml b/pages/shop/index/index.wxml index dd05a07..51ef9a6 100644 --- a/pages/shop/index/index.wxml +++ b/pages/shop/index/index.wxml @@ -1,26 +1,28 @@ - - - 蜂蜜 (克) - {{userInfo.points}} - 取快递自动抵扣 - - - - - - - - - - - 暂无该分类商铺 + + + + + 蜂蜜 (克) + {{userInfo.points}} + 取快递自动抵扣 + + + + - \ No newline at end of file + + + + + + 暂无该分类商铺 + + + \ No newline at end of file diff --git a/pages/shop/index/index.wxss b/pages/shop/index/index.wxss index 31874d7..53ceae1 100644 --- a/pages/shop/index/index.wxss +++ b/pages/shop/index/index.wxss @@ -4,15 +4,15 @@ background: linear-gradient(270deg, #FFDB00 0%, #FFC300 60%); box-shadow: 0px 6px 6px 0px rgba(0, 0, 0, 0.06); margin:20rpx; - padding:40rpx 30rpx; + padding:34rpx 0 32rpx 30rpx; position:relative; } .consume .title{ - font-size: 32rpx; + font-size: 34rpx; } .consume .point{ font-size: 70rpx; - margin-top:40rpx; + margin-top:50rpx; font-weight: 600; } .consume .tips{ @@ -22,7 +22,7 @@ background-color: var(--main-color); line-height: 40rpx; font-size: 22rpx; - padding:0 16rpx; + padding:0 12rpx 0 24rpx; } .btns{