问题修复

This commit is contained in:
YeMingfei666 2025-10-17 11:25:21 +08:00
parent 76cf312e12
commit 2882a50828
3 changed files with 55 additions and 13 deletions

View File

@ -67,7 +67,7 @@
<view class="u-flex u-col-center u-row-between">
<view>
<view class="color-333 u-font-32 font-bold">与优惠券同享</view>
<view class="color-666 u-font-24 u-m-t-4">不能和优惠券同时使用</view>
<view class="color-666 u-font-24 u-m-t-4">开启后可与优惠券同时使用</view>
</view>
<up-switch v-model="form.withCoupon" size="18"></up-switch>
</view>

View File

@ -79,7 +79,7 @@
<text class="text-tips text-tips1"></text>
</view>
<view class="u-flex u-m-t-24">
<text class="u-m-r-24"> 返现比例</text>
<text class="u-m-r-24"> {{form.cashbackType === 'percentage' ? '返现比例' : '返现金额'}}</text>
<input
class="my-input"
type="number"

View File

@ -12,7 +12,7 @@
<text> ID:{{ item.id }} </text>
<text class="u-m-l-24"> 优先级:{{ item.sort }} </text>
</view>
<view class="tag success">进行中</view>
<view class="tag" :class="[returnTagClass(item)]">{{ returnStatus(item) }}</view>
</view>
<view class="coor-333 font-bold u-m-t-16"
>活动日期{{ returnActivityDate(item) }}</view
@ -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);
@ -70,7 +70,7 @@ async function getList() {
if (pageNum.value == 1) {
list.value = res.records || [];
} else {
list.value = [...list.value, ...res.records || []];
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++;
@ -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;
}