Feat:优惠券对接

This commit is contained in:
lifizer
2023-12-25 17:16:56 +08:00
parent 847a80f251
commit 18a2fbb8a6
46 changed files with 1360 additions and 858 deletions
@@ -10,37 +10,15 @@
<view class="u-calendar-month__days__day" v-for="(item1, index1) in item.date" :key="index1"
:style="[dayStyle(index, index1, item1)]" @tap="clickHandler(index, index1, item1)"
:class="[item1.selected && 'u-calendar-month__days__day__select--selected']">
<view class="u-calendar-month__days__day__select flex-column" >
<view class="u-calendar-month__days__day__select__info day-info"
<view class="u-calendar-month__days__day__select" :style="[daySelectStyle(index, index1, item1)]">
<text class="u-calendar-month__days__day__select__info"
:class="[item1.disabled && 'u-calendar-month__days__day__select__info--disabled']"
:style="[daySelectStyle(index, index1, item1)]">
<text :style="[textStyle(item1)]">
{{ item1.day }}
</text>
</view>
<!-- <text v-if="getBottomInfo(index, index1, item1)"
:style="[textStyle(item1)]">{{ item1.day }}</text>
<text v-if="getBottomInfo(index, index1, item1)"
class="u-calendar-month__days__day__select__buttom-info"
:class="[item1.disabled && 'u-calendar-month__days__day__select__buttom-info--disabled']"
:style="[textStyle(item1)]">{{ getBottomInfo(index, index1, item1) }}</text> -->
<!-- <text v-if="item1.dot" class="u-calendar-month__days__day__select__dot"></text> -->
<view class="align-center justify-around" v-if="getBottomInfo(index, index1, item1).text">
<text
class="font-sm mr-1"
:class="[
{'grey--text' : getBottomInfo(index, index1, item1).status == 0 },
{'error--text' : getBottomInfo(index, index1, item1).status == 1 },
{'success--text' : getBottomInfo(index, index1, item1).status == 2 }]"
>
{{ getBottomInfo(index, index1, item1).text }}
</text>
<text
v-if="item1.dot"
:class="[
{'grey' : getBottomInfo(index, index1, item1).status == 0 },
{'error' : getBottomInfo(index, index1, item1).status == 1 },
{'success' : getBottomInfo(index, index1, item1).status == 2 }]"
class="day_dot" ></text>
</view>
:style="[textStyle(item1)]">{{ getBottomInfo(index, index1, item1) }}</text>
<text v-if="item1.dot" class="u-calendar-month__days__day__select__dot"></text>
</view>
</view>
</view>
@@ -203,11 +181,10 @@
if (this.mode === 'single') {
if (date === this.selected[0]) {
// 因为需要对nvue的兼容,只能这么写,无法缩写,也无法通过类名控制等等
style.borderRadius = '50%'
// style.borderTopLeftRadius = '3px'
// style.borderBottomLeftRadius = '3px'
// style.borderTopRightRadius = '3px'
// style.borderBottomRightRadius = '3px'
style.borderTopLeftRadius = '3px'
style.borderBottomLeftRadius = '3px'
style.borderTopRightRadius = '3px'
style.borderBottomRightRadius = '3px'
}
} else if (this.mode === 'range') {
if (this.selected.length >= 2) {
@@ -373,7 +350,6 @@
},
// 点击某一个日期
clickHandler(index1, index2, item) {
this.$emit('select', item)
if (this.readonly) {
return;
}
@@ -478,25 +454,7 @@
<style lang="scss" scoped>
@import "../../libs/css/components.scss";
.align-center{
flex-direction: row !important;
align-items: center !important;
}
.day-info{
background: #Fff;
border-radius: 50%;
height: 60rpx;
width: 60rpx;
line-height: 60rpx;
}
.flex-column{
flex-direction: column !important
}
.day_dot{
width: 30rpx;
height: 15rpx;
border-radius: 15rpx;
}
.u-calendar-month-wrapper {
margin-top: 4px;
}