You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
< template >
< su -popup
:show ="show"
type = "bottom"
round = "20"
@close ="emits('close')"
showClose
backgroundColor = "#f2f2f2"
>
< view class = "model-box" >
< view class = "title ss-m-t-38 ss-m-l-20 ss-m-b-40" > 活动优惠 < / view >
< 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" >
< ! - - 不 展 示 积 分 、 优 惠 劵 、 会 员 折 扣 , 因 为 它 们 已 经 单 独 展 示 了 - - >
< view class = "ss-flex ss-m-b-40 subtitle" v-if ="[1, 2, 3, 4, 5].includes(item.type)">
<view> {{ item.description }} </view>
</view>
</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 >
import { computed , reactive } from 'vue' ;
const props = defineProps ( {
promoInfo : {
type : Array ,
default : ( ) => [ ] ,
} ,
goodsList : {
type : Array ,
default : ( ) => [ ] ,
} ,
modelValue : {
type : Object ,
default ( ) { } ,
} ,
show : {
type : Boolean ,
default : false ,
} ,
} ) ;
const emits = defineEmits ( [ 'close' ] ) ;
const state = reactive ( {
orderInfo : computed ( ( ) => props . modelValue ) ,
} ) ;
< / script >
< style lang = "scss" scoped >
. model - box {
height : 60 vh ;
}
. model - content {
height : 54 vh ;
}
. modal - footer {
width : 100 % ;
height : 120 rpx ;
background : # fff ;
}
. confirm - btn {
width : 710 rpx ;
margin - left : 20 rpx ;
height : 80 rpx ;
background : linear - gradient ( 90 deg , var ( -- ui - BG - Main ) , var ( -- ui - BG - Main - gradient ) ) ;
border - radius : 40 rpx ;
color : # fff ;
}
. content - img {
width : 140 rpx ;
height : 140 rpx ;
margin - right : 20 rpx ;
margin - bottom : 20 rpx ;
}
. subtitle {
font - size : 28 rpx ;
font - weight : 500 ;
color : # 333333 ;
}
. price - text {
color : # ff3000 ;
}
< / style >