问题修复
This commit is contained in:
@@ -18,9 +18,13 @@
|
||||
>
|
||||
<view class="u-flex">
|
||||
<text>{{ item.productName }}</text>
|
||||
<view class="u-flex gap-10" style="margin-left: 40rpx">
|
||||
<view class="u-flex gap-20" style="margin-left: 40rpx">
|
||||
<text class="status gift" v-if="item.isGift">赠</text>
|
||||
<template v-if="item.subStatus">
|
||||
<text class="status pack" v-if="item.packNumber > 0"
|
||||
>包
|
||||
<view class="badge">{{ item.packNumber }}</view>
|
||||
</text>
|
||||
<template v-if="item.subStatus &&cartStore.shopInfo.registerType=='after'">
|
||||
<text
|
||||
class="status"
|
||||
:class="[
|
||||
@@ -78,7 +82,7 @@
|
||||
</view>
|
||||
|
||||
<text class="u-flex-1">
|
||||
{{ cartStore.packFee }}
|
||||
{{ cartStore.orderCostSummary.packFee }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -107,12 +111,18 @@ const timer = setInterval(() => {
|
||||
}, 1000);
|
||||
|
||||
//超时时间
|
||||
const maxTime = 10 * 60 * 1000;
|
||||
const maxTime = cartStore.shopInfo.serveTime*60*1000;
|
||||
|
||||
function returnStatusClass(item) {
|
||||
if (item.subStatus == "DELIVERED") {
|
||||
return "success";
|
||||
}
|
||||
if (item.subStatus == "READY_TO_SERVE") {
|
||||
return "warning";
|
||||
}
|
||||
if (item.subStatus == "SENT_OUT") {
|
||||
return "green";
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 返回商品状态文本
|
||||
@@ -123,7 +133,7 @@ function returnSubStatusText(item) {
|
||||
return "待起菜";
|
||||
}
|
||||
if (item.subStatus == "READY_TO_SERVE") {
|
||||
if (item.startOrderTime) {
|
||||
if (item.startOrderTime&&cartStore.shopInfo.isServeTimeControl) {
|
||||
const maxWaitTime = dayjs(item.startOrderTime).add(
|
||||
maxTime,
|
||||
"millisecond"
|
||||
@@ -215,6 +225,7 @@ function itemClick(item) {
|
||||
color: #999;
|
||||
border-color: #999;
|
||||
background-color: rgba(153, 153, 153, 0.25);
|
||||
position: relative;
|
||||
&.default {
|
||||
}
|
||||
&.timeout {
|
||||
@@ -227,13 +238,44 @@ function itemClick(item) {
|
||||
border-color: $my-main-color;
|
||||
background-color: rgba(63, 158, 255, 0.25);
|
||||
}
|
||||
|
||||
&.green {
|
||||
$color: rgba(52, 199, 89, 1);
|
||||
border-color: $color;
|
||||
color: $color;
|
||||
background-color: rgba(52, 199, 89, 0.25);
|
||||
}
|
||||
&.warning {
|
||||
$color: #ff8d28;
|
||||
border-color: $color;
|
||||
color: $color;
|
||||
background-color: rgba(255, 141, 40, 0.25);
|
||||
}
|
||||
&.gift {
|
||||
$color: rgb(255, 159, 46);
|
||||
color: $color;
|
||||
background-color: rgb(255, 240, 223);
|
||||
border-color: $color;
|
||||
}
|
||||
&.pack {
|
||||
$color: rgb(49, 138, 254);
|
||||
color: $color;
|
||||
background-color: rgb(49, 138, 254, 0.25);
|
||||
border-color: $color;
|
||||
}
|
||||
.badge {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
$height:32rpx;
|
||||
line-height: $height;
|
||||
height: $height;
|
||||
top: calc(-#{$height} / 2);
|
||||
right: calc(-#{$height} / 2);
|
||||
width: $height;
|
||||
border-radius: 50%;
|
||||
font-size: 20rpx;
|
||||
color: #fff;
|
||||
background-color: #ff383c;
|
||||
}
|
||||
}
|
||||
.old-price {
|
||||
text-decoration: line-through;
|
||||
|
||||
Reference in New Issue
Block a user