问题修复

This commit is contained in:
2025-10-10 15:56:22 +08:00
parent 87babdda60
commit 8f7852f834
5 changed files with 48 additions and 17 deletions

View File

@@ -5,28 +5,31 @@
<view class="u-flex u-flex-between"> <view class="u-flex u-flex-between">
<view class=""> <view class="">
<text class="color-333 font-16">查看优惠券</text> <text class="color-333 font-16">查看优惠券</text>
<text class="color-666 font-14">({{list.length}})</text> <text class="color-666 font-14">({{couponList }})</text>
</view> </view>
<up-icon name="close-circle" color="#666" size="28rpx" @click="close"></up-icon> <up-icon name="close-circle" color="#666" size="28rpx" @click="close"></up-icon>
</view> </view>
<scroll-view scroll-y="true" class="u-m-t-42" style="max-height: 50vh;"> <scroll-view scroll-y="true" class="u-m-t-42" style="max-height: 50vh;">
<view class="list"> <view class="list">
<view class="item u-flex u-m-b-32 u-col-center" v-for="(item,index) in list" :key="index"> <view v-for="(item,index) in list" :key="index">
<view class="left" style="min-width: 162rpx;"> <view class="item u-flex u-m-b-32 u-col-center" v-for="(item1,index1) in item.num">
<couponIcon :item="item.coupon" /> <view class="left" style="min-width: 162rpx;">
<!-- <view class="red font-16 font-700" style="width: 122rpx;">第二件半价券</view> --> <couponIcon :item="item.coupon" />
<view></view> <!-- <view class="red font-16 font-700" style="width: 122rpx;">第二件半价券</view> -->
</view> <view></view>
<view class="u-flex-1 u-p-l-26 ">
<view class="color-333 font-16">
{{item.coupon.title }}
</view> </view>
<view class="color-999 font-12 u-m-t-8">
有效期至{{item.coupon.validEndTime||''}} <view class="u-flex-1 u-p-l-26 ">
<view class="color-333 font-16">
{{item.coupon.title }}
</view>
<view class="color-999 font-12 u-m-t-8">
有效期至{{item.coupon.validEndTime||''}}
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@@ -38,6 +41,9 @@
<script setup> <script setup>
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import couponIcon from './coupon-icon.vue' import couponIcon from './coupon-icon.vue'
import {
computed
} from 'vue';
const props = defineProps({ const props = defineProps({
title: { title: {
type: String, type: String,
@@ -51,6 +57,11 @@
} }
}) })
const show = defineModel(false) const show = defineModel(false)
const couponList = computed(() => {
return props.list.reduce((prve, cur) => {
return prve + cur.num
}, 0)
})
function close() { function close() {
show.value = false show.value = false

View File

@@ -321,12 +321,13 @@ function formatCoupon(){
const shopId = uni.cache.get('shopId'); const shopId = uni.cache.get('shopId');
for (let i = 0; i < couponList.value.length; i++) { for (let i = 0; i < couponList.value.length; i++) {
const coupon = couponList.value[i]; const coupon = couponList.value[i];
const selCoupon=querForm.value.statusActiveIndex!=1?quansSelArr.value.filter(v=>v.type!=2):quansSelArr.value.filter(v=>v.type==2)
const canuseResult = UTILS.returnCouponCanUse({ const canuseResult = UTILS.returnCouponCanUse({
canDikouGoodsArr, canDikouGoodsArr,
coupon, coupon,
goodsOrderPrice, goodsOrderPrice,
user, user,
selCoupon: quansSelArr.value, selCoupon:selCoupon,
shopInfo shopInfo
}); });
const { canUse, reason } = canuseResult; const { canUse, reason } = canuseResult;

View File

@@ -2,7 +2,10 @@
<!-- 账单明细 --> <!-- 账单明细 -->
<view style="padding-bottom: 40rpx;"> <view style="padding-bottom: 40rpx;">
<up-navbar bgColor="transparent" title="明细" @leftClick="back"></up-navbar> <up-navbar bgColor="transparent" title="明细" @leftClick="back"></up-navbar>
<view class="bild" style="background-image: url(/static/czzx_header_bg.png);"> <view class="bild" >
<view class="bg">
<image class="image" src="/static/czzx_header_bg.png" mode=""></image>
</view>
<view class="bildLeft"> <view class="bildLeft">
<text>我的余额</text> <text>我的余额</text>
<view>{{shopUserInfo.amount||0}}</view> <view>{{shopUserInfo.amount||0}}</view>
@@ -217,7 +220,19 @@
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
position:relative;
.bg{
position:absolute;
left:0;
right:0;
top:0;
bottom:0;
z-index:-1;
.image{
width:100%;
height:100%;
}
}
.bildLeft, .bildLeft,
.bildRight { .bildRight {
font-weight: 400; font-weight: 400;

View File

@@ -175,6 +175,7 @@ export const useCartsStore = defineStore('cart',
// 订单费用汇总 // 订单费用汇总
const orderCostSummary = computed(() => { const orderCostSummary = computed(() => {
allGoods.value = getAllGoodsList() allGoods.value = getAllGoodsList()
console.log('allGoods.value',allGoods.value);
const costSummary = OrderPriceCalculator.calculateOrderCostSummary( const costSummary = OrderPriceCalculator.calculateOrderCostSummary(
allGoods.value, allGoods.value,
dinnerType.value, dinnerType.value,

View File

@@ -116,7 +116,10 @@
if (name == '周期福利') { if (name == '周期福利') {
model.title = '周期福利'; model.title = '周期福利';
modelContent.value = modelContent.value =
`${memberLevel.value.cycleUnit}赠送${memberLevel.value.cycleRewardPoints}积分,${memberLevel.value.cycleRewardCouponList.length}张优惠券`; `${memberLevel.value.cycleUnit}赠送${memberLevel.value.cycleRewardPoints}积分`;
if (memberLevel.value.cycleRewardCouponList && memberLevel.value.cycleRewardCouponList.length) {
modelContent.value += `,${memberLevel.value.cycleRewardCouponList.length}张优惠券`
}
} }
if (name == '会员说明') { if (name == '会员说明') {
model.title = '会员说明'; model.title = '会员说明';