Commit c1663ffdac480ee9eda4eb9caaba83e3cdfd73ce

Authored by vking
1 parent 4f3c3ed8

pay

... ... @@ -30,20 +30,21 @@ Page({
*/
onShow: function () {
this.GetCheckout()
this.GetOrderInfoRun()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
this.GetOrderInfoStop()
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
this.GetOrderInfoStop()
},
/**
... ... @@ -102,4 +103,18 @@ Page({
})
})
},
GetOrderInfoInterval:null,
GetOrderInfoRun(){
if(!this.GetOrderInfoInterval){
setInterval(()=>{
this.GetCheckout()
},15000)
}
},
GetOrderInfoStop(){
if(this.GetOrderInfoInterval){
clearInterval(this.GetOrderInfoInterval)
this.GetOrderInfoInterval=null
}
},
})
\ No newline at end of file
... ...
... ... @@ -6,16 +6,16 @@
<jinduBar checkout="{{checkout}}"></jinduBar>
</view>
<!--//买单相关(可选)-->
<block wx:if="{{checkout.status<1}}">
<block wx:if="{{true || checkout.status<1}}">
<view class="content checkout">
<view class="title">买单相关(可选)</view>
<view class="item flex-lr">
<view>剩余酒水饮料需要退</view>
<switch color="#C0A369" bindchange="checkoutData" data-type="is_wine"/>
<checkbox color="#ffffff" checked bindchange="checkoutData" data-type="is_wine"/>
</view>
<view class="item flex-lr">
<view>菜品打包</view>
<switch color="#C0A369" bindchange="checkoutData" data-type="is_pack"/>
<checkbox color="#ffffff" bindchange="checkoutData" data-type="is_pack"/>
</view>
</view>
<view class="checkout-get" bindtap="checkoutInit">获取消费金额</view>
... ...
... ... @@ -110,4 +110,23 @@ page{
border-top: 2rpx solid #F1F0F4;
margin-top: 20rpx;
padding-top: 20rpx;
}
/* 选中后的 对勾样式 (白色对勾 可根据UI需求自己修改) */
checkbox .wx-checkbox-input {
width: 48rpx;
height: 48rpx;
border-radius:8rpx;
border-width: 0;
margin: 0;
padding: 0;
background-image: url("http://qn.colorcun.com/checkout/images/checkbox.png");
background-size: 48rpx auto;
}
checkbox .wx-checkbox-input.wx-checkbox-input-checked{
background-position: 0 -48rpx;
}
checkbox .wx-checkbox-input.wx-checkbox-input-checked:before{
content: "";
}
\ No newline at end of file
... ...