You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
319 lines
6.5 KiB
319 lines
6.5 KiB
<template>
|
|
|
|
<BaseContainer>
|
|
<NavBar title="我的报名" fixed />
|
|
<view class="activity-list">
|
|
<view class="tab">
|
|
<view
|
|
v-for="(item, index) in navs"
|
|
:key="index"
|
|
:class="{ on: navActive === index }"
|
|
@click="navActives(index)"
|
|
>
|
|
{{ item }}
|
|
</view>
|
|
</view>
|
|
<view class="content">
|
|
<view v-if="activityList.length">
|
|
<navigator
|
|
class="item"
|
|
v-for="(item, index) in activityList"
|
|
:key="index"
|
|
:url="`/pages/my/order_verify?order_id=${item.order_id}`"
|
|
>
|
|
<view>
|
|
<view>单号:{{ item.order_id }}</view>
|
|
<view v-if="item.status == 0">待核销</view>
|
|
<view v-else-if="item.status == 1">已核销</view>
|
|
</view>
|
|
<view>
|
|
<view class="item">
|
|
<image class="img" :src="item.image" alt="" />
|
|
</view>
|
|
<view>
|
|
<view>{{ item.title }}</view>
|
|
<view>
|
|
<text class="iconfont icondidian"></text>{{ item.province }}{{ item.city
|
|
}}{{ item.district }}{{ item.detail }}
|
|
</view>
|
|
<view class="price-wrap">
|
|
<view class="price">
|
|
¥<text>{{ item.pay_price }}</text>
|
|
</view>
|
|
<view>{{ item.upUnmber }}人参加</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</navigator>
|
|
</view>
|
|
<view v-if="!activityList.length && loadend" class="empty">
|
|
<image
|
|
mode="aspectFill"
|
|
:src="getImgPath('/wap/first/zsff/images/empty.png')"
|
|
alt="暂无数据"
|
|
class="empty"
|
|
/>
|
|
<view>暂无数据</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</BaseContainer>
|
|
</template>
|
|
|
|
<script>
|
|
import { getActivitySignInList } from "@/api/activity";
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
navs: ["全部", "待核销", "已核销"],
|
|
navActive: 0,
|
|
activityList: [],
|
|
loading: false,
|
|
loadend: false,
|
|
page: 1,
|
|
limit: 20,
|
|
loadTitle: "",
|
|
};
|
|
},
|
|
onLoad() {
|
|
this.getActivitySignList();
|
|
},
|
|
onReachBottom() {
|
|
this.getActivitySignList();
|
|
},
|
|
methods: {
|
|
navActives(index) {
|
|
this.navActive = index;
|
|
this.page = 1;
|
|
this.loading = false;
|
|
this.loadend = false;
|
|
this.activityList = [];
|
|
this.getActivitySignList();
|
|
},
|
|
// 获取活动列表
|
|
async getActivitySignList() {
|
|
if (this.loading || this.loadend) return;
|
|
this.loading = true;
|
|
uni.showLoading({ mask: true });
|
|
|
|
try {
|
|
const { data: list } = await getActivitySignInList({
|
|
page: this.page,
|
|
limit: this.limit,
|
|
navActive: this.navActive,
|
|
});
|
|
uni.hideLoading();
|
|
this.activityList.push.apply(this.activityList, list);
|
|
this.loadend = list.length < this.limit;
|
|
this.loadTitle = this.loadend ? "已全部加载完" : "上拉加载更多";
|
|
this.page++;
|
|
this.loading = false;
|
|
this.$set(this, "activityList", this.activityList);
|
|
} catch (err) {
|
|
uni.hideLoading();
|
|
this.loadTitle = "上拉加载更多";
|
|
this.loading = false;
|
|
this.$util.showMsg(err);
|
|
}
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
<style>
|
|
page {
|
|
background: #f5f5f5;
|
|
}
|
|
</style>
|
|
<style scoped lang="scss">
|
|
|
|
.price-wrap {
|
|
display: flex;
|
|
align-items: center;
|
|
font-size: 24rpx;
|
|
line-height: 33rpx;
|
|
color: #ff6b00;
|
|
}
|
|
.price-wrap .price {
|
|
flex: 1;
|
|
font-weight: bold;
|
|
font-size: 24rpx;
|
|
line-height: 45rpx;
|
|
color: #ff6b00;
|
|
}
|
|
.price-wrap .price text {
|
|
font-size: 32rpx;
|
|
}
|
|
.activity-list .item > view > view > view:last-child {
|
|
font-weight: normal;
|
|
}
|
|
.item image{
|
|
display: block;
|
|
width: 250rpx;
|
|
height: 140rpx;
|
|
border-radius: 10rpx;
|
|
object-fit: cover;
|
|
}
|
|
/* 我的报名 */
|
|
.activity-list .empty {
|
|
margin-top: 200rpx;
|
|
font-size: 28rpx;
|
|
text-align: center;
|
|
color: #cdcdcd;
|
|
}
|
|
|
|
.activity-list .empty image {
|
|
display: block;
|
|
width: 414rpx;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.activity-list {
|
|
padding: 0 20rpx;
|
|
}
|
|
|
|
.activity-list .tab {
|
|
position: fixed;
|
|
top: calc(108rpx + var(--safe-top));
|
|
right: 20rpx;
|
|
left: 20rpx;
|
|
z-index: 10;
|
|
|
|
display: flex;
|
|
border-radius: 12rpx;
|
|
background: #ffffff;
|
|
}
|
|
|
|
.activity-list .tab view {
|
|
position: relative;
|
|
|
|
flex: 1;
|
|
font-size: 28rpx;
|
|
line-height: 90rpx;
|
|
text-align: center;
|
|
color: #333333;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.activity-list .tab .on {
|
|
color: #2c8eff;
|
|
}
|
|
|
|
.activity-list .tab .on::after {
|
|
content: "";
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 50%;
|
|
z-index: 2;
|
|
width: 70rpx;
|
|
height: 4rpx;
|
|
border-radius: 2rpx;
|
|
background: #2c8eff;
|
|
|
|
transform: translateX(-50%);
|
|
}
|
|
|
|
.activity-list .content {
|
|
padding-top: 140rpx ;
|
|
}
|
|
|
|
.activity-list .item {
|
|
border-radius: 12rpx;
|
|
background: #ffffff;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.activity-list .item + .item {
|
|
margin-top: 20rpx;
|
|
}
|
|
|
|
.activity-list .item > view {
|
|
display: flex;
|
|
}
|
|
|
|
.activity-list .item > view:first-child {
|
|
justify-content: space-between;
|
|
padding: 23rpx 30rpx;
|
|
font-size: 28rpx;
|
|
line-height: 40rpx;
|
|
color: #999999;
|
|
}
|
|
|
|
.activity-list .item > view:first-child > view:last-child {
|
|
color: #ff6b00;
|
|
}
|
|
|
|
.activity-list .item > view:first-child > view.verify {
|
|
color: #2c8eff;
|
|
}
|
|
|
|
.activity-list .item > view:last-child {
|
|
padding: 40rpx 30rpx;
|
|
border-top: 1px solid #f5f5f5;
|
|
}
|
|
|
|
.activity-list .itemimage {
|
|
display: block;
|
|
width: 250rpx;
|
|
height: 140rpx;
|
|
border-radius: 10rpx;
|
|
|
|
object-fit: cover;
|
|
}
|
|
|
|
.activity-list .item > view:last-child > view:last-child {
|
|
flex: 1;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
min-width: 0;
|
|
margin-left: 30rpx;
|
|
}
|
|
|
|
.activity-list .item > view > view > view:first-child {
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
font-size: 28rpx;
|
|
line-height: 40rpx;
|
|
color: #333333;
|
|
}
|
|
|
|
.activity-list .item > view > view > view:nth-child(2) {
|
|
flex: 1;
|
|
min-height: 0;
|
|
margin-top: 9rpx;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
font-size: 22rpx;
|
|
line-height: 30rpx;
|
|
color: #999999;
|
|
}
|
|
|
|
.activity-list .iconfont {
|
|
margin-right: 10rpx;
|
|
font-size: 19rpx;
|
|
}
|
|
|
|
.activity-list .item > view > view > view:last-child {
|
|
font-weight: bold;
|
|
font-size: 24rpx;
|
|
color: #ff6b00;
|
|
}
|
|
|
|
.activity-list .itemtext {
|
|
font-size: 32rpx;
|
|
}
|
|
.empty{
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
width: 414rpx;
|
|
height: 414rpx;
|
|
transform: translate(-50%, -50%);
|
|
-webkit-touch-callout: none;
|
|
pointer-events: none;
|
|
}
|
|
</style>
|
|
|