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 0000000..d7e5096 Binary files /dev/null and b/assets/icon/help/qrcode.png differ diff --git a/assets/icon/my/partner-community.png b/assets/icon/my/partner-community.png index 34d6b0d..c8ac91e 100644 Binary files a/assets/icon/my/partner-community.png and b/assets/icon/my/partner-community.png differ diff --git a/assets/icon/shop/phone-black.png b/assets/icon/shop/phone-black.png new file mode 100644 index 0000000..5dc43b9 Binary files /dev/null and b/assets/icon/shop/phone-black.png differ diff --git a/components/modalView/index.js b/components/modalView/index.js index 9ec35c9..c006924 100644 --- a/components/modalView/index.js +++ b/components/modalView/index.js @@ -5,6 +5,7 @@ Component({ * 组件的属性列表 */ properties: { + width:String, titleText:{ type:String, value:'' diff --git a/components/modalView/index.wxml b/components/modalView/index.wxml index e8d0674..17e1112 100644 --- a/components/modalView/index.wxml +++ b/components/modalView/index.wxml @@ -2,7 +2,7 @@ + custom-style="background-color:transparent;left:{{width?'calc((100vw - '+width+')/2)':'27px'}};width:{{width||'calc(100vw - 54px)'}};height:200px;{{dynamicsStyle}}"> @@ -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{