提交 f7c90bbd 编写于 作者: zhongyao.qiao's avatar zhongyao.qiao

Merge branch 'feature/xym' into 'release'

Feature/xym

See merge request !10
......@@ -62,7 +62,7 @@
</div>
</van-pull-refresh>
</div>
<coupon-tips :visible.sync="show" @close="close" />
<coupon-tips :view-value="selectedCoupon" :visible.sync="show" @close="close" />
</div>
</section>
</template>
......@@ -86,6 +86,7 @@ export default {
},
data() {
return {
selectedCoupon:{},
couponList: [],
hasTips: true,
show: false,
......@@ -203,12 +204,14 @@ export default {
.then((res) => {
console.log(res, "receiveCoupon");
// couponType 1 满减 2 立减 todo 现金红包
// if (item.couponType === 2) {
// this.show = true;
// } else {
if (item.couponType == 4) {
this.selectedCoupon = item;
console.log("this.selectedCoupon", this.selectedCoupon);
this.show = true;
} else {
this.$toast("领取成功");
// this.getSearchCoupons();
// }
}
})
.catch((err) => {
this.$set(this.couponList[index], "hasDown", false);
......@@ -229,7 +232,9 @@ export default {
}
console.log(this.show, item);
},
close() {},
close() {
this.getSearchCoupons();
},
goBack() {
console.log("back");
window.history.back();
......
......@@ -30,6 +30,13 @@
>
{{ couponDetail.requiredTotalFee / 100 }}可用
</div>
<div v-if="couponDetail.couponType == 4" class="card-item-left-top">
<span :class="{ unit: true, opacity5: hasUsed }">¥</span>
<span :class="{ amount: true, opacity5: hasUsed }">{{ couponDetail.discountAmount / 100 }}</span>
</div>
<div v-if="couponDetail.couponType == 4" :class="['card-item-left-bottom', hasUsed ? 'cr-c1c1c1 ' : '']"
>现金红包</div
>
</div>
<div
v-if="couponDetail.couponType == 3"
......@@ -39,6 +46,7 @@
>{{ couponDetail.discountPercent }}</span
>
</div>
</div>
<div class="bar">
<div class="bar-top" />
......@@ -116,7 +124,7 @@
</div>
</div>
<div
v-if="[0, 1, 4].includes(couponDetail.couponStatus)"
v-if="[0, 1, 4].includes(couponDetail.couponStatus) && couponBtnShow"
class="use-coupon"
@click="goUse"
>
......@@ -241,6 +249,14 @@ export default {
hasUsed() {
return [3, 5, 6, 7, 8].includes(this.couponDetail.couponStatus);
},
couponBtnShow() {
console.log('tag', this.$route.path)
if (this.$route.path === "/coupon-center") {
return true;
} else {
return this.couponDetail.couponType == 4 ? false : true;
}
},
},
methods: {
// 获取日期
......@@ -270,7 +286,7 @@ export default {
if (
this.$route.path == "/coupon-center" &&
this.couponDetail.couponStatus == 0 &&
!this.hasDown
!this.hasDown && this.couponDetail.couponType != 4
) {
this.$emit("update:hasDown", !this.hasDown);
}
......
<template>
<div>
<div class="container">
<van-dialog
v-model="visible"
class="coupon-dialog"
:show-confirm-button="false"
>
<div class="body">
<div class="content">
<div class="title">
<div class="title-text">
领取成功!
......@@ -26,7 +26,7 @@
<div class="card-item-left shadow">
<div class="card-item-left-top">
<span class="unit">¥</span> <span class="amount">
20
{{ amountPrice }}
</span>
</div>
<div class="card-item-left-bottom">
......@@ -36,13 +36,13 @@
<div class="card-item-right flex shadow">
<div class="card-item-right-center">
<div class="right-coupon">
可至「云鹊医App-个人中心-账户余额」中提现
可至「云鹊医App/小程序-个人中心-账户余额」中提现
</div>
</div>
</div>
</div>
</div>
<div class="card-bottom">
<div @click="navigateToWithdraw" class="card-bottom">
<span class="card-text"> 去提现 </span>
</div>
</div>
......@@ -50,7 +50,9 @@
</div>
</template>
<script>
export default {
import { getWebPageUrl } from "@/utils";
export default {
components: {},
props: {
tabsDetail: {
......@@ -62,14 +64,25 @@
visible: {
type: Boolean,
},
viewValue: {
type: Object,
default() {
return {}
}
}
},
data() {
return {
currentIndex: 0,
};
},
mounted() {},
mounted() { },
computed: {
amountPrice() {
let price = this.viewValue.discountAmount / 100;
return Number.isNaN(price) ? "" : price;
},
},
methods: {
changeTab(index) {
if (this.currentIndex === index) return;
......@@ -80,17 +93,22 @@
this.$emit('update:visible', false);
this.$emit('close', false);
},
navigateToWithdraw() {
let webUrl = getWebPageUrl(`mall/banlance-detail?type=1`);
location.replace(webUrl);
return
}
},
};
};
</script>
<style scoped lang="less">
.coupon-dialog{
/deep/ .van-dialog__content{
height: 273px;
}
.body {
height: 215px;
width: 295px;
.coupon-dialog{
height: auto !important;
overflow: visible !important;
.content {
position: absolute;
// height: 215px;
width: 290px;
background: url("https://files.yunqueyi.com/image/png/common/20240510112413239.png")
no-repeat;
background-size: 100% 100%;
......@@ -99,13 +117,14 @@
left: 50%;
transform: translate(-50%, -50%);
top: 50%;
box-sizing: content-box;
padding: 28px 24px 30px;
.title {
position: relative;
margin-bottom: 25px;
&-text {
font-weight: 600;
font-weight: bold;
font-size: 28px;
color: #812603;
line-height: 28px;
......@@ -121,9 +140,9 @@
.card-item {
margin-bottom: 10px;
&-left {
width: 119px;
width: 117px;
&-top {
font-weight: 600;
font-weight: bold;
font-size: 33px;
color: #fff;
line-height: 33px;
......@@ -133,13 +152,13 @@
align-items: baseline;
justify-content: center;
.unit {
font-weight: 600;
font-weight: bold;
font-size: 15px;
color: #fff;
line-height: 15px;
}
.amount {
font-weight: 600;
font-weight: bold;
font-size: 33px;
color: #fff;
line-height: 33px;
......@@ -193,8 +212,8 @@
padding: 0 14px;
height: 100px;
.right-coupon {
font-weight: 600;
font-size: 13px;
font-weight: bold;
font-size: 11px;
color: #fff;
line-height: 15px;
padding-top: 31px;
......@@ -219,7 +238,7 @@
no-repeat;
background-size: 100% 100%;
.card-text {
font-weight: 600;
font-weight: bold;
font-size: 16px;
color: #ffffff;
line-height: 19px;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册