Showing
26 changed files
with
1091 additions
and
169 deletions
| @@ -11,7 +11,9 @@ | @@ -11,7 +11,9 @@ | ||
| 11 | "pages/customer/remind", | 11 | "pages/customer/remind", |
| 12 | "pages/customer/care", | 12 | "pages/customer/care", |
| 13 | "pages/customer/wecode", | 13 | "pages/customer/wecode", |
| 14 | + "pages/customer/wechat", | ||
| 14 | "pages/reserve/index", | 15 | "pages/reserve/index", |
| 16 | + "pages/reserve/map", | ||
| 15 | "pages/reserve/index_yy", | 17 | "pages/reserve/index_yy", |
| 16 | "pages/me/index", | 18 | "pages/me/index", |
| 17 | "pages/me/concat", | 19 | "pages/me/concat", |
| @@ -143,16 +145,20 @@ | @@ -143,16 +145,20 @@ | ||
| 143 | "list": [ | 145 | "list": [ |
| 144 | { | 146 | { |
| 145 | "pagePath": "pages/reserve/index", | 147 | "pagePath": "pages/reserve/index", |
| 146 | - "text": "订座" | 148 | + "text": "附近" |
| 147 | }, | 149 | }, |
| 148 | { | 150 | { |
| 149 | "pagePath": "pages/reserve/search", | 151 | "pagePath": "pages/reserve/search", |
| 150 | - "text": "查找" | 152 | + "text": "搜索" |
| 151 | }, | 153 | }, |
| 152 | { | 154 | { |
| 153 | "pagePath": "pages/me/list", | 155 | "pagePath": "pages/me/list", |
| 154 | "text": "订单" | 156 | "text": "订单" |
| 155 | - } | 157 | + }, |
| 158 | + { | ||
| 159 | + "pagePath": "pages/me/index", | ||
| 160 | + "text": "我的" | ||
| 161 | + } | ||
| 156 | ] | 162 | ] |
| 157 | }, | 163 | }, |
| 158 | "plugins": { | 164 | "plugins": { |
| @@ -11,7 +11,8 @@ Component({ | @@ -11,7 +11,8 @@ Component({ | ||
| 11 | * 组件的初始数据 | 11 | * 组件的初始数据 |
| 12 | */ | 12 | */ |
| 13 | data: { | 13 | data: { |
| 14 | - url:'pages/reserve/search' | 14 | + url:'pages/reserve/search', |
| 15 | + bottom:0, | ||
| 15 | }, | 16 | }, |
| 16 | pageLifetimes:{ | 17 | pageLifetimes:{ |
| 17 | show(){ | 18 | show(){ |
| @@ -29,6 +30,11 @@ Component({ | @@ -29,6 +30,11 @@ Component({ | ||
| 29 | }, | 30 | }, |
| 30 | attached: function() { | 31 | attached: function() { |
| 31 | // 在组件实例进入页面节点树时执行 | 32 | // 在组件实例进入页面节点树时执行 |
| 33 | + const res = wx.getSystemInfoSync(); | ||
| 34 | + let ratio=750/res.windowWidth; | ||
| 35 | + this.setData({ | ||
| 36 | + bottom:(res.windowHeight-res.safeArea.bottom)*ratio, | ||
| 37 | + }) | ||
| 32 | console.log('custom-tab-bar.attached') | 38 | console.log('custom-tab-bar.attached') |
| 33 | PubSub.on('custom-tab-bar',()=>{ | 39 | PubSub.on('custom-tab-bar',()=>{ |
| 34 | this.setStatus() | 40 | this.setStatus() |
| 1 | <!--components/book/tabBar/tabBar.wxml--> | 1 | <!--components/book/tabBar/tabBar.wxml--> |
| 2 | -<view class="view tabBar flex align-center" > | ||
| 3 | - <view class="view home flex justify-center align-center {{('pages/reserve/index'==url)?'checked':''}}" | 2 | +<view class="view tabBar flex-lr align-center" style="height:{{100+bottom}}rpx;padding-bottom: {{bottom}}rpx;"> |
| 3 | + <view class="view home flex-vc {{('pages/reserve/index'==url)?'checked':''}}" | ||
| 4 | bindtap="redirectTo" data-url="pages/reserve/index"> | 4 | bindtap="redirectTo" data-url="pages/reserve/index"> |
| 5 | <view class="view icon"></view><view class="text">附近</view> | 5 | <view class="view icon"></view><view class="text">附近</view> |
| 6 | </view> | 6 | </view> |
| 7 | - <view class="view search flex justify-center align-center {{('pages/reserve/search'==url)?'checked':''}}" bindtap="redirectTo" data-url="pages/reserve/search"> | ||
| 8 | - <view> | ||
| 9 | - <view class="view icon"></view> | ||
| 10 | - <view class="text">找包间</view> | ||
| 11 | - </view> | 7 | + <view class="view search flex-vc {{('pages/reserve/search'==url)?'checked':''}}" bindtap="redirectTo" data-url="pages/reserve/search"> |
| 8 | + <view class="view icon"></view> | ||
| 9 | + <view class="text">搜索</view> | ||
| 12 | </view> | 10 | </view> |
| 13 | - <view class="view order flex justify-center align-center {{('pages/me/list'==url)?'checked':''}}" bindtap="redirectTo" data-url="pages/me/list"> | 11 | + <view class="view order flex-vc {{('pages/me/list'==url)?'checked':''}}" bindtap="redirectTo" data-url="pages/me/list"> |
| 14 | <view class="view icon"></view> | 12 | <view class="view icon"></view> |
| 15 | <view class="text">订单</view> | 13 | <view class="text">订单</view> |
| 16 | </view> | 14 | </view> |
| 15 | + <view class="view me flex-vc {{('pages/me/index'==url)?'checked':''}}" bindtap="redirectTo" data-url="pages/me/index"> | ||
| 16 | + <view class="view icon"></view> | ||
| 17 | + <view class="text">我的</view> | ||
| 18 | + </view> | ||
| 17 | </view> | 19 | </view> |
| 18 | -<me></me> | 20 | +<!-- <me></me> --> |
| 1 | /* components/book/tabBar/tabBar.wxss */ | 1 | /* components/book/tabBar/tabBar.wxss */ |
| 2 | @import "../colorui/main.wxss"; | 2 | @import "../colorui/main.wxss"; |
| 3 | +.flex-lr{ | ||
| 4 | + display: flex; | ||
| 5 | + display: -webkit-flex; | ||
| 6 | + justify-content: space-between; | ||
| 7 | + align-items:center; | ||
| 8 | + flex-direction: row; | ||
| 9 | + -webkit-flex-direction: row; | ||
| 10 | +} | ||
| 11 | +/*垂直方向居中分布*/ | ||
| 12 | +.flex-vc{ | ||
| 13 | + display: flex; | ||
| 14 | + display: -webkit-flex; | ||
| 15 | + justify-content: center; | ||
| 16 | + align-items: center; | ||
| 17 | + flex-direction: column; | ||
| 18 | + -webkit-flex-direction: column; | ||
| 19 | +} | ||
| 3 | .tabBar{ | 20 | .tabBar{ |
| 4 | position: fixed; | 21 | position: fixed; |
| 5 | - bottom: 34rpx; | ||
| 6 | - left: calc(50% - 232rpx); | ||
| 7 | - width: 464rpx; | 22 | + bottom: 0; |
| 23 | + left: 0; | ||
| 24 | + width: 100%; | ||
| 8 | /* height: calc(100rpx + env(safe-area-inset-bottom)); */ | 25 | /* height: calc(100rpx + env(safe-area-inset-bottom)); */ |
| 9 | height: 100rpx; | 26 | height: 100rpx; |
| 10 | background: #FFFFFF; | 27 | background: #FFFFFF; |
| 11 | box-shadow: 0rpx 0rpx 10rpx 0rpx #E5E5E5; | 28 | box-shadow: 0rpx 0rpx 10rpx 0rpx #E5E5E5; |
| 12 | - border-radius: 50rpx; | ||
| 13 | - border: 2rpx solid #E5E5E5; | 29 | + padding: 0 60rpx; |
| 30 | + box-sizing: border-box; | ||
| 31 | + /* border-radius: 50rpx; */ | ||
| 32 | + /* border: 2rpx solid #E5E5E5; */ | ||
| 14 | } | 33 | } |
| 15 | - | ||
| 16 | -.home,.order{ | ||
| 17 | - width:176rpx; | ||
| 18 | - | 34 | +/* .view{ |
| 35 | + padding: 0 10rpx; | ||
| 36 | +} */ | ||
| 37 | +.home,.order,.me,.search{ | ||
| 38 | + /* width:176rpx; */ | ||
| 19 | font-size: 28rpx; | 39 | font-size: 28rpx; |
| 20 | font-family: PingFangSC-Semibold, PingFang SC; | 40 | font-family: PingFangSC-Semibold, PingFang SC; |
| 21 | font-weight: 600; | 41 | font-weight: 600; |
| 22 | color: #999999; | 42 | color: #999999; |
| 43 | + padding: 0 10rpx; | ||
| 23 | } | 44 | } |
| 24 | -.tabBar .text{ | 45 | +/* .tabBar .text{ |
| 25 | margin-left: 14rpx; | 46 | margin-left: 14rpx; |
| 26 | -} | 47 | +} */ |
| 27 | .tabBar .checked .text{ | 48 | .tabBar .checked .text{ |
| 28 | color: #5EB2FF; | 49 | color: #5EB2FF; |
| 29 | } | 50 | } |
| 30 | -.tabBar .search.checked .icon{ | 51 | +/* .tabBar .search.checked .icon{ |
| 31 | width: 56rpx; | 52 | width: 56rpx; |
| 32 | height: 56rpx; | 53 | height: 56rpx; |
| 33 | -} | ||
| 34 | -.tabBar .search.checked .text{ | 54 | +} */ |
| 55 | +/* .tabBar .search.checked .text{ | ||
| 35 | color: #FFFFFF; | 56 | color: #FFFFFF; |
| 36 | display: none; | 57 | display: none; |
| 37 | -} | 58 | +} */ |
| 38 | .home .icon{ | 59 | .home .icon{ |
| 39 | - width: 40rpx; | ||
| 40 | - height: 40rpx; | ||
| 41 | - background-image: url("http://nosqn.colorcun.com/2.0/home%20%287%29.png"); | 60 | + width: 48rpx; |
| 61 | + height: 48rpx; | ||
| 62 | + margin-bottom: 2rpx; | ||
| 63 | + background-image: url("http://nosqn.colorcun.com/near.png"); | ||
| 42 | } | 64 | } |
| 43 | .home.checked .icon{ | 65 | .home.checked .icon{ |
| 44 | - background-image: url("http://nosqn.colorcun.com/2.0/home%20%286%29.png"); | ||
| 45 | -} | ||
| 46 | -.order .icon{ | ||
| 47 | - width: 40rpx; | ||
| 48 | - height: 40rpx; | ||
| 49 | - background-image: url("http://nosqn.colorcun.com/2.0/home%20%2812%29.png"); | 66 | + background-image: url("http://nosqn.colorcun.com/near-checked.png"); |
| 50 | } | 67 | } |
| 51 | -.order.checked .icon{ | ||
| 52 | - background-image: url("http://nosqn.colorcun.com/2.0/home%20%285%29.png"); | ||
| 53 | -} | ||
| 54 | -.search{ | 68 | +/* .search{ |
| 55 | width: 112rpx; | 69 | width: 112rpx; |
| 56 | height: 112rpx; | 70 | height: 112rpx; |
| 57 | background: linear-gradient(90deg, #3BBFF5 0%, #57A0FF 100%); | 71 | background: linear-gradient(90deg, #3BBFF5 0%, #57A0FF 100%); |
| 58 | - box-shadow: 0rpx 0rpx 6rpx 0rpx #42A5FF; | 72 | + box-shadow: 0rpx 0rpx 8rpx 0rpx #E5E5E5; |
| 73 | + background: #FFFFFF; | ||
| 59 | border-radius: 50%; | 74 | border-radius: 50%; |
| 75 | +} */ | ||
| 76 | +.search .icon{ | ||
| 77 | + width: 48rpx; | ||
| 78 | + height: 48rpx; | ||
| 79 | + margin-bottom: 2rpx; | ||
| 80 | + background-image: url("http://nosqn.colorcun.com/search.png"); | ||
| 81 | +} | ||
| 82 | +.search.checked .icon{ | ||
| 83 | + background-image: url("http://nosqn.colorcun.com/search-checked.png"); | ||
| 60 | } | 84 | } |
| 61 | .search .text{ | 85 | .search .text{ |
| 62 | - font-size: 20rpx; | 86 | + font-size: 28rpx; |
| 63 | font-family: PingFangSC-Regular, PingFang SC; | 87 | font-family: PingFangSC-Regular, PingFang SC; |
| 64 | font-weight: 400; | 88 | font-weight: 400; |
| 65 | - color: #FFFFFF; | 89 | + color: #999999; |
| 66 | line-height: 28rpx; | 90 | line-height: 28rpx; |
| 67 | height: 28rpx; | 91 | height: 28rpx; |
| 68 | margin-left: 0; | 92 | margin-left: 0; |
| 69 | } | 93 | } |
| 70 | -.search .icon{ | 94 | +.order .icon{ |
| 71 | width: 48rpx; | 95 | width: 48rpx; |
| 72 | height: 48rpx; | 96 | height: 48rpx; |
| 73 | - background-image: url("http://nosqn.colorcun.com/2.0/home%20%2810%29.png"); | ||
| 74 | - margin-bottom: 4rpx; | 97 | + margin-bottom: 2rpx; |
| 98 | + background-image: url("http://nosqn.colorcun.com/order-gray.png"); | ||
| 99 | +} | ||
| 100 | +.order.checked .icon{ | ||
| 101 | + background-image: url("http://nosqn.colorcun.com/order-checked.png"); | ||
| 102 | +} | ||
| 103 | +.me .icon{ | ||
| 104 | + width: 48rpx; | ||
| 105 | + height: 48rpx; | ||
| 106 | + background-image: url("http://nosqn.colorcun.com/me-gray.png"); | ||
| 107 | + margin-bottom: 2rpx; | ||
| 108 | +} | ||
| 109 | +.me.checked .icon{ | ||
| 110 | + background-image: url("http://nosqn.colorcun.com/me-checked.png"); | ||
| 75 | } | 111 | } |
| 76 | 112 |
| @@ -170,6 +170,32 @@ Page({ | @@ -170,6 +170,32 @@ Page({ | ||
| 170 | util.toast('手机号码错误', 'none') | 170 | util.toast('手机号码错误', 'none') |
| 171 | return; | 171 | return; |
| 172 | } | 172 | } |
| 173 | + if(this.detail.seller.id==8){ | ||
| 174 | + let content='贵宾您好!您预订的'+this.data.seller.name+',已为您安排完毕'; | ||
| 175 | + console.log(content) | ||
| 176 | + wx.cloud.callFunction({ | ||
| 177 | + name:'sms', | ||
| 178 | + data:{ | ||
| 179 | + content:content, | ||
| 180 | + path:'/index.html?id='+this.data.options.id+'&hasInvation=1&hasSellerShare=1', | ||
| 181 | + phoneNumberList:'+86'+this.detail.phone | ||
| 182 | + | ||
| 183 | + }, | ||
| 184 | + success:(res)=>{ | ||
| 185 | + console.log('success',res); | ||
| 186 | + if(res.result && res.result.errCode==0){ | ||
| 187 | + util.toast('发送成功', 'success') | ||
| 188 | + } | ||
| 189 | + }, | ||
| 190 | + fail:(fail)=>{ | ||
| 191 | + console.log('fail',fail) | ||
| 192 | + } | ||
| 193 | + }) | ||
| 194 | + }else{ | ||
| 195 | + wx.navigateTo({ | ||
| 196 | + url: '/pack-book/pages/book/b_sms?id=' + this.detail.id | ||
| 197 | + }); | ||
| 198 | + } | ||
| 173 | // wx.cloud.callFunction({ | 199 | // wx.cloud.callFunction({ |
| 174 | // name:'common', | 200 | // name:'common', |
| 175 | // data:{ | 201 | // data:{ |
| @@ -185,29 +211,8 @@ Page({ | @@ -185,29 +211,8 @@ Page({ | ||
| 185 | // } | 211 | // } |
| 186 | 212 | ||
| 187 | // }) | 213 | // }) |
| 188 | - // let content='贵宾您好!您预订的'+this.data.seller.name+',已为您安排完毕'; | ||
| 189 | - // console.log(content) | ||
| 190 | - // wx.cloud.callFunction({ | ||
| 191 | - // name:'sms', | ||
| 192 | - // data:{ | ||
| 193 | - // content:content, | ||
| 194 | - // path:'/index.html?id='+this.data.options.id+'&hasInvation=1&hasSellerShare=1', | ||
| 195 | - // phoneNumberList:'+86'+this.detail.phone | ||
| 196 | - | ||
| 197 | - // }, | ||
| 198 | - // success:(res)=>{ | ||
| 199 | - // console.log('success',res); | ||
| 200 | - // if(res.result && res.result.errCode==0){ | ||
| 201 | - // util.toast('发送成功', 'success') | ||
| 202 | - // } | ||
| 203 | - // }, | ||
| 204 | - // fail:(fail)=>{ | ||
| 205 | - // console.log('fail',fail) | ||
| 206 | - // } | ||
| 207 | - // }) | ||
| 208 | - wx.navigateTo({ | ||
| 209 | - url: '/pack-book/pages/book/b_sms?id=' + this.detail.id | ||
| 210 | - }); | 214 | + |
| 215 | + | ||
| 211 | }, | 216 | }, |
| 212 | gotoDetail(){ | 217 | gotoDetail(){ |
| 213 | if(this.detail.type==1){//在线预订 | 218 | if(this.detail.type==1){//在线预订 |
| @@ -118,21 +118,22 @@ Page({ | @@ -118,21 +118,22 @@ Page({ | ||
| 118 | }, | 118 | }, |
| 119 | test(e){ | 119 | test(e){ |
| 120 | console.log('ttttttttttttttt'); | 120 | console.log('ttttttttttttttt'); |
| 121 | - App.Contact.UploadCustomerMedia({url:this.data.staffinfo.qrcode}).then((json)=>{ | ||
| 122 | - if(json.ret==200) { | ||
| 123 | - console.log('json') | ||
| 124 | - } | ||
| 125 | - }) | 121 | + // App.Contact.UploadCustomerMedia({url:this.data.staffinfo.qrcode}).then((json)=>{ |
| 122 | + // if(json.ret==200) { | ||
| 123 | + // console.log('json') | ||
| 124 | + // } | ||
| 125 | + // }) | ||
| 126 | }, | 126 | }, |
| 127 | addwechat(){ | 127 | addwechat(){ |
| 128 | - wx.previewImage({ | ||
| 129 | - current: this.data.staffinfo.qrcode, // 当前显示图片的http链接 | ||
| 130 | - urls: [this.data.staffinfo.qrcode] // 需要预览的图片http链接列表 | ||
| 131 | - }) | ||
| 132 | - // util.cache('staffinfo',this.data.staffinfo); | ||
| 133 | - // wx.navigateTo({ | ||
| 134 | - // url:'./care' | ||
| 135 | - // }) | 128 | + // wx.previewImage({ |
| 129 | + // current: this.data.staffinfo.qrcode, // 当前显示图片的http链接 | ||
| 130 | + // urls: [this.data.staffinfo.qrcode] // 需要预览的图片http链接列表 | ||
| 131 | + // }) | ||
| 132 | + util.cache('staffinfo',this.data.staffinfo); | ||
| 133 | + wx.navigateTo({ | ||
| 134 | + url:'./wechat?qrcode='+this.data.staffinfo.qrcode | ||
| 135 | + }) | ||
| 136 | + | ||
| 136 | }, | 137 | }, |
| 137 | getstaffinfo(){ | 138 | getstaffinfo(){ |
| 138 | App.Activity.GetCustomerActivityBaseinfo({sellerid:this.data.detail.seller.id,uid:this.data.options.uid}).then((json)=>{ | 139 | App.Activity.GetCustomerActivityBaseinfo({sellerid:this.data.detail.seller.id,uid:this.data.options.uid}).then((json)=>{ |
| 1 | <!--pages/customer/detail_owner.wxml--> | 1 | <!--pages/customer/detail_owner.wxml--> |
| 2 | <import src="../tpl/invitation"></import> | 2 | <import src="../tpl/invitation"></import> |
| 3 | <nav backgroundColor="rgba(0,0,0,0)" hasHome style="position: fixed;z-index: 1;" class="navhome" place="{{true}}"></nav> | 3 | <nav backgroundColor="rgba(0,0,0,0)" hasHome style="position: fixed;z-index: 1;" class="navhome" place="{{true}}"></nav> |
| 4 | -<block wx:if="{{detail && detail.type==0 && detail.channel==3}}"> | 4 | +<block wx:if="{{detail && detail.type==0 && detail.channel==2}}"> |
| 5 | <!-- <view class="pages bg-1" style="max-height:{{height}}px;overflow-y: scroll;padding-top: {{statusBarHeight+titleBarHeight}}px;line-height: 1.4;padding-bottom: 60rpx;position: relative;"> | 5 | <!-- <view class="pages bg-1" style="max-height:{{height}}px;overflow-y: scroll;padding-top: {{statusBarHeight+titleBarHeight}}px;line-height: 1.4;padding-bottom: 60rpx;position: relative;"> |
| 6 | <view class="book-image flex-cc"></view> | 6 | <view class="book-image flex-cc"></view> |
| 7 | <view class="cover-conent flex-vc"> | 7 | <view class="cover-conent flex-vc"> |
| @@ -62,7 +62,11 @@ | @@ -62,7 +62,11 @@ | ||
| 62 | <image src="http://sellershare.colorcun.com/last-book-call.png" class="last-icon"></image> | 62 | <image src="http://sellershare.colorcun.com/last-book-call.png" class="last-icon"></image> |
| 63 | <view class="black-font font22r last-button-content flex-cc" >拨打电话</view> | 63 | <view class="black-font font22r last-button-content flex-cc" >拨打电话</view> |
| 64 | </view> | 64 | </view> |
| 65 | - <button class="last-button-item flex-ll" open-type="contact" bindcontact="test"> | 65 | + <!-- <button class="last-button-item flex-ll" open-type="contact" bindcontact="test" send-message-img="{{staffinfo.qrcode}}" show-message-card="{{true}}" send-message-path="pages/customer/index?qrcode={{staffinfo.qrcode}}&islover=customer"> |
| 66 | + <image src="http://sellershare.colorcun.com/last-book-wechat.png" class="last-icon"></image> | ||
| 67 | + <view class="black-font font22r last-button-content flex-cc" >加我微信</view> | ||
| 68 | + </button> --> | ||
| 69 | + <button class="last-button-item flex-ll" bindtap="addwechat"> | ||
| 66 | <image src="http://sellershare.colorcun.com/last-book-wechat.png" class="last-icon"></image> | 70 | <image src="http://sellershare.colorcun.com/last-book-wechat.png" class="last-icon"></image> |
| 67 | <view class="black-font font22r last-button-content flex-cc" >加我微信</view> | 71 | <view class="black-font font22r last-button-content flex-cc" >加我微信</view> |
| 68 | </button> | 72 | </button> |
| @@ -95,25 +99,27 @@ | @@ -95,25 +99,27 @@ | ||
| 95 | <view class="font32r white-font flex-cc" style="margin-bottom: 30rpx;">订座已完成</view> | 99 | <view class="font32r white-font flex-cc" style="margin-bottom: 30rpx;">订座已完成</view> |
| 96 | </block> --> | 100 | </block> --> |
| 97 | <view class="font24r last-yellow-font" style="width:140rpx;padding: 0 20rpx;box-sizing: border-box;margin: 0 auto;" bindtap="secondbook">再次预订</view> | 101 | <view class="font24r last-yellow-font" style="width:140rpx;padding: 0 20rpx;box-sizing: border-box;margin: 0 auto;" bindtap="secondbook">再次预订</view> |
| 98 | - <view style="height:50rpx;"></view> | 102 | + <view style="height:40rpx;"></view> |
| 99 | <!-- <view bindtap="sendmsg" style="padding: 60px;" class="white-font font36r">测试发送短信息</view> --> | 103 | <!-- <view bindtap="sendmsg" style="padding: 60px;" class="white-font font36r">测试发送短信息</view> --> |
| 100 | </scroll-view> | 104 | </scroll-view> |
| 101 | 105 | ||
| 102 | 106 | ||
| 103 | </block> | 107 | </block> |
| 104 | <block wx:else> | 108 | <block wx:else> |
| 105 | - <view class="pages bg-{{options.tplid}} flex-vc" style="height:{{height}}px; padding-top: 120rpx;overflow-y: auto;" wx:if="{{options.tplid}}"> | ||
| 106 | - <template is="tpl-{{options.tplid}}" data="{{seller,options,hasOwner,animation,detail}}"></template> | ||
| 107 | - <view class="opt-view flex-vc" style="padding-bottom: 320rpx;"> | ||
| 108 | - <block wx:if="{{!detail.hasCanSuccess && detail.status!=4}}"> | ||
| 109 | - <button class="button-none flex-vc" catchtap="confirmed"> | ||
| 110 | - <view class="buts-share animation customer"></view> | ||
| 111 | - </button> | ||
| 112 | - </block> | ||
| 113 | - </view> | ||
| 114 | - </view> | 109 | + <block wx:if="{{detail}}"> |
| 110 | + <view class="pages bg-{{options.tplid}} flex-vc" style="height:{{height}}px; padding-top: 120rpx;overflow-y: auto;" wx:if="{{options.tplid}}"> | ||
| 111 | + <template is="tpl-{{options.tplid}}" data="{{seller,options,hasOwner,animation,detail}}"></template> | ||
| 112 | + <view class="opt-view flex-vc" style="padding-bottom: 320rpx;"> | ||
| 113 | + <block wx:if="{{!detail.hasCanSuccess && detail.status!=4}}"> | ||
| 114 | + <button class="button-none flex-vc" catchtap="confirmed"> | ||
| 115 | + <view class="buts-share animation customer"></view> | ||
| 116 | + </button> | ||
| 117 | + </block> | ||
| 118 | + </view> | ||
| 119 | + </view> | ||
| 120 | + </block> | ||
| 115 | </block> | 121 | </block> |
| 116 | -<view class="opt-button flex-lr" wx:if="{{detail && detail.channel!=3}}"> | 122 | +<view class="opt-button flex-lr" wx:if="{{detail && detail.channel!=2}}"> |
| 117 | <view bindtap="gotoHome" class="dingbaojian flex-vc"> | 123 | <view bindtap="gotoHome" class="dingbaojian flex-vc"> |
| 118 | <image src="http://nosqn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20191114105901.png" class="icon"></image> | 124 | <image src="http://nosqn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20191114105901.png" class="icon"></image> |
| 119 | <view class="text">订包间</view> | 125 | <view class="text">订包间</view> |
| @@ -77,7 +77,7 @@ Page({ | @@ -77,7 +77,7 @@ Page({ | ||
| 77 | this.setData({ | 77 | this.setData({ |
| 78 | statusBarHeight: pt, | 78 | statusBarHeight: pt, |
| 79 | titleBarHeight: h, | 79 | titleBarHeight: h, |
| 80 | - height: systemInfo.windowHeight | 80 | + height: systemInfo.windowHeight-90/(750/systemInfo.windowWidth) |
| 81 | }) | 81 | }) |
| 82 | this.getDetail(getCurrentPages().length==1); | 82 | this.getDetail(getCurrentPages().length==1); |
| 83 | }, | 83 | }, |
| @@ -105,21 +105,22 @@ Page({ | @@ -105,21 +105,22 @@ Page({ | ||
| 105 | }, | 105 | }, |
| 106 | test(e){ | 106 | test(e){ |
| 107 | console.log('ttttttttttttttt'); | 107 | console.log('ttttttttttttttt'); |
| 108 | - App.Contact.UploadCustomerMedia({url:this.data.staffinfo.qrcode}).then((json)=>{ | ||
| 109 | - if(json.ret==200) { | ||
| 110 | - console.log('json') | ||
| 111 | - } | ||
| 112 | - }) | 108 | + // App.Contact.UploadCustomerMedia({url:this.data.staffinfo.qrcode}).then((json)=>{ |
| 109 | + // if(json.ret==200) { | ||
| 110 | + // console.log('json') | ||
| 111 | + // } | ||
| 112 | + // }) | ||
| 113 | }, | 113 | }, |
| 114 | addwechat(){ | 114 | addwechat(){ |
| 115 | - wx.previewImage({ | ||
| 116 | - current: this.data.staffinfo.qrcode, // 当前显示图片的http链接 | ||
| 117 | - urls: [this.data.staffinfo.qrcode] // 需要预览的图片http链接列表 | ||
| 118 | - }) | ||
| 119 | - // util.cache('staffinfo',this.data.staffinfo); | ||
| 120 | - // wx.navigateTo({ | ||
| 121 | - // url:'../me/chat?qrcode='+this.data.staffinfo.qrcode | ||
| 122 | - // }) | 115 | + // wx.previewImage({ |
| 116 | + // current: this.data.staffinfo.qrcode, // 当前显示图片的http链接 | ||
| 117 | + // urls: [this.data.staffinfo.qrcode] // 需要预览的图片http链接列表 | ||
| 118 | + // }) | ||
| 119 | + util.cache('staffinfo',this.data.staffinfo); | ||
| 120 | + wx.navigateTo({ | ||
| 121 | + url:'./wechat?qrcode='+this.data.staffinfo.qrcode | ||
| 122 | + }) | ||
| 123 | + | ||
| 123 | }, | 124 | }, |
| 124 | getstaffinfo(){ | 125 | getstaffinfo(){ |
| 125 | App.Activity.GetCustomerActivityBaseinfo({sellerid:this.data.detail.seller.id,uid:this.data.options.uid}).then((json)=>{ | 126 | App.Activity.GetCustomerActivityBaseinfo({sellerid:this.data.detail.seller.id,uid:this.data.options.uid}).then((json)=>{ |
| @@ -471,4 +472,19 @@ Page({ | @@ -471,4 +472,19 @@ Page({ | ||
| 471 | couponhidden:true, | 472 | couponhidden:true, |
| 472 | }) | 473 | }) |
| 473 | }, | 474 | }, |
| 475 | + checkout(){ | ||
| 476 | + if(this.data.detail.status==0){ | ||
| 477 | + this.selectComponent('#showModal').options({ | ||
| 478 | + header: '您点早啦!', | ||
| 479 | + body: '商家分配包间后,您可以通过在线买单支付,无需到前台结账排队等发票。' | ||
| 480 | + }).show(); | ||
| 481 | + }else{ | ||
| 482 | + wx.navigateTo({ | ||
| 483 | + url:util.http_build_query({ | ||
| 484 | + rid:this.data.detail.id, | ||
| 485 | + sid:this.data.detail.sid | ||
| 486 | + },'/pack-checkout/pages/index') | ||
| 487 | + }) | ||
| 488 | + } | ||
| 489 | + }, | ||
| 474 | }) | 490 | }) |
| @@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
| 9 | "ddate":"/components/reserve/invitation/ddate", | 9 | "ddate":"/components/reserve/invitation/ddate", |
| 10 | "a2l":"/components/tips/add-to-lite", | 10 | "a2l":"/components/tips/add-to-lite", |
| 11 | "userinfo-share": "/components/userinfo/share", | 11 | "userinfo-share": "/components/userinfo/share", |
| 12 | - "service":"/components/tips/service" | 12 | + "service":"/components/tips/service", |
| 13 | + "showModal":"/components/tips/showModal/showModal" | ||
| 13 | } | 14 | } |
| 14 | } | 15 | } |
| @@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
| 11 | --> | 11 | --> |
| 12 | </nav> | 12 | </nav> |
| 13 | <!-- 内部预定 --> | 13 | <!-- 内部预定 --> |
| 14 | -<block wx:if="{{detail && detail.type==0 && detail.channel==3}}"> | 14 | +<block wx:if="{{detail && detail.type==0 && detail.channel==2}}"> |
| 15 | <!-- <view class="pages bg-1" style="max-height:{{height}}px;overflow-y: scroll;padding-top: {{statusBarHeight+titleBarHeight}}px;line-height: 1.4;padding-bottom: 60rpx;"> | 15 | <!-- <view class="pages bg-1" style="max-height:{{height}}px;overflow-y: scroll;padding-top: {{statusBarHeight+titleBarHeight}}px;line-height: 1.4;padding-bottom: 60rpx;"> |
| 16 | <view class="book-image flex-cc"> | 16 | <view class="book-image flex-cc"> |
| 17 | </view> | 17 | </view> |
| @@ -79,7 +79,11 @@ | @@ -79,7 +79,11 @@ | ||
| 79 | <image src="http://sellershare.colorcun.com/last-book-call.png" class="last-icon"></image> | 79 | <image src="http://sellershare.colorcun.com/last-book-call.png" class="last-icon"></image> |
| 80 | <view class="black-font font22r last-button-content flex-cc" >拨打电话</view> | 80 | <view class="black-font font22r last-button-content flex-cc" >拨打电话</view> |
| 81 | </view> | 81 | </view> |
| 82 | - <button class="last-button-item flex-ll" open-type="contact" bindcontact="test"> | 82 | + <!-- <button class="last-button-item flex-ll" open-type="contact" bindcontact="test" send-message-img="{{staffinfo.qrcode}}" show-message-card="{{true}}" send-message-path="pages/customer/index?qrcode={{staffinfo.qrcode}}&islover=customer"> |
| 83 | + <image src="http://sellershare.colorcun.com/last-book-wechat.png" class="last-icon"></image> | ||
| 84 | + <view class="black-font font22r last-button-content flex-cc" >加我微信</view> | ||
| 85 | + </button> --> | ||
| 86 | + <button class="last-button-item flex-ll" bindtap="addwechat"> | ||
| 83 | <image src="http://sellershare.colorcun.com/last-book-wechat.png" class="last-icon"></image> | 87 | <image src="http://sellershare.colorcun.com/last-book-wechat.png" class="last-icon"></image> |
| 84 | <view class="black-font font22r last-button-content flex-cc" >加我微信</view> | 88 | <view class="black-font font22r last-button-content flex-cc" >加我微信</view> |
| 85 | </button> | 89 | </button> |
| @@ -111,37 +115,55 @@ | @@ -111,37 +115,55 @@ | ||
| 111 | <block wx:else=""> | 115 | <block wx:else=""> |
| 112 | <view class="font32r white-font flex-cc" style="margin-bottom: 30rpx;">订座已完成</view> | 116 | <view class="font32r white-font flex-cc" style="margin-bottom: 30rpx;">订座已完成</view> |
| 113 | </block> --> | 117 | </block> --> |
| 114 | - <view class="font24r last-yellow-font" style="width:140rpx;padding: 0 20rpx;box-sizing: border-box;margin: 0 auto;" bindtap="secondbook">再次预订</view> | ||
| 115 | - <view style="height:{{detail.seller.is_open_order==1 && !detail.hasOvered && !detail.hasCancel ? 140 : 50}}rpx;"></view> | 118 | + <view class="font24r last-yellow-font" style="width:140rpx;padding: 0 20rpx;box-sizing: border-box;margin: 0 auto;" bindtap="sendmsg" wx:if="{{!detail.hasOvered && !detail.hasCancel}}">短信通知</view> |
| 119 | + <view style="height:40rpx;"></view> | ||
| 116 | </scroll-view> | 120 | </scroll-view> |
| 117 | <!-- wx:if="{{detail.seller.is_open_order==1 && !detail.hasOvered && !detail.hasCancel}}" --> | 121 | <!-- wx:if="{{detail.seller.is_open_order==1 && !detail.hasOvered && !detail.hasCancel}}" --> |
| 118 | - <userinfo binduserinfo="cookbook" class="last-diancan flex-vc" wx:if="{{detail.seller.is_open_order==1 && !detail.hasOvered && !detail.hasCancel}}"> | ||
| 119 | - <view class="last-buts-text flex-cc font30r"> | ||
| 120 | - <image src="http://nosqn.colorcun.com/manager-invitation/wx2/%E6%8F%90%E5%89%8D%E7%82%B9%E9%A4%90.png" class="icon"></image> | ||
| 121 | - 提前点餐 | ||
| 122 | - </view> | ||
| 123 | - </userinfo> | 122 | + <view class="last-bottom flex-lr"> |
| 123 | + <view class="booking-button last-buts-text flex-cc font30r" bindtap="secondbook" style="width:{{detail.seller.is_open_order==1 && !detail.hasOvered && !detail.hasCancel ? (detail && detail.seller.isopen_md==1 ? 33.33 : 50) : 100}}%;"> | ||
| 124 | + <image src="http://sellershare.colorcun.com/yuding.png" class="icon" style="width: 32rpx;height: 32rpx;"></image> | ||
| 125 | + 再次预订 | ||
| 126 | + </view> | ||
| 127 | + <block wx:if="{{detail.seller.is_open_order==1 && !detail.hasOvered && !detail.hasCancel}}"> | ||
| 128 | + <userinfo binduserinfo="cookbook" class="last-diancan flex-vc" style="width:{{detail && detail.seller.isopen_md==1 ? 33.33 : 50}}%;"> | ||
| 129 | + <view class="last-buts-text flex-cc font30r" style="border-left:2rpx solid #D3BF9C;height: 50rpx;"> | ||
| 130 | + <image src="http://sellershare.colorcun.com/diancan.png" class="icon" style="width: 34rpx;height: 28rpx;"></image> | ||
| 131 | + 提前点餐 | ||
| 132 | + </view> | ||
| 133 | + </userinfo> | ||
| 134 | + <userinfo class="last-pay flex-cc" binduserinfo="checkout" share="{{detail}}" share-act="invitation" wx:if="{{detail && detail.seller.isopen_md==1}}"> | ||
| 135 | + <view class="last-buts-text font30r flex-cc" style="border-left:2rpx solid #D3BF9C;height: 50rpx;"> | ||
| 136 | + <image src="http://sellershare.colorcun.com/maidan.png" class="icon" style="width:30rpx;height: 24rpx;"></image> | ||
| 137 | + 在线买单 | ||
| 138 | + </view> | ||
| 139 | + </userinfo> | ||
| 140 | + </block> | ||
| 141 | + </view> | ||
| 142 | + <showModal id="showModal" confirmText="知道了" bindshowModal="showModal" cla="checkout"></showModal> | ||
| 124 | <!-- <view bindtap="sendmsg">测试发送短信息</view> --> | 143 | <!-- <view bindtap="sendmsg">测试发送短信息</view> --> |
| 125 | </block> | 144 | </block> |
| 126 | <block wx:else> | 145 | <block wx:else> |
| 127 | - <view class="pages bg-{{options.tplid}} flex-vc" style="height:{{height}}px;" wx:if="{{options.tplid}}"> | ||
| 128 | - <template is="tpl-{{options.tplid}}" data="{{seller,options,hasOwner,animation}}"></template> | ||
| 129 | - <view class="opt-view flex-vc"> | ||
| 130 | - <block wx:if="{{!detail.hasOvered && !detail.hasCancel}}"> | ||
| 131 | - <button open-type="share" class="button-none flex-vc" catchtap="setUserInfoSuccess"> | ||
| 132 | - <view class="buts-share"></view> | ||
| 133 | - </button> | ||
| 134 | - </block> | ||
| 135 | - <block wx:elif="{{detail.hasCancel}}"> | ||
| 136 | - <view class="opt-view-tip Medium">订座已取消</view> | ||
| 137 | - </block> | ||
| 138 | - <block wx:else=""> | ||
| 139 | - <view class="opt-view-tip Medium">订座已完成</view> | ||
| 140 | - </block> | ||
| 141 | - </view> | ||
| 142 | - </view> | 146 | + <block wx:if="{{detail}}"> |
| 147 | + <view class="pages bg-{{options.tplid}} flex-vc" style="height:{{height}}px;" wx:if="{{options.tplid}}"> | ||
| 148 | + <template is="tpl-{{options.tplid}}" data="{{seller,options,hasOwner,animation}}"></template> | ||
| 149 | + <view class="opt-view flex-vc"> | ||
| 150 | + <block wx:if="{{!detail.hasOvered && !detail.hasCancel}}"> | ||
| 151 | + <button open-type="share" class="button-none flex-vc" catchtap="setUserInfoSuccess"> | ||
| 152 | + <view class="buts-share"></view> | ||
| 153 | + </button> | ||
| 154 | + </block> | ||
| 155 | + <block wx:elif="{{detail.hasCancel}}"> | ||
| 156 | + <view class="opt-view-tip Medium">订座已取消</view> | ||
| 157 | + </block> | ||
| 158 | + <block wx:else=""> | ||
| 159 | + <view class="opt-view-tip Medium">订座已完成</view> | ||
| 160 | + </block> | ||
| 161 | + </view> | ||
| 162 | + </view> | ||
| 163 | + </block> | ||
| 164 | + | ||
| 143 | </block> | 165 | </block> |
| 144 | -<view class="bottom flex-lr" wx:if="{{!detail.hasOvered && !detail.hasCancel && detail.channel!=3}}"> | 166 | +<view class="bottom flex-lr" wx:if="{{!detail.hasOvered && !detail.hasCancel && detail.channel!=2}}"> |
| 145 | 167 | ||
| 146 | <view bindtap="gotoHome" class="dingbaojian flex-vc"> | 168 | <view bindtap="gotoHome" class="dingbaojian flex-vc"> |
| 147 | <image src="http://nosqn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20191114105901.png" class="icon"></image> | 169 | <image src="http://nosqn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20191114105901.png" class="icon"></image> |
| @@ -15,10 +15,10 @@ page{ | @@ -15,10 +15,10 @@ page{ | ||
| 15 | margin-top: 40rpx; | 15 | margin-top: 40rpx; |
| 16 | } | 16 | } |
| 17 | .zhoudao{ | 17 | .zhoudao{ |
| 18 | - width: 280rpx; | ||
| 19 | - height: 52rpx; | 18 | + width: 198rpx; |
| 19 | + height: 32rpx; | ||
| 20 | background-size: 100% 100%; | 20 | background-size: 100% 100%; |
| 21 | - background-image: url("http://nosqn.colorcun.com/2.0/home%20%2821%29.png"); | 21 | + background-image: url("http://nosqn.colorcun.com/zhoudaoanpai.png"); |
| 22 | margin-top: 30rpx; | 22 | margin-top: 30rpx; |
| 23 | } | 23 | } |
| 24 | @keyframes dododo | 24 | @keyframes dododo |
miniprogram/pages/customer/wechat.js
0 → 100644
| 1 | +Page({ | ||
| 2 | + onLoad(opt){ | ||
| 3 | + //导航栏自适应 | ||
| 4 | + let systemInfo = wx.getSystemInfoSync(); | ||
| 5 | + let reg = /ios/i; | ||
| 6 | + let pt = 20;//导航状态栏上内边距 | ||
| 7 | + let h = 44;//导航状态栏高度 | ||
| 8 | + if (reg.test(systemInfo.system)) { | ||
| 9 | + pt = systemInfo.statusBarHeight; | ||
| 10 | + h = 44; | ||
| 11 | + } else { | ||
| 12 | + pt = systemInfo.statusBarHeight; | ||
| 13 | + h = 48; | ||
| 14 | + } | ||
| 15 | + this.setData({ | ||
| 16 | + height: systemInfo.windowHeight, | ||
| 17 | + statusBarHeight: pt, | ||
| 18 | + titleBarHeight: h, | ||
| 19 | + qrcode:opt.qrcode | ||
| 20 | + }) | ||
| 21 | + }, | ||
| 22 | + saveimage(){ | ||
| 23 | + wx.downloadFile({ | ||
| 24 | + url: this.data.qrcode, //仅为示例,并非真实的资源 | ||
| 25 | + success (res) { | ||
| 26 | + // 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容 | ||
| 27 | + if (res.statusCode === 200) { | ||
| 28 | + wx.saveImageToPhotosAlbum({ | ||
| 29 | + filePath:res.tempFilePath, | ||
| 30 | + success:(res)=>{ | ||
| 31 | + wx.showToast({ | ||
| 32 | + title:'保存成功', | ||
| 33 | + duration:2000, | ||
| 34 | + mask:true, | ||
| 35 | + }) | ||
| 36 | + }, | ||
| 37 | + fail:(fail)=>{ | ||
| 38 | + | ||
| 39 | + } | ||
| 40 | + }) | ||
| 41 | + } | ||
| 42 | + } | ||
| 43 | + }) | ||
| 44 | + } | ||
| 45 | +}) |
miniprogram/pages/customer/wechat.json
0 → 100644
| 1 | +{} |
miniprogram/pages/customer/wechat.wxml
0 → 100644
| 1 | +<nav backgroundColor="rgba(0,0,0,0)" hasHome style="position: fixed;z-index: 1;" class="navhome" place="{{true}}"></nav> | ||
| 2 | +<view class="last-bg flex-vc" style="min-height:{{height}}px;justify-content:flex-start;padding-top: {{titleBarHeight+statusBarHeight}}px;"> | ||
| 3 | + <view class="last-yellow-font font-bold" style="font-size: 86rpx;margin-bottom: 40rpx;">添加微信</view> | ||
| 4 | + <view class="wecode"> | ||
| 5 | + <image src="{{qrcode}}" mode="aspectFit"></image> | ||
| 6 | + </view> | ||
| 7 | + <view class="last-yellow-font font48r act-operate">1.点击“保存图片”按钮</view> | ||
| 8 | + <view class="last-yellow-font font48r act-operate">2.打开微信扫一扫</view> | ||
| 9 | + <view class="last-yellow-font font48r act-operate">3.选择相册该图片识别</view> | ||
| 10 | + <view class="save-button flex-cc last-yellow-font font36r font-bold" bindtap='saveimage'>保存图片</view> | ||
| 11 | +</view> |
miniprogram/pages/customer/wechat.wxss
0 → 100644
| 1 | +.last-bg{ | ||
| 2 | + width: 100%; | ||
| 3 | + box-sizing: border-box; | ||
| 4 | + overflow-y: scroll; | ||
| 5 | + background: url(http://sellershare.colorcun.com/last-bg.png) center center no-repeat; | ||
| 6 | + background-size: 100% 100%; | ||
| 7 | + padding-bottom: 10rpx; | ||
| 8 | + position: relative; | ||
| 9 | +} | ||
| 10 | +.last-yellow-font{ | ||
| 11 | + color: #BA9953; | ||
| 12 | +} | ||
| 13 | +.wecode{ | ||
| 14 | + width: 520rpx; | ||
| 15 | + height: 520rpx; | ||
| 16 | + border-radius: 20rpx; | ||
| 17 | + border: 8rpx solid #BA9953; | ||
| 18 | + margin-bottom: 80rpx; | ||
| 19 | + overflow: hidden; | ||
| 20 | +} | ||
| 21 | +.wecode image{ | ||
| 22 | + width: 520rpx; | ||
| 23 | + height: 520rpx; | ||
| 24 | +} | ||
| 25 | +.act-operate{ | ||
| 26 | + line-height: 1.4; | ||
| 27 | + margin-bottom: 20rpx; | ||
| 28 | +} | ||
| 29 | +.save-button{ | ||
| 30 | + width: 440rpx; | ||
| 31 | + height: 80rpx; | ||
| 32 | + position: absolute; | ||
| 33 | + left: 0; | ||
| 34 | + right: 0; | ||
| 35 | + bottom: 70rpx; | ||
| 36 | + margin: 0 auto; | ||
| 37 | + border-radius: 14rpx; | ||
| 38 | + background: #BA9953; | ||
| 39 | + color: #4A3404; | ||
| 40 | +} |
| @@ -43,13 +43,13 @@ | @@ -43,13 +43,13 @@ | ||
| 43 | </view> | 43 | </view> |
| 44 | <view class="text-df">{{util.unixtoTime(couponinfo.stime,'YYYY.MM.DD HH:II')}}-{{util.unixtoTime(couponinfo.etime,'YYYY.MM.DD HH:II')}}</view> | 44 | <view class="text-df">{{util.unixtoTime(couponinfo.stime,'YYYY.MM.DD HH:II')}}-{{util.unixtoTime(couponinfo.etime,'YYYY.MM.DD HH:II')}}</view> |
| 45 | </view> | 45 | </view> |
| 46 | - <view class="view padding block"> | 46 | + <!-- <view class="view padding block"> |
| 47 | <view class="flex align-center margin-bottom-sm"> | 47 | <view class="flex align-center margin-bottom-sm"> |
| 48 | <view class="dot"></view> | 48 | <view class="dot"></view> |
| 49 | <view class="txt-30-h text-bold">使用时间</view> | 49 | <view class="txt-30-h text-bold">使用时间</view> |
| 50 | </view> | 50 | </view> |
| 51 | <view class="text-df">{{couponinfo.use_time}}</view> | 51 | <view class="text-df">{{couponinfo.use_time}}</view> |
| 52 | - </view> | 52 | + </view> --> |
| 53 | <view class="view padding block padding-bottom-sm"> | 53 | <view class="view padding block padding-bottom-sm"> |
| 54 | <view class="flex align-center margin-bottom-sm"> | 54 | <view class="flex align-center margin-bottom-sm"> |
| 55 | <view class="dot"></view> | 55 | <view class="dot"></view> |
| 1 | // pages/me/index.js | 1 | // pages/me/index.js |
| 2 | import App from '../../utils/api'; | 2 | import App from '../../utils/api'; |
| 3 | import util from '../../utils/util' | 3 | import util from '../../utils/util' |
| 4 | +import PubSub from '../../utils/PubSub' | ||
| 4 | const {regeneratorRuntime} = global | 5 | const {regeneratorRuntime} = global |
| 5 | Page({ | 6 | Page({ |
| 6 | 7 | ||
| @@ -56,12 +57,13 @@ Page({ | @@ -56,12 +57,13 @@ Page({ | ||
| 56 | * 生命周期函数--监听页面显示 | 57 | * 生命周期函数--监听页面显示 |
| 57 | */ | 58 | */ |
| 58 | onShow: function () { | 59 | onShow: function () { |
| 59 | - if (typeof this.getTabBar === 'function' && | ||
| 60 | - this.getTabBar()) { | ||
| 61 | - this.getTabBar().setData({ | ||
| 62 | - selected:3 | ||
| 63 | - }) | ||
| 64 | - } | 60 | + // if (typeof this.getTabBar === 'function' && |
| 61 | + // this.getTabBar()) { | ||
| 62 | + // this.getTabBar().setData({ | ||
| 63 | + // selected:3 | ||
| 64 | + // }) | ||
| 65 | + // } | ||
| 66 | + PubSub.emit('custom-tab-bar') | ||
| 65 | App.User.GetBalance().then(res=>{ | 67 | App.User.GetBalance().then(res=>{ |
| 66 | this.setData({ | 68 | this.setData({ |
| 67 | user:res.data | 69 | user:res.data |
| @@ -111,6 +111,11 @@ Page({ | @@ -111,6 +111,11 @@ Page({ | ||
| 111 | console.log('moveToLocation') | 111 | console.log('moveToLocation') |
| 112 | this.selectComponent('#getpos').getPos(true); | 112 | this.selectComponent('#getpos').getPos(true); |
| 113 | }, | 113 | }, |
| 114 | + switchpage(){ | ||
| 115 | + wx.redirectTo({ | ||
| 116 | + url: './map' | ||
| 117 | + }) | ||
| 118 | + }, | ||
| 114 | debounceTimer:null, | 119 | debounceTimer:null, |
| 115 | debounce(func,wait){ | 120 | debounce(func,wait){ |
| 116 | if(this.debounceTimer){ | 121 | if(this.debounceTimer){ |
| @@ -13,14 +13,25 @@ | @@ -13,14 +13,25 @@ | ||
| 13 | enable-rotate | 13 | enable-rotate |
| 14 | subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ" | 14 | subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ" |
| 15 | layer-style="2" | 15 | layer-style="2" |
| 16 | - style="width: 100%; height: 30vh;position: relative;"> | 16 | + style="width: 100%; height: 40vh;position: relative;"> |
| 17 | </map> | 17 | </map> |
| 18 | -<view class="moveToLocationView"> | 18 | +<!-- <view class="moveToLocationView"> |
| 19 | <view bindtap="moveToLocation" class="view moveToLocation flex align-center justify-center"> | 19 | <view bindtap="moveToLocation" class="view moveToLocation flex align-center justify-center"> |
| 20 | <image class="moveToLocation-image" src="http://nosqn.colorcun.com/2.0/home%20%2811%29.png"></image> | 20 | <image class="moveToLocation-image" src="http://nosqn.colorcun.com/2.0/home%20%2811%29.png"></image> |
| 21 | </view> | 21 | </view> |
| 22 | +</view> --> | ||
| 23 | +<view class="moveToLocationView"> | ||
| 24 | + <view bindtap="moveToLocation" class="view moveToLocation flex align-center justify-center"> | ||
| 25 | + <image class="moveToLocation-image" src="http://nosqn.colorcun.com/loaction.png"></image> | ||
| 26 | + </view> | ||
| 27 | +</view> | ||
| 28 | +<view class="moveToLocationView"> | ||
| 29 | + <view bindtap="switchpage" class="view moveToLocation flex-vc" style="top: -140rpx;"> | ||
| 30 | + <image class="moveToLocation-image" src="http://nosqn.colorcun.com/menu.png" style="width: 32rpx;height: 26rpx;margin-bottom: 8rpx;"></image> | ||
| 31 | + <view style="color: #42A5FF;font-size: 20rpx;">地图</view> | ||
| 32 | + </view> | ||
| 22 | </view> | 33 | </view> |
| 23 | -<view class="view content padding-top-xs" style="height: 70vh;"> | 34 | +<view class="view content padding-top-xs" style="height: 60vh;"> |
| 24 | <taocan-notice></taocan-notice> | 35 | <taocan-notice></taocan-notice> |
| 25 | <filter-group height="{{height}}" | 36 | <filter-group height="{{height}}" |
| 26 | id="filter-group" | 37 | id="filter-group" |
| @@ -64,7 +75,7 @@ | @@ -64,7 +75,7 @@ | ||
| 64 | scroll-into-view="seller-{{scrollSellerID}}" | 75 | scroll-into-view="seller-{{scrollSellerID}}" |
| 65 | scroll-with-animation | 76 | scroll-with-animation |
| 66 | bindscroll="scrollEvent" | 77 | bindscroll="scrollEvent" |
| 67 | - style="width:100%;height: calc(70vh - 50px);"> | 78 | + style="width:100%;height: calc(60vh - 50px);"> |
| 68 | <block wx:for="{{sellers}}" wx:key="sellers" > | 79 | <block wx:for="{{sellers}}" wx:key="sellers" > |
| 69 | <navigator url="/pages/reserve/detail?id={{item.id}}" hover-class="navigator-hover"> | 80 | <navigator url="/pages/reserve/detail?id={{item.id}}" hover-class="navigator-hover"> |
| 70 | <seller-card class="seller-card" id="seller-{{item.id}}" | 81 | <seller-card class="seller-card" id="seller-{{item.id}}" |
| @@ -9,16 +9,34 @@ page{ | @@ -9,16 +9,34 @@ page{ | ||
| 9 | height: 0; | 9 | height: 0; |
| 10 | position: relative; | 10 | position: relative; |
| 11 | } | 11 | } |
| 12 | +.moveToLocationView{ | ||
| 13 | + width: 100%; | ||
| 14 | + height: 0; | ||
| 15 | + position: relative; | ||
| 16 | +} | ||
| 12 | .moveToLocation{ | 17 | .moveToLocation{ |
| 13 | position: absolute; | 18 | position: absolute; |
| 14 | - width: 80rpx; | ||
| 15 | - height: 80rpx; | ||
| 16 | - right:0rpx; | ||
| 17 | - top:-80rpx; | 19 | + width: 100rpx; |
| 20 | + height: 100rpx; | ||
| 21 | + right:10rpx; | ||
| 22 | + top:-260rpx; | ||
| 23 | + background: #FFFFFF; | ||
| 24 | + box-shadow: 0 4rpx 10rpx #E5E5E5; | ||
| 25 | + border-radius: 50%; | ||
| 18 | } | 26 | } |
| 19 | .moveToLocation-image{ | 27 | .moveToLocation-image{ |
| 20 | - width: 40rpx; | ||
| 21 | - height: 40rpx; | 28 | + width: 48rpx; |
| 29 | + height: 48rpx; | ||
| 30 | +} | ||
| 31 | +.switchpage{ | ||
| 32 | + position: absolute; | ||
| 33 | + width: 100rpx; | ||
| 34 | + height: 100rpx; | ||
| 35 | + right:10rpx; | ||
| 36 | + top:-610rpx; | ||
| 37 | + background: #FFFFFF; | ||
| 38 | + box-shadow: 0 4rpx 10rpx #E5E5E5; | ||
| 39 | + border-radius: 50%; | ||
| 22 | } | 40 | } |
| 23 | .me{ | 41 | .me{ |
| 24 | width: 84rpx; | 42 | width: 84rpx; |
miniprogram/pages/reserve/map.js
0 → 100644
| 1 | +// pages/reservr/index.js | ||
| 2 | +import util from '../../utils/util'; | ||
| 3 | +import App from '../../utils/api'; | ||
| 4 | +import PubSub from '../../utils/PubSub' | ||
| 5 | +const {regeneratorRuntime} = global | ||
| 6 | +const mapScale = 15//18; | ||
| 7 | +const def_latitude = 39.684670; | ||
| 8 | +const def_longitude = 118.176300; | ||
| 9 | +const cates_version = '?1.2'; | ||
| 10 | +Page({ | ||
| 11 | + data:{ | ||
| 12 | + map:{}, | ||
| 13 | + height:1000, | ||
| 14 | + meTop:20, | ||
| 15 | + hasLoading:true, | ||
| 16 | + activeSellerID:'',//高亮商家 | ||
| 17 | + scrollSellerID:'',//滚动到商家 | ||
| 18 | + current:0, | ||
| 19 | + }, | ||
| 20 | + user:{}, | ||
| 21 | + /** | ||
| 22 | + * 生命周期函数--监听页面加载 | ||
| 23 | + */ | ||
| 24 | + onLoad: function (options) { | ||
| 25 | + const systeminfo=wx.getSystemInfoSync(); | ||
| 26 | + let ratio=750/systeminfo.windowWidth; | ||
| 27 | + console.log(systeminfo) | ||
| 28 | + this.setData({ | ||
| 29 | + height:systeminfo.windowHeight-(350/ratio) | ||
| 30 | + }) | ||
| 31 | + }, | ||
| 32 | + | ||
| 33 | + /** | ||
| 34 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 35 | + */ | ||
| 36 | + onReady: function () { | ||
| 37 | + this.selectComponent('#getpos').getPos(); | ||
| 38 | + }, | ||
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * 生命周期函数--监听页面显示 | ||
| 42 | + */ | ||
| 43 | + onShow: function () { | ||
| 44 | + // PubSub.emit('custom-tab-bar') | ||
| 45 | + if(wx.getMenuButtonBoundingClientRect){ | ||
| 46 | + let rect=wx.getMenuButtonBoundingClientRect() | ||
| 47 | + this.setData({ | ||
| 48 | + meTop:rect.top-5, | ||
| 49 | + }) | ||
| 50 | + } | ||
| 51 | + }, | ||
| 52 | + | ||
| 53 | + /** | ||
| 54 | + * 生命周期函数--监听页面隐藏 | ||
| 55 | + */ | ||
| 56 | + onHide: function () { | ||
| 57 | + | ||
| 58 | + }, | ||
| 59 | + | ||
| 60 | + /** | ||
| 61 | + * 生命周期函数--监听页面卸载 | ||
| 62 | + */ | ||
| 63 | + onUnload: function () { | ||
| 64 | + | ||
| 65 | + }, | ||
| 66 | + /** | ||
| 67 | + * 用户点击右上角分享 | ||
| 68 | + */ | ||
| 69 | + onShareAppMessage: function () { | ||
| 70 | + return{ | ||
| 71 | + title:'请客订包间,就上周到安排' | ||
| 72 | + } | ||
| 73 | + }, | ||
| 74 | + switchpage(){ | ||
| 75 | + wx.switchTab({ | ||
| 76 | + url: './index' | ||
| 77 | + }) | ||
| 78 | + }, | ||
| 79 | + onpos(e) { | ||
| 80 | + let res = e.detail; | ||
| 81 | + console.log('onpos.res', res); | ||
| 82 | + let map = this.data.map; | ||
| 83 | + if (!res.latitude){ | ||
| 84 | + map.latitude = def_latitude; | ||
| 85 | + map.longitude = def_longitude; | ||
| 86 | + }else{ | ||
| 87 | + map.latitude = res.latitude; | ||
| 88 | + map.longitude = res.longitude; | ||
| 89 | + } | ||
| 90 | + map.scale = mapScale; | ||
| 91 | + this.user.latitude = res.latitude; | ||
| 92 | + this.user.longitude = res.longitude; | ||
| 93 | + let sdobj = { | ||
| 94 | + map: map, | ||
| 95 | + } | ||
| 96 | + this.setData(sdobj) | ||
| 97 | + }, | ||
| 98 | + setLoacl(e){ | ||
| 99 | + let pos=util.attr(e,'val').split(','); | ||
| 100 | + let map = this.data.map | ||
| 101 | + map.latitude = pos[0]; | ||
| 102 | + map.longitude = pos[1]; | ||
| 103 | + this.setData({ | ||
| 104 | + map:map | ||
| 105 | + }) | ||
| 106 | + }, | ||
| 107 | + reduceMapScale(){ | ||
| 108 | + let map = this.data.map | ||
| 109 | + map.scale=parseInt(map.scale)-1 | ||
| 110 | + this.setData({ | ||
| 111 | + map:map | ||
| 112 | + }) | ||
| 113 | + }, | ||
| 114 | + moveToLocation() { | ||
| 115 | + console.log('moveToLocation') | ||
| 116 | + this.selectComponent('#getpos').getPos(true); | ||
| 117 | + }, | ||
| 118 | + debounceTimer:null, | ||
| 119 | + debounce(func,wait){ | ||
| 120 | + if(this.debounceTimer){ | ||
| 121 | + clearTimeout(this.debounceTimer) | ||
| 122 | + } | ||
| 123 | + this.debounceTimer=setTimeout(()=>{ | ||
| 124 | + this.debounceTimer=null; | ||
| 125 | + func() | ||
| 126 | + },wait); | ||
| 127 | + }, | ||
| 128 | + regionChange(e){ | ||
| 129 | + if(e.type=='end'){ | ||
| 130 | + console.log('regionChange', e) | ||
| 131 | + this.debounce(this.regionChangeDo,800) | ||
| 132 | + } | ||
| 133 | + }, | ||
| 134 | + mapCtx:null, | ||
| 135 | + mapData: { | ||
| 136 | + latitude: 0, | ||
| 137 | + longitude: 0, | ||
| 138 | + scale: 30, | ||
| 139 | + hasRegionchange: false, | ||
| 140 | + region: { | ||
| 141 | + southwest: {}, | ||
| 142 | + northeast: {}, | ||
| 143 | + }, | ||
| 144 | + }, | ||
| 145 | + regionChangeDo(){ | ||
| 146 | + console.log('regionChangeDo') | ||
| 147 | + if(!this.mapCtx){ | ||
| 148 | + this.mapCtx = wx.createMapContext('map') | ||
| 149 | + } | ||
| 150 | + if(!this.mapCtx) return; | ||
| 151 | + this.mapCtx.getScale({ | ||
| 152 | + success: (res) => { | ||
| 153 | + this.mapScale = res.scale; | ||
| 154 | + }, | ||
| 155 | + }) | ||
| 156 | + this.mapCtx.getRegion({ | ||
| 157 | + success: (res) => { | ||
| 158 | + if (res.southwest.latitude) { | ||
| 159 | + this.mapData.region = res | ||
| 160 | + } | ||
| 161 | + // this.selectComponent('#filter-group').hide(); | ||
| 162 | + this.getSellers(); | ||
| 163 | + }, | ||
| 164 | + }) | ||
| 165 | + }, | ||
| 166 | + hasSellers:0, | ||
| 167 | + sellers:[], | ||
| 168 | + getSellers(){ | ||
| 169 | + console.log('getSellers',this.mapScale,this.mapData) | ||
| 170 | + this.setData({ | ||
| 171 | + hasLoading:true, | ||
| 172 | + scrollSellerID:'',//清理,滚到顶 | ||
| 173 | + }) | ||
| 174 | + let param = { | ||
| 175 | + lat: this.user.latitude == def_latitude ? '' : this.user.latitude, | ||
| 176 | + lng: this.user.longitude == def_longitude ? '' : this.user.longitude, | ||
| 177 | + offset: 0, | ||
| 178 | + rows: 200, | ||
| 179 | + distance: 100000, | ||
| 180 | + map: JSON.stringify({...this.mapData.region, scale: 50}) | ||
| 181 | + } | ||
| 182 | + if (param.lat) { | ||
| 183 | + param.centre_pos = `${param.lat},${param.lng}` | ||
| 184 | + } else { | ||
| 185 | + let lat = (this.mapData.region.southwest.latitude + this.mapData.region.northeast.latitude) / 2 | ||
| 186 | + let lng = (this.mapData.region.southwest.longitude + this.mapData.region.northeast.longitude) / 2 | ||
| 187 | + param.centre_pos = `${lat},${lng}` | ||
| 188 | + } | ||
| 189 | + this.hasFilterData=false | ||
| 190 | + if(this.filterGroupData.tags){ | ||
| 191 | + param.tags = this.filterGroupData.tags; | ||
| 192 | + this.hasFilterData=true | ||
| 193 | + } | ||
| 194 | + if (this.filterGroupData.cuisine) { | ||
| 195 | + param.cuisine = this.filterGroupData.cuisine; | ||
| 196 | + this.hasFilterData=true | ||
| 197 | + } | ||
| 198 | + if(this.filterGroupData.average){ | ||
| 199 | + param.average = this.filterGroupData.average; | ||
| 200 | + this.hasFilterData=true | ||
| 201 | + } | ||
| 202 | + this.param = param; | ||
| 203 | + this.activeSellerID=''; | ||
| 204 | + App.Customer.SellerList(param).then(async res => { | ||
| 205 | + if (res.ret == 200) { | ||
| 206 | + this.hasSellers=res.data.flag; | ||
| 207 | + res.data.list.forEach((v,i)=>{ | ||
| 208 | + v.distance=Math.round(Number(v.distance)); | ||
| 209 | + if(v.cate && v.cate.length>0){ | ||
| 210 | + v.cateStr=[]; | ||
| 211 | + v.cate.some(cate=>{ | ||
| 212 | + v.cateStr.push(cate.name); | ||
| 213 | + if(v.cateStr.length>2){return true} | ||
| 214 | + }) | ||
| 215 | + v.cateStr=v.cateStr.join('/') | ||
| 216 | + } | ||
| 217 | + }) | ||
| 218 | + this.sellers=res.data.list; | ||
| 219 | + this.makeMarker(); | ||
| 220 | + this.makeSellers(); | ||
| 221 | + this.debounce(this.makeDefMarker,300) | ||
| 222 | + } | ||
| 223 | + }).catch(e=>{ | ||
| 224 | + this.debounce(this.getSellers,300) | ||
| 225 | + }) | ||
| 226 | + | ||
| 227 | + }, | ||
| 228 | + makeMarker(){ | ||
| 229 | + this.mapCtx.getScale({ | ||
| 230 | + success: (res) => { | ||
| 231 | + this.mapData.scale = res.scale; | ||
| 232 | + let markers=[] | ||
| 233 | + let sellersLength=this.sellers.length | ||
| 234 | + this.sellers.forEach((seller,si)=>{ | ||
| 235 | + if(seller.scale>this.mapData.scale) return; | ||
| 236 | + let marker = { | ||
| 237 | + id: seller.id, | ||
| 238 | + iconPath: "http://nosqn.colorcun.com/custom/lite-online/cates/circle1x5.png" + cates_version, | ||
| 239 | + latitude: seller.lat, | ||
| 240 | + longitude: seller.long, | ||
| 241 | + width: 8, | ||
| 242 | + height: 8, | ||
| 243 | + //title:seller.seller_name, | ||
| 244 | + zIndex: sellersLength - si, | ||
| 245 | + zIndexBak: sellersLength - si, | ||
| 246 | + //seller: seller, | ||
| 247 | + }; | ||
| 248 | + // marker.callout={ | ||
| 249 | + // content: ' ' + seller.sellername + ' ', | ||
| 250 | + // color: '#353535', | ||
| 251 | + // fontSize: 12, | ||
| 252 | + // borderWidth: 1, | ||
| 253 | + // borderColor: '#cccccc', | ||
| 254 | + // borderRadius: 50, | ||
| 255 | + // bgColor: '#fefefe', | ||
| 256 | + // padding: 5, | ||
| 257 | + // textAlign: 'left', | ||
| 258 | + // display:'BYCLICK', | ||
| 259 | + // }; | ||
| 260 | + // marker.calloutDisplay='BYCLICK'; | ||
| 261 | + if (seller.mode.length > 0) { | ||
| 262 | + seller.mode.forEach(x => { | ||
| 263 | + if (x.id == 1) {//大图标 | ||
| 264 | + marker.iconPath = "http://nosqn.colorcun.com/custom/lite-online/cates/其他菜品.png"; | ||
| 265 | + if (seller.cate.length > 0) { | ||
| 266 | + marker.iconPath = seller.cate[0].icon | ||
| 267 | + } | ||
| 268 | + marker.iconPath = marker.iconPath.replace(/\/cates\/(.*)\.png/, function ($0, $1) { | ||
| 269 | + return '/cates/' + encodeURI($1) + '.png' | ||
| 270 | + }) | ||
| 271 | + marker.iconPath += cates_version | ||
| 272 | + marker.width = 20; | ||
| 273 | + marker.height = 25; | ||
| 274 | + } | ||
| 275 | + // if(x.id==2){//商家名 | ||
| 276 | + // marker.callout.display='ALWAYS'; | ||
| 277 | + // marker.calloutDisplay='ALWAYS'; | ||
| 278 | + // } | ||
| 279 | + }) | ||
| 280 | + } | ||
| 281 | + markers.push(marker) | ||
| 282 | + }) | ||
| 283 | + markers.push({ | ||
| 284 | + id: 'local', | ||
| 285 | + iconPath: "http://nosqn.colorcun.com/2.0/home%20%288%29.png" + cates_version, | ||
| 286 | + latitude: (this.user.latitude||def_latitude)+'', | ||
| 287 | + longitude: (this.user.longitude||def_longitude)+'', | ||
| 288 | + width: 25, | ||
| 289 | + height: 41, | ||
| 290 | + zIndex: 9999, | ||
| 291 | + zIndexBak:9999, | ||
| 292 | + }) | ||
| 293 | + this.setData({ | ||
| 294 | + markers:markers, | ||
| 295 | + }) | ||
| 296 | + }, | ||
| 297 | + }) | ||
| 298 | + }, | ||
| 299 | + makeSellers(){ | ||
| 300 | + this.setData({ | ||
| 301 | + sellers:this.sellers, | ||
| 302 | + hasSellers:(this.hasSellers==1 || this.sellers.length>0) || this.hasFilterData, | ||
| 303 | + hasLoading:false, | ||
| 304 | + hasFilterData:this.hasFilterData, | ||
| 305 | + }) | ||
| 306 | + }, | ||
| 307 | + switchseller(e){ | ||
| 308 | + let current=e.detail.current; | ||
| 309 | + let id=this.data.sellers[current].id; | ||
| 310 | + this.markertap({markerId:id}); | ||
| 311 | + }, | ||
| 312 | + makeDefMarker(){ | ||
| 313 | + if(!this.activeSellerID && this.data.markers.length>0){ | ||
| 314 | + this.markertap({markerId:this.data.markers[0].id}) | ||
| 315 | + } | ||
| 316 | + }, | ||
| 317 | + hasScrollToIng:false, | ||
| 318 | + markertap(e,scrollTo=true){ | ||
| 319 | + if(!e.markerId || e.markerId=='local') return; | ||
| 320 | + let markers=this.data.markers | ||
| 321 | + this.activeSellerID = e.markerId | ||
| 322 | + let bl = 1.2; | ||
| 323 | + markers.forEach((m, i) => { | ||
| 324 | + m.iconPath = m.iconPath.replace('/cates-active/', '/cates/') | ||
| 325 | + m.zIndex = m.zIndexBak | ||
| 326 | + if (m.width == 20 * bl) { | ||
| 327 | + m.width = 20; | ||
| 328 | + m.height = 25; | ||
| 329 | + } | ||
| 330 | + if (m.width == 12) { | ||
| 331 | + m.width = 8; | ||
| 332 | + m.height = 8; | ||
| 333 | + } | ||
| 334 | + if(m.callout){ | ||
| 335 | + m.callout.borderColor= '#cccccc'; | ||
| 336 | + m.callout.bgColor= '#fefefe'; | ||
| 337 | + m.callout.color= '#353535'; | ||
| 338 | + m.callout.display=m.calloutDisplay; | ||
| 339 | + } | ||
| 340 | + if (m.id == e.markerId) { | ||
| 341 | + m.iconPath = m.iconPath.replace('/cates/', '/cates-active/') | ||
| 342 | + if (m.width == 20) { | ||
| 343 | + m.width = 20 * bl; | ||
| 344 | + m.height = 25 * bl; | ||
| 345 | + } else { | ||
| 346 | + m.width = 12; | ||
| 347 | + m.height = 12; | ||
| 348 | + } | ||
| 349 | + m.zIndex = 9999 | ||
| 350 | + if(m.callout){ | ||
| 351 | + m.callout.borderColor= '#F05522'; | ||
| 352 | + m.callout.bgColor= '#F05522'; | ||
| 353 | + m.callout.color= '#fefefe'; | ||
| 354 | + m.callout.display='ALWAYS'; | ||
| 355 | + } | ||
| 356 | + this.setData({ | ||
| 357 | + current:i, | ||
| 358 | + }) | ||
| 359 | + } | ||
| 360 | + }) | ||
| 361 | + let obj = { | ||
| 362 | + markers: markers, | ||
| 363 | + activeSellerID:this.activeSellerID, | ||
| 364 | + }; | ||
| 365 | + this.hasScrollToIng=false | ||
| 366 | + if(scrollTo){ | ||
| 367 | + obj.scrollSellerID=this.activeSellerID | ||
| 368 | + this.hasScrollToIng=true | ||
| 369 | + } | ||
| 370 | + this.setData(obj) | ||
| 371 | + setTimeout(()=>{this.hasScrollToIng=false},800) | ||
| 372 | + }, | ||
| 373 | + filterGroupData:{}, | ||
| 374 | + filterGroupEvent(e){ | ||
| 375 | + console.log('filterGroupEvent',e.detail) | ||
| 376 | + this.filterGroupData=e.detail | ||
| 377 | + this.debounce(this.getSellers,500) | ||
| 378 | + }, | ||
| 379 | + sellerCardEvent(e){ | ||
| 380 | + if(e.detail.type=='phone'){ | ||
| 381 | + this.selectComponent('#as').show(e.detail.seller); | ||
| 382 | + } | ||
| 383 | + }, | ||
| 384 | + scrollTop:0, | ||
| 385 | + scrollEvent(e){ | ||
| 386 | + if(this.mapScale<12) return; | ||
| 387 | + //console.log(e.detail.scrollTop) | ||
| 388 | + this.scrollTop=e.detail.scrollTop | ||
| 389 | + if(this.hasScrollToIng)return; | ||
| 390 | + this.debounce(()=>{ | ||
| 391 | + this.scrollEventActive() | ||
| 392 | + },300) | ||
| 393 | + }, | ||
| 394 | + scrollEventActive(){ | ||
| 395 | + let idx=parseInt(this.scrollTop/162) | ||
| 396 | + let po=this.scrollTop%((idx>0?idx:1)*162); | ||
| 397 | + if(po>80){ | ||
| 398 | + idx+=1; | ||
| 399 | + } | ||
| 400 | + //console.log(idx,po) | ||
| 401 | + if(this.sellers[idx]){ | ||
| 402 | + //this.activeSellerID=this.sellers[idx].id | ||
| 403 | + this.markertap({markerId:this.sellers[idx].id},false) | ||
| 404 | + } | ||
| 405 | + }, | ||
| 406 | + todetail(e){ | ||
| 407 | + let seller=this.data.sellers[e.currentTarget.dataset.index]; | ||
| 408 | + let url=util.http_build_query({id:seller.id},'/pages/reserve/detail'); | ||
| 409 | + return wx.navigateTo({ | ||
| 410 | + url:url, | ||
| 411 | + }) | ||
| 412 | + }, | ||
| 413 | + reserve(e){ | ||
| 414 | + let seller=this.data.sellers[e.currentTarget.dataset.index]; | ||
| 415 | + if(seller.is_online_reserve==1){ | ||
| 416 | + let url=util.http_build_query({id:seller.id,activeTab:'reserve'},'/pages/reserve/reserve') | ||
| 417 | + // let cid=seller.id; | ||
| 418 | + // if(cid){ | ||
| 419 | + // url=util.http_build_query({ | ||
| 420 | + // classID:cid, | ||
| 421 | + // className:util.attr(e,'cname'), | ||
| 422 | + // },url) | ||
| 423 | + // } | ||
| 424 | + return wx.navigateTo({ | ||
| 425 | + url:url, | ||
| 426 | + }) | ||
| 427 | + }else{ | ||
| 428 | + this.selectComponent('#as').show(seller); | ||
| 429 | + } | ||
| 430 | + }, | ||
| 431 | +}) |
miniprogram/pages/reserve/map.json
0 → 100644
| 1 | +{ | ||
| 2 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 3 | + "navigationBarTextStyle": "black", | ||
| 4 | + "navigationBarTitleText":"周到安排", | ||
| 5 | + "usingComponents": { | ||
| 6 | + "getpos":"/components/2.0/userinfo/getpos", | ||
| 7 | + "a2l":"/components/tips/add-to-lite", | ||
| 8 | + "filter-group":"/components/2.0/filter/filter-group", | ||
| 9 | + "seller-card":"/components/2.0/seller/card", | ||
| 10 | + "chatbot":"/components/userinfo/chatbot", | ||
| 11 | + "as-phone":"/components/2.0/dialog/phone", | ||
| 12 | + "taocan-notice":"/components/2.0/taocan/notice" | ||
| 13 | + } | ||
| 14 | +} |
miniprogram/pages/reserve/map.wxml
0 → 100644
| 1 | +<map id="map" scale="{{map.scale}}" | ||
| 2 | + longitude="{{map.longitude||118.170300}}" latitude="{{map.latitude||39.65273}}" | ||
| 3 | + markers="{{markers}}" polygons="{{polygons}}" | ||
| 4 | + bindmarkertap="markertap" | ||
| 5 | + bindcallouttap="markertap" | ||
| 6 | + bindregionchange="regionChange" | ||
| 7 | + bindupdated="mapUpdated" | ||
| 8 | + show-location="{{false}}" | ||
| 9 | + enable-3D="{{false}}" | ||
| 10 | + enable-zoom | ||
| 11 | + enable-scroll | ||
| 12 | + enable-rotate | ||
| 13 | + subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ" | ||
| 14 | + layer-style="2" | ||
| 15 | + style="width: 100%; height: 100vh;position: relative;"> | ||
| 16 | +</map> | ||
| 17 | +<view class="moveToLocationView"> | ||
| 18 | + <view bindtap="moveToLocation" class="view moveToLocation flex align-center justify-center"> | ||
| 19 | + <image class="moveToLocation-image" src="http://nosqn.colorcun.com/loaction.png"></image> | ||
| 20 | + </view> | ||
| 21 | +</view> | ||
| 22 | +<view class="moveToLocationView"> | ||
| 23 | + <view bindtap="switchpage" class="view moveToLocation flex-vc" style="top: -490rpx;"> | ||
| 24 | + <image class="moveToLocation-image" src="http://nosqn.colorcun.com/menu.png" style="width: 32rpx;height: 26rpx;margin-bottom: 8rpx;"></image> | ||
| 25 | + <view style="color: #42A5FF;font-size: 20rpx;">列表</view> | ||
| 26 | + </view> | ||
| 27 | +</view> | ||
| 28 | +<view class="seller-list"> | ||
| 29 | + <swiper previous-margin="50rpx" next-margin="50rpx" current="{{current}}" bindchange="switchseller"> | ||
| 30 | + <block wx:for="{{sellers}}" wx:key="{{item.id}}" wx:for-item="selleritem"> | ||
| 31 | + <swiper-item style="padding: 20rpx 0;"> | ||
| 32 | + <view class="seller-item" bindtap="todetail" data-index="{{index}}"> | ||
| 33 | + <view class="flex-ll" style="align-items: flex-start;"> | ||
| 34 | + <view class="seller-image-cover"> | ||
| 35 | + <image src="{{selleritem.seller_image}}" class="seller-image" mode="aspectFill"></image> | ||
| 36 | + </view> | ||
| 37 | + | ||
| 38 | + <view> | ||
| 39 | + <view class="black-font font-bold font38r font-more" style="margin-bottom: 10rpx;width: 370rpx;">{{selleritem.sellername}}</view> | ||
| 40 | + <view class="gray-font font26r" style="padding-bottom: 14rpx;">{{selleritem.cateStr}}</view> | ||
| 41 | + <view style="padding-top:4rpx;" wx:if="{{selleritem.activity && selleritem.activity.length>0}}"> | ||
| 42 | + <block wx:for="{{selleritem.activity}}" wx:key="selleractivitykey" wx:if="{{index<2}}"> | ||
| 43 | + <view class="cu-tag line-yellow" style="margin-bottom: 6rpx;"> | ||
| 44 | + <text class="text-orange">{{(item.type==2?'满赠':item.title)}}</text> | ||
| 45 | + </view> | ||
| 46 | + </block> | ||
| 47 | + </view> | ||
| 48 | + <view class="flex-ll"> | ||
| 49 | + <view class="gray-font font24r" style="margin-right: 40rpx;">{{selleritem.distance}}m</view> | ||
| 50 | + <view class="gray-font font24r" wx:if="{{selleritem.average>0}}">¥{{selleritem.average}}/人</view> | ||
| 51 | + </view> | ||
| 52 | + <!-- <view></view> --> | ||
| 53 | + </view> | ||
| 54 | + </view> | ||
| 55 | + <view class="seller-room flex-ll"> | ||
| 56 | + <view class="flex-ll" style="width:450rpx;height:52rpx;overflow: scroll;"> | ||
| 57 | + <block wx:for="{{selleritem.class}}" wx:key="seclass"> | ||
| 58 | + <view data-cid="{{item.id}}" data-cname="{{item.name}}" class="room-type line-blue text-blue">{{item.name}}</view> | ||
| 59 | + </block> | ||
| 60 | + </view> | ||
| 61 | + <view class="box-shadow"></view> | ||
| 62 | + <view class="book-cover"> | ||
| 63 | + <view class="white-font font28r font-bold book-button" data-index="{{index}}" catchtap="reserve">订包间</view> | ||
| 64 | + </view> | ||
| 65 | + </view> | ||
| 66 | + </view> | ||
| 67 | + </swiper-item> | ||
| 68 | + </block> | ||
| 69 | + </swiper> | ||
| 70 | + <!-- <block wx:for="{{sellers}}" wx:key="{{item.id}}" wx:for-item="selleritem"> | ||
| 71 | + <view class="seller-item" style="left:{{(index-current)*650+60}}rpx" catchtouchstart="start" catchtouchend="switch"> | ||
| 72 | + <view class="flex-ll" style="align-items: flex-start;"> | ||
| 73 | + <view class="seller-image-cover"> | ||
| 74 | + <cover-image src="{{selleritem.seller_image}}" class="seller-image"></cover-image> | ||
| 75 | + </view> | ||
| 76 | + | ||
| 77 | + <view> | ||
| 78 | + <view class="black-font font-bold font38r font-more" style="margin-bottom: 10rpx;width: 370rpx;">{{selleritem.sellername}}</view> | ||
| 79 | + <view class="gray-font font26r">{{selleritem.cateStr}}</view> | ||
| 80 | + <block wx:for="{{selleritem.activity}}" wx:key="selleractivitykey" wx:if="{{index<3}}"> | ||
| 81 | + <view class="cu-tag line-yellow view"> | ||
| 82 | + <text class="text-orange">{{(item.type==2?'满赠':item.title)}}</text> | ||
| 83 | + </view> | ||
| 84 | + </block> | ||
| 85 | + </view> | ||
| 86 | + </view> | ||
| 87 | + <view class="seller-room flex-ll"> | ||
| 88 | + <view class="flex-ll" style="width:450rpx;height:52rpx;overflow: auto;"> | ||
| 89 | + <block wx:for="{{selleritem.class}}" wx:key="seclass"> | ||
| 90 | + <view data-cid="{{item.id}}" data-cname="{{item.name}}" class="room-type line-blue text-blue">{{item.name}}</view> | ||
| 91 | + </block> | ||
| 92 | + </view> | ||
| 93 | + <view class="book-cover"> | ||
| 94 | + <view class="white-font font28r font-bold book-button">订包间</view> | ||
| 95 | + </view> | ||
| 96 | + </view> | ||
| 97 | + </view> | ||
| 98 | + </block> --> | ||
| 99 | + | ||
| 100 | +</view> | ||
| 101 | +<getpos bindpos="onpos" id="getpos" hasFailPop></getpos> | ||
| 102 | +<a2l bindshow="a2lshow" bindhide="a2lshow" key="INDEX" type="black20"></a2l> | ||
| 103 | +<as-phone id="as"></as-phone> |
miniprogram/pages/reserve/map.wxss
0 → 100644
| 1 | +@import "../../colorui/main.wxss"; | ||
| 2 | +.seller-list{ | ||
| 3 | + width: 100%; | ||
| 4 | + height: 350rpx; | ||
| 5 | + box-sizing: border-box; | ||
| 6 | + position: fixed; | ||
| 7 | + left: 0; | ||
| 8 | + bottom:0; | ||
| 9 | + z-index: 5; | ||
| 10 | +} | ||
| 11 | +.moveToLocationView{ | ||
| 12 | + width: 100%; | ||
| 13 | + height: 0; | ||
| 14 | + position: relative; | ||
| 15 | +} | ||
| 16 | +.moveToLocation{ | ||
| 17 | + position: absolute; | ||
| 18 | + width: 100rpx; | ||
| 19 | + height: 100rpx; | ||
| 20 | + right:10rpx; | ||
| 21 | + top:-610rpx; | ||
| 22 | + background: #FFFFFF; | ||
| 23 | + box-shadow: 0 4rpx 10rpx #E5E5E5; | ||
| 24 | + border-radius: 50%; | ||
| 25 | +} | ||
| 26 | +.moveToLocation-image{ | ||
| 27 | + width: 48rpx; | ||
| 28 | + height: 48rpx; | ||
| 29 | +} | ||
| 30 | +swiper{ | ||
| 31 | + height: 350rpx; | ||
| 32 | +} | ||
| 33 | +.seller-item{ | ||
| 34 | + width: 630rpx; | ||
| 35 | + height: 310rpx; | ||
| 36 | + background-color: #FFFFFF; | ||
| 37 | + border-radius: 20rpx; | ||
| 38 | + padding: 20rpx 0 0 20rpx; | ||
| 39 | + box-sizing: border-box; | ||
| 40 | + box-shadow: 0 0 30rpx #E5E5E5; | ||
| 41 | + margin: 0 10rpx; | ||
| 42 | +} | ||
| 43 | +.seller-image{ | ||
| 44 | + width: 200rpx; | ||
| 45 | + height: 200rpx; | ||
| 46 | + border-radius: 10rpx; | ||
| 47 | +} | ||
| 48 | +.seller-image-cover{ | ||
| 49 | + width: 200rpx; | ||
| 50 | + height: 200rpx; | ||
| 51 | + border-radius: 10rpx; | ||
| 52 | + margin-right: 20rpx; | ||
| 53 | +} | ||
| 54 | +.seller-room{ | ||
| 55 | + width: 100%; | ||
| 56 | + height: 92rpx; | ||
| 57 | + position: relative; | ||
| 58 | + box-sizing: border-box; | ||
| 59 | +} | ||
| 60 | +.room-type{ | ||
| 61 | + padding: 0 20rpx; | ||
| 62 | + height: 52rpx; | ||
| 63 | + border: 2rpx solid #5EB2FF; | ||
| 64 | + border-radius: 26rpx; | ||
| 65 | + margin-right: 20rpx; | ||
| 66 | + text-align: center; | ||
| 67 | + line-height: 48rpx; | ||
| 68 | + box-sizing: border-box; | ||
| 69 | + | ||
| 70 | +} | ||
| 71 | +.book-cover{ | ||
| 72 | + width: 160rpx; | ||
| 73 | + position: absolute; | ||
| 74 | + right: 0; | ||
| 75 | + bottom: 20rpx; | ||
| 76 | + background: #FFFFFF; | ||
| 77 | + padding:0 20rpx; | ||
| 78 | + box-sizing: border-box; | ||
| 79 | +} | ||
| 80 | +.box-shadow{ | ||
| 81 | + width: 4rpx; | ||
| 82 | + height: 100%; | ||
| 83 | + box-shadow: 0 0 10rpx rgba(0,0,0,.1); | ||
| 84 | + | ||
| 85 | +} | ||
| 86 | +.book-button{ | ||
| 87 | + width: 124rpx; | ||
| 88 | + height: 54rpx; | ||
| 89 | + box-sizing: border-box; | ||
| 90 | + background: #3BBFF5; | ||
| 91 | + /* background: linear-gradient(to right,#3BBFF5,#57A0FF); */ | ||
| 92 | + border-radius: 27rpx; | ||
| 93 | + text-align: center; | ||
| 94 | + line-height: 54rpx; | ||
| 95 | +} | ||
| 96 | +.cu-tag{ | ||
| 97 | + height: 36rpx; | ||
| 98 | + line-height: 36rpx; | ||
| 99 | + border-radius: 4rpx; | ||
| 100 | + padding: 0 10rpx; | ||
| 101 | +} |
| @@ -517,7 +517,7 @@ | @@ -517,7 +517,7 @@ | ||
| 517 | margin: 0 auto; | 517 | margin: 0 auto; |
| 518 | } | 518 | } |
| 519 | .last-share-button{ | 519 | .last-share-button{ |
| 520 | - width: 440rpx; | 520 | + width: 260rpx; |
| 521 | height: 80rpx; | 521 | height: 80rpx; |
| 522 | border-radius: 14rpx; | 522 | border-radius: 14rpx; |
| 523 | color: #4A3404; | 523 | color: #4A3404; |
| @@ -546,14 +546,11 @@ | @@ -546,14 +546,11 @@ | ||
| 546 | color: #BA9953; | 546 | color: #BA9953; |
| 547 | } | 547 | } |
| 548 | .last-diancan{ | 548 | .last-diancan{ |
| 549 | - width: 100%; | ||
| 550 | - position: absolute; | ||
| 551 | - left: 0; | ||
| 552 | - bottom: 0; | ||
| 553 | - height: 90rpx; | ||
| 554 | - background: #BA9953; | 549 | + width: 33.33%; |
| 550 | + height: 100%; | ||
| 555 | margin: 0; | 551 | margin: 0; |
| 556 | padding: 0; | 552 | padding: 0; |
| 553 | + color: #7B512A; | ||
| 557 | } | 554 | } |
| 558 | .last-buts-text{ | 555 | .last-buts-text{ |
| 559 | width: 100%; | 556 | width: 100%; |
| @@ -569,4 +566,28 @@ | @@ -569,4 +566,28 @@ | ||
| 569 | padding: 0; | 566 | padding: 0; |
| 570 | background: transparent; | 567 | background: transparent; |
| 571 | margin: 0; | 568 | margin: 0; |
| 569 | +} | ||
| 570 | +.last-bottom{ | ||
| 571 | + width: 100%; | ||
| 572 | + position: absolute; | ||
| 573 | + left: 0; | ||
| 574 | + bottom: 0; | ||
| 575 | + height: 90rpx; | ||
| 576 | + background: #ECD9B7; | ||
| 577 | + margin: 0; | ||
| 578 | + padding: 0; | ||
| 579 | + padding: 20rpx 0; | ||
| 580 | + box-sizing: border-box; | ||
| 581 | +} | ||
| 582 | +.booking-button{ | ||
| 583 | + width: 33.33%; | ||
| 584 | + height: 100%; | ||
| 585 | + color: #7B512A; | ||
| 586 | +} | ||
| 587 | +.last-pay{ | ||
| 588 | + width: 35%; | ||
| 589 | + height: 100%; | ||
| 590 | + padding: 5rpx 0; | ||
| 591 | + box-sizing: border-box; | ||
| 592 | + color: #7B512A; | ||
| 572 | } | 593 | } |
| @@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
| 15 | { | 15 | { |
| 16 | "name": "预订本-商家1", | 16 | "name": "预订本-商家1", |
| 17 | "pathName": "pack-book/pages/book/b_index", | 17 | "pathName": "pack-book/pages/book/b_index", |
| 18 | - "query": "seller_id=1001&seller_openid= oZc-q05hV2N-knHfpxKg5dDUp5vU&manager_id=20612", | 18 | + "query": "seller_id=1297&seller_openid= oZc-q05hV2N-knHfpxKg5dDUp5vU&manager_id=20612", |
| 19 | "scene": 1001 | 19 | "scene": 1001 |
| 20 | }, | 20 | }, |
| 21 | { | 21 | { |
| @@ -636,8 +636,26 @@ | @@ -636,8 +636,26 @@ | ||
| 636 | { | 636 | { |
| 637 | "name": "pages/customer/index", | 637 | "name": "pages/customer/index", |
| 638 | "pathName": "pages/customer/index", | 638 | "pathName": "pages/customer/index", |
| 639 | - "query": "id=171312&tplid=1&hasSellerShare=1&hasInvitation=1", | 639 | + "query": "id=178777&hasSellerShare=1&hasInvitation=1&uid=311", |
| 640 | "scene": 1047 | 640 | "scene": 1047 |
| 641 | + }, | ||
| 642 | + { | ||
| 643 | + "name": "pages/reserve/map", | ||
| 644 | + "pathName": "pages/reserve/map", | ||
| 645 | + "query": "id=174308&hasSellerShare=1&hasInvitation=1&uid=3736", | ||
| 646 | + "scene": null | ||
| 647 | + }, | ||
| 648 | + { | ||
| 649 | + "name": "pack-activity/pages/qiye", | ||
| 650 | + "pathName": "pack-activity/pages/qiye", | ||
| 651 | + "query": "", | ||
| 652 | + "scene": null | ||
| 653 | + }, | ||
| 654 | + { | ||
| 655 | + "name": "pages/customer/wechat", | ||
| 656 | + "pathName": "pages/customer/wechat", | ||
| 657 | + "query": "id=178777&hasSellerShare=1&hasInvitation=1&uid=311", | ||
| 658 | + "scene": null | ||
| 641 | } | 659 | } |
| 642 | ] | 660 | ] |
| 643 | } | 661 | } |
-
Please register or login to post a comment