tapd相关修改更新
This commit is contained in:
@@ -155,7 +155,7 @@
|
||||
<view class="">
|
||||
<view class=" u-relative">
|
||||
<template v-if="item.is_gift">
|
||||
<text class="line-th color-999">¥{{formatPrice(item.lowPrice*item.number) }}</text>
|
||||
<text class="line-th color-999">¥{{$utils.toFixed(item.lowPrice*item.number,item) }}</text>
|
||||
<view class="u-absolute" style="right: 0;bottom: 100%;">
|
||||
<text class="font-bold">¥0</text>
|
||||
</view>
|
||||
@@ -163,24 +163,24 @@
|
||||
<template v-else>
|
||||
<template v-if="item.discount_sale_amount&&item.discount_sale_amount*1>0">
|
||||
<text
|
||||
class="line-th color-999">¥{{formatPrice(item.lowPrice*item.number) }}</text>
|
||||
class="line-th color-999">¥{{$utils.toFixed(item.lowPrice*item.number,item) }}</text>
|
||||
<view class="u-absolute" style="right: 0;bottom: 100%;">
|
||||
<text
|
||||
class="font-bold">¥{{formatPrice(item.discount_sale_amount*item.number) }}</text>
|
||||
class="font-bold">¥{{$utils.toFixed(item.discount_sale_amount*item.number,item) }}</text>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else-if="isVip&&item.lowMemberPrice&&item.lowMemberPrice*1!=item.lowPrice*1">
|
||||
<text
|
||||
class="line-th color-999">¥{{formatPrice(item.lowPrice*item.number) }}</text>
|
||||
class="line-th color-999">¥{{$utils.toFixed(item.lowPrice*item.number,item) }}</text>
|
||||
<view class="u-absolute" style="right: 0;bottom: 100%;">
|
||||
<text
|
||||
class="font-bold">¥{{formatPrice(item.lowMemberPrice*item.number) }}</text>
|
||||
class="font-bold">¥{{$utils.toFixed(item.lowMemberPrice*item.number,item) }}</text>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="font-bold">
|
||||
<text>¥</text>
|
||||
<text class="">{{formatPrice(item.lowPrice*item.number) }}</text>
|
||||
<text class="">{{$utils.toFixed(item.lowPrice*item.number,item) }}</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
<view class="u-flex">
|
||||
<view class="u-flex price" v-if="youhui*1>0">
|
||||
<view class="">优惠金额</view>
|
||||
<view class="font-bold u-font-32">¥{{formatPrice(youhui) }}</view>
|
||||
<view class="font-bold u-font-32">¥{{$utils.toFixed(youhui) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -368,7 +368,6 @@
|
||||
if (opt.tableId||opt.tableCode) {
|
||||
pageData.table.id = opt.tableId
|
||||
pageData.table.tableCode = opt.tableCode
|
||||
getTableInfo(opt)
|
||||
}
|
||||
getTbShopInfo()
|
||||
|
||||
@@ -490,10 +489,8 @@
|
||||
// 获取商品列表
|
||||
$goods = await getProductList({},'product', false)
|
||||
console.log("商品列表===",$goods)
|
||||
getTableInfo(pageData.table)
|
||||
|
||||
|
||||
// 获取购物车数据
|
||||
getCart()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -569,6 +566,7 @@
|
||||
$seatFee.totalNumber = 0
|
||||
$seatFee.totalAmount = 0
|
||||
userNumbers.defaultCateIndex = 0
|
||||
init()
|
||||
break;
|
||||
case 'product_update':
|
||||
init()
|
||||
@@ -647,13 +645,16 @@
|
||||
* 获取桌台信息
|
||||
*/
|
||||
async function getTableInfo(opt) {
|
||||
const res = await getShopTableDetail({id: opt.tableId,tableCode: opt.tableCode})
|
||||
const res = await getShopTableDetail({id: opt.id,tableCode: opt.tableCode})
|
||||
Object.assign(pageData.table, res)
|
||||
if(!pageData.shopInfo.isTableFee&&pageData.table&&pageData.table.id){
|
||||
userNumbers.list = new Array(res.maxCapacity ? res.maxCapacity * 1 : 100).fill(1).map((v, index) => {
|
||||
return (index + 1) + '人'
|
||||
})
|
||||
}
|
||||
// 获取购物车数据
|
||||
getCart()
|
||||
// 获取购物车数据
|
||||
getHistoryOrderDetail(opt.tableCode)
|
||||
}
|
||||
|
||||
@@ -831,9 +832,7 @@
|
||||
async function updateChoseCount() {
|
||||
const maxCapacity = pageData.table&&pageData.table.id ? (pageData.table.maxCapacity || 0) : 100
|
||||
if (pageData.table&&pageData.table.id && userNumbers.defaultCateIndex * 1 + 1 > maxCapacity) {
|
||||
uni.showToast({
|
||||
title: '当前台桌最大人数为: ' + maxCapacity
|
||||
})
|
||||
uni.$utils.showToast('当前台桌最大人数为: ' + maxCapacity)
|
||||
userNumbers.defaultCateIndex = maxCapacity - 1
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user