|
|
@ -7,26 +7,27 @@ |
|
|
|
</view> --> |
|
|
|
|
|
|
|
<!-- item --> |
|
|
|
<view class="item flex_col flex_start_y bg-white padding " v-for="(i,k) in pageList.list" :key="k" @click="jumpPage('eventGrade')"> |
|
|
|
<view class="item flex_col flex_start_y bg-white padding " v-for="(i,k) in pageList" :key="k" @click="jumpDetail(i)"> |
|
|
|
|
|
|
|
<view class="time flex_row"> |
|
|
|
<image src="../../static/images/event/event_lock.png" mode=""></image> |
|
|
|
<text>2020.06.22</text> |
|
|
|
<text>{{i.match_sign_before}}</text> |
|
|
|
<text>前报名</text> |
|
|
|
</view> |
|
|
|
<view class="box flex_row flex_start_y"> |
|
|
|
|
|
|
|
<image class="img" src="../../static/images/index/index_cup.png" mode=""></image> |
|
|
|
<image class="img" :src="i.match_cover" mode=""></image> |
|
|
|
|
|
|
|
<view class="info flex_col flex_start flex_start_y"> |
|
|
|
<view class="event_title flex_row flex_start flex_start_y"> |
|
|
|
<text class="tag tag_green" >团队</text> |
|
|
|
<text class="tag tag_blue" >个人</text> |
|
|
|
<text class="">{{title|autoAddPoints}}</text> |
|
|
|
<!-- <text class="tag tag_green" >团队</text> |
|
|
|
<text class="tag tag_blue" >个人</text> --> |
|
|
|
<text class="tag tag_blue" :class="i.match_type=='personal'?'tag_blue':'tag_green'" >{{i.match_type_text}}</text> |
|
|
|
<text class="match_name" >{{i.match_name|autoAddPoints}}</text> |
|
|
|
</view> |
|
|
|
<view class="location flex_row"> |
|
|
|
<image src="../../static/images/event/event_location.png" mode=""></image> |
|
|
|
<text class="text-maxline-one">{{address}}</text> |
|
|
|
<text class="text-maxline-one">{{i.match_addr}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
@ -34,7 +35,7 @@ |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="load-finish">我是有底线的~</view> |
|
|
|
<view class="load-finish" v-if="listLoadFinished">我是有底线的~</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</template> |
|
|
@ -42,16 +43,14 @@ |
|
|
|
import {matchList} from "../../nxTemp/apis/userAPI.js" |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
title:"默认块级元素默认块级元素默认块级元素", |
|
|
|
address:"广州省广州市区白云区广州省广州市区白云区永泰广州省广州市区白云区广州省广州市区白云区永泰", |
|
|
|
return { |
|
|
|
postData:{ |
|
|
|
page:1, |
|
|
|
page_size:10, |
|
|
|
token:123 |
|
|
|
page_size:10 |
|
|
|
}, |
|
|
|
listLoadFinished:false, |
|
|
|
listTotal:0, |
|
|
|
pageList:[] |
|
|
|
|
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(opt) { |
|
|
@ -59,20 +58,41 @@ |
|
|
|
}, |
|
|
|
onUnload() { |
|
|
|
this.resetPostData() |
|
|
|
}, |
|
|
|
onPullDownRefresh(){ |
|
|
|
console.log("onPullDownRefresh"); |
|
|
|
}, |
|
|
|
onReachBottom(){ |
|
|
|
console.log("onReachBottom"); |
|
|
|
this.updatePage() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
jumpDetail(i){ |
|
|
|
let {match_id} = i |
|
|
|
this.$Router.push({ |
|
|
|
name:"eventGrade", |
|
|
|
params:{ |
|
|
|
match_id |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
jumpPage(name){ |
|
|
|
this.$Router.push({name}) |
|
|
|
}, |
|
|
|
//更新页面列表 |
|
|
|
updatePage() { |
|
|
|
if(this.listLoadFinished)return this.$tools.showNone("已加载完毕") |
|
|
|
matchList(this.postData).then(res => { |
|
|
|
this.$tools.showNone("已更新"); |
|
|
|
this.pageList.push(res) |
|
|
|
this.postData.page++ |
|
|
|
this.pageList.push(...res.list) |
|
|
|
checkListLoadFinished(res,this); |
|
|
|
}).catch(e=>{ |
|
|
|
this.$tools.showNone(e.errMsg) |
|
|
|
}) |
|
|
|
function checkListLoadFinished(res,that){ |
|
|
|
if(that.pageList.length == res.total)that.listLoadFinished = true |
|
|
|
else that.postData.page++ |
|
|
|
} |
|
|
|
}, |
|
|
|
//预留 |
|
|
|
getFilteredItem(item){ |
|
|
@ -142,6 +162,7 @@ page{ |
|
|
|
display: inline; |
|
|
|
> text{ |
|
|
|
margin-left: 10rpx; |
|
|
|
// margin-bottom: 10rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.tag{ |
|
|
@ -153,9 +174,11 @@ page{ |
|
|
|
text-align: center; |
|
|
|
line-height: 36rpx; |
|
|
|
padding: 5rpx 5rpx; |
|
|
|
// margin: 10rpx 0; |
|
|
|
|
|
|
|
} |
|
|
|
.match_name{ |
|
|
|
// padding-top: 50rpx; |
|
|
|
} |
|
|
|
.tag_blue{ |
|
|
|
color: #32C5FF; |
|
|
|
background: #E0F6FF; |
|
|
|