下单选择人数条件修改
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
<view class="tabBox" v-if="storeInfo.registerType == 'munchies'">
|
||||
<view class="tab">
|
||||
<view :class="is_type==(index+1)?'tab_item'+is_type+' tab_item active ':'tab_item'" v-for="(item,index) in is_typeList" :key="index" @click="tabClick(index+1,item)">
|
||||
<view v-if="item.show" :class="is_type==(index+1)?'tab_item'+is_type+' tab_item active ':'tab_item'" v-for="(item,index) in is_typeList" :key="index" @click="tabClick(index+1,item)">
|
||||
<view></view>
|
||||
<image class="icon" :src="is_type==(index+1)?item.url_active:item.url" mode="aspectFill"/>
|
||||
<text class="title" :class="{active:is_type==(index+1)}">{{item.title}}</text>
|
||||
@@ -187,8 +187,8 @@
|
||||
},
|
||||
is_type: 1,
|
||||
is_typeList: [
|
||||
{ title: "送餐到桌", type: "table", val: "dine-in", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/tab1.png" , url_active: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/tab1_active.png"},
|
||||
{ title: "打包外带", type: "takeself", val: "take-out", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/tab2.png" , url_active: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/tab2_active.png"},
|
||||
{ title: "送餐到桌", show: false, type: "table", val: "dine-in", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/tab1.png" , url_active: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/tab1_active.png"},
|
||||
{ title: "打包外带", show: false, type: "takeself", val: "take-out", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/tab2.png" , url_active: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/tab2_active.png"},
|
||||
],
|
||||
sendType: "table",
|
||||
eatModel: [],
|
||||
@@ -249,10 +249,8 @@
|
||||
this.listinfo.name = this.storeInfo.shopName;
|
||||
this.listinfo.details = JSON.parse(e.cartLists).data;
|
||||
this.listinfo.payAmount = JSON.parse(e.cartLists).amount;
|
||||
if ( e.tableCode ) { this.tableCode = e.tableCode; }
|
||||
if ( e.dinersNum ) {
|
||||
this.dinersNum = e.dinersNum;
|
||||
}
|
||||
if ( e.tableCode ) { this.tableCode = e.tableCode;}
|
||||
if ( e.dinersNum ) { this.dinersNum = e.dinersNum;}
|
||||
|
||||
if ( this.storeInfo.eatModel.indexOf("dine-in") != -1 ) {
|
||||
this.eatModel = ["dine-in"]
|
||||
@@ -271,6 +269,13 @@
|
||||
this.handlemessage()
|
||||
}
|
||||
this.getAount()
|
||||
|
||||
this.is_typeList.map((item)=>{
|
||||
console.log(this.storeInfo.eatModel.indexOf(item.val))
|
||||
if ( this.storeInfo.eatModel.indexOf(item.val) != -1) {
|
||||
item.show = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -306,6 +311,7 @@
|
||||
if (this.shopId) {params.shopId = this.shopId}
|
||||
let res = await this.api.productqueryShop(params)
|
||||
this.shopTableInfo = res.data.shopTableInfo;
|
||||
this.storeInfo = res.data.storeInfo;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -491,6 +497,13 @@
|
||||
})
|
||||
return;
|
||||
}
|
||||
if ( this.sendType == 'table' && !this.tableCode) {
|
||||
uni.showToast({
|
||||
title: "请选择桌台",
|
||||
icon: "none",
|
||||
})
|
||||
return;
|
||||
}
|
||||
if ( this.listinfo.details.length == 0) {
|
||||
uni.showToast({
|
||||
title: "购物车为空,请添加商品",
|
||||
@@ -767,7 +780,7 @@
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-radius: 22rpx;
|
||||
border-radius: 22rpx 22rpx 0 0;
|
||||
background-color: $uni-bg-color;
|
||||
.tab_item{
|
||||
width: 50%;
|
||||
|
||||
Reference in New Issue
Block a user