Commit eaf3334d5663505ba3349215cd44584dfb098aea

Authored by vking
1 parent 6139f750

pay

... ... @@ -7,6 +7,7 @@ const properties={
confirmColor:{type:String,value:'#fff'},
header:{type:String,value:'确认信息'},
body:{type:String,value:'确认信息'},
cla:String,
};
Component({
options: {
... ...
<!--components/showModal/showModal.wxml-->
<view class="mask flex-vc" hidden="{{!hasShow}}">
<view class="mask flex-vc {{cla}}" hidden="{{!hasShow}}">
<view class="showModal">
<view class="header">
{{opt.header}}
... ...
... ... @@ -57,4 +57,22 @@
.footer .button-none.confirm{
}
.footer .button-none.cancel{
}
.checkout .body{
font-size:32rpx;
font-weight:500;
color:rgba(53,53,53,1);
line-height:44rpx;
margin-top: 32rpx;
}
.checkout .confirm{
width:320rpx;
height:80rpx;
background:rgba(36,35,32,1);
border-radius:10rpx;
font-size:32rpx;
font-family:PingFangSC-Semibold,PingFang SC;
font-weight:600;
color:rgba(255,255,255,1);
line-height:80rpx;
}
\ No newline at end of file
... ...
... ... @@ -125,6 +125,8 @@ Page({
this.setData({
firstShowMsg:firstShowMsg,
})
this.GetBalance()//余额
this.GetCheckout()//账单
}
})
},
... ... @@ -298,5 +300,31 @@ Page({
wx.setStorageSync('order', 'complete')
}
console.log(pages)
}
},
GetBalance(){//获得余额
App.User.GetBalance().then(res=>{
this.setData({
user:res.data
})
})
},
GetCheckout(){
App.Customer.GetOrderInfo({rid:this.options.id}).then(res=>{
this.setData({
checkout:res.data
})
})
},
checkout(){
if(this.data.detail.status==0){
this.selectComponent('#showModal').options({
header: '未到就餐时间',
body: '到店就餐时,可提前买单'
}).show();
}else{
wx.navigateTo({
url:'/pack-checkout/pages/index?rid='+this.data.detail.id
})
}
},
})
\ No newline at end of file
... ...
... ... @@ -13,6 +13,7 @@
"getpos":"/components/userinfo/getpos",
"as":"/components/actionSheet/index",
"subscribe": "/components/userinfo/subscribe",
"activity-enter":"/components/activity/enter"
"activity-enter":"/components/activity/enter",
"showModal":"/components/tips/showModal/showModal"
}
}
\ No newline at end of file
... ...
... ... @@ -42,6 +42,18 @@
<subscribe class="flex-lr share-view subscribe" ids="{{[0]}}">
<view class="share-but">提醒我包间预订结果</view>
</subscribe>
<view class="flex-lr share-view-cookbook">
<userinfo
binduserinfo="checkout"
share="{{detail}}"
share-act="invitation"
class="share-but-view">
<view class="share-but Regular">
提前买单
<view class="money-tips" wx:if="{{user.price>0}}">{{user.price}}元红包待用</view>
</view>
</userinfo>
</view>
</block>
<block wx:elif="{{detail.status==6}}">
<view class="icon">
... ... @@ -97,6 +109,19 @@
</view>
<view class="share-but Regular" wx:else="">提前点餐</view>
</userinfo>
<userinfo
binduserinfo="checkout"
share="{{detail}}"
share-act="invitation"
class="share-but-view">
<view class="share-but Regular">
<view class="flex-cc">
<view class="checkout-icon checkout-icon-{{checkout.status}}" wx:if="{{checkout}}"></view>
提前买单
</view>
<view class="money-tips" wx:if="{{user.price>0}}">{{user.price}}元红包待用</view>
</view>
</userinfo>
</view>
</block>
<view style="height: 40rpx;"></view>
... ... @@ -175,4 +200,5 @@
<manager manager="{{detail}}" id="manager"></manager>
<as id="as" items="{{detail.seller.seller_tel}}" bindclick="callSellerPhone">拨打电话</as>
<getpos bindpos="onpos" id="getpos" hasAllowFail hasAllowLoading="{{false}}"></getpos>
<activity-enter floclass="detail_owner"></activity-enter>
\ No newline at end of file
<activity-enter floclass="detail_owner"></activity-enter>
<showModal id="showModal" confirmText="知道了" bindshowModal="showModal" cla="checkout"></showModal>
\ No newline at end of file
... ...
... ... @@ -45,9 +45,6 @@
width: 100%;
background-color: #262628;
}
.share-view-cookbook:last-child{
border-width: 0;
}
.share-view-cookbook{
margin-top: 0rpx;
margin-bottom: 20rpx;
... ... @@ -61,6 +58,7 @@
.share-but{
width: 100%;
text-align: center;
position: relative;
}
.seller{
... ... @@ -160,4 +158,26 @@
}
.share-view.subscribe{
margin-top: 24rpx;
}
.money-tips{
width:184rpx;
height:34rpx;
background:rgba(240,85,34,1);
border-radius:16rpx 16rpx 16rpx 0rpx;
font-size:20rpx;
font-weight:500;
color:rgba(255,255,255,1);
line-height:34rpx;
position: absolute;
top:-28rpx;
right:-16rpx;
}
.checkout-icon{
width: 32rpx;
height: 32rpx;
margin-right: 20rpx;
background-color: #1AAD19;
background-size: 100% 100%;
}
\ No newline at end of file
... ...
... ... @@ -453,4 +453,6 @@ export default {
'App.Task.GetTaskByOpenid':{
openid:'openid',
},
//获取账单详情
'App.Customer.GetOrderInfo':null,
}
\ No newline at end of file
... ...