4dfe89e4
monkeyhouyi
初始化
|
1
2
|
<template>
<view class="page">
|
00e7322c
monkeyhouyi
我的活动申请
|
3
|
<view class="tabs-box">
|
1b38b4ce
monkeyhouyi
商铺、广告-列表、详情
|
4
5
|
<u-tabs-swiper ref="tabs" :current="current" :list="tabList" @change="tabsChange" :is-scroll="false" :font-size="24" active-color="#0FBB59" :height="70">
</u-tabs-swiper>
|
00e7322c
monkeyhouyi
我的活动申请
|
6
|
</view>
|
4dfe89e4
monkeyhouyi
初始化
|
7
8
|
<!-- 搜索 -->
<view class="head-search">
|
00e7322c
monkeyhouyi
我的活动申请
|
9
10
|
<u-search bg-color="#fff" placeholder="请输入关键词" v-model="query.keyword" :show-action="false" @search="search"></u-search>
<u-button type="success" @click="search">搜索</u-button>
|
4dfe89e4
monkeyhouyi
初始化
|
11
|
</view>
|
4dfe89e4
monkeyhouyi
初始化
|
12
13
|
<view class="goods-data">
<view class="goods-list">
|
00e7322c
monkeyhouyi
我的活动申请
|
14
15
|
<view class="good-item" v-for="(v, i) in datalist" :key="i">
<view class="body">
|
354e3811
杨鑫
'验收'
|
16
|
<image :src="v.coverImage" ></image>
|
00e7322c
monkeyhouyi
我的活动申请
|
17
|
<view class="info">
|
354e3811
杨鑫
'验收'
|
18
|
<view class="title">{{v.activityName}}</view>
|
00e7322c
monkeyhouyi
我的活动申请
|
19
20
21
|
<view class="info-items">
<view class="info-item">
<view class="label">活动时间:</view>
|
354e3811
杨鑫
'验收'
|
22
|
<text>{{v.startTime}}</text>
|
00e7322c
monkeyhouyi
我的活动申请
|
23
24
25
|
</view>
<view class="info-item">
<view class="label">参与商家:</view>
|
354e3811
杨鑫
'验收'
|
26
|
<text>{{v.maxParticipants}}人</text>
|
00e7322c
monkeyhouyi
我的活动申请
|
27
28
29
|
</view>
<view class="info-item">
<view class="label">活动状态:</view>
|
354e3811
杨鑫
'验收'
|
30
|
<text>{{v.auditStatus =='1'?'待提交':v.auditStatus =='2'?'待审核':v.auditStatus =='3'?'审核通过':v.auditStatus =='4'?'审核驳回':''}}</text>
|
00e7322c
monkeyhouyi
我的活动申请
|
31
|
</view>
|
4dfe89e4
monkeyhouyi
初始化
|
32
33
34
|
</view>
</view>
</view>
|
00e7322c
monkeyhouyi
我的活动申请
|
35
|
<view class="footer">
|
354e3811
杨鑫
'验收'
|
36
37
38
39
40
|
<!-- <u-button type="primary" size="mini" v-if="v.auditStatus == '1'">编辑</u-button> -->
<u-button type="success" size="mini" @click="tijiao('2',v.id)" v-if="v.auditStatus == '1'" style="margin-right: 22rpx;">提交审核</u-button>
<u-button type="success" size="mini" @click="toDetail(v.id, '/pages/activityDetail/activityDetail')" style="margin-right: 22rpx;">查看详情</u-button>
<u-button type="info" size="mini" @click="tijiao('1',v.id)" v-if="v.auditStatus == '2'" style="margin-right: 22rpx;">撤回</u-button>
<u-button type="info" size="mini" @click="delact(v.id)" v-if="v.auditStatus == '1'" style="margin-right: 22rpx;">删除</u-button>
|
00e7322c
monkeyhouyi
我的活动申请
|
41
|
</view>
|
4dfe89e4
monkeyhouyi
初始化
|
42
|
</view>
|
354e3811
杨鑫
'验收'
|
43
|
<!-- <u-loadmore :status="statuslist" @loadmore='loading' style="width: 100%; text-align: center;"/> -->
|
4dfe89e4
monkeyhouyi
初始化
|
44
45
|
</view>
</view>
|
00e7322c
monkeyhouyi
我的活动申请
|
46
47
48
49
|
<view style="height: 120rpx;"></view>
<view class="page-footer">
<u-button type="success" @click="toAdd">活动申请</u-button>
</view>
|
4dfe89e4
monkeyhouyi
初始化
|
50
51
52
53
54
55
56
|
</view>
</template>
<script>
export default {
data() {
return {
|
00e7322c
monkeyhouyi
我的活动申请
|
57
58
59
60
61
62
63
64
65
66
|
tabList:[
{ name: '全部' },
{ name: '待提交' },
{ name: '待审核' },
{ name: '通过' },
{ name: '驳回' },
{ name: '进行中' },
{ name: '已结束' },
],
current: 0,
|
354e3811
杨鑫
'验收'
|
67
|
datalist: [],
|
00e7322c
monkeyhouyi
我的活动申请
|
68
69
70
71
72
73
74
|
total: 2,
statuslist: 'loadmore',
query: {
keyword: '',
pageSize: 10,
pageNum: 0,
},
|
c62ab6f2
杨鑫
1
|
75
76
|
listIn:0,
num:0,
|
354e3811
杨鑫
'验收'
|
77
78
79
80
81
|
pageIndex :{
pageNumber: 1,
pageSize: 10,
createUser:uni.getStorageSync('shopId')
}
|
4dfe89e4
monkeyhouyi
初始化
|
82
83
|
};
},
|
c62ab6f2
杨鑫
1
|
84
|
onLoad(option) {
|
00e7322c
monkeyhouyi
我的活动申请
|
85
86
87
|
this.num = option.id;
this.statuslist = 'nomore';
},
|
354e3811
杨鑫
'验收'
|
88
89
90
91
92
93
94
95
96
97
98
|
// onPullDownRefresh(e) {
// let that = this
// that.statuslist = 'loading';
// this.page = 0;
// setTimeout(() => {
// that.datalist = [{}];
// that.statuslist = that.datalist.length >= that.total ? 'nomore' : 'loadmore';
// uni.stopPullDownRefresh();
// }, 1000);
// },
|
00e7322c
monkeyhouyi
我的活动申请
|
99
100
|
onReachBottom(e) {
// this.loading();
|
c62ab6f2
杨鑫
1
|
101
|
},
|
354e3811
杨鑫
'验收'
|
102
103
104
|
mounted() {
this.getAll()
},
|
4dfe89e4
monkeyhouyi
初始化
|
105
|
methods: {
|
354e3811
杨鑫
'验收'
|
106
107
108
109
110
111
|
toDetail(item, path) {
uni.navigateTo({
url: `${path}?item=${item}`
})
},
|
00e7322c
monkeyhouyi
我的活动申请
|
112
|
tabsChange(val) {
|
354e3811
杨鑫
'验收'
|
113
114
115
116
117
118
119
|
this.current = val
if(val == 0){
this.getAll()
}else{
this.getAll(val )
}
|
00e7322c
monkeyhouyi
我的活动申请
|
120
|
},
|
354e3811
杨鑫
'验收'
|
121
122
123
124
125
126
127
128
129
130
|
getAll(val){
if(val !=0){
this.pageIndex.auditStatus = val
}
this.$http.sendRequest('/cereActivityApplication/queryByPage', 'POST',this.pageIndex,1).then(res => {
this.datalist = res.data.data.content
}).catch(err => {
console.log(err)
//请求失败
})
|
00e7322c
monkeyhouyi
我的活动申请
|
131
|
},
|
354e3811
杨鑫
'验收'
|
132
133
134
135
136
137
138
139
140
141
142
143
144
|
search() {},
// loading() {
// let that = this
// if(that.statuslist == 'nomore') return;
// that.statuslist = 'loading';
// that.query.pageNum = ++that.query.pageNum;
// setTimeout(() => {
// let data = [{}, {}];
// that.datalist = [...that.datalist, ...data];
// console.log(that.datalist);
// that.statuslist = that.datalist.length >= that.total ? 'nomore' : 'loadmore';
// }, 300)
// },
|
4dfe89e4
monkeyhouyi
初始化
|
145
146
147
148
149
|
sel(val){
this.listIn = val
},
reconciliationdetail() {
|
00e7322c
monkeyhouyi
我的活动申请
|
150
151
152
153
154
|
},
toAdd() {
uni.navigateTo({
url: '/pages/activityAdd/activityAdd'
})
|
354e3811
杨鑫
'验收'
|
155
156
157
158
159
|
},
tijiao(val,ids){
let pageIndex = {
id:ids,
auditStatus:val
|
4dfe89e4
monkeyhouyi
初始化
|
160
|
}
|
354e3811
杨鑫
'验收'
|
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
|
this.$http.sendRequest('/cereActivityApplication/edit', 'POST',pageIndex,1).then(res => {
this.current = 0
this.getAll()
}).catch(err => {
console.log(err)
//请求失败
})
},
delact(ids){
let padge = {
id:ids
}
this.$http.sendRequest('/cereActivityApplication/deleteById', 'POST',padge,1).then(res => {
this.current = 0
this.getAll()
}).catch(err => {
console.log(err)
//请求失败
})
},
|
4dfe89e4
monkeyhouyi
初始化
|
181
182
183
184
185
186
187
|
}
}
</script>
<style scoped lang="scss">
@import 'mycreated.scss';
</style>
|