3f535f30
杨鑫
'初始'
|
1
|
<template>
|
e5b57447
杨鑫
'分包问卷'
|
2
|
<!-- 活动参与 -->
|
3f535f30
杨鑫
'初始'
|
3
|
<view class="page">
|
e5b57447
杨鑫
'分包问卷'
|
4
5
6
7
|
<view class="more page-box" @click="toMyAdd">
<u-section :bold="false" title="我的活动申请" sub-title='' :show-line="false" color="#0FBB59" >
<view slot="right">
<u-icon name="arrow-rightward" color="#0FBB59" size="28"></u-icon>
|
3f535f30
杨鑫
'初始'
|
8
|
</view>
|
e5b57447
杨鑫
'分包问卷'
|
9
10
11
12
|
</u-section>
</view>
<!-- 搜索 -->
<view class="head-search">
|
b1fef010
杨鑫
'最新代码'
|
13
|
<u-search bg-color="#fff" placeholder="请输入关键词" v-model="pageIndex.activityName" :show-action="false" @search="search"></u-search>
|
e5b57447
杨鑫
'分包问卷'
|
14
|
<u-button type="success" @click="search">搜索</u-button>
|
3f535f30
杨鑫
'初始'
|
15
|
</view>
|
3f535f30
杨鑫
'初始'
|
16
|
<view class="screen-list">
|
e5b57447
杨鑫
'分包问卷'
|
17
|
<u-dropdown menu-icon="arrow-down-fill" :title-size="24" :height="40">
|
844aa73a
杨鑫
'最新'
|
18
19
|
<u-dropdown-item v-model="pageIndex.orderingRule" title="时间排序" :options="sortTypeOptions" @change="search"></u-dropdown-item>
<u-dropdown-item v-model="pageIndex.activeState" title="活动状态" :options="statusOptions" @change="search"></u-dropdown-item>
|
e5b57447
杨鑫
'分包问卷'
|
20
|
</u-dropdown>
|
3f535f30
杨鑫
'初始'
|
21
22
23
|
</view>
<!-- 订单列表 -->
<view class="goods-data">
|
e5b57447
杨鑫
'分包问卷'
|
24
25
26
|
<u-row gutter="16" class="goods-list">
<u-col span="6" v-for="(item,index) in datalist" :key="index" @click="toDetail(item.id, '/pages/activityDetail/activityDetail')" >
<view class="demo-layout good-item">
|
b1fef010
杨鑫
'最新代码'
|
27
|
<!-- <image :src="item.coverImage" style="width: 315rpx; height: 315rpx; border-radius: 10rpx;"></image> -->
|
844aa73a
杨鑫
'最新'
|
28
|
<u-image :src="$img+item.coverImage" border-radius="10" mode="heightFix" style="margin-top:8px;margin-right:8px;height:110px" ></u-image>
|
e5b57447
杨鑫
'分包问卷'
|
29
30
31
32
|
<view class="info">
<view class="title">{{item.activityName}}</view>
<view class="huo-card-item">活动日期:<span>{{item.startTime}}至{{item.endTime}}</span></view>
<view class="huo-card-item">参与人数:<span>{{item.maxParticipants}}</span></view>
|
844aa73a
杨鑫
'最新'
|
33
34
35
36
37
|
<view style="margin-top: 5px;">
<u-tag text="进行中" type="success" mode="dark" v-if="item.activeState==1"/>
<u-tag text="未开始" type="info" mode="dark" v-if="item.activeState==0"/>
<u-tag text="已结束" type="warning" mode="dark" v-if="item.activeState==2"/>
</view>
|
3f535f30
杨鑫
'初始'
|
38
|
</view>
|
3f535f30
杨鑫
'初始'
|
39
|
</view>
|
e5b57447
杨鑫
'分包问卷'
|
40
41
42
43
44
45
46
|
</u-col>
<u-loadmore :status="status" @loadmore='loading' style="width: 100%; text-align: center;"/>
</u-row>
</view>
<view style="height: 120rpx;"></view>
<view class="page-footer">
<u-button type="success" @click="toAdd">活动申请</u-button>
|
3f535f30
杨鑫
'初始'
|
47
48
49
50
51
52
53
54
|
</view>
</view>
</template>
<script>
export default {
data() {
return {
|
e5b57447
杨鑫
'分包问卷'
|
55
56
57
|
status: 'loadmore',
datalist: [],
total: 1,
|
b1fef010
杨鑫
'最新代码'
|
58
|
|
e5b57447
杨鑫
'分包问卷'
|
59
|
sortTypeOptions: [
|
844aa73a
杨鑫
'最新'
|
60
61
|
{ label: '正序', value: 1 },
{ label: '倒序', value: 2 },
|
e5b57447
杨鑫
'分包问卷'
|
62
63
64
65
|
],
statusOptions: [
{ label: '进行中', value: 1 },
{ label: '已结束', value: 2 },
|
844aa73a
杨鑫
'最新'
|
66
|
{ label: '未开始', value: 0 },
|
e5b57447
杨鑫
'分包问卷'
|
67
68
|
],
pageIndex :{
|
b1fef010
杨鑫
'最新代码'
|
69
|
activityName: '', // 搜索项
|
844aa73a
杨鑫
'最新'
|
70
71
|
orderingRule: 1, // 排序方式
activeState:null, // 活动状态
|
e5b57447
杨鑫
'分包问卷'
|
72
73
|
pageNumber: 1,
pageSize: 10,
|
b1fef010
杨鑫
'最新代码'
|
74
|
auditStatus:'3',
|
e5b57447
杨鑫
'分包问卷'
|
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
}
}
},
onLoad() {
this.status = 'nomore';
},
onPullDownRefresh(e) {
let that = this
that.status = 'loading';
this.page = 0;
setTimeout(() => {
that.list = 1;
that.status = that.list >= that.total ? 'nomore' : 'loadmore';
uni.stopPullDownRefresh();
}, 1000);
},
onReachBottom(e) {
this.loading();
},
mounted() {
this.getAll()
|
3f535f30
杨鑫
'初始'
|
96
97
|
},
methods: {
|
e5b57447
杨鑫
'分包问卷'
|
98
|
getAll(val){
|
e5b57447
杨鑫
'分包问卷'
|
99
100
101
102
103
104
105
106
107
|
this.$http.sendRequest('/cereActivityApplication/queryByPage', 'POST',this.pageIndex,1).then(res => {
this.datalist = res.data.data.content
}).catch(err => {
console.log(err)
//请求失败
})
},
toMyAdd() {
// 跳转我的活动申请
|
3f535f30
杨鑫
'初始'
|
108
109
110
111
|
uni.navigateTo({
url: '/pages/mycreated/mycreated'
})
},
|
e5b57447
杨鑫
'分包问卷'
|
112
|
search() {
|
b1fef010
杨鑫
'最新代码'
|
113
|
|
844aa73a
杨鑫
'最新'
|
114
|
this.getAll()
|
e5b57447
杨鑫
'分包问卷'
|
115
|
},
|
844aa73a
杨鑫
'最新'
|
116
|
|
e5b57447
杨鑫
'分包问卷'
|
117
118
119
120
121
122
123
124
125
126
|
loading() {
let that = this
if(that.status == 'nomore') return;
that.status = 'loading';
that.page = ++that.page;
setTimeout(() => {
that.list += 10;
that.status = that.list >= that.total ? 'nomore' : 'loadmore';
}, 300)
},
|
3f535f30
杨鑫
'初始'
|
127
128
129
130
|
join(){
uni.navigateTo({
url: '/pages/mycreated/mycreated?id=1'
})
|
e5b57447
杨鑫
'分包问卷'
|
131
132
133
134
135
136
137
138
139
140
141
142
143
|
},
toAdd() {
uni.navigateTo({
url: '/pages/activityAdd/activityAdd'
})
},
toDetail(item, path) {
uni.navigateTo({
url: `${path}?item=${item}`
})
},
|
3f535f30
杨鑫
'初始'
|
144
145
146
147
148
149
150
|
}
}
</script>
<style scoped lang="scss">
@import 'participation.scss';
</style>
|