Feat(优惠券):UI调整(缺顶部优惠公式)
This commit is contained in:
+55
-27
@@ -1,41 +1,45 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="components-coupons">
|
<view class="components-coupons">
|
||||||
<image
|
<view class="image-wrap">
|
||||||
:src="data.image"
|
<image
|
||||||
class="coupons__cover"
|
:src="data.image"
|
||||||
mode="widthFix"
|
class="coupons__cover"
|
||||||
/>
|
/>
|
||||||
<view class="coupons__section flex jc-between ai-center">
|
<view @click="selectCoupon" class="check-radio" :class="{'v12-primary': data.checked}">
|
||||||
<view>有效期至:
|
|
||||||
<text>{{ data.endTime }}</text>
|
|
||||||
</view>
|
|
||||||
<!-- status: 0-未使用,1-已使用,2-已过期 -->
|
|
||||||
<view
|
|
||||||
v-if="data.status === 2"
|
|
||||||
class="coupons__tag coupons__tag-expire"
|
|
||||||
>已到期</view>
|
|
||||||
<view
|
|
||||||
v-if="data.status === 0 && !radioModel"
|
|
||||||
class="coupons__tag coupons__tag-expire"
|
|
||||||
>不可用</view>
|
|
||||||
<view @click="selectCoupon">
|
|
||||||
<radio
|
<radio
|
||||||
v-if="radioModel && data.status === 0"
|
v-if="radioModel && data.status === 0"
|
||||||
:value="data.id"
|
:value="data.id"
|
||||||
:checked="data.checked"
|
:checked="data.checked"
|
||||||
color="#FF564A"
|
color="#C52733"
|
||||||
|
borderColor="#C52733"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="coupons__section flex jc-between ai-center">
|
||||||
|
<view>
|
||||||
|
<text class="v12-dark-text v12-font-weight-500 v12-font-28">有效期至:</text>
|
||||||
|
<text class='v12-primary-text v12-font-weight-500 v12-font-28'>{{ data.endTime }}</text>
|
||||||
|
</view>
|
||||||
|
<!-- status: 0-未使用,1-已使用,2-已过期 -->
|
||||||
|
<view
|
||||||
|
v-if="data.status === 2"
|
||||||
|
class="coupons__tag coupons__tag-expire v12-font-24"
|
||||||
|
>已到期</view>
|
||||||
|
<view
|
||||||
|
v-if="data.status === 0 && !radioModel"
|
||||||
|
class="coupons__tag coupons__tag-expire v12-font-24"
|
||||||
|
>不可用</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
<view class="coupons__rules">
|
<view class="coupons__rules">
|
||||||
<view class="coupons__rules-title" @click="changeRules()">使用规则
|
<view class="coupons__rules-title v12-font-22" @click="changeRules()">使用规则
|
||||||
<image :class="{'open':isOpen}" :src="webUrl + '/20231125220409665027.png'" mode="scaleToFill"/>
|
<image :class="{'open':isOpen}" :src="webUrl + '/20231125220409665027.png'" mode="scaleToFill"/>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
:class="isOpen ? 'auto-height' : ''"
|
:class="isOpen ? 'auto-height' : ''"
|
||||||
class="coupon-html"
|
class="coupon-html"
|
||||||
>
|
>
|
||||||
<rich-text :nodes="data.description" />
|
<rich-text class='v12-font-22 v12-dark1-text' :nodes="data.description" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -81,20 +85,45 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
.check-radio{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 10px;
|
||||||
|
right: 16px;
|
||||||
|
height: 32rpx;
|
||||||
|
width: 32rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 2px solid #C52733;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
overflow: hidden;
|
||||||
|
radio {
|
||||||
|
margin-right: -6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.image-wrap{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 30rpx 0;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
position: relative
|
||||||
|
}
|
||||||
.components-coupons {
|
.components-coupons {
|
||||||
width: 686rpx;
|
width: 686rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 2rpx solid #FF564A;
|
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
background: #fff;
|
||||||
image {
|
image {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupons__cover {
|
.coupons__cover {
|
||||||
width: 100%;
|
width: 600rpx;
|
||||||
height: auto;
|
height: 160rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupons__section {
|
.coupons__section {
|
||||||
@@ -147,7 +176,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.coupon-html {
|
.coupon-html {
|
||||||
height: 80rpx;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transition: all .3s;
|
transition: all .3s;
|
||||||
&.auto-height {
|
&.auto-height {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="popup-coupons">
|
<view class="popup-coupons">
|
||||||
<view class="popup-box">
|
<view class="popup-box">
|
||||||
<view class="popup-title bold tc">选择优惠券</view>
|
<view class="popup-title bold tc">优惠详情</view>
|
||||||
<SubSection
|
<SubSection
|
||||||
:current="current"
|
:current="current"
|
||||||
:can-use="canUse"
|
:can-use="canUse"
|
||||||
@@ -105,6 +105,7 @@ export default {
|
|||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.popup-coupons {
|
.popup-coupons {
|
||||||
|
background: #F0F0F0;
|
||||||
.popup-box {
|
.popup-box {
|
||||||
padding: 34rpx 32rpx;
|
padding: 34rpx 32rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user