2024-03-21 17:52:58 +08:00
< template >
< view >
< view class = "application-record" v-if ="listData.length" >
< navigator :url ="`/pages/activity/registrate_activity/index?id=${item.activity_id}`" hover -class = ' none ' class = "card-list" v-for ="item in listData" :key="item.activity_id" v-if="item.activity" >
< view class = "card-top" >
< view class = "card-wrapper" >
< view class = "card-status" :class ="'status'+item.activity.time_status" > { { item . activity . time _status == 0 ? '未开始' : item . activity . time _status == 1 ? '正在进行' : '已结束' } } < / view >
< view class = "btn" > 详情 < text class = 'iconfont icon-jiantou' > < / text > < / view >
< / view >
< / view >
< view v-if ="item.activity" class="card-bottom" >
< view class = "title" > { { item . activity . activity _name } } < / view >
< view class = "time" > 提交时间 : { { item . create _time } } < / view >
< / view >
< / navigator >
< / view >
< view class = 'no-shop' v-if ="!listData.length && !loading" >
< view class = 'pictrue' style = "margin: 0 auto;" >
< image :src ="`${domain}/static/images/noCart.png`" > < / image >
< text > 暂无活动 , 快去提交报名信息吧 ! < / text >
< / view >
< / view >
< / view >
< / template >
< script >
2024-03-21 18:05:36 +08:00
2024-03-21 17:52:58 +08:00
import {
getRechargeRecordList
} from '@/api/user.js'
import { HTTP _REQUEST _URL } from '@/config/app' ;
export default {
data ( ) {
return {
domain : HTTP _REQUEST _URL ,
loading : false ,
listData : [ ] ,
count : 0 ,
pageData : {
page : 1 ,
limit : 10 ,
}
}
} ,
onLoad ( ) {
this . getListData ( )
} ,
methods : {
getListData ( ) {
this . loading = true
uni . showLoading ( {
title : '数据加载中' ,
} ) ;
getRechargeRecordList ( this . pageData ) . then ( res => {
this . count = res . data . count
this . listData = this . listData . concat ( res . data . list )
uni . hideLoading ( ) ;
this . loading = false
} )
} ,
} ,
// 滚动到底部
onReachBottom ( ) {
if ( this . count == this . listData . length ) {
uni . showToast ( {
title : '没有更多啦' ,
icon : 'none' ,
duration : 1000
} ) ;
} else {
this . pageData . page += 1
this . getListData ( )
}
} ,
}
< / script >
< style lang = "scss" scoped >
. application - record {
display : flex ;
flex - direction : column ;
align - items : center ;
background - color : # F5F5F5 ;
padding : 30 rpx 30 rpx ;
. card - list {
width : 100 % ;
background - color : # fff ;
padding : 20 rpx 24 rpx ;
margin - bottom : 30 rpx ;
border - radius : 16 rpx ;
. card - top {
. card - wrapper {
display : flex ;
align - items : center ;
justify - content : space - between ;
border - bottom : 1 px solid # EEEEEE ;
padding - bottom : 30 rpx ;
. card - status {
font - size : 28 rpx ;
& . status1 {
color : # 61 CE74 ;
}
& . status - 1 {
color : # FF922C ;
}
}
. btn {
color : # 666666 ;
. iconfont {
color : # bbbbbb ;
font - size : 22 rpx ;
margin - left : 5 rpx ;
}
}
}
}
. card - bottom {
margin - top : 30 rpx ;
. title {
font - size : 28 rpx ;
font - weight : bold ;
color : # 333333 ;
}
. time {
color : # 999999 ;
font - size : 24 rpx ;
margin - top : 24 rpx ;
}
}
}
}
. no - shop {
width : 100 % ;
background - color : # fff ;
height : 100 vh ;
. pictrue {
display : flex ;
flex - direction : column ;
align - items : center ;
color : $uni - nothing - text ;
image {
width : 414 rpx ;
height : 380 rpx ;
}
}
}
< / style >