下单逻辑修改
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.val)">
|
||||
<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></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>
|
||||
@@ -76,7 +76,7 @@
|
||||
</view>
|
||||
<view class="cell_item" v-if="dinersNum">
|
||||
<view class="label">餐位费</view>
|
||||
<view class="value"><view>X{{dinersNum}}</view><view>X{{dinersNum*storeInfo.tableFee}}</view></view>
|
||||
<view class="value"><view>X{{dinersNum}}</view><view>¥{{dinersNum*storeInfo.tableFee}}</view></view>
|
||||
</view>
|
||||
<!-- <view class="favorable" v-for="(item,index) in favorable" :key="index">
|
||||
<view class="favorable_left">
|
||||
@@ -189,9 +189,10 @@
|
||||
},
|
||||
is_type: 1,
|
||||
is_typeList: [
|
||||
{ title: "送餐到桌", 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: "打包外带", 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: "送餐到桌", 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"},
|
||||
],
|
||||
sendType: "table",
|
||||
eatModel: [],
|
||||
favorable: [
|
||||
{ name: "优惠券", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/coupon.png"},
|
||||
@@ -412,10 +413,11 @@
|
||||
* 监听送餐/打包切换
|
||||
* @param {Object} val
|
||||
*/
|
||||
tabClick ( index,val ) {
|
||||
tabClick ( index, item ) {
|
||||
this.is_type = index;
|
||||
this.sendType = item.type
|
||||
this.eatModel = [];
|
||||
this.eatModel.push(val);
|
||||
this.eatModel.push(item.val);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -528,6 +530,7 @@
|
||||
"isYhq": 0, // 是否使用优惠券( 1: 使用, 0: 不使用),
|
||||
"isBuyYhq": 0, // 是否购买优惠券( 1: 购买, 0: 不够买)
|
||||
"productId": '', //商品id
|
||||
"sendType": this.sendType,
|
||||
"tableId": this.tableCode , //商品id
|
||||
"dinersNum": this.dinersNum, //就餐人数
|
||||
"eatModel": this.eatModel, //就餐模式
|
||||
|
||||
Reference in New Issue
Block a user