问题修复
This commit is contained in:
parent
76cf312e12
commit
2882a50828
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
<text class="no-wrap"> {{ returnCanUseTime(item) }}</text>
|
||||
</view>
|
||||
<view class="u-m-t-26">
|
||||
<u-line ></u-line>
|
||||
<u-line></u-line>
|
||||
</view>
|
||||
<view class="color-333 u-m-t-24">
|
||||
<view>活动内容:</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);
|
||||
|
|
@ -67,10 +67,10 @@ async function getList() {
|
|||
pageSize: 10,
|
||||
});
|
||||
if (res) {
|
||||
if( pageNum.value==1){
|
||||
if (pageNum.value == 1) {
|
||||
list.value = res.records || [];
|
||||
}else{
|
||||
list.value = [...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++;
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue