问题修复

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 class="u-flex u-col-center u-row-between">
<view> <view>
<view class="color-333 u-font-32 font-bold">与优惠券同享</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> </view>
<up-switch v-model="form.withCoupon" size="18"></up-switch> <up-switch v-model="form.withCoupon" size="18"></up-switch>
</view> </view>

View File

@ -79,7 +79,7 @@
<text class="text-tips text-tips1"></text> <text class="text-tips text-tips1"></text>
</view> </view>
<view class="u-flex u-m-t-24"> <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 <input
class="my-input" class="my-input"
type="number" type="number"

View File

@ -12,7 +12,7 @@
<text> ID:{{ item.id }} </text> <text> ID:{{ item.id }} </text>
<text class="u-m-l-24"> 优先级:{{ item.sort }} </text> <text class="u-m-l-24"> 优先级:{{ item.sort }} </text>
</view> </view>
<view class="tag success">进行中</view> <view class="tag" :class="[returnTagClass(item)]">{{ returnStatus(item) }}</view>
</view> </view>
<view class="coor-333 font-bold u-m-t-16" <view class="coor-333 font-bold u-m-t-16"
>活动日期{{ returnActivityDate(item) }}</view >活动日期{{ returnActivityDate(item) }}</view
@ -22,7 +22,7 @@
<text class="no-wrap"> {{ returnCanUseTime(item) }}</text> <text class="no-wrap"> {{ returnCanUseTime(item) }}</text>
</view> </view>
<view class="u-m-t-26"> <view class="u-m-t-26">
<u-line ></u-line> <u-line></u-line>
</view> </view>
<view class="color-333 u-m-t-24"> <view class="color-333 u-m-t-24">
<view>活动内容</view> <view>活动内容</view>
@ -55,7 +55,7 @@ import {
} from "@dcloudio/uni-app"; } from "@dcloudio/uni-app";
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import * as discountActivityApi from "@/http/api/market/discountActivity.js"; import * as discountActivityApi from "@/http/api/market/discountActivity.js";
import { is } from "immutable"; import dayjs from "dayjs";
const list = ref([]); const list = ref([]);
const pageNum = ref(1); const pageNum = ref(1);
@ -67,10 +67,10 @@ async function getList() {
pageSize: 10, pageSize: 10,
}); });
if (res) { if (res) {
if( pageNum.value==1){ if (pageNum.value == 1) {
list.value = res.records || []; list.value = res.records || [];
}else{ } else {
list.value = [...list.value, ...res.records || []]; list.value = [...list.value, ...(res.records || [])];
} }
isEnd.value = pageNum.value >= res.totalPage * 1 ? true : false; isEnd.value = pageNum.value >= res.totalPage * 1 ? true : false;
console.log(isEnd.value); 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(() => { onReachBottom(() => {
if (!isEnd.value) { if (!isEnd.value) {
pageNum.value++; pageNum.value++;
@ -174,7 +204,19 @@ onShow(() => {
background-color: #edfff0; background-color: #edfff0;
color: #5bbc6d; 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; background-color: #f7f7f7;
color: #999; color: #999;
} }