Commit a7b55d8e1b1075a007b12839c7c4ea2b3a153409

Authored by vking
1 parent df63463e

在线预定失败

... ... @@ -15,6 +15,7 @@ Page({
detail: null,
hasOnlineReserve: false,
firstShowMsg:'',
rsl:[],//推荐商家
},
id: null,
tpls: TP.tpls(),
... ... @@ -43,11 +44,14 @@ Page({
openid: getApp().openid,
rid: this.id
}).then(res => {
console.log('res.data.type',res.data.type)
let detail=this.formatDatail(res.data)
this.setData({
detail: this.formatDatail(res.data),
detail: detail,
hasOnlineReserve:res.data.type==1,
})
if(detail.type==1 && detail.status==6){
this.GetRecommendSellerList(detail.seller.id)
}
})
},
... ... @@ -180,4 +184,29 @@ Page({
cardEvent(e){
console.log(e)
},
GetRecommendSellerList(sid){
App.Customer.GetRecommendSellerList({
sid:sid,
}).then(res=>{
this.setData({
rsl:res.data
})
})
},
hasGoto:false,
bindtransition(e){
if('change'==e.type){
this.hasGoto=false
}
if('animationfinish'==e.type){
if(this.hasGoto){
wx.switchTab({
url: '/pages/reserve/index'
})
return;
}else{
this.hasGoto=true
}
}
},
})
\ No newline at end of file
... ...
... ... @@ -9,6 +9,7 @@
"nav":"/components/nav/nav",
"card":"/components/seller-card/seller-card",
"formids":"/components/formids/formids",
"sb-tr":"/components/reserve/seller-box-transverse/seller-box",
"as":"/components/actionSheet/index"
}
}
\ No newline at end of file
... ...
... ... @@ -121,6 +121,28 @@
<view class="item" bindtap="callSeller" wx:if="{{detail.hasRunning}}">取消预订</view>
</view>
</view>
<block wx:if="{{rsl.length>0}}">
<view class="line-push">为你推荐</view>
<view class="transverse-list">
<swiper
indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}"
interval="2000" duration="500"
previous-margin="{{15}}px" next-margin="{{15}}px" style="height: 350rpx;"
current="{{current}}" bindchange="bindtransition" bindanimationfinish="bindtransition">
<block wx:for="{{rsl}}" wx:key="rsl.key">
<swiper-item bindtap="gotoDetail" data-sid="{{id}}">
<view class="seller" id="seller-{{id}}">
<sb-tr seller="{{item}}"
hasActivityTags="{{false}}"
hasActivityShort="{{true}}"
hasBrand="true" hasActivityTese="true"
hasSlogan="{{false}}"></sb-tr>
</view>
</swiper-item>
</block>
</swiper>
</view>
</block>
<view style="height: 50rpx;"></view>
</view>
<manager manager="{{detail}}" id="manager"></manager>
... ...
... ... @@ -132,4 +132,26 @@
.tuiding .item{
margin-left: 40rpx;
text-decoration: underline;
}
.line-push{
background-image: url("https://qn.colorcun.com/reserve/images/line-push.png");
width: 328rpx;
height: 42rpx;
background-size: 100% 24rpx;
margin: 0 auto;
font-size:30rpx;
color: #C0A369;
line-height: 24rpx;
background-repeat: no-repeat;
text-align: center;
margin-top: 100rpx;
}
.transverse-list{
background-color: #fefefe;
width: 100%;
margin-top: 40rpx;
}
.transverse-list .seller{
width: 98%;
margin: 0 auto;
}
\ No newline at end of file
... ...
... ... @@ -285,6 +285,11 @@ export default {
openid:'openid',
silence:false,
},
// 预定失败推荐商家接口
'App.Customer.GetRecommendSellerList':null,
// 用户订单为空时推介商家
'App.Customer.GetRecommendSellerLists':null,
//获取营业时间段满房接口
'App.Customer.GetHouseFullDateTimes':null,
... ...