Showing
5 changed files
with
48 additions
and
23 deletions
| @@ -16,6 +16,7 @@ Page({ | @@ -16,6 +16,7 @@ Page({ | ||
| 16 | */ | 16 | */ |
| 17 | hasScene:false, | 17 | hasScene:false, |
| 18 | onLoad: function (options) { | 18 | onLoad: function (options) { |
| 19 | + console.log(options,'xxxxxxxx') | ||
| 19 | //转化场景值到 options | 20 | //转化场景值到 options |
| 20 | if(options.scene){//扫码进入 | 21 | if(options.scene){//扫码进入 |
| 21 | let query=decodeURIComponent(options.scene); | 22 | let query=decodeURIComponent(options.scene); |
| @@ -78,10 +79,11 @@ Page({ | @@ -78,10 +79,11 @@ Page({ | ||
| 78 | }, | 79 | }, |
| 79 | buy(){ | 80 | buy(){ |
| 80 | if(!this.data.form.meal_id) return; | 81 | if(!this.data.form.meal_id) return; |
| 82 | + console.log(this.data.form.seller_id,'ssssss') | ||
| 81 | let prarms={ | 83 | let prarms={ |
| 82 | sellerid: this.data.form.seller_id, | 84 | sellerid: this.data.form.seller_id, |
| 83 | - //price:this.data.form.price, | ||
| 84 | - price:0.01, | 85 | + price:this.data.form.price, |
| 86 | + //price:0.01, | ||
| 85 | meal_id:this.data.form.meal_id, | 87 | meal_id:this.data.form.meal_id, |
| 86 | openid:getApp().openid, | 88 | openid:getApp().openid, |
| 87 | } | 89 | } |
| @@ -175,7 +175,7 @@ Page({ | @@ -175,7 +175,7 @@ Page({ | ||
| 175 | }) | 175 | }) |
| 176 | let urls=[]; | 176 | let urls=[]; |
| 177 | json.data.forEach((v,i)=>{ | 177 | json.data.forEach((v,i)=>{ |
| 178 | - urls.push(v.image); | 178 | + urls.push(v.url); |
| 179 | }) | 179 | }) |
| 180 | this.urls=urls; | 180 | this.urls=urls; |
| 181 | console.log(urls,'lllllll') | 181 | console.log(urls,'lllllll') |
| @@ -293,7 +293,7 @@ Page({ | @@ -293,7 +293,7 @@ Page({ | ||
| 293 | detail.tableSubInfo = '等' + (detail.tables.length) + '个' | 293 | detail.tableSubInfo = '等' + (detail.tables.length) + '个' |
| 294 | + (detail.tables[0].tid == 2 ? '包间' : ''); | 294 | + (detail.tables[0].tid == 2 ? '包间' : ''); |
| 295 | } | 295 | } |
| 296 | - if (detail.sex != 3) { | 296 | + if (detail.rname && detail.sex != 3) { |
| 297 | detail.rnameStr = detail.rname.substr(0, 1) + (detail.sex == 1 ? '先生' : '女士') | 297 | detail.rnameStr = detail.rname.substr(0, 1) + (detail.sex == 1 ? '先生' : '女士') |
| 298 | } else { | 298 | } else { |
| 299 | detail.rnameStr = detail.rname | 299 | detail.rnameStr = detail.rname |
| @@ -181,7 +181,7 @@ | @@ -181,7 +181,7 @@ | ||
| 181 | </view> | 181 | </view> |
| 182 | <view class="book-mask" hidden="{{morehidden}}" bindtap="closemore"></view> | 182 | <view class="book-mask" hidden="{{morehidden}}" bindtap="closemore"></view> |
| 183 | <view class="service-buttons"> | 183 | <view class="service-buttons"> |
| 184 | - <view class="more-button white-font font28r flex-vc" bindtap="showmore">更多<view>服务</view></view> | 184 | + <view class="more-button white-font font28r flex-vc" bindtap="showmore" hidden="true">更多<view>服务</view></view> |
| 185 | <view hidden="{{morehidden}}"> | 185 | <view hidden="{{morehidden}}"> |
| 186 | <view class="select-item-button flex-cc gray-font font24r" style="right: 39rpx;bottom:681rpx;" bindtap="noopenservice">酒水</view> | 186 | <view class="select-item-button flex-cc gray-font font24r" style="right: 39rpx;bottom:681rpx;" bindtap="noopenservice">酒水</view> |
| 187 | <view class="select-item-button flex-cc gray-font font24r" style="right: 136rpx;bottom:599rpx;" bindtap="noopenservice">代驾</view> | 187 | <view class="select-item-button flex-cc gray-font font24r" style="right: 136rpx;bottom:599rpx;" bindtap="noopenservice">代驾</view> |
| @@ -102,10 +102,24 @@ Page({ | @@ -102,10 +102,24 @@ Page({ | ||
| 102 | } | 102 | } |
| 103 | }) | 103 | }) |
| 104 | }, | 104 | }, |
| 105 | + | ||
| 106 | +cli(){ | ||
| 107 | + wx.setClipboardData({ | ||
| 108 | + data: this.data.staffinfo.wechat, | ||
| 109 | + success (res) { | ||
| 110 | + wx.getClipboardData({ | ||
| 111 | + success (res) { | ||
| 112 | + console.log(res.data) // data | ||
| 113 | + } | ||
| 114 | + }) | ||
| 115 | + } | ||
| 116 | + }) | ||
| 117 | +}, | ||
| 118 | + | ||
| 105 | call(){ | 119 | call(){ |
| 106 | wx.reportMonitor('1012', 1) | 120 | wx.reportMonitor('1012', 1) |
| 107 | wx.makePhoneCall({ | 121 | wx.makePhoneCall({ |
| 108 | - phoneNumber: this.data.staffinfo.phone ? this.data.staffinfo.phone : this.data.detail.seller.seller_tel.split(',')[0]//仅为示例,并非真实的电话号码 | 122 | + phoneNumber: this.data.staffinfo.phone |
| 109 | }) | 123 | }) |
| 110 | }, | 124 | }, |
| 111 | test(e){ | 125 | test(e){ |
| @@ -144,19 +158,19 @@ Page({ | @@ -144,19 +158,19 @@ Page({ | ||
| 144 | this.setData({ | 158 | this.setData({ |
| 145 | roomimage:json.data | 159 | roomimage:json.data |
| 146 | }) | 160 | }) |
| 147 | - let urls=[]; | 161 | + var urlsArr=[]; |
| 148 | json.data.forEach((v,i)=>{ | 162 | json.data.forEach((v,i)=>{ |
| 149 | - urls.push(v.image); | 163 | + urlsArr.push(v.url); |
| 150 | }) | 164 | }) |
| 151 | - this.urls=urls; | ||
| 152 | - console.log(urls,'lllllll') | 165 | + this.urlsValue=urlsArr; |
| 166 | + console.log(urlsArr,'lllllll') | ||
| 153 | } | 167 | } |
| 154 | }) | 168 | }) |
| 155 | }, | 169 | }, |
| 156 | lookroom(){ | 170 | lookroom(){ |
| 157 | wx.previewImage({ | 171 | wx.previewImage({ |
| 158 | current: '', // 当前显示图片的http链接 | 172 | current: '', // 当前显示图片的http链接 |
| 159 | - urls: this.urls, // 需要预览的图片http链接列表 | 173 | + urls: this.urlsValue, // 需要预览的图片http链接列表 |
| 160 | }) | 174 | }) |
| 161 | }, | 175 | }, |
| 162 | secondbook(){ | 176 | secondbook(){ |
| @@ -239,7 +253,7 @@ Page({ | @@ -239,7 +253,7 @@ Page({ | ||
| 239 | tel:reserev.seller.seller_tel.split(',')[0] | 253 | tel:reserev.seller.seller_tel.split(',')[0] |
| 240 | } | 254 | } |
| 241 | }) | 255 | }) |
| 242 | - if(this.data.detail.type==0){ | 256 | + if(this.data.detail.type==0 || this.data.detail.type==1){ |
| 243 | this.getstaffinfo(); | 257 | this.getstaffinfo(); |
| 244 | this.getroomimage(); | 258 | this.getroomimage(); |
| 245 | this.getactivity(); | 259 | this.getactivity(); |
| @@ -264,7 +278,7 @@ Page({ | @@ -264,7 +278,7 @@ Page({ | ||
| 264 | detail.tableSubInfo = '等' + (detail.tables.length) + '个' | 278 | detail.tableSubInfo = '等' + (detail.tables.length) + '个' |
| 265 | + (detail.tables[0].tid == 2 ? '包间' : ''); | 279 | + (detail.tables[0].tid == 2 ? '包间' : ''); |
| 266 | } | 280 | } |
| 267 | - if (detail.sex != 3) { | 281 | + if (detail.rname && detail.sex != 3) { |
| 268 | detail.rnameStr = detail.rname.substr(0, 1) + (detail.sex == 1 ? '先生' : '女士') | 282 | detail.rnameStr = detail.rname.substr(0, 1) + (detail.sex == 1 ? '先生' : '女士') |
| 269 | } else { | 283 | } else { |
| 270 | detail.rnameStr = detail.rname | 284 | detail.rnameStr = detail.rname |
| @@ -536,10 +550,14 @@ Page({ | @@ -536,10 +550,14 @@ Page({ | ||
| 536 | }) | 550 | }) |
| 537 | }, | 551 | }, |
| 538 | showselect(){ | 552 | showselect(){ |
| 539 | - wx.reportMonitor('1014', 1) | ||
| 540 | - this.setData({ | ||
| 541 | - selecthidden:false | ||
| 542 | - }) | 553 | + wx.reportMonitor('1014', 1) |
| 554 | + if(this.data.selecthidden==false){ | ||
| 555 | + this.closeselect(); | ||
| 556 | + }else{ | ||
| 557 | + this.setData({ | ||
| 558 | + selecthidden:false | ||
| 559 | + }) | ||
| 560 | + } | ||
| 543 | }, | 561 | }, |
| 544 | closeselect(){ | 562 | closeselect(){ |
| 545 | console.log('ttttt') | 563 | console.log('ttttt') |
| @@ -548,9 +566,14 @@ Page({ | @@ -548,9 +566,14 @@ Page({ | ||
| 548 | }) | 566 | }) |
| 549 | }, | 567 | }, |
| 550 | showmore(){ | 568 | showmore(){ |
| 551 | - this.setData({ | ||
| 552 | - morehidden:false | ||
| 553 | - }) | 569 | + if(this.data.morehidden==false){ |
| 570 | + this.closemore(); | ||
| 571 | + }else{ | ||
| 572 | + this.setData({ | ||
| 573 | + morehidden:false | ||
| 574 | + }) | ||
| 575 | + } | ||
| 576 | + | ||
| 554 | }, | 577 | }, |
| 555 | closemore(){ | 578 | closemore(){ |
| 556 | this.setData({ | 579 | this.setData({ |
| @@ -117,9 +117,9 @@ | @@ -117,9 +117,9 @@ | ||
| 117 | <image src="{{staffinfo.photo}}" class="book-staff-headerimg" mode="aspectFit"></image> | 117 | <image src="{{staffinfo.photo}}" class="book-staff-headerimg" mode="aspectFit"></image> |
| 118 | <view class="flex-rr" style="margin-bottom: 20rpx;"> | 118 | <view class="flex-rr" style="margin-bottom: 20rpx;"> |
| 119 | <view class="flex-rr font26r yellow-font">客户经理:{{staffinfo.name}}</view> | 119 | <view class="flex-rr font26r yellow-font">客户经理:{{staffinfo.name}}</view> |
| 120 | - <view class="book-staff-item-button flex-cc" bindtap="addwechat"> | 120 | + <view class="book-staff-item-button flex-cc" bindtap="cli"> |
| 121 | <image src="http://nosqn.colorcun.com/book-wechat.png" class="book-header-icon"></image> | 121 | <image src="http://nosqn.colorcun.com/book-wechat.png" class="book-header-icon"></image> |
| 122 | - <view class="font22r brown-font">加我微信</view> | 122 | + <view class="font22r brown-font">复制微信号</view> |
| 123 | </view> | 123 | </view> |
| 124 | </view> | 124 | </view> |
| 125 | <view class="flex-rr"> | 125 | <view class="flex-rr"> |
| @@ -217,7 +217,7 @@ | @@ -217,7 +217,7 @@ | ||
| 217 | </view> | 217 | </view> |
| 218 | <view class="book-mask" hidden="{{morehidden}}" bindtap="closemore"></view> | 218 | <view class="book-mask" hidden="{{morehidden}}" bindtap="closemore"></view> |
| 219 | <view class="service-buttons"> | 219 | <view class="service-buttons"> |
| 220 | - <view class="more-button white-font font28r flex-vc" bindtap="showmore">更多<view>服务</view></view> | 220 | + <view class="more-button white-font font28r flex-vc" bindtap="showmore" hidden="true">更多<view>服务</view></view> |
| 221 | <view hidden="{{morehidden}}"> | 221 | <view hidden="{{morehidden}}"> |
| 222 | <view class="select-item-button flex-cc gray-font font24r" style="right: 39rpx;bottom:681rpx;" bindtap="noopenservice">酒水</view> | 222 | <view class="select-item-button flex-cc gray-font font24r" style="right: 39rpx;bottom:681rpx;" bindtap="noopenservice">酒水</view> |
| 223 | <view class="select-item-button flex-cc gray-font font24r" style="right: 136rpx;bottom:599rpx;" bindtap="noopenservice">代驾</view> | 223 | <view class="select-item-button flex-cc gray-font font24r" style="right: 136rpx;bottom:599rpx;" bindtap="noopenservice">代驾</view> |
-
Please register or login to post a comment