Commit c1663ffdac480ee9eda4eb9caaba83e3cdfd73ce

Authored by vking
1 parent 4f3c3ed8

pay

@@ -30,20 +30,21 @@ Page({ @@ -30,20 +30,21 @@ Page({
30 */ 30 */
31 onShow: function () { 31 onShow: function () {
32 this.GetCheckout() 32 this.GetCheckout()
  33 + this.GetOrderInfoRun()
33 }, 34 },
34 35
35 /** 36 /**
36 * 生命周期函数--监听页面隐藏 37 * 生命周期函数--监听页面隐藏
37 */ 38 */
38 onHide: function () { 39 onHide: function () {
39 - 40 + this.GetOrderInfoStop()
40 }, 41 },
41 42
42 /** 43 /**
43 * 生命周期函数--监听页面卸载 44 * 生命周期函数--监听页面卸载
44 */ 45 */
45 onUnload: function () { 46 onUnload: function () {
46 - 47 + this.GetOrderInfoStop()
47 }, 48 },
48 49
49 /** 50 /**
@@ -102,4 +103,18 @@ Page({ @@ -102,4 +103,18 @@ Page({
102 }) 103 })
103 }) 104 })
104 }, 105 },
  106 + GetOrderInfoInterval:null,
  107 + GetOrderInfoRun(){
  108 + if(!this.GetOrderInfoInterval){
  109 + setInterval(()=>{
  110 + this.GetCheckout()
  111 + },15000)
  112 + }
  113 + },
  114 + GetOrderInfoStop(){
  115 + if(this.GetOrderInfoInterval){
  116 + clearInterval(this.GetOrderInfoInterval)
  117 + this.GetOrderInfoInterval=null
  118 + }
  119 + },
105 }) 120 })
@@ -6,16 +6,16 @@ @@ -6,16 +6,16 @@
6 <jinduBar checkout="{{checkout}}"></jinduBar> 6 <jinduBar checkout="{{checkout}}"></jinduBar>
7 </view> 7 </view>
8 <!--//买单相关(可选)--> 8 <!--//买单相关(可选)-->
9 - <block wx:if="{{checkout.status<1}}"> 9 + <block wx:if="{{true || checkout.status<1}}">
10 <view class="content checkout"> 10 <view class="content checkout">
11 <view class="title">买单相关(可选)</view> 11 <view class="title">买单相关(可选)</view>
12 <view class="item flex-lr"> 12 <view class="item flex-lr">
13 <view>剩余酒水饮料需要退</view> 13 <view>剩余酒水饮料需要退</view>
14 - <switch color="#C0A369" bindchange="checkoutData" data-type="is_wine"/> 14 + <checkbox color="#ffffff" checked bindchange="checkoutData" data-type="is_wine"/>
15 </view> 15 </view>
16 <view class="item flex-lr"> 16 <view class="item flex-lr">
17 <view>菜品打包</view> 17 <view>菜品打包</view>
18 - <switch color="#C0A369" bindchange="checkoutData" data-type="is_pack"/> 18 + <checkbox color="#ffffff" bindchange="checkoutData" data-type="is_pack"/>
19 </view> 19 </view>
20 </view> 20 </view>
21 <view class="checkout-get" bindtap="checkoutInit">获取消费金额</view> 21 <view class="checkout-get" bindtap="checkoutInit">获取消费金额</view>
@@ -110,4 +110,23 @@ page{ @@ -110,4 +110,23 @@ page{
110 border-top: 2rpx solid #F1F0F4; 110 border-top: 2rpx solid #F1F0F4;
111 margin-top: 20rpx; 111 margin-top: 20rpx;
112 padding-top: 20rpx; 112 padding-top: 20rpx;
  113 +}
  114 +
  115 +/* 选中后的 对勾样式 (白色对勾 可根据UI需求自己修改) */
  116 +checkbox .wx-checkbox-input {
  117 + width: 48rpx;
  118 + height: 48rpx;
  119 + border-radius:8rpx;
  120 + border-width: 0;
  121 + margin: 0;
  122 + padding: 0;
  123 + background-image: url("http://qn.colorcun.com/checkout/images/checkbox.png");
  124 + background-size: 48rpx auto;
  125 +
  126 +}
  127 +checkbox .wx-checkbox-input.wx-checkbox-input-checked{
  128 + background-position: 0 -48rpx;
  129 +}
  130 +checkbox .wx-checkbox-input.wx-checkbox-input-checked:before{
  131 + content: "";
113 } 132 }