Commit 10e6e35db42ed5d99daf0911f56f6f1e92e39174

Authored by vking
1 parent 6bd67311

taocan

... ... @@ -8,14 +8,8 @@ Page({
*/
data: {
current:0,
activityId:1,
packs:[
{id:1,},
{id:2,},
{id:3,},
{id:4,},
{id:5,},
],
activityId:'',
packs:{},
},
/**
... ... @@ -24,6 +18,18 @@ Page({
* pid 套餐id
*/
onLoad: function (options) {
App.Foodset.GetFoodsetList({sid:options.sid}).then(res=>{
let packs={}
res.data.some(r=>{
r['包间可用']=r.service.indexOf('包间可用');
r.sid=this.data.sid
packs[r.id]=r
})
this.setData({
packs:packs,
activityId:options.pid,
})
})
},
... ...
... ... @@ -10,40 +10,40 @@
<swiper-item
bindtap="touchTab" data-id="{{item.id}}" data-index="{{index}}"
class="swiper-item {{activityId==item.id?'active':''}} flex align-center">
<view class="txt-28-h">招牌六十人餐</view>
<view class="txt-28-h">{{item.name}}</view>
</swiper-item>
</block>
</swiper>
<view class="view" style="padding-bottom: 150rpx;padding-top: 80rpx;">
<view class="view box margin-lr margin-top-lg margin-bottom-sm padding">
<view class="view txt-40-h text-bold">招牌花开富贵六十人餐</view>
<view class="view txt-40-h text-bold">{{packs[activityId].name}}</view>
<view class="view flex align-end">
<view class="text-orange txt-28-h" style="margin-bottom: 4rpx;">¥</view>
<view class="text-orange txt-44-h margin-right-sm text-bold">123</view>
<view class="text-orange txt-44-h margin-right-sm text-bold">{{packs[activityId].sale_price}}</view>
<view class="huaxian flex align-end">
<view class="txt-20-h" style="margin-bottom: 8rpx;">¥</view>
<view class="txt-28-h" style="margin-bottom: 4rpx;">123</view>
<view class="txt-28-h" style="margin-bottom: 4rpx;">{{packs[activityId].market_price}}</view>
</view>
<view class="view flex text-orange align-end margin-left-sm" >
<view class="view tag" style="margin-bottom: 16rpx;"></view>
<view class="view margin-left-xs txt-24-h" style="margin-bottom: 10rpx;">8折</view>
<view class="view margin-left-xs txt-24-h" style="margin-bottom: 10rpx;">{{packs[activityId].discount*10}}折</view>
</view>
</view>
<view class="view flex align-center txt-28-h margin-bottom labels" style="margin-top: 10rpx;">
<view class="view margin-right flex align-center">
<view class="view margin-right flex align-center" wx:if="{{packs[activityId]['包间可用']}}">
<view class="view icon icon1"></view>
<view class="view txt-28-h bg-white">包间可用</view>
</view>
<view class="view margin-right flex align-center">
<view class="view margin-right flex align-center" wx:if="{{packs[activityId]['免预约']}}">
<view class="view icon icon2"></view>
<view class="view txt-28-h bg-white">免预约</view>
</view>
<view class="view margin-right flex align-center">
<view class="view margin-right flex align-center" wx:if="{{packs[activityId]['随时退']}}">
<view class="view icon icon3"></view>
<view class="view txt-28-h bg-white">随时退</view>
</view>
</view>
<image src="" style="width:100%;background-color: #cccccc;border-radius: 10rpx;" mode="widthFix"></image>
<image src="{{packs[activityId].main_url}}" style="width:100%;background-color: #cccccc;border-radius: 10rpx;" mode="widthFix"></image>
</view>
<view class="view box margin-lr margin-top-sm margin-bottom-sm">
<view class="txt-30-h padding solid-bottom">购买须知</view>
... ...
... ... @@ -497,7 +497,12 @@ export default {
silence: false,
},
//获取商家菜品套餐列列表
'App.Foodset.GetFoodsetList':null,
'App.Foodset.GetFoodsetList':{
cachetime: 120,
},
//获取商家菜品套餐详情
'App.Foodset.GetFoodsetDetail':null,
//获取商家优惠对接人信息
'App.Customer.GetSellerPreferentialDocking':null,
... ...