Showing
22 changed files
with
419 additions
and
531 deletions
| @@ -16,7 +16,6 @@ Page({ | @@ -16,7 +16,6 @@ Page({ | ||
| 16 | tableNum: 0, | 16 | tableNum: 0, |
| 17 | detail: {}, | 17 | detail: {}, |
| 18 | staffinfo: {}, | 18 | staffinfo: {}, |
| 19 | - between: false, | ||
| 20 | chef: {}, | 19 | chef: {}, |
| 21 | marketing: {}, | 20 | marketing: {}, |
| 22 | home: {}, | 21 | home: {}, |
| @@ -53,6 +52,9 @@ Page({ | @@ -53,6 +52,9 @@ Page({ | ||
| 53 | isPlay: '1', | 52 | isPlay: '1', |
| 54 | paymentStatus:'',//定金支付状态 1支付 0未支付 | 53 | paymentStatus:'',//定金支付状态 1支付 0未支付 |
| 55 | reserveData:{},//自定义图文数据 | 54 | reserveData:{},//自定义图文数据 |
| 55 | + toastBool: false, //支付定金提示框 | ||
| 56 | + toastText: '', //支付定金提示文字 | ||
| 57 | + paymentId: '', //定金id | ||
| 56 | }, | 58 | }, |
| 57 | tablestr: '', | 59 | tablestr: '', |
| 58 | urlsValue: [], | 60 | urlsValue: [], |
| @@ -74,9 +76,6 @@ Page({ | @@ -74,9 +76,6 @@ Page({ | ||
| 74 | console.log(param); | 76 | console.log(param); |
| 75 | console.log(options); | 77 | console.log(options); |
| 76 | this.setData(param) | 78 | this.setData(param) |
| 77 | - if(options.paymentId){ | ||
| 78 | - this.getPaymentStatus(options.paymentId) | ||
| 79 | - } | ||
| 80 | mta.Page.init({ | 79 | mta.Page.init({ |
| 81 | "appID": "500667280", | 80 | "appID": "500667280", |
| 82 | "eventID": "500667287", | 81 | "eventID": "500667287", |
| @@ -144,6 +143,7 @@ Page({ | @@ -144,6 +143,7 @@ Page({ | ||
| 144 | onShow: function () { | 143 | onShow: function () { |
| 145 | this.getDetail() | 144 | this.getDetail() |
| 146 | this.getText() | 145 | this.getText() |
| 146 | + this.getPaymentStatus() | ||
| 147 | }, | 147 | }, |
| 148 | // 复制微信号 | 148 | // 复制微信号 |
| 149 | copyWeChat() { | 149 | copyWeChat() { |
| @@ -315,14 +315,16 @@ Page({ | @@ -315,14 +315,16 @@ Page({ | ||
| 315 | } | 315 | } |
| 316 | }) | 316 | }) |
| 317 | }, | 317 | }, |
| 318 | - // 通过定金ID查收定金详情 | ||
| 319 | - getPaymentStatus(id){ | ||
| 320 | - App.Reserve.GetReserveDepositByid({ | ||
| 321 | - id | ||
| 322 | - }).then(res=>{ | ||
| 323 | - if(res.ret == 200){ | 318 | + // 通过预订ID查收定金详情 |
| 319 | + getPaymentStatus() { | ||
| 320 | + App.Reserve.GetReserveDepositByRid({ | ||
| 321 | + rid: this.data.options.id | ||
| 322 | + }).then(res => { | ||
| 323 | + if (res.ret == 200 && res.data && res.data.length > 0) { | ||
| 324 | + let data = res.data[0]; | ||
| 324 | this.setData({ | 325 | this.setData({ |
| 325 | - paymentStatus:res.data.trade_state=='SUCCESS'?'1':'0' | 326 | + paymentId: data.id, |
| 327 | + paymentStatus: data.trade_state == 'SUCCESS' ? '1' : '0' | ||
| 326 | }) | 328 | }) |
| 327 | } | 329 | } |
| 328 | }) | 330 | }) |
| @@ -347,8 +349,9 @@ Page({ | @@ -347,8 +349,9 @@ Page({ | ||
| 347 | }, | 349 | }, |
| 348 | // 点击支付定金 | 350 | // 点击支付定金 |
| 349 | paymentFun() { | 351 | paymentFun() { |
| 352 | + let that = this; | ||
| 350 | App.PayOnline.CombineTransactionsByDeposit({ | 353 | App.PayOnline.CombineTransactionsByDeposit({ |
| 351 | - id: this.options.paymentId, | 354 | + id: this.data.paymentId, |
| 352 | openid: getApp().openid, | 355 | openid: getApp().openid, |
| 353 | }).then(res => { | 356 | }).then(res => { |
| 354 | if (res.ret == 200) { | 357 | if (res.ret == 200) { |
| @@ -359,28 +362,31 @@ Page({ | @@ -359,28 +362,31 @@ Page({ | ||
| 359 | signType: res.data.signType, | 362 | signType: res.data.signType, |
| 360 | paySign: res.data.paySign, | 363 | paySign: res.data.paySign, |
| 361 | success(ress) { | 364 | success(ress) { |
| 365 | + console.log('微信支付结果',ress); | ||
| 362 | if (ress.errMsg == 'requestPayment:ok') { | 366 | if (ress.errMsg == 'requestPayment:ok') { |
| 363 | console.log('支付成功', ress); | 367 | console.log('支付成功', ress); |
| 364 | - this.setData({ | ||
| 365 | - paymentStatus:'1' | ||
| 366 | - }) | ||
| 367 | - return wx.showToast({ | ||
| 368 | - title: '支付成功', | ||
| 369 | - icon: 'success' | 368 | + that.setData({ |
| 369 | + paymentStatus:'1', | ||
| 370 | + toastBool:true, | ||
| 371 | + toastText:'支付成功' | ||
| 370 | }) | 372 | }) |
| 373 | + that.hideToast(); | ||
| 374 | + return | ||
| 371 | } | 375 | } |
| 372 | - console.log('支付失败', ress); | ||
| 373 | - wx.showToast({ | ||
| 374 | - title: '支付失败,请重新支付', | ||
| 375 | - icon: 'none', | 376 | + console.log('支付失败1', ress); |
| 377 | + that.setData({ | ||
| 378 | + toastBool:true, | ||
| 379 | + toastText:'支付失败,请重新支付' | ||
| 376 | }) | 380 | }) |
| 381 | + that.hideToast(); | ||
| 377 | }, | 382 | }, |
| 378 | fail(ress) { | 383 | fail(ress) { |
| 379 | - console.log('支付失败', ress); | ||
| 380 | - wx.showToast({ | ||
| 381 | - title: '支付失败,请重新支付', | ||
| 382 | - icon: 'none', | 384 | + console.log('支付失败2', ress); |
| 385 | + that.setData({ | ||
| 386 | + toastBool:true, | ||
| 387 | + toastText:'支付失败,请重新支付' | ||
| 383 | }) | 388 | }) |
| 389 | + that.hideToast(); | ||
| 384 | }, | 390 | }, |
| 385 | }) | 391 | }) |
| 386 | }else{ | 392 | }else{ |
| @@ -391,6 +397,14 @@ Page({ | @@ -391,6 +397,14 @@ Page({ | ||
| 391 | } | 397 | } |
| 392 | }) | 398 | }) |
| 393 | }, | 399 | }, |
| 400 | + // 关闭支付失败或者成功弹框 | ||
| 401 | + hideToast() { | ||
| 402 | + setTimeout(()=> { | ||
| 403 | + this.setData({ | ||
| 404 | + toastBool:false | ||
| 405 | + }) | ||
| 406 | + }, 1500) | ||
| 407 | + }, | ||
| 394 | // 客户经理获取基本信息 | 408 | // 客户经理获取基本信息 |
| 395 | getstaffinfo(uid, sid) { | 409 | getstaffinfo(uid, sid) { |
| 396 | console.log('sellerid', this.data.detail.seller.id); | 410 | console.log('sellerid', this.data.detail.seller.id); |
| @@ -545,11 +559,6 @@ Page({ | @@ -545,11 +559,6 @@ Page({ | ||
| 545 | } | 559 | } |
| 546 | if (store && store.images && store.images.length > 0) store.images = util.determine(store.images); | 560 | if (store && store.images && store.images.length > 0) store.images = util.determine(store.images); |
| 547 | if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images); | 561 | if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images); |
| 548 | - if (marketing && marketing.is_online_book && marketing.is_online_book == '1' && marketing.is_transpond == '1') { | ||
| 549 | - this.setData({ | ||
| 550 | - between: true | ||
| 551 | - }) | ||
| 552 | - } | ||
| 553 | switch (themeColor) { | 562 | switch (themeColor) { |
| 554 | case 'blackBlueGradient': | 563 | case 'blackBlueGradient': |
| 555 | themeSixteen = 'linear-gradient(104.24deg, #42a5ff -57.47%, #000000 55.72%, #42a5ff 182.69%)' | 564 | themeSixteen = 'linear-gradient(104.24deg, #42a5ff -57.47%, #000000 55.72%, #42a5ff 182.69%)' |
| @@ -213,11 +213,12 @@ | @@ -213,11 +213,12 @@ | ||
| 213 | <view class="moreText">滑动查看更多</view> | 213 | <view class="moreText">滑动查看更多</view> |
| 214 | <image src="https://qn.colorcun.com/jt1.png" mode="" /> | 214 | <image src="https://qn.colorcun.com/jt1.png" mode="" /> |
| 215 | </view> | 215 | </view> |
| 216 | -</scroll-view> | ||
| 217 | -<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (options.paymentId && paymentStatus == '0')}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}"> | ||
| 218 | - <view wx:if="{{marketing.is_online_book=='1'}}" class="book-item-font second-book-button flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订 | 216 | + <view class="toastBox" wx:if="{{toastBool}}"> |
| 217 | + {{toastText}} | ||
| 219 | </view> | 218 | </view> |
| 220 | - <view wx:if="{{options.paymentId && paymentStatus == '0'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="paymentFun">支付定金</view> | ||
| 221 | - <button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人 | ||
| 222 | - </button> | 219 | +</scroll-view> |
| 220 | +<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="all-button flex-lr sharewidth"> | ||
| 221 | + <view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view> | ||
| 222 | + <view wx:if="{{paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view> | ||
| 223 | + <view wx:if="{{marketing.is_transpond=='1'}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</view> | ||
| 223 | </view> | 224 | </view> |
| @@ -416,54 +416,30 @@ | @@ -416,54 +416,30 @@ | ||
| 416 | justify-content: flex-end; | 416 | justify-content: flex-end; |
| 417 | } | 417 | } |
| 418 | 418 | ||
| 419 | -.between { | ||
| 420 | - justify-content: space-between; | ||
| 421 | -} | ||
| 422 | - | ||
| 423 | .centerBtn { | 419 | .centerBtn { |
| 424 | margin: 0 20rpx; | 420 | margin: 0 20rpx; |
| 425 | } | 421 | } |
| 426 | 422 | ||
| 427 | -.second-book-button { | ||
| 428 | - margin-right: 20rpx; | ||
| 429 | -} | ||
| 430 | - | ||
| 431 | -.book-item-font { | ||
| 432 | - width: 25%; | ||
| 433 | - border: 2rpx solid #0143A3; | 423 | +.shareItem, |
| 424 | +.moreBtn, | ||
| 425 | +.paymenBtn { | ||
| 426 | + width: inherit; | ||
| 427 | + margin: 0; | ||
| 428 | + background: #fafafa; | ||
| 434 | color: #0143A3; | 429 | color: #0143A3; |
| 430 | + border: 2rpx solid #0143A3; | ||
| 435 | height: 46%; | 431 | height: 46%; |
| 436 | border-radius: 42rpx; | 432 | border-radius: 42rpx; |
| 437 | font-weight: 600; | 433 | font-weight: 600; |
| 434 | + margin-right: 20rpx; | ||
| 438 | } | 435 | } |
| 439 | 436 | ||
| 440 | .shareItem { | 437 | .shareItem { |
| 441 | - width: 100%; | ||
| 442 | - margin: 0; | 438 | + margin-right: 0; |
| 443 | background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); | 439 | background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); |
| 444 | color: #fff; | 440 | color: #fff; |
| 445 | } | 441 | } |
| 446 | 442 | ||
| 447 | -.moreBtn{ | ||
| 448 | - width: 100%; | ||
| 449 | -} | ||
| 450 | - | ||
| 451 | -.sharewidth .moreBtn { | ||
| 452 | - width: 100% !important; | ||
| 453 | -} | ||
| 454 | - | ||
| 455 | -.sharewidth .shareItem { | ||
| 456 | - width: 100% !important; | ||
| 457 | -} | ||
| 458 | - | ||
| 459 | -.between .shareItem { | ||
| 460 | - width: 65% !important; | ||
| 461 | -} | ||
| 462 | - | ||
| 463 | -.book-item-font { | ||
| 464 | - width: 40% !important; | ||
| 465 | -} | ||
| 466 | - | ||
| 467 | .menu-item { | 443 | .menu-item { |
| 468 | width: 100%; | 444 | width: 100%; |
| 469 | height: 100%; | 445 | height: 100%; |
| @@ -16,7 +16,6 @@ Page({ | @@ -16,7 +16,6 @@ Page({ | ||
| 16 | tableNum: 0, | 16 | tableNum: 0, |
| 17 | detail: {}, | 17 | detail: {}, |
| 18 | staffinfo: {}, | 18 | staffinfo: {}, |
| 19 | - between: false, | ||
| 20 | chef: {}, | 19 | chef: {}, |
| 21 | marketing: {}, | 20 | marketing: {}, |
| 22 | home: {}, | 21 | home: {}, |
| @@ -54,6 +53,9 @@ Page({ | @@ -54,6 +53,9 @@ Page({ | ||
| 54 | isPlay: '1', | 53 | isPlay: '1', |
| 55 | paymentStatus:'',//定金支付状态 1支付 0未支付 | 54 | paymentStatus:'',//定金支付状态 1支付 0未支付 |
| 56 | reserveData:{},//自定义图文数据 | 55 | reserveData:{},//自定义图文数据 |
| 56 | + toastBool: false, //支付定金提示框 | ||
| 57 | + toastText: '', //支付定金提示文字 | ||
| 58 | + paymentId: '', //定金id | ||
| 57 | }, | 59 | }, |
| 58 | tablestr: '', | 60 | tablestr: '', |
| 59 | urlsValue: [], | 61 | urlsValue: [], |
| @@ -75,9 +77,6 @@ Page({ | @@ -75,9 +77,6 @@ Page({ | ||
| 75 | console.log(param); | 77 | console.log(param); |
| 76 | console.log(options); | 78 | console.log(options); |
| 77 | this.setData(param) | 79 | this.setData(param) |
| 78 | - if(options.paymentId){ | ||
| 79 | - this.getPaymentStatus(options.paymentId) | ||
| 80 | - } | ||
| 81 | mta.Page.init({ | 80 | mta.Page.init({ |
| 82 | "appID": "500667280", | 81 | "appID": "500667280", |
| 83 | "eventID": "500667287", | 82 | "eventID": "500667287", |
| @@ -145,6 +144,7 @@ Page({ | @@ -145,6 +144,7 @@ Page({ | ||
| 145 | onShow: function () { | 144 | onShow: function () { |
| 146 | this.getDetail() | 145 | this.getDetail() |
| 147 | this.getText() | 146 | this.getText() |
| 147 | + this.getPaymentStatus() | ||
| 148 | }, | 148 | }, |
| 149 | // 复制微信号 | 149 | // 复制微信号 |
| 150 | copyWeChat() { | 150 | copyWeChat() { |
| @@ -316,14 +316,16 @@ Page({ | @@ -316,14 +316,16 @@ Page({ | ||
| 316 | } | 316 | } |
| 317 | }) | 317 | }) |
| 318 | }, | 318 | }, |
| 319 | - // 通过定金ID查收定金详情 | ||
| 320 | - getPaymentStatus(id){ | ||
| 321 | - App.Reserve.GetReserveDepositByid({ | ||
| 322 | - id | ||
| 323 | - }).then(res=>{ | ||
| 324 | - if(res.ret == 200){ | 319 | + // 通过预订ID查收定金详情 |
| 320 | + getPaymentStatus() { | ||
| 321 | + App.Reserve.GetReserveDepositByRid({ | ||
| 322 | + rid: this.data.options.id | ||
| 323 | + }).then(res => { | ||
| 324 | + if (res.ret == 200 && res.data && res.data.length > 0) { | ||
| 325 | + let data = res.data[0]; | ||
| 325 | this.setData({ | 326 | this.setData({ |
| 326 | - paymentStatus:res.data.trade_state=='SUCCESS'?'1':'0' | 327 | + paymentId: data.id, |
| 328 | + paymentStatus: data.trade_state == 'SUCCESS' ? '1' : '0' | ||
| 327 | }) | 329 | }) |
| 328 | } | 330 | } |
| 329 | }) | 331 | }) |
| @@ -348,8 +350,9 @@ Page({ | @@ -348,8 +350,9 @@ Page({ | ||
| 348 | }, | 350 | }, |
| 349 | // 点击支付定金 | 351 | // 点击支付定金 |
| 350 | paymentFun() { | 352 | paymentFun() { |
| 353 | + let that = this; | ||
| 351 | App.PayOnline.CombineTransactionsByDeposit({ | 354 | App.PayOnline.CombineTransactionsByDeposit({ |
| 352 | - id: this.options.paymentId, | 355 | + id: this.data.paymentId, |
| 353 | openid: getApp().openid, | 356 | openid: getApp().openid, |
| 354 | }).then(res => { | 357 | }).then(res => { |
| 355 | if (res.ret == 200) { | 358 | if (res.ret == 200) { |
| @@ -360,28 +363,31 @@ Page({ | @@ -360,28 +363,31 @@ Page({ | ||
| 360 | signType: res.data.signType, | 363 | signType: res.data.signType, |
| 361 | paySign: res.data.paySign, | 364 | paySign: res.data.paySign, |
| 362 | success(ress) { | 365 | success(ress) { |
| 366 | + console.log('微信支付结果',ress); | ||
| 363 | if (ress.errMsg == 'requestPayment:ok') { | 367 | if (ress.errMsg == 'requestPayment:ok') { |
| 364 | console.log('支付成功', ress); | 368 | console.log('支付成功', ress); |
| 365 | - this.setData({ | ||
| 366 | - paymentStatus:'1' | ||
| 367 | - }) | ||
| 368 | - return wx.showToast({ | ||
| 369 | - title: '支付成功', | ||
| 370 | - icon: 'success' | 369 | + that.setData({ |
| 370 | + paymentStatus:'1', | ||
| 371 | + toastBool:true, | ||
| 372 | + toastText:'支付成功' | ||
| 371 | }) | 373 | }) |
| 374 | + that.hideToast(); | ||
| 375 | + return | ||
| 372 | } | 376 | } |
| 373 | - console.log('支付失败', ress); | ||
| 374 | - wx.showToast({ | ||
| 375 | - title: '支付失败,请重新支付', | ||
| 376 | - icon: 'none', | 377 | + console.log('支付失败1', ress); |
| 378 | + that.setData({ | ||
| 379 | + toastBool:true, | ||
| 380 | + toastText:'支付失败,请重新支付' | ||
| 377 | }) | 381 | }) |
| 382 | + that.hideToast(); | ||
| 378 | }, | 383 | }, |
| 379 | fail(ress) { | 384 | fail(ress) { |
| 380 | - console.log('支付失败', ress); | ||
| 381 | - wx.showToast({ | ||
| 382 | - title: '支付失败,请重新支付', | ||
| 383 | - icon: 'none', | 385 | + console.log('支付失败2', ress); |
| 386 | + that.setData({ | ||
| 387 | + toastBool:true, | ||
| 388 | + toastText:'支付失败,请重新支付' | ||
| 384 | }) | 389 | }) |
| 390 | + that.hideToast(); | ||
| 385 | }, | 391 | }, |
| 386 | }) | 392 | }) |
| 387 | }else{ | 393 | }else{ |
| @@ -392,6 +398,14 @@ Page({ | @@ -392,6 +398,14 @@ Page({ | ||
| 392 | } | 398 | } |
| 393 | }) | 399 | }) |
| 394 | }, | 400 | }, |
| 401 | + // 关闭支付失败或者成功弹框 | ||
| 402 | + hideToast() { | ||
| 403 | + setTimeout(()=> { | ||
| 404 | + this.setData({ | ||
| 405 | + toastBool:false | ||
| 406 | + }) | ||
| 407 | + }, 1500) | ||
| 408 | + }, | ||
| 395 | // 客户经理获取基本信息 | 409 | // 客户经理获取基本信息 |
| 396 | getstaffinfo(uid, sid) { | 410 | getstaffinfo(uid, sid) { |
| 397 | console.log('sellerid', this.data.detail.seller.id); | 411 | console.log('sellerid', this.data.detail.seller.id); |
| @@ -546,11 +560,6 @@ Page({ | @@ -546,11 +560,6 @@ Page({ | ||
| 546 | } | 560 | } |
| 547 | if (store && store.images && store.images.length > 0) store.images = util.determine(store.images); | 561 | if (store && store.images && store.images.length > 0) store.images = util.determine(store.images); |
| 548 | if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images); | 562 | if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images); |
| 549 | - if (marketing && marketing.is_online_book && marketing.is_online_book == '1' && marketing.is_transpond == '1') { | ||
| 550 | - this.setData({ | ||
| 551 | - between: true | ||
| 552 | - }) | ||
| 553 | - } | ||
| 554 | if (themeColor == 'turmeric' || themeColor == 'golden') { | 563 | if (themeColor == 'turmeric' || themeColor == 'golden') { |
| 555 | whiteBj = true | 564 | whiteBj = true |
| 556 | } else { | 565 | } else { |
| @@ -221,11 +221,12 @@ | @@ -221,11 +221,12 @@ | ||
| 221 | <view class="moreText">滑动查看更多</view> | 221 | <view class="moreText">滑动查看更多</view> |
| 222 | <image src="https://qn.colorcun.com/jt1.png" mode="" /> | 222 | <image src="https://qn.colorcun.com/jt1.png" mode="" /> |
| 223 | </view> | 223 | </view> |
| 224 | -</scroll-view> | ||
| 225 | -<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (options.paymentId && paymentStatus == '0')}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}"> | ||
| 226 | - <view wx:if="{{marketing.is_online_book=='1'}}" class="book-item-font second-book-button flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订 | 224 | + <view class="toastBox" wx:if="{{toastBool}}"> |
| 225 | + {{toastText}} | ||
| 227 | </view> | 226 | </view> |
| 228 | - <view wx:if="{{options.paymentId && paymentStatus == '0'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="paymentFun">支付定金</view> | ||
| 229 | - <button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人 | ||
| 230 | - </button> | 227 | +</scroll-view> |
| 228 | +<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="all-button flex-lr sharewidth"> | ||
| 229 | + <view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view> | ||
| 230 | + <view wx:if="{{paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view> | ||
| 231 | + <view wx:if="{{marketing.is_transpond=='1'}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</view> | ||
| 231 | </view> | 232 | </view> |
| @@ -454,62 +454,30 @@ | @@ -454,62 +454,30 @@ | ||
| 454 | justify-content: flex-end; | 454 | justify-content: flex-end; |
| 455 | } | 455 | } |
| 456 | 456 | ||
| 457 | -.between { | ||
| 458 | - justify-content: space-between; | ||
| 459 | -} | ||
| 460 | - | ||
| 461 | .centerBtn { | 457 | .centerBtn { |
| 462 | margin: 0 20rpx; | 458 | margin: 0 20rpx; |
| 463 | } | 459 | } |
| 464 | 460 | ||
| 465 | -.second-book-button { | ||
| 466 | - margin-right: 20rpx; | ||
| 467 | -} | ||
| 468 | - | ||
| 469 | -.book-item-font { | ||
| 470 | - width: 25%; | ||
| 471 | - border: 2rpx solid #0143A3; | 461 | +.shareItem, |
| 462 | +.moreBtn, | ||
| 463 | +.paymenBtn { | ||
| 464 | + width: inherit; | ||
| 465 | + margin: 0; | ||
| 466 | + background: #fafafa; | ||
| 472 | color: #0143A3; | 467 | color: #0143A3; |
| 468 | + border: 2rpx solid #0143A3; | ||
| 473 | height: 46%; | 469 | height: 46%; |
| 474 | border-radius: 42rpx; | 470 | border-radius: 42rpx; |
| 475 | font-weight: 600; | 471 | font-weight: 600; |
| 472 | + margin-right: 20rpx; | ||
| 476 | } | 473 | } |
| 477 | 474 | ||
| 478 | .shareItem { | 475 | .shareItem { |
| 479 | - width: 100%; | ||
| 480 | - margin: 0; | ||
| 481 | - background: #fafafa; | ||
| 482 | - color: #0143A3; | ||
| 483 | - border: 2rpx solid #0143A3; | ||
| 484 | -} | ||
| 485 | - | ||
| 486 | -.moreBtn{ | ||
| 487 | - width: 100%; | ||
| 488 | -} | ||
| 489 | - | ||
| 490 | -.sharewidth .moreBtn { | ||
| 491 | - width: 100% !important; | ||
| 492 | -} | ||
| 493 | - | ||
| 494 | -.between .shareItem { | ||
| 495 | - width: 100%; | ||
| 496 | - margin: 0; | 476 | + margin-right: 0; |
| 497 | background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); | 477 | background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); |
| 498 | color: #fff; | 478 | color: #fff; |
| 499 | } | 479 | } |
| 500 | 480 | ||
| 501 | -.sharewidth .shareItem { | ||
| 502 | - width: 100% !important; | ||
| 503 | -} | ||
| 504 | - | ||
| 505 | -.between .shareItem { | ||
| 506 | - width: 65% !important; | ||
| 507 | -} | ||
| 508 | - | ||
| 509 | -.book-item-font { | ||
| 510 | - width: 40% !important; | ||
| 511 | -} | ||
| 512 | - | ||
| 513 | .menu-item { | 481 | .menu-item { |
| 514 | width: 100%; | 482 | width: 100%; |
| 515 | height: 100%; | 483 | height: 100%; |
| @@ -16,7 +16,6 @@ Page({ | @@ -16,7 +16,6 @@ Page({ | ||
| 16 | tableNum: 0, | 16 | tableNum: 0, |
| 17 | detail: {}, | 17 | detail: {}, |
| 18 | staffinfo: {}, | 18 | staffinfo: {}, |
| 19 | - between: false, | ||
| 20 | chef: {}, | 19 | chef: {}, |
| 21 | marketing: {}, | 20 | marketing: {}, |
| 22 | home: {}, | 21 | home: {}, |
| @@ -54,6 +53,9 @@ Page({ | @@ -54,6 +53,9 @@ Page({ | ||
| 54 | isPlay: '1', | 53 | isPlay: '1', |
| 55 | paymentStatus:'',//定金支付状态 1支付 0未支付 | 54 | paymentStatus:'',//定金支付状态 1支付 0未支付 |
| 56 | reserveData:{},//自定义图文数据 | 55 | reserveData:{},//自定义图文数据 |
| 56 | + toastBool: false, //支付定金提示框 | ||
| 57 | + toastText: '', //支付定金提示文字 | ||
| 58 | + paymentId: '', //定金id | ||
| 57 | }, | 59 | }, |
| 58 | tablestr: '', | 60 | tablestr: '', |
| 59 | urlsValue: [], | 61 | urlsValue: [], |
| @@ -75,9 +77,6 @@ Page({ | @@ -75,9 +77,6 @@ Page({ | ||
| 75 | console.log(param); | 77 | console.log(param); |
| 76 | console.log(options); | 78 | console.log(options); |
| 77 | this.setData(param) | 79 | this.setData(param) |
| 78 | - if(options.paymentId){ | ||
| 79 | - this.getPaymentStatus(options.paymentId) | ||
| 80 | - } | ||
| 81 | mta.Page.init({ | 80 | mta.Page.init({ |
| 82 | "appID": "500667280", | 81 | "appID": "500667280", |
| 83 | "eventID": "500667287", | 82 | "eventID": "500667287", |
| @@ -145,6 +144,7 @@ Page({ | @@ -145,6 +144,7 @@ Page({ | ||
| 145 | onShow: function () { | 144 | onShow: function () { |
| 146 | this.getDetail() | 145 | this.getDetail() |
| 147 | this.getText() | 146 | this.getText() |
| 147 | + this.getPaymentStatus() | ||
| 148 | }, | 148 | }, |
| 149 | // 复制微信号 | 149 | // 复制微信号 |
| 150 | copyWeChat() { | 150 | copyWeChat() { |
| @@ -316,14 +316,16 @@ Page({ | @@ -316,14 +316,16 @@ Page({ | ||
| 316 | } | 316 | } |
| 317 | }) | 317 | }) |
| 318 | }, | 318 | }, |
| 319 | - // 通过定金ID查收定金详情 | ||
| 320 | - getPaymentStatus(id){ | ||
| 321 | - App.Reserve.GetReserveDepositByid({ | ||
| 322 | - id | ||
| 323 | - }).then(res=>{ | ||
| 324 | - if(res.ret == 200){ | 319 | + // 通过预订ID查收定金详情 |
| 320 | + getPaymentStatus() { | ||
| 321 | + App.Reserve.GetReserveDepositByRid({ | ||
| 322 | + rid: this.data.options.id | ||
| 323 | + }).then(res => { | ||
| 324 | + if (res.ret == 200 && res.data && res.data.length > 0) { | ||
| 325 | + let data = res.data[0]; | ||
| 325 | this.setData({ | 326 | this.setData({ |
| 326 | - paymentStatus:res.data.trade_state=='SUCCESS'?'1':'0' | 327 | + paymentId: data.id, |
| 328 | + paymentStatus: data.trade_state == 'SUCCESS' ? '1' : '0' | ||
| 327 | }) | 329 | }) |
| 328 | } | 330 | } |
| 329 | }) | 331 | }) |
| @@ -348,8 +350,9 @@ Page({ | @@ -348,8 +350,9 @@ Page({ | ||
| 348 | }, | 350 | }, |
| 349 | // 点击支付定金 | 351 | // 点击支付定金 |
| 350 | paymentFun() { | 352 | paymentFun() { |
| 353 | + let that = this; | ||
| 351 | App.PayOnline.CombineTransactionsByDeposit({ | 354 | App.PayOnline.CombineTransactionsByDeposit({ |
| 352 | - id: this.options.paymentId, | 355 | + id: this.data.paymentId, |
| 353 | openid: getApp().openid, | 356 | openid: getApp().openid, |
| 354 | }).then(res => { | 357 | }).then(res => { |
| 355 | if (res.ret == 200) { | 358 | if (res.ret == 200) { |
| @@ -360,28 +363,31 @@ Page({ | @@ -360,28 +363,31 @@ Page({ | ||
| 360 | signType: res.data.signType, | 363 | signType: res.data.signType, |
| 361 | paySign: res.data.paySign, | 364 | paySign: res.data.paySign, |
| 362 | success(ress) { | 365 | success(ress) { |
| 366 | + console.log('微信支付结果',ress); | ||
| 363 | if (ress.errMsg == 'requestPayment:ok') { | 367 | if (ress.errMsg == 'requestPayment:ok') { |
| 364 | console.log('支付成功', ress); | 368 | console.log('支付成功', ress); |
| 365 | - this.setData({ | ||
| 366 | - paymentStatus:'1' | ||
| 367 | - }) | ||
| 368 | - return wx.showToast({ | ||
| 369 | - title: '支付成功', | ||
| 370 | - icon: 'success' | 369 | + that.setData({ |
| 370 | + paymentStatus:'1', | ||
| 371 | + toastBool:true, | ||
| 372 | + toastText:'支付成功' | ||
| 371 | }) | 373 | }) |
| 374 | + that.hideToast(); | ||
| 375 | + return | ||
| 372 | } | 376 | } |
| 373 | - console.log('支付失败', ress); | ||
| 374 | - wx.showToast({ | ||
| 375 | - title: '支付失败,请重新支付', | ||
| 376 | - icon: 'none', | 377 | + console.log('支付失败1', ress); |
| 378 | + that.setData({ | ||
| 379 | + toastBool:true, | ||
| 380 | + toastText:'支付失败,请重新支付' | ||
| 377 | }) | 381 | }) |
| 382 | + that.hideToast(); | ||
| 378 | }, | 383 | }, |
| 379 | fail(ress) { | 384 | fail(ress) { |
| 380 | - console.log('支付失败', ress); | ||
| 381 | - wx.showToast({ | ||
| 382 | - title: '支付失败,请重新支付', | ||
| 383 | - icon: 'none', | 385 | + console.log('支付失败2', ress); |
| 386 | + that.setData({ | ||
| 387 | + toastBool:true, | ||
| 388 | + toastText:'支付失败,请重新支付' | ||
| 384 | }) | 389 | }) |
| 390 | + that.hideToast(); | ||
| 385 | }, | 391 | }, |
| 386 | }) | 392 | }) |
| 387 | }else{ | 393 | }else{ |
| @@ -392,6 +398,14 @@ Page({ | @@ -392,6 +398,14 @@ Page({ | ||
| 392 | } | 398 | } |
| 393 | }) | 399 | }) |
| 394 | }, | 400 | }, |
| 401 | + // 关闭支付失败或者成功弹框 | ||
| 402 | + hideToast() { | ||
| 403 | + setTimeout(()=> { | ||
| 404 | + this.setData({ | ||
| 405 | + toastBool:false | ||
| 406 | + }) | ||
| 407 | + }, 1500) | ||
| 408 | + }, | ||
| 395 | // 客户经理获取基本信息 | 409 | // 客户经理获取基本信息 |
| 396 | getstaffinfo(uid, sid) { | 410 | getstaffinfo(uid, sid) { |
| 397 | console.log('sellerid', this.data.detail.seller.id); | 411 | console.log('sellerid', this.data.detail.seller.id); |
| @@ -546,11 +560,6 @@ Page({ | @@ -546,11 +560,6 @@ Page({ | ||
| 546 | } | 560 | } |
| 547 | if (store && store.images && store.images.length > 0) store.images = util.determine(store.images); | 561 | if (store && store.images && store.images.length > 0) store.images = util.determine(store.images); |
| 548 | if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images); | 562 | if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images); |
| 549 | - if (marketing && marketing.is_online_book && marketing.is_online_book == '1' && marketing.is_transpond == '1') { | ||
| 550 | - this.setData({ | ||
| 551 | - between: true | ||
| 552 | - }) | ||
| 553 | - } | ||
| 554 | if (themeColor == 'turmeric' || themeColor == 'golden') { | 563 | if (themeColor == 'turmeric' || themeColor == 'golden') { |
| 555 | whiteBj = true | 564 | whiteBj = true |
| 556 | } else { | 565 | } else { |
| @@ -197,11 +197,12 @@ | @@ -197,11 +197,12 @@ | ||
| 197 | <view class="moreText">滑动查看更多</view> | 197 | <view class="moreText">滑动查看更多</view> |
| 198 | <image src="https://qn.colorcun.com/jt1.png" mode="" /> | 198 | <image src="https://qn.colorcun.com/jt1.png" mode="" /> |
| 199 | </view> | 199 | </view> |
| 200 | -</scroll-view> | ||
| 201 | -<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (options.paymentId && paymentStatus == '0')}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}"> | ||
| 202 | - <view wx:if="{{marketing.is_online_book=='1'}}" class="book-item-font second-book-button flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订 | 200 | + <view class="toastBox" wx:if="{{toastBool}}"> |
| 201 | + {{toastText}} | ||
| 203 | </view> | 202 | </view> |
| 204 | - <view wx:if="{{options.paymentId && paymentStatus == '0'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="paymentFun">支付定金</view> | ||
| 205 | - <button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人 | ||
| 206 | - </button> | 203 | +</scroll-view> |
| 204 | +<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="all-button flex-lr sharewidth"> | ||
| 205 | + <view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view> | ||
| 206 | + <view wx:if="{{paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view> | ||
| 207 | + <view wx:if="{{marketing.is_transpond=='1'}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</view> | ||
| 207 | </view> | 208 | </view> |
| @@ -430,50 +430,26 @@ | @@ -430,50 +430,26 @@ | ||
| 430 | justify-content: flex-end; | 430 | justify-content: flex-end; |
| 431 | } | 431 | } |
| 432 | 432 | ||
| 433 | -.between { | ||
| 434 | - justify-content: space-between; | ||
| 435 | -} | ||
| 436 | - | ||
| 437 | -.second-book-button { | ||
| 438 | - margin-right: 20rpx; | ||
| 439 | -} | ||
| 440 | - | ||
| 441 | -.book-item-font { | ||
| 442 | - width: 25%; | ||
| 443 | - border: 2rpx solid #0143A3; | 433 | +.shareItem, |
| 434 | +.moreBtn, | ||
| 435 | +.paymenBtn { | ||
| 436 | + width: inherit; | ||
| 437 | + margin: 0; | ||
| 438 | + background: #fafafa; | ||
| 444 | color: #0143A3; | 439 | color: #0143A3; |
| 440 | + border: 2rpx solid #0143A3; | ||
| 445 | height: 46%; | 441 | height: 46%; |
| 446 | border-radius: 42rpx; | 442 | border-radius: 42rpx; |
| 447 | font-weight: 600; | 443 | font-weight: 600; |
| 444 | + margin-right: 20rpx; | ||
| 448 | } | 445 | } |
| 449 | 446 | ||
| 450 | .shareItem { | 447 | .shareItem { |
| 451 | - width: 100%; | ||
| 452 | - margin: 0; | 448 | + margin-right: 0; |
| 453 | background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); | 449 | background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); |
| 454 | color: #fff; | 450 | color: #fff; |
| 455 | } | 451 | } |
| 456 | 452 | ||
| 457 | -.moreBtn{ | ||
| 458 | - width: 100%; | ||
| 459 | -} | ||
| 460 | - | ||
| 461 | -.sharewidth .moreBtn { | ||
| 462 | - width: 100% !important; | ||
| 463 | -} | ||
| 464 | - | ||
| 465 | -.sharewidth .shareItem { | ||
| 466 | - width: 100% !important; | ||
| 467 | -} | ||
| 468 | - | ||
| 469 | -.between .shareItem { | ||
| 470 | - width: 65% !important; | ||
| 471 | -} | ||
| 472 | - | ||
| 473 | -.book-item-font { | ||
| 474 | - width: 40% !important; | ||
| 475 | -} | ||
| 476 | - | ||
| 477 | .menu-item { | 453 | .menu-item { |
| 478 | width: 100%; | 454 | width: 100%; |
| 479 | height: 100%; | 455 | height: 100%; |
| @@ -16,7 +16,6 @@ Page({ | @@ -16,7 +16,6 @@ Page({ | ||
| 16 | tableNum: 0, | 16 | tableNum: 0, |
| 17 | detail: {}, | 17 | detail: {}, |
| 18 | staffinfo: {}, | 18 | staffinfo: {}, |
| 19 | - between: false, | ||
| 20 | chef: {}, | 19 | chef: {}, |
| 21 | marketing: {}, | 20 | marketing: {}, |
| 22 | home: {}, | 21 | home: {}, |
| @@ -53,6 +52,9 @@ Page({ | @@ -53,6 +52,9 @@ Page({ | ||
| 53 | isPlay: '1', | 52 | isPlay: '1', |
| 54 | paymentStatus:'',//定金支付状态 1支付 0未支付 | 53 | paymentStatus:'',//定金支付状态 1支付 0未支付 |
| 55 | reserveData:{},//自定义图文数据 | 54 | reserveData:{},//自定义图文数据 |
| 55 | + toastBool: false, //支付定金提示框 | ||
| 56 | + toastText: '', //支付定金提示文字 | ||
| 57 | + paymentId: '', //定金id | ||
| 56 | }, | 58 | }, |
| 57 | tablestr: '', | 59 | tablestr: '', |
| 58 | urlsValue: [], | 60 | urlsValue: [], |
| @@ -74,9 +76,6 @@ Page({ | @@ -74,9 +76,6 @@ Page({ | ||
| 74 | console.log(param); | 76 | console.log(param); |
| 75 | console.log(options); | 77 | console.log(options); |
| 76 | this.setData(param) | 78 | this.setData(param) |
| 77 | - if(options.paymentId){ | ||
| 78 | - this.getPaymentStatus(options.paymentId) | ||
| 79 | - } | ||
| 80 | mta.Page.init({ | 79 | mta.Page.init({ |
| 81 | "appID": "500667280", | 80 | "appID": "500667280", |
| 82 | "eventID": "500667287", | 81 | "eventID": "500667287", |
| @@ -144,6 +143,7 @@ Page({ | @@ -144,6 +143,7 @@ Page({ | ||
| 144 | onShow: function () { | 143 | onShow: function () { |
| 145 | this.getDetail() | 144 | this.getDetail() |
| 146 | this.getText() | 145 | this.getText() |
| 146 | + this.getPaymentStatus() | ||
| 147 | }, | 147 | }, |
| 148 | // 复制微信号 | 148 | // 复制微信号 |
| 149 | copyWeChat() { | 149 | copyWeChat() { |
| @@ -315,14 +315,16 @@ Page({ | @@ -315,14 +315,16 @@ Page({ | ||
| 315 | } | 315 | } |
| 316 | }) | 316 | }) |
| 317 | }, | 317 | }, |
| 318 | - // 通过定金ID查收定金详情 | ||
| 319 | - getPaymentStatus(id){ | ||
| 320 | - App.Reserve.GetReserveDepositByid({ | ||
| 321 | - id | ||
| 322 | - }).then(res=>{ | ||
| 323 | - if(res.ret == 200){ | 318 | + // 通过预订ID查收定金详情 |
| 319 | + getPaymentStatus() { | ||
| 320 | + App.Reserve.GetReserveDepositByRid({ | ||
| 321 | + rid: this.data.options.id | ||
| 322 | + }).then(res => { | ||
| 323 | + if (res.ret == 200 && res.data && res.data.length > 0) { | ||
| 324 | + let data = res.data[0]; | ||
| 324 | this.setData({ | 325 | this.setData({ |
| 325 | - paymentStatus:res.data.trade_state=='SUCCESS'?'1':'0' | 326 | + paymentId: data.id, |
| 327 | + paymentStatus: data.trade_state == 'SUCCESS' ? '1' : '0' | ||
| 326 | }) | 328 | }) |
| 327 | } | 329 | } |
| 328 | }) | 330 | }) |
| @@ -347,8 +349,9 @@ Page({ | @@ -347,8 +349,9 @@ Page({ | ||
| 347 | }, | 349 | }, |
| 348 | // 点击支付定金 | 350 | // 点击支付定金 |
| 349 | paymentFun() { | 351 | paymentFun() { |
| 352 | + let that = this; | ||
| 350 | App.PayOnline.CombineTransactionsByDeposit({ | 353 | App.PayOnline.CombineTransactionsByDeposit({ |
| 351 | - id: this.options.paymentId, | 354 | + id: this.data.paymentId, |
| 352 | openid: getApp().openid, | 355 | openid: getApp().openid, |
| 353 | }).then(res => { | 356 | }).then(res => { |
| 354 | if (res.ret == 200) { | 357 | if (res.ret == 200) { |
| @@ -359,28 +362,31 @@ Page({ | @@ -359,28 +362,31 @@ Page({ | ||
| 359 | signType: res.data.signType, | 362 | signType: res.data.signType, |
| 360 | paySign: res.data.paySign, | 363 | paySign: res.data.paySign, |
| 361 | success(ress) { | 364 | success(ress) { |
| 365 | + console.log('微信支付结果',ress); | ||
| 362 | if (ress.errMsg == 'requestPayment:ok') { | 366 | if (ress.errMsg == 'requestPayment:ok') { |
| 363 | console.log('支付成功', ress); | 367 | console.log('支付成功', ress); |
| 364 | - this.setData({ | ||
| 365 | - paymentStatus:'1' | ||
| 366 | - }) | ||
| 367 | - return wx.showToast({ | ||
| 368 | - title: '支付成功', | ||
| 369 | - icon: 'success' | 368 | + that.setData({ |
| 369 | + paymentStatus:'1', | ||
| 370 | + toastBool:true, | ||
| 371 | + toastText:'支付成功' | ||
| 370 | }) | 372 | }) |
| 373 | + that.hideToast(); | ||
| 374 | + return | ||
| 371 | } | 375 | } |
| 372 | - console.log('支付失败', ress); | ||
| 373 | - wx.showToast({ | ||
| 374 | - title: '支付失败,请重新支付', | ||
| 375 | - icon: 'none', | 376 | + console.log('支付失败1', ress); |
| 377 | + that.setData({ | ||
| 378 | + toastBool:true, | ||
| 379 | + toastText:'支付失败,请重新支付' | ||
| 376 | }) | 380 | }) |
| 381 | + that.hideToast(); | ||
| 377 | }, | 382 | }, |
| 378 | fail(ress) { | 383 | fail(ress) { |
| 379 | - console.log('支付失败', ress); | ||
| 380 | - wx.showToast({ | ||
| 381 | - title: '支付失败,请重新支付', | ||
| 382 | - icon: 'none', | 384 | + console.log('支付失败2', ress); |
| 385 | + that.setData({ | ||
| 386 | + toastBool:true, | ||
| 387 | + toastText:'支付失败,请重新支付' | ||
| 383 | }) | 388 | }) |
| 389 | + that.hideToast(); | ||
| 384 | }, | 390 | }, |
| 385 | }) | 391 | }) |
| 386 | }else{ | 392 | }else{ |
| @@ -391,6 +397,14 @@ Page({ | @@ -391,6 +397,14 @@ Page({ | ||
| 391 | } | 397 | } |
| 392 | }) | 398 | }) |
| 393 | }, | 399 | }, |
| 400 | + // 关闭支付失败或者成功弹框 | ||
| 401 | + hideToast() { | ||
| 402 | + setTimeout(()=> { | ||
| 403 | + this.setData({ | ||
| 404 | + toastBool:false | ||
| 405 | + }) | ||
| 406 | + }, 1500) | ||
| 407 | + }, | ||
| 394 | // 客户经理获取基本信息 | 408 | // 客户经理获取基本信息 |
| 395 | getstaffinfo(uid, sid) { | 409 | getstaffinfo(uid, sid) { |
| 396 | console.log('sellerid', this.data.detail.seller.id); | 410 | console.log('sellerid', this.data.detail.seller.id); |
| @@ -545,11 +559,6 @@ Page({ | @@ -545,11 +559,6 @@ Page({ | ||
| 545 | } | 559 | } |
| 546 | if (store && store.images && store.images.length > 0) store.images = util.determine(store.images); | 560 | if (store && store.images && store.images.length > 0) store.images = util.determine(store.images); |
| 547 | if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images); | 561 | if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images); |
| 548 | - if (marketing && marketing.is_online_book && marketing.is_online_book == '1' && marketing.is_transpond == '1') { | ||
| 549 | - this.setData({ | ||
| 550 | - between: true | ||
| 551 | - }) | ||
| 552 | - } | ||
| 553 | if (themeColor == 'turmeric' || themeColor == 'golden') { | 562 | if (themeColor == 'turmeric' || themeColor == 'golden') { |
| 554 | whiteBj = true | 563 | whiteBj = true |
| 555 | } else { | 564 | } else { |
| @@ -194,11 +194,12 @@ | @@ -194,11 +194,12 @@ | ||
| 194 | <view class="moreText">滑动查看更多</view> | 194 | <view class="moreText">滑动查看更多</view> |
| 195 | <image src="https://qn.colorcun.com/jt1.png" mode="" /> | 195 | <image src="https://qn.colorcun.com/jt1.png" mode="" /> |
| 196 | </view> | 196 | </view> |
| 197 | -</scroll-view> | ||
| 198 | -<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (options.paymentId && paymentStatus == '0')}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}"> | ||
| 199 | - <view wx:if="{{marketing.is_online_book=='1'}}" class="book-item-font second-book-button flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订 | 197 | + <view class="toastBox" wx:if="{{toastBool}}"> |
| 198 | + {{toastText}} | ||
| 200 | </view> | 199 | </view> |
| 201 | - <view wx:if="{{options.paymentId && paymentStatus == '0'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="paymentFun">支付定金</view> | ||
| 202 | - <button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人 | ||
| 203 | - </button> | 200 | +</scroll-view> |
| 201 | +<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="all-button flex-lr sharewidth"> | ||
| 202 | + <view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view> | ||
| 203 | + <view wx:if="{{paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view> | ||
| 204 | + <view wx:if="{{marketing.is_transpond=='1'}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</view> | ||
| 204 | </view> | 205 | </view> |
| @@ -421,54 +421,30 @@ | @@ -421,54 +421,30 @@ | ||
| 421 | justify-content: flex-end; | 421 | justify-content: flex-end; |
| 422 | } | 422 | } |
| 423 | 423 | ||
| 424 | -.between { | ||
| 425 | - justify-content: space-between; | ||
| 426 | -} | ||
| 427 | - | ||
| 428 | .second-book-button { | 424 | .second-book-button { |
| 429 | margin-right: 20rpx; | 425 | margin-right: 20rpx; |
| 430 | } | 426 | } |
| 431 | 427 | ||
| 432 | -.book-item-font { | ||
| 433 | - width: 25%; | ||
| 434 | - border: 2rpx solid #0143A3; | 428 | +.shareItem, |
| 429 | +.moreBtn, | ||
| 430 | +.paymenBtn { | ||
| 431 | + width: inherit; | ||
| 432 | + margin: 0; | ||
| 433 | + background: #fafafa; | ||
| 435 | color: #0143A3; | 434 | color: #0143A3; |
| 435 | + border: 2rpx solid #0143A3; | ||
| 436 | height: 46%; | 436 | height: 46%; |
| 437 | border-radius: 42rpx; | 437 | border-radius: 42rpx; |
| 438 | font-weight: 600; | 438 | font-weight: 600; |
| 439 | + margin-right: 20rpx; | ||
| 439 | } | 440 | } |
| 440 | 441 | ||
| 441 | .shareItem { | 442 | .shareItem { |
| 442 | - width: 100%; | ||
| 443 | - margin: 0; | ||
| 444 | - background: #fafafa; | ||
| 445 | - color: #0143A3; | ||
| 446 | - border: 2rpx solid #0143A3; | ||
| 447 | -} | ||
| 448 | - | ||
| 449 | -.moreBtn{ | ||
| 450 | - width: 100%; | ||
| 451 | -} | ||
| 452 | - | ||
| 453 | -.sharewidth .moreBtn { | ||
| 454 | - width: 100% !important; | ||
| 455 | -} | ||
| 456 | - | ||
| 457 | -.between .shareItem { | ||
| 458 | - width: 65% !important; | ||
| 459 | - margin: 0; | 443 | + margin-right: 0; |
| 460 | background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); | 444 | background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); |
| 461 | color: #fff; | 445 | color: #fff; |
| 462 | } | 446 | } |
| 463 | 447 | ||
| 464 | -.sharewidth .shareItem { | ||
| 465 | - width: 100% !important; | ||
| 466 | -} | ||
| 467 | - | ||
| 468 | -.book-item-font { | ||
| 469 | - width: 40% !important; | ||
| 470 | -} | ||
| 471 | - | ||
| 472 | .menu-item { | 448 | .menu-item { |
| 473 | width: 100%; | 449 | width: 100%; |
| 474 | height: 100%; | 450 | height: 100%; |
| @@ -16,7 +16,6 @@ Page({ | @@ -16,7 +16,6 @@ Page({ | ||
| 16 | tableNum: 0, | 16 | tableNum: 0, |
| 17 | detail: {}, | 17 | detail: {}, |
| 18 | staffinfo: {}, | 18 | staffinfo: {}, |
| 19 | - between: false, | ||
| 20 | id: null, | 19 | id: null, |
| 21 | msgTpl: '', | 20 | msgTpl: '', |
| 22 | chef: {}, | 21 | chef: {}, |
| @@ -54,6 +53,9 @@ Page({ | @@ -54,6 +53,9 @@ Page({ | ||
| 54 | isPlay: '1', | 53 | isPlay: '1', |
| 55 | paymentStatus:'',//定金支付状态 1支付 0未支付 | 54 | paymentStatus:'',//定金支付状态 1支付 0未支付 |
| 56 | reserveData:{},//自定义图文数据 | 55 | reserveData:{},//自定义图文数据 |
| 56 | + toastBool: false, //支付定金提示框 | ||
| 57 | + toastText: '', //支付定金提示文字 | ||
| 58 | + paymentId: '', //定金id | ||
| 57 | }, | 59 | }, |
| 58 | screenHeight: '', | 60 | screenHeight: '', |
| 59 | attentionAnim: {}, | 61 | attentionAnim: {}, |
| @@ -73,9 +75,6 @@ Page({ | @@ -73,9 +75,6 @@ Page({ | ||
| 73 | console.log(param); | 75 | console.log(param); |
| 74 | console.log(options); | 76 | console.log(options); |
| 75 | this.setData(param) | 77 | this.setData(param) |
| 76 | - if(options.paymentId){ | ||
| 77 | - this.getPaymentStatus(options.paymentId) | ||
| 78 | - } | ||
| 79 | mta.Page.init({ | 78 | mta.Page.init({ |
| 80 | "appID": "500667280", | 79 | "appID": "500667280", |
| 81 | "eventID": "500667287", | 80 | "eventID": "500667287", |
| @@ -139,6 +138,7 @@ Page({ | @@ -139,6 +138,7 @@ Page({ | ||
| 139 | onShow: function () { | 138 | onShow: function () { |
| 140 | this.getDetail() | 139 | this.getDetail() |
| 141 | this.getText() | 140 | this.getText() |
| 141 | + this.getPaymentStatus() | ||
| 142 | }, | 142 | }, |
| 143 | cli() { | 143 | cli() { |
| 144 | if (this.data.staffinfo.wechat) { | 144 | if (this.data.staffinfo.wechat) { |
| @@ -268,14 +268,16 @@ Page({ | @@ -268,14 +268,16 @@ Page({ | ||
| 268 | } | 268 | } |
| 269 | }) | 269 | }) |
| 270 | }, | 270 | }, |
| 271 | - // 通过定金ID查收定金详情 | ||
| 272 | - getPaymentStatus(id){ | ||
| 273 | - App.Reserve.GetReserveDepositByid({ | ||
| 274 | - id | ||
| 275 | - }).then(res=>{ | ||
| 276 | - if(res.ret == 200){ | 271 | + // 通过预订ID查收定金详情 |
| 272 | + getPaymentStatus() { | ||
| 273 | + App.Reserve.GetReserveDepositByRid({ | ||
| 274 | + rid: this.data.options.id | ||
| 275 | + }).then(res => { | ||
| 276 | + if (res.ret == 200 && res.data && res.data.length > 0) { | ||
| 277 | + let data = res.data[0]; | ||
| 277 | this.setData({ | 278 | this.setData({ |
| 278 | - paymentStatus:res.data.trade_state=='SUCCESS'?'1':'0' | 279 | + paymentId: data.id, |
| 280 | + paymentStatus: data.trade_state == 'SUCCESS' ? '1' : '0' | ||
| 279 | }) | 281 | }) |
| 280 | } | 282 | } |
| 281 | }) | 283 | }) |
| @@ -300,8 +302,9 @@ Page({ | @@ -300,8 +302,9 @@ Page({ | ||
| 300 | }, | 302 | }, |
| 301 | // 点击支付定金 | 303 | // 点击支付定金 |
| 302 | paymentFun() { | 304 | paymentFun() { |
| 305 | + let that = this; | ||
| 303 | App.PayOnline.CombineTransactionsByDeposit({ | 306 | App.PayOnline.CombineTransactionsByDeposit({ |
| 304 | - id: this.options.paymentId, | 307 | + id: this.data.paymentId, |
| 305 | openid: getApp().openid, | 308 | openid: getApp().openid, |
| 306 | }).then(res => { | 309 | }).then(res => { |
| 307 | if (res.ret == 200) { | 310 | if (res.ret == 200) { |
| @@ -312,28 +315,31 @@ Page({ | @@ -312,28 +315,31 @@ Page({ | ||
| 312 | signType: res.data.signType, | 315 | signType: res.data.signType, |
| 313 | paySign: res.data.paySign, | 316 | paySign: res.data.paySign, |
| 314 | success(ress) { | 317 | success(ress) { |
| 318 | + console.log('微信支付结果',ress); | ||
| 315 | if (ress.errMsg == 'requestPayment:ok') { | 319 | if (ress.errMsg == 'requestPayment:ok') { |
| 316 | console.log('支付成功', ress); | 320 | console.log('支付成功', ress); |
| 317 | - this.setData({ | ||
| 318 | - paymentStatus:'1' | ||
| 319 | - }) | ||
| 320 | - return wx.showToast({ | ||
| 321 | - title: '支付成功', | ||
| 322 | - icon: 'success' | 321 | + that.setData({ |
| 322 | + paymentStatus:'1', | ||
| 323 | + toastBool:true, | ||
| 324 | + toastText:'支付成功' | ||
| 323 | }) | 325 | }) |
| 326 | + that.hideToast(); | ||
| 327 | + return | ||
| 324 | } | 328 | } |
| 325 | - console.log('支付失败', ress); | ||
| 326 | - wx.showToast({ | ||
| 327 | - title: '支付失败,请重新支付', | ||
| 328 | - icon: 'none', | 329 | + console.log('支付失败1', ress); |
| 330 | + that.setData({ | ||
| 331 | + toastBool:true, | ||
| 332 | + toastText:'支付失败,请重新支付' | ||
| 329 | }) | 333 | }) |
| 334 | + that.hideToast(); | ||
| 330 | }, | 335 | }, |
| 331 | fail(ress) { | 336 | fail(ress) { |
| 332 | - console.log('支付失败', ress); | ||
| 333 | - wx.showToast({ | ||
| 334 | - title: '支付失败,请重新支付', | ||
| 335 | - icon: 'none', | 337 | + console.log('支付失败2', ress); |
| 338 | + that.setData({ | ||
| 339 | + toastBool:true, | ||
| 340 | + toastText:'支付失败,请重新支付' | ||
| 336 | }) | 341 | }) |
| 342 | + that.hideToast(); | ||
| 337 | }, | 343 | }, |
| 338 | }) | 344 | }) |
| 339 | }else{ | 345 | }else{ |
| @@ -344,6 +350,14 @@ Page({ | @@ -344,6 +350,14 @@ Page({ | ||
| 344 | } | 350 | } |
| 345 | }) | 351 | }) |
| 346 | }, | 352 | }, |
| 353 | + // 关闭支付失败或者成功弹框 | ||
| 354 | + hideToast() { | ||
| 355 | + setTimeout(()=> { | ||
| 356 | + this.setData({ | ||
| 357 | + toastBool:false | ||
| 358 | + }) | ||
| 359 | + }, 1500) | ||
| 360 | + }, | ||
| 347 | // 客户经理获取基本信息 | 361 | // 客户经理获取基本信息 |
| 348 | getstaffinfo(uid, sid) { | 362 | getstaffinfo(uid, sid) { |
| 349 | console.log('sellerid', this.data.detail.seller.id); | 363 | console.log('sellerid', this.data.detail.seller.id); |
| @@ -494,11 +508,6 @@ Page({ | @@ -494,11 +508,6 @@ Page({ | ||
| 494 | } | 508 | } |
| 495 | if (store && store.images && store.images.length > 0) store.images = util.determine(store.images); | 509 | if (store && store.images && store.images.length > 0) store.images = util.determine(store.images); |
| 496 | if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images); | 510 | if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images); |
| 497 | - if (marketing && marketing.is_online_book && marketing.is_online_book == '1' && marketing.is_transpond == '1') { | ||
| 498 | - this.setData({ | ||
| 499 | - between: true | ||
| 500 | - }) | ||
| 501 | - } | ||
| 502 | if (themeColor == 'turmeric' || themeColor == 'golden') { | 511 | if (themeColor == 'turmeric' || themeColor == 'golden') { |
| 503 | whiteBj = true | 512 | whiteBj = true |
| 504 | } else { | 513 | } else { |
| @@ -272,11 +272,12 @@ | @@ -272,11 +272,12 @@ | ||
| 272 | <view class="moreText">滑动查看更多</view> | 272 | <view class="moreText">滑动查看更多</view> |
| 273 | <image src="https://qn.colorcun.com/jt1.png" mode="" /> | 273 | <image src="https://qn.colorcun.com/jt1.png" mode="" /> |
| 274 | </view> | 274 | </view> |
| 275 | -</scroll-view> | ||
| 276 | -<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (options.paymentId && paymentStatus == '0')}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}"> | ||
| 277 | - <view wx:if="{{marketing.is_online_book=='1'}}" class="book-item-font second-book-button flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订 | 275 | + <view class="toastBox" wx:if="{{toastBool}}"> |
| 276 | + {{toastText}} | ||
| 278 | </view> | 277 | </view> |
| 279 | - <view wx:if="{{options.paymentId && paymentStatus == '0'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="paymentFun">支付定金</view> | ||
| 280 | - <button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人 | ||
| 281 | - </button> | 278 | +</scroll-view> |
| 279 | +<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="all-button flex-lr sharewidth"> | ||
| 280 | + <view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view> | ||
| 281 | + <view wx:if="{{paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view> | ||
| 282 | + <view wx:if="{{marketing.is_transpond=='1'}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</view> | ||
| 282 | </view> | 283 | </view> |
| @@ -587,59 +587,30 @@ | @@ -587,59 +587,30 @@ | ||
| 587 | justify-content: flex-end; | 587 | justify-content: flex-end; |
| 588 | } | 588 | } |
| 589 | 589 | ||
| 590 | -.between { | ||
| 591 | - justify-content: space-between; | ||
| 592 | -} | ||
| 593 | - | ||
| 594 | .centerBtn { | 590 | .centerBtn { |
| 595 | margin: 0 20rpx; | 591 | margin: 0 20rpx; |
| 596 | } | 592 | } |
| 597 | 593 | ||
| 598 | -.second-book-button { | ||
| 599 | - margin-right: 20rpx; | ||
| 600 | -} | ||
| 601 | - | ||
| 602 | -.book-item-font { | ||
| 603 | - width: 25%; | ||
| 604 | - border: 2rpx solid #0143A3; | 594 | +.shareItem, |
| 595 | +.moreBtn, | ||
| 596 | +.paymenBtn { | ||
| 597 | + width: inherit; | ||
| 598 | + margin: 0; | ||
| 599 | + background: #fafafa; | ||
| 605 | color: #0143A3; | 600 | color: #0143A3; |
| 601 | + border: 2rpx solid #0143A3; | ||
| 606 | height: 46%; | 602 | height: 46%; |
| 607 | border-radius: 42rpx; | 603 | border-radius: 42rpx; |
| 608 | font-weight: 600; | 604 | font-weight: 600; |
| 605 | + margin-right: 20rpx; | ||
| 609 | } | 606 | } |
| 610 | 607 | ||
| 611 | .shareItem { | 608 | .shareItem { |
| 612 | - width: 100%; | ||
| 613 | - margin: 0; | ||
| 614 | - background: #fafafa; | ||
| 615 | - color: #0143A3; | ||
| 616 | - border: 2rpx solid #0143A3; | ||
| 617 | -} | ||
| 618 | - | ||
| 619 | -.moreBtn{ | ||
| 620 | - width: 100%; | ||
| 621 | -} | ||
| 622 | - | ||
| 623 | -.sharewidth .moreBtn { | ||
| 624 | - width: 100% !important; | ||
| 625 | -} | ||
| 626 | - | ||
| 627 | -.between .shareItem { | ||
| 628 | - width: 65% !important; | ||
| 629 | - margin: 0; | 609 | + margin-right: 0; |
| 630 | background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); | 610 | background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); |
| 631 | color: #fff; | 611 | color: #fff; |
| 632 | } | 612 | } |
| 633 | 613 | ||
| 634 | -.sharewidth .shareItem { | ||
| 635 | - width: 100% !important; | ||
| 636 | -} | ||
| 637 | - | ||
| 638 | - | ||
| 639 | -.book-item-font { | ||
| 640 | - width: 40% !important; | ||
| 641 | -} | ||
| 642 | - | ||
| 643 | .menu-item { | 614 | .menu-item { |
| 644 | width: 100%; | 615 | width: 100%; |
| 645 | height: 100%; | 616 | height: 100%; |
| @@ -16,7 +16,6 @@ Page({ | @@ -16,7 +16,6 @@ Page({ | ||
| 16 | tableNum: 0, | 16 | tableNum: 0, |
| 17 | detail: {}, | 17 | detail: {}, |
| 18 | staffinfo: {}, | 18 | staffinfo: {}, |
| 19 | - between: false, | ||
| 20 | chef: {}, | 19 | chef: {}, |
| 21 | marketing: {}, | 20 | marketing: {}, |
| 22 | home: {}, | 21 | home: {}, |
| @@ -53,6 +52,9 @@ Page({ | @@ -53,6 +52,9 @@ Page({ | ||
| 53 | isPlay: '1', | 52 | isPlay: '1', |
| 54 | paymentStatus:'',//定金支付状态 1支付 0未支付 | 53 | paymentStatus:'',//定金支付状态 1支付 0未支付 |
| 55 | reserveData:{},//自定义图文数据 | 54 | reserveData:{},//自定义图文数据 |
| 55 | + toastBool: false, //支付定金提示框 | ||
| 56 | + toastText: '', //支付定金提示文字 | ||
| 57 | + paymentId: '', //定金id | ||
| 56 | }, | 58 | }, |
| 57 | tablestr: '', | 59 | tablestr: '', |
| 58 | urlsValue: [], | 60 | urlsValue: [], |
| @@ -74,9 +76,6 @@ Page({ | @@ -74,9 +76,6 @@ Page({ | ||
| 74 | console.log(param); | 76 | console.log(param); |
| 75 | console.log(options); | 77 | console.log(options); |
| 76 | this.setData(param) | 78 | this.setData(param) |
| 77 | - if(options.paymentId){ | ||
| 78 | - this.getPaymentStatus(options.paymentId) | ||
| 79 | - } | ||
| 80 | mta.Page.init({ | 79 | mta.Page.init({ |
| 81 | "appID": "500667280", | 80 | "appID": "500667280", |
| 82 | "eventID": "500667287", | 81 | "eventID": "500667287", |
| @@ -144,6 +143,7 @@ Page({ | @@ -144,6 +143,7 @@ Page({ | ||
| 144 | onShow: function () { | 143 | onShow: function () { |
| 145 | this.getDetail() | 144 | this.getDetail() |
| 146 | this.getText() | 145 | this.getText() |
| 146 | + this.getPaymentStatus() | ||
| 147 | }, | 147 | }, |
| 148 | // 复制微信号 | 148 | // 复制微信号 |
| 149 | copyWeChat() { | 149 | copyWeChat() { |
| @@ -315,14 +315,16 @@ Page({ | @@ -315,14 +315,16 @@ Page({ | ||
| 315 | } | 315 | } |
| 316 | }) | 316 | }) |
| 317 | }, | 317 | }, |
| 318 | - // 通过定金ID查收定金详情 | ||
| 319 | - getPaymentStatus(id){ | ||
| 320 | - App.Reserve.GetReserveDepositByid({ | ||
| 321 | - id | ||
| 322 | - }).then(res=>{ | ||
| 323 | - if(res.ret == 200){ | 318 | + // 通过预订ID查收定金详情 |
| 319 | + getPaymentStatus() { | ||
| 320 | + App.Reserve.GetReserveDepositByRid({ | ||
| 321 | + rid: this.data.options.id | ||
| 322 | + }).then(res => { | ||
| 323 | + if (res.ret == 200 && res.data && res.data.length > 0) { | ||
| 324 | + let data = res.data[0]; | ||
| 324 | this.setData({ | 325 | this.setData({ |
| 325 | - paymentStatus:res.data.trade_state=='SUCCESS'?'1':'0' | 326 | + paymentId: data.id, |
| 327 | + paymentStatus: data.trade_state == 'SUCCESS' ? '1' : '0' | ||
| 326 | }) | 328 | }) |
| 327 | } | 329 | } |
| 328 | }) | 330 | }) |
| @@ -347,8 +349,9 @@ Page({ | @@ -347,8 +349,9 @@ Page({ | ||
| 347 | }, | 349 | }, |
| 348 | // 点击支付定金 | 350 | // 点击支付定金 |
| 349 | paymentFun() { | 351 | paymentFun() { |
| 352 | + let that = this; | ||
| 350 | App.PayOnline.CombineTransactionsByDeposit({ | 353 | App.PayOnline.CombineTransactionsByDeposit({ |
| 351 | - id: this.options.paymentId, | 354 | + id: this.data.paymentId, |
| 352 | openid: getApp().openid, | 355 | openid: getApp().openid, |
| 353 | }).then(res => { | 356 | }).then(res => { |
| 354 | if (res.ret == 200) { | 357 | if (res.ret == 200) { |
| @@ -359,28 +362,31 @@ Page({ | @@ -359,28 +362,31 @@ Page({ | ||
| 359 | signType: res.data.signType, | 362 | signType: res.data.signType, |
| 360 | paySign: res.data.paySign, | 363 | paySign: res.data.paySign, |
| 361 | success(ress) { | 364 | success(ress) { |
| 365 | + console.log('微信支付结果',ress); | ||
| 362 | if (ress.errMsg == 'requestPayment:ok') { | 366 | if (ress.errMsg == 'requestPayment:ok') { |
| 363 | console.log('支付成功', ress); | 367 | console.log('支付成功', ress); |
| 364 | - this.setData({ | ||
| 365 | - paymentStatus:'1' | ||
| 366 | - }) | ||
| 367 | - return wx.showToast({ | ||
| 368 | - title: '支付成功', | ||
| 369 | - icon: 'success' | 368 | + that.setData({ |
| 369 | + paymentStatus:'1', | ||
| 370 | + toastBool:true, | ||
| 371 | + toastText:'支付成功' | ||
| 370 | }) | 372 | }) |
| 373 | + that.hideToast(); | ||
| 374 | + return | ||
| 371 | } | 375 | } |
| 372 | - console.log('支付失败', ress); | ||
| 373 | - wx.showToast({ | ||
| 374 | - title: '支付失败,请重新支付', | ||
| 375 | - icon: 'none', | 376 | + console.log('支付失败1', ress); |
| 377 | + that.setData({ | ||
| 378 | + toastBool:true, | ||
| 379 | + toastText:'支付失败,请重新支付' | ||
| 376 | }) | 380 | }) |
| 381 | + that.hideToast(); | ||
| 377 | }, | 382 | }, |
| 378 | fail(ress) { | 383 | fail(ress) { |
| 379 | - console.log('支付失败', ress); | ||
| 380 | - wx.showToast({ | ||
| 381 | - title: '支付失败,请重新支付', | ||
| 382 | - icon: 'none', | 384 | + console.log('支付失败2', ress); |
| 385 | + that.setData({ | ||
| 386 | + toastBool:true, | ||
| 387 | + toastText:'支付失败,请重新支付' | ||
| 383 | }) | 388 | }) |
| 389 | + that.hideToast(); | ||
| 384 | }, | 390 | }, |
| 385 | }) | 391 | }) |
| 386 | }else{ | 392 | }else{ |
| @@ -391,6 +397,14 @@ Page({ | @@ -391,6 +397,14 @@ Page({ | ||
| 391 | } | 397 | } |
| 392 | }) | 398 | }) |
| 393 | }, | 399 | }, |
| 400 | + // 关闭支付失败或者成功弹框 | ||
| 401 | + hideToast() { | ||
| 402 | + setTimeout(()=> { | ||
| 403 | + this.setData({ | ||
| 404 | + toastBool:false | ||
| 405 | + }) | ||
| 406 | + }, 1500) | ||
| 407 | + }, | ||
| 394 | // 客户经理获取基本信息 | 408 | // 客户经理获取基本信息 |
| 395 | getstaffinfo(uid, sid) { | 409 | getstaffinfo(uid, sid) { |
| 396 | console.log('sellerid', this.data.detail.seller.id); | 410 | console.log('sellerid', this.data.detail.seller.id); |
| @@ -545,11 +559,6 @@ Page({ | @@ -545,11 +559,6 @@ Page({ | ||
| 545 | } | 559 | } |
| 546 | if (store && store.images && store.images.length > 0) store.images = util.determine(store.images); | 560 | if (store && store.images && store.images.length > 0) store.images = util.determine(store.images); |
| 547 | if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images); | 561 | if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images); |
| 548 | - if (marketing && marketing.is_online_book && marketing.is_online_book == '1' && marketing.is_transpond == '1') { | ||
| 549 | - this.setData({ | ||
| 550 | - between: true | ||
| 551 | - }) | ||
| 552 | - } | ||
| 553 | this.setData({ | 562 | this.setData({ |
| 554 | chef, | 563 | chef, |
| 555 | marketing, | 564 | marketing, |
| @@ -215,11 +215,12 @@ | @@ -215,11 +215,12 @@ | ||
| 215 | <view class="moreText">滑动查看更多</view> | 215 | <view class="moreText">滑动查看更多</view> |
| 216 | <image src="https://qn.colorcun.com/jt1.png" mode="" /> | 216 | <image src="https://qn.colorcun.com/jt1.png" mode="" /> |
| 217 | </view> | 217 | </view> |
| 218 | -</scroll-view> | ||
| 219 | -<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (options.paymentId && paymentStatus == '0')}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}"> | ||
| 220 | - <view wx:if="{{marketing.is_online_book=='1'}}" class="book-item-font second-book-button flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订 | 218 | + <view class="toastBox" wx:if="{{toastBool}}"> |
| 219 | + {{toastText}} | ||
| 221 | </view> | 220 | </view> |
| 222 | - <view wx:if="{{options.paymentId && paymentStatus == '0'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="paymentFun">支付定金</view> | ||
| 223 | - <button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人 | ||
| 224 | - </button> | 221 | +</scroll-view> |
| 222 | +<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="all-button flex-lr sharewidth"> | ||
| 223 | + <view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view> | ||
| 224 | + <view wx:if="{{paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view> | ||
| 225 | + <view wx:if="{{marketing.is_transpond=='1'}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</view> | ||
| 225 | </view> | 226 | </view> |
| @@ -418,62 +418,30 @@ | @@ -418,62 +418,30 @@ | ||
| 418 | justify-content: flex-end; | 418 | justify-content: flex-end; |
| 419 | } | 419 | } |
| 420 | 420 | ||
| 421 | -.between { | ||
| 422 | - justify-content: space-between; | ||
| 423 | -} | ||
| 424 | - | ||
| 425 | .centerBtn { | 421 | .centerBtn { |
| 426 | margin: 0 20rpx; | 422 | margin: 0 20rpx; |
| 427 | } | 423 | } |
| 428 | 424 | ||
| 429 | -.second-book-button { | ||
| 430 | - margin-right: 20rpx; | ||
| 431 | -} | ||
| 432 | - | ||
| 433 | -.book-item-font { | ||
| 434 | - width: 25%; | ||
| 435 | - border: 2rpx solid #0143A3; | 425 | +.shareItem, |
| 426 | +.moreBtn, | ||
| 427 | +.paymenBtn { | ||
| 428 | + width: inherit; | ||
| 429 | + margin: 0; | ||
| 430 | + background: #fafafa; | ||
| 436 | color: #0143A3; | 431 | color: #0143A3; |
| 432 | + border: 2rpx solid #0143A3; | ||
| 437 | height: 46%; | 433 | height: 46%; |
| 438 | border-radius: 42rpx; | 434 | border-radius: 42rpx; |
| 439 | font-weight: 600; | 435 | font-weight: 600; |
| 436 | + margin-right: 20rpx; | ||
| 440 | } | 437 | } |
| 441 | 438 | ||
| 442 | .shareItem { | 439 | .shareItem { |
| 443 | - width: 100%; | ||
| 444 | - margin: 0; | ||
| 445 | - background: #fafafa; | ||
| 446 | - color: #0143A3; | ||
| 447 | - border: 2rpx solid #0143A3; | ||
| 448 | -} | ||
| 449 | - | ||
| 450 | -.moreBtn{ | ||
| 451 | - width: 100%; | ||
| 452 | -} | ||
| 453 | - | ||
| 454 | -.sharewidth .moreBtn { | ||
| 455 | - width: 100% !important; | ||
| 456 | -} | ||
| 457 | - | ||
| 458 | -.between .shareItem { | ||
| 459 | - width: 100%; | ||
| 460 | - margin: 0; | 440 | + margin-right: 0; |
| 461 | background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); | 441 | background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); |
| 462 | color: #fff; | 442 | color: #fff; |
| 463 | } | 443 | } |
| 464 | 444 | ||
| 465 | -.sharewidth .shareItem { | ||
| 466 | - width: 100% !important; | ||
| 467 | -} | ||
| 468 | - | ||
| 469 | -.between .shareItem { | ||
| 470 | - width: 65% !important; | ||
| 471 | -} | ||
| 472 | - | ||
| 473 | -.book-item-font { | ||
| 474 | - width: 40% !important; | ||
| 475 | -} | ||
| 476 | - | ||
| 477 | .menu-item { | 445 | .menu-item { |
| 478 | width: 100%; | 446 | width: 100%; |
| 479 | height: 100%; | 447 | height: 100%; |
| @@ -16,7 +16,6 @@ Page({ | @@ -16,7 +16,6 @@ Page({ | ||
| 16 | tableNum: 0, | 16 | tableNum: 0, |
| 17 | detail: {}, | 17 | detail: {}, |
| 18 | staffinfo: {}, | 18 | staffinfo: {}, |
| 19 | - between: false, | ||
| 20 | chef: {}, | 19 | chef: {}, |
| 21 | marketing: {}, | 20 | marketing: {}, |
| 22 | home: {}, | 21 | home: {}, |
| @@ -53,6 +52,9 @@ Page({ | @@ -53,6 +52,9 @@ Page({ | ||
| 53 | isPlay: '1', | 52 | isPlay: '1', |
| 54 | paymentStatus:'',//定金支付状态 1支付 0未支付 | 53 | paymentStatus:'',//定金支付状态 1支付 0未支付 |
| 55 | reserveData:{},//自定义图文数据 | 54 | reserveData:{},//自定义图文数据 |
| 55 | + toastBool: false, //支付定金提示框 | ||
| 56 | + toastText: '', //支付定金提示文字 | ||
| 57 | + paymentId: '', //定金id | ||
| 56 | }, | 58 | }, |
| 57 | tablestr: '', | 59 | tablestr: '', |
| 58 | urlsValue: [], | 60 | urlsValue: [], |
| @@ -74,9 +76,6 @@ Page({ | @@ -74,9 +76,6 @@ Page({ | ||
| 74 | console.log(param); | 76 | console.log(param); |
| 75 | console.log(options); | 77 | console.log(options); |
| 76 | this.setData(param) | 78 | this.setData(param) |
| 77 | - if(options.paymentId){ | ||
| 78 | - this.getPaymentStatus(options.paymentId) | ||
| 79 | - } | ||
| 80 | mta.Page.init({ | 79 | mta.Page.init({ |
| 81 | "appID": "500667280", | 80 | "appID": "500667280", |
| 82 | "eventID": "500667287", | 81 | "eventID": "500667287", |
| @@ -144,6 +143,7 @@ Page({ | @@ -144,6 +143,7 @@ Page({ | ||
| 144 | onShow: function () { | 143 | onShow: function () { |
| 145 | this.getDetail() | 144 | this.getDetail() |
| 146 | this.getText() | 145 | this.getText() |
| 146 | + this.getPaymentStatus() | ||
| 147 | }, | 147 | }, |
| 148 | // 复制微信号 | 148 | // 复制微信号 |
| 149 | copyWeChat() { | 149 | copyWeChat() { |
| @@ -314,14 +314,16 @@ Page({ | @@ -314,14 +314,16 @@ Page({ | ||
| 314 | } | 314 | } |
| 315 | }) | 315 | }) |
| 316 | }, | 316 | }, |
| 317 | - // 通过定金ID查收定金详情 | ||
| 318 | - getPaymentStatus(id){ | ||
| 319 | - App.Reserve.GetReserveDepositByid({ | ||
| 320 | - id | ||
| 321 | - }).then(res=>{ | ||
| 322 | - if(res.ret == 200){ | 317 | + // 通过预订ID查收定金详情 |
| 318 | + getPaymentStatus() { | ||
| 319 | + App.Reserve.GetReserveDepositByRid({ | ||
| 320 | + rid: this.data.options.id | ||
| 321 | + }).then(res => { | ||
| 322 | + if (res.ret == 200 && res.data && res.data.length > 0) { | ||
| 323 | + let data = res.data[0]; | ||
| 323 | this.setData({ | 324 | this.setData({ |
| 324 | - paymentStatus:res.data.trade_state=='SUCCESS'?'1':'0' | 325 | + paymentId: data.id, |
| 326 | + paymentStatus: data.trade_state == 'SUCCESS' ? '1' : '0' | ||
| 325 | }) | 327 | }) |
| 326 | } | 328 | } |
| 327 | }) | 329 | }) |
| @@ -346,8 +348,9 @@ Page({ | @@ -346,8 +348,9 @@ Page({ | ||
| 346 | }, | 348 | }, |
| 347 | // 点击支付定金 | 349 | // 点击支付定金 |
| 348 | paymentFun() { | 350 | paymentFun() { |
| 351 | + let that = this; | ||
| 349 | App.PayOnline.CombineTransactionsByDeposit({ | 352 | App.PayOnline.CombineTransactionsByDeposit({ |
| 350 | - id: this.options.paymentId, | 353 | + id: this.data.paymentId, |
| 351 | openid: getApp().openid, | 354 | openid: getApp().openid, |
| 352 | }).then(res => { | 355 | }).then(res => { |
| 353 | if (res.ret == 200) { | 356 | if (res.ret == 200) { |
| @@ -358,28 +361,31 @@ Page({ | @@ -358,28 +361,31 @@ Page({ | ||
| 358 | signType: res.data.signType, | 361 | signType: res.data.signType, |
| 359 | paySign: res.data.paySign, | 362 | paySign: res.data.paySign, |
| 360 | success(ress) { | 363 | success(ress) { |
| 364 | + console.log('微信支付结果',ress); | ||
| 361 | if (ress.errMsg == 'requestPayment:ok') { | 365 | if (ress.errMsg == 'requestPayment:ok') { |
| 362 | console.log('支付成功', ress); | 366 | console.log('支付成功', ress); |
| 363 | - this.setData({ | ||
| 364 | - paymentStatus:'1' | ||
| 365 | - }) | ||
| 366 | - return wx.showToast({ | ||
| 367 | - title: '支付成功', | ||
| 368 | - icon: 'success' | 367 | + that.setData({ |
| 368 | + paymentStatus:'1', | ||
| 369 | + toastBool:true, | ||
| 370 | + toastText:'支付成功' | ||
| 369 | }) | 371 | }) |
| 372 | + that.hideToast(); | ||
| 373 | + return | ||
| 370 | } | 374 | } |
| 371 | - console.log('支付失败', ress); | ||
| 372 | - wx.showToast({ | ||
| 373 | - title: '支付失败,请重新支付', | ||
| 374 | - icon: 'none', | 375 | + console.log('支付失败1', ress); |
| 376 | + that.setData({ | ||
| 377 | + toastBool:true, | ||
| 378 | + toastText:'支付失败,请重新支付' | ||
| 375 | }) | 379 | }) |
| 380 | + that.hideToast(); | ||
| 376 | }, | 381 | }, |
| 377 | fail(ress) { | 382 | fail(ress) { |
| 378 | - console.log('支付失败', ress); | ||
| 379 | - wx.showToast({ | ||
| 380 | - title: '支付失败,请重新支付', | ||
| 381 | - icon: 'none', | 383 | + console.log('支付失败2', ress); |
| 384 | + that.setData({ | ||
| 385 | + toastBool:true, | ||
| 386 | + toastText:'支付失败,请重新支付' | ||
| 382 | }) | 387 | }) |
| 388 | + that.hideToast(); | ||
| 383 | }, | 389 | }, |
| 384 | }) | 390 | }) |
| 385 | }else{ | 391 | }else{ |
| @@ -390,6 +396,14 @@ Page({ | @@ -390,6 +396,14 @@ Page({ | ||
| 390 | } | 396 | } |
| 391 | }) | 397 | }) |
| 392 | }, | 398 | }, |
| 399 | + // 关闭支付失败或者成功弹框 | ||
| 400 | + hideToast() { | ||
| 401 | + setTimeout(()=> { | ||
| 402 | + this.setData({ | ||
| 403 | + toastBool:false | ||
| 404 | + }) | ||
| 405 | + }, 1500) | ||
| 406 | + }, | ||
| 393 | // 客户经理获取基本信息 | 407 | // 客户经理获取基本信息 |
| 394 | getstaffinfo(uid, sid) { | 408 | getstaffinfo(uid, sid) { |
| 395 | console.log('sellerid', this.data.detail.seller.id); | 409 | console.log('sellerid', this.data.detail.seller.id); |
| @@ -544,11 +558,6 @@ Page({ | @@ -544,11 +558,6 @@ Page({ | ||
| 544 | } | 558 | } |
| 545 | if (store && store.images && store.images.length > 0) store.images = util.determine(store.images); | 559 | if (store && store.images && store.images.length > 0) store.images = util.determine(store.images); |
| 546 | if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images); | 560 | if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images); |
| 547 | - if (marketing && marketing.is_online_book && marketing.is_online_book == '1' && marketing.is_transpond == '1') { | ||
| 548 | - this.setData({ | ||
| 549 | - between: true | ||
| 550 | - }) | ||
| 551 | - } | ||
| 552 | this.setData({ | 561 | this.setData({ |
| 553 | chef, | 562 | chef, |
| 554 | marketing, | 563 | marketing, |
| @@ -202,11 +202,12 @@ | @@ -202,11 +202,12 @@ | ||
| 202 | <view class="moreText">滑动查看更多</view> | 202 | <view class="moreText">滑动查看更多</view> |
| 203 | <image src="https://qn.colorcun.com/jt1.png" mode="" /> | 203 | <image src="https://qn.colorcun.com/jt1.png" mode="" /> |
| 204 | </view> | 204 | </view> |
| 205 | -</scroll-view> | ||
| 206 | -<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (options.paymentId && paymentStatus == '0')}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}"> | ||
| 207 | - <view wx:if="{{marketing.is_online_book=='1'}}" class="book-item-font second-book-button flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订 | 205 | + <view class="toastBox" wx:if="{{toastBool}}"> |
| 206 | + {{toastText}} | ||
| 208 | </view> | 207 | </view> |
| 209 | - <view wx:if="{{options.paymentId && paymentStatus == '0'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="paymentFun">支付定金</view> | ||
| 210 | - <button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人 | ||
| 211 | - </button> | 208 | +</scroll-view> |
| 209 | +<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="all-button flex-lr sharewidth"> | ||
| 210 | + <view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view> | ||
| 211 | + <view wx:if="{{paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view> | ||
| 212 | + <view wx:if="{{marketing.is_transpond=='1'}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</view> | ||
| 212 | </view> | 213 | </view> |
| @@ -187,10 +187,10 @@ | @@ -187,10 +187,10 @@ | ||
| 187 | margin-left: 10rpx; | 187 | margin-left: 10rpx; |
| 188 | height: 54rpx !important; | 188 | height: 54rpx !important; |
| 189 | border: 2rpx solid #0143A3; | 189 | border: 2rpx solid #0143A3; |
| 190 | - color: #0143A3; | ||
| 191 | - height: 54rpx !important; | ||
| 192 | - border-radius: 42rpx; | ||
| 193 | - font-weight: 600; | 190 | + color: #0143A3; |
| 191 | + height: 54rpx !important; | ||
| 192 | + border-radius: 42rpx; | ||
| 193 | + font-weight: 600; | ||
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | .positioning .name text { | 196 | .positioning .name text { |
| @@ -263,7 +263,7 @@ | @@ -263,7 +263,7 @@ | ||
| 263 | width: 100%; | 263 | width: 100%; |
| 264 | margin-bottom: 20rpx; | 264 | margin-bottom: 20rpx; |
| 265 | display: block !important; | 265 | display: block !important; |
| 266 | - vertical-align: top; | 266 | + vertical-align: top; |
| 267 | } | 267 | } |
| 268 | 268 | ||
| 269 | .famousChefBox { | 269 | .famousChefBox { |
| @@ -436,62 +436,30 @@ | @@ -436,62 +436,30 @@ | ||
| 436 | justify-content: flex-end; | 436 | justify-content: flex-end; |
| 437 | } | 437 | } |
| 438 | 438 | ||
| 439 | -.between { | ||
| 440 | - justify-content: space-between; | ||
| 441 | -} | ||
| 442 | - | ||
| 443 | .centerBtn { | 439 | .centerBtn { |
| 444 | margin: 0 20rpx; | 440 | margin: 0 20rpx; |
| 445 | } | 441 | } |
| 446 | 442 | ||
| 447 | -.second-book-button { | ||
| 448 | - margin-right: 20rpx; | ||
| 449 | -} | ||
| 450 | - | ||
| 451 | -.book-item-font { | ||
| 452 | - width: 25%; | ||
| 453 | - border: 2rpx solid #0143A3; | 443 | +.shareItem, |
| 444 | +.moreBtn, | ||
| 445 | +.paymenBtn { | ||
| 446 | + width: inherit; | ||
| 447 | + margin: 0; | ||
| 448 | + background: #fafafa; | ||
| 454 | color: #0143A3; | 449 | color: #0143A3; |
| 450 | + border: 2rpx solid #0143A3; | ||
| 455 | height: 46%; | 451 | height: 46%; |
| 456 | border-radius: 42rpx; | 452 | border-radius: 42rpx; |
| 457 | font-weight: 600; | 453 | font-weight: 600; |
| 454 | + margin-right: 20rpx; | ||
| 458 | } | 455 | } |
| 459 | 456 | ||
| 460 | .shareItem { | 457 | .shareItem { |
| 461 | - width: 100%; | ||
| 462 | - margin: 0; | ||
| 463 | - background: #fafafa; | ||
| 464 | - color: #0143A3; | ||
| 465 | - border: 2rpx solid #0143A3; | ||
| 466 | -} | ||
| 467 | - | ||
| 468 | -.moreBtn{ | ||
| 469 | - width: 100%; | ||
| 470 | -} | ||
| 471 | - | ||
| 472 | -.sharewidth .moreBtn { | ||
| 473 | - width: 100% !important; | ||
| 474 | -} | ||
| 475 | - | ||
| 476 | -.between .shareItem { | ||
| 477 | - width: 100%; | ||
| 478 | - margin: 0; | 458 | + margin-right: 0; |
| 479 | background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); | 459 | background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); |
| 480 | color: #fff; | 460 | color: #fff; |
| 481 | } | 461 | } |
| 482 | 462 | ||
| 483 | -.sharewidth .shareItem { | ||
| 484 | - width: 100% !important; | ||
| 485 | -} | ||
| 486 | - | ||
| 487 | -.between .shareItem { | ||
| 488 | - width: 65% !important; | ||
| 489 | -} | ||
| 490 | - | ||
| 491 | -.book-item-font { | ||
| 492 | - width: 40% !important; | ||
| 493 | -} | ||
| 494 | - | ||
| 495 | .menu-item { | 463 | .menu-item { |
| 496 | width: 100%; | 464 | width: 100%; |
| 497 | height: 100%; | 465 | height: 100%; |
| @@ -531,16 +499,17 @@ | @@ -531,16 +499,17 @@ | ||
| 531 | font-size: 28rpx; | 499 | font-size: 28rpx; |
| 532 | } | 500 | } |
| 533 | 501 | ||
| 534 | -.reserveBox{ | 502 | +.reserveBox { |
| 535 | margin: 20rpx 40rpx 0 40rpx; | 503 | margin: 20rpx 40rpx 0 40rpx; |
| 536 | } | 504 | } |
| 537 | -.reserveBox .title{ | 505 | + |
| 506 | +.reserveBox .title { | ||
| 538 | margin-bottom: 20rpx; | 507 | margin-bottom: 20rpx; |
| 539 | color: #000; | 508 | color: #000; |
| 540 | font-family: PingFang SC; | 509 | font-family: PingFang SC; |
| 541 | } | 510 | } |
| 542 | 511 | ||
| 543 | -.reserveBox .items{ | 512 | +.reserveBox .items { |
| 544 | margin-bottom: 20rpx; | 513 | margin-bottom: 20rpx; |
| 545 | color: #000; | 514 | color: #000; |
| 546 | font-family: PingFang SC; | 515 | font-family: PingFang SC; |
| @@ -656,7 +625,7 @@ | @@ -656,7 +625,7 @@ | ||
| 656 | margin-top: 20rpx; | 625 | margin-top: 20rpx; |
| 657 | } | 626 | } |
| 658 | 627 | ||
| 659 | -.musicImg{ | 628 | +.musicImg { |
| 660 | width: 62rpx; | 629 | width: 62rpx; |
| 661 | height: 62rpx; | 630 | height: 62rpx; |
| 662 | position: fixed !important; | 631 | position: fixed !important; |
| @@ -665,7 +634,7 @@ | @@ -665,7 +634,7 @@ | ||
| 665 | z-index: 200; | 634 | z-index: 200; |
| 666 | } | 635 | } |
| 667 | 636 | ||
| 668 | -.bookData{ | 637 | +.bookData { |
| 669 | margin-left: 0; | 638 | margin-left: 0; |
| 670 | } | 639 | } |
| 671 | 640 | ||
| @@ -833,4 +802,18 @@ | @@ -833,4 +802,18 @@ | ||
| 833 | 802 | ||
| 834 | .businessBox text { | 803 | .businessBox text { |
| 835 | color: #0143A3; | 804 | color: #0143A3; |
| 805 | +} | ||
| 806 | + | ||
| 807 | +.toastBox { | ||
| 808 | + width: fit-content; | ||
| 809 | + position: fixed; | ||
| 810 | + padding: 30rpx; | ||
| 811 | + color: #fff; | ||
| 812 | + background: rgba(0, 0, 0, .7); | ||
| 813 | + font-size: 28rpx; | ||
| 814 | + border-radius: 10rpx; | ||
| 815 | + left: 50%; | ||
| 816 | + z-index: 999; | ||
| 817 | + top: 50%; | ||
| 818 | + transform: translate(-50%, -50%); | ||
| 836 | } | 819 | } |
| @@ -741,8 +741,8 @@ export default { | @@ -741,8 +741,8 @@ export default { | ||
| 741 | openid:'openid' | 741 | openid:'openid' |
| 742 | }, | 742 | }, |
| 743 | 743 | ||
| 744 | - // 通过定金ID查收定金详情 | ||
| 745 | - 'App.Reserve.GetReserveDepositByid':{ | 744 | + // 通过预订ID查收定金详情 |
| 745 | + 'App.Reserve.GetReserveDepositByRid':{ | ||
| 746 | openid:'openid' | 746 | openid:'openid' |
| 747 | }, | 747 | }, |
| 748 | 748 |
-
Please register or login to post a comment