diff --git a/pageBwc/index/index.vue b/pageBwc/index/index.vue index 195ff38..968b9b6 100644 --- a/pageBwc/index/index.vue +++ b/pageBwc/index/index.vue @@ -67,7 +67,7 @@ 与优惠券同享 - 不能和优惠券同时使用 + 开启后,可与优惠券同时使用 diff --git a/pageMarket/consumeCashback/components/config.vue b/pageMarket/consumeCashback/components/config.vue index e9be420..338a479 100644 --- a/pageMarket/consumeCashback/components/config.vue +++ b/pageMarket/consumeCashback/components/config.vue @@ -79,7 +79,7 @@ - 返现比例 + {{form.cashbackType === 'percentage' ? '返现比例' : '返现金额'}} ID:{{ item.id }} 优先级:{{ item.sort }} - 进行中 + {{ returnStatus(item) }} 活动日期:{{ returnActivityDate(item) }} {{ returnActivityWeek(item) }} {{ returnCanUseTime(item) }} - - - + + + 活动内容: {{ returnActivityContent(item) }} @@ -55,7 +55,7 @@ import { } from "@dcloudio/uni-app"; import { ref, onMounted } from "vue"; import * as discountActivityApi from "@/http/api/market/discountActivity.js"; -import { is } from "immutable"; +import dayjs from "dayjs"; const list = ref([]); const pageNum = ref(1); @@ -67,10 +67,10 @@ async function getList() { pageSize: 10, }); if (res) { - if( pageNum.value==1){ - list.value = res.records || []; - }else{ - list.value = [...list.value, ...res.records || []]; + if (pageNum.value == 1) { + list.value = res.records || []; + } else { + list.value = [...list.value, ...(res.records || [])]; } isEnd.value = pageNum.value >= res.totalPage * 1 ? true : false; console.log(isEnd.value); @@ -139,6 +139,36 @@ function deleteDiscountActivity(item) { }, }); } + + +function returnStatus(item) { + if (item.status == 1) { + //未开始 + return "未开始"; + } + if (item.status == 2) { + //进行中 + return "进行中"; + } + if (item.status == 3) { + //已结束 + return "已结束"; + } +} +function returnTagClass(item) { + if (item.status == 1) { + //未开始 + return "tag-priority"; + } + if (item.status == 2) { + //进行中 + return "tag-green"; + } + if (item.status == 3) { + //已结束 + return "tag-end"; + } +} onReachBottom(() => { if (!isEnd.value) { pageNum.value++; @@ -146,7 +176,7 @@ onReachBottom(() => { } }); onShow(() => { - pageNum.value = 1; + pageNum.value = 1; getList(); }); @@ -174,7 +204,19 @@ onShow(() => { background-color: #edfff0; color: #5bbc6d; } - &.end { + &.tag-priority { + background-color: #fff2e6; + color: #ff9900; + } + &.tag-gray { + background-color: #f7f7f7; + color: #999; + } + &.tag-green { + background-color: #edfff0; + color: #5bbc6d; + } + &.tag-end { background-color: #f7f7f7; color: #999; }