2022-11-22 07:45:36 +00:00
|
|
|
|
<template>
|
2024-09-15 09:32:29 +00:00
|
|
|
|
<su-popup :show="show" type="bottom" round="20" @close="emits('close')" showClose backgroundColor="#f2f2f2">
|
2022-11-22 07:45:36 +00:00
|
|
|
|
<view class="model-box">
|
|
|
|
|
<view class="title ss-m-t-38 ss-m-l-20 ss-m-b-40">活动优惠</view>
|
2024-09-15 09:32:29 +00:00
|
|
|
|
<scroll-view class="model-content ss-m-l-20" scroll-y :scroll-with-animation="false"
|
|
|
|
|
:enable-back-to-top="true">
|
|
|
|
|
<view v-for="(item, index) in state.orderInfo.promotions" :key="index">
|
2022-11-22 07:45:36 +00:00
|
|
|
|
<view class="ss-flex ss-m-b-40 subtitle">
|
2024-09-15 09:32:29 +00:00
|
|
|
|
<!-- <view>共{{ item.goods_ids.length }}件,</view>
|
2022-11-22 07:45:36 +00:00
|
|
|
|
<view v-if="item.activity_type === 'full_discount'">
|
|
|
|
|
满{{ item.discount_rule.full }}打{{ item.discount_rule.discount }}折,已减
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="item.activity_type === 'full_gift'">满赠</view>
|
|
|
|
|
<view v-if="item.activity_type === 'full_reduce'">
|
|
|
|
|
满{{ item.discount_rule.full }}减{{ item.discount_rule.discount }},已减
|
|
|
|
|
</view>
|
2024-09-15 09:32:29 +00:00
|
|
|
|
<view class="price-text">¥{{ item.promo_discount_money || '0.00' }}</view> -->
|
|
|
|
|
<view>
|
|
|
|
|
{{item.description}}
|
2022-11-22 07:45:36 +00:00
|
|
|
|
</view>
|
2024-09-15 09:32:29 +00:00
|
|
|
|
</view>
|
2022-11-22 07:45:36 +00:00
|
|
|
|
</view>
|
|
|
|
|
</scroll-view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="modal-footer ss-flex">
|
|
|
|
|
<button class="confirm-btn ss-reset-button" @tap="emits('close')">确认</button>
|
|
|
|
|
</view>
|
|
|
|
|
</su-popup>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup>
|
2024-09-15 09:32:29 +00:00
|
|
|
|
import {
|
|
|
|
|
computed,
|
|
|
|
|
reactive
|
|
|
|
|
} from 'vue';
|
2022-11-22 07:45:36 +00:00
|
|
|
|
import sheep from '@/sheep';
|
2024-09-15 09:32:29 +00:00
|
|
|
|
import {
|
|
|
|
|
fen2yuan
|
|
|
|
|
} from '@/sheep/hooks/useGoods';
|
2022-11-22 07:45:36 +00:00
|
|
|
|
const props = defineProps({
|
|
|
|
|
promoInfo: {
|
|
|
|
|
type: Array,
|
|
|
|
|
default: () => [],
|
|
|
|
|
},
|
|
|
|
|
goodsList: {
|
|
|
|
|
type: Array,
|
|
|
|
|
default: () => [],
|
|
|
|
|
},
|
|
|
|
|
modelValue: {
|
|
|
|
|
type: Object,
|
2024-09-15 09:32:29 +00:00
|
|
|
|
default () {},
|
2022-11-22 07:45:36 +00:00
|
|
|
|
},
|
|
|
|
|
show: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
const emits = defineEmits(['close']);
|
|
|
|
|
const state = reactive({
|
|
|
|
|
orderInfo: computed(() => props.modelValue),
|
|
|
|
|
});
|
2024-09-15 09:32:29 +00:00
|
|
|
|
// const getGoodsImg = (e) => {
|
|
|
|
|
// let goodsImg = '';
|
|
|
|
|
// state.orderInfo.goods_list.forEach((i) => {
|
|
|
|
|
// if (e == i.goods_id) {
|
|
|
|
|
// goodsImg = i.goods.image;
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// return goodsImg;
|
|
|
|
|
// };
|
2022-11-22 07:45:36 +00:00
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.model-box {
|
|
|
|
|
height: 60vh;
|
|
|
|
|
}
|
2024-09-15 09:32:29 +00:00
|
|
|
|
|
2022-11-22 07:45:36 +00:00
|
|
|
|
.model-content {
|
|
|
|
|
height: 54vh;
|
|
|
|
|
}
|
2024-09-15 09:32:29 +00:00
|
|
|
|
|
2022-11-22 07:45:36 +00:00
|
|
|
|
.modal-footer {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 120rpx;
|
|
|
|
|
background: #fff;
|
|
|
|
|
}
|
2024-09-15 09:32:29 +00:00
|
|
|
|
|
2022-11-22 07:45:36 +00:00
|
|
|
|
.confirm-btn {
|
|
|
|
|
width: 710rpx;
|
|
|
|
|
margin-left: 20rpx;
|
|
|
|
|
height: 80rpx;
|
|
|
|
|
background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
2024-09-15 09:32:29 +00:00
|
|
|
|
|
2022-11-22 07:45:36 +00:00
|
|
|
|
.content-img {
|
|
|
|
|
width: 140rpx;
|
|
|
|
|
height: 140rpx;
|
|
|
|
|
margin-right: 20rpx;
|
|
|
|
|
margin-bottom: 20rpx;
|
|
|
|
|
}
|
2024-09-15 09:32:29 +00:00
|
|
|
|
|
2022-11-22 07:45:36 +00:00
|
|
|
|
.subtitle {
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: #333333;
|
|
|
|
|
}
|
2024-09-15 09:32:29 +00:00
|
|
|
|
|
2022-11-22 07:45:36 +00:00
|
|
|
|
.price-text {
|
|
|
|
|
color: #ff3000;
|
|
|
|
|
}
|
2024-09-15 09:32:29 +00:00
|
|
|
|
</style>
|