process.vue
4.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<script>
import ClipboardJS from 'clipboard'
import { getProgress } from '@/api/task'
export default {
name: '',
components: {},
data() {
return {
poster: '',
completeNum: 0,
left: 0,
data: {
customerList: [],
},
show: false,
}
},
computed: {},
watch: {},
created() {
let query = this.$route.query
this.poster = query.poster
getProgress(query).then(({ data }) => {
this.data = data
data.fissNum = data.fissNum || 0
data.customerList = data.customerList || []
let length = (this.completeNum = data.customerList.length)
this.left = data.fissNum - length < 0 ? 0 : data.fissNum - length
})
},
mounted() {
this.clipboard = new ClipboardJS('.copy-btn')
this.clipboard.on('success', (e) => {
this.$toast.success('复制成功')
})
this.clipboard.on('error', (e) => {
this.$toast.fail('复制失败')
})
},
destroyed() {
this.clipboard.destroy()
},
methods: {},
}
</script>
<template>
<div class="container">
<div class="title">活动兑奖</div>
<div class="generalContent">
<div class="reward-info" :style="{ filter: left ? 'blur(1px)' : 'blur(0px)' }">
<div class="listMsg">
<div class="generalFont">兑换链接</div>
<div class="codeDetail codeLink">
{{ data.rewardUrl }}
<van-button
v-if="!left"
class="copy-btn"
plain
hairline
type="info"
size="mini"
:data-clipboard-text="data.rewardUrl"
style="padding: 0px 8px;"
>
复制
</van-button>
</div>
</div>
<div class="listMsg">
<div class="generalFont">兑奖图片</div>
<!-- <div class="codeDetail codeImg">1024</div> -->
<img
class="codeDetail codeImg"
fit="contain"
:src="data.rewardImageUrl"
@click="show = true"
/>
<van-image-preview v-model="show" :images="[data.rewardImageUrl]"> </van-image-preview>
</div>
<div class="listMsg">
<div class="generalFont">兑换规则</div>
<div class="codeDetail codeNum">{{ data.rewardRule }}</div>
</div>
</div>
<div class="cc tip" v-if="left">
任务完成后显示兑换信息
</div>
</div>
<div class="title">邀请列表</div>
<div class="generalFont">
您已邀请<span class="completeNum">{{ completeNum }}</span
>人,
<template v-if="left">
还差<span class="loseNum">{{ left }}</span
>人,即可领奖
</template>
<span v-else>可前往领奖</span>
</div>
<div class="customersBox">
<div class="customersList" v-for="(item, index) of data.customerList" :key="index">
<img :src="item.avatar" class="customersImg" />
<span class="name">{{ item.customerName }}</span>
<span class="time">{{ item.addTime }}</span>
<span class="customersSuccess">邀请成功</span>
</div>
</div>
<div class="activityPoster">
<div>活动海报</div>
<img :src="poster" class="activityPosterImg" />
</div>
</div>
</template>
<style lang="less" scoped>
.title {
color: #333;
font-size: 18px;
padding: 37px 18px;
padding-bottom: 18px;
background-color: #fff;
}
.container {
height: 100%;
background-color: rgb(239, 239, 244);
}
.generalFont {
color: #909399;
font-size: 12px;
padding: 0 18px;
padding-bottom: 8px;
}
.container > .generalFont {
background-color: #fff;
}
.listMsg {
display: flex;
align-items: center;
margin: 20px 0;
}
.listMsg .generalFont {
flex: none;
width: 56px;
margin-right: 30px;
text-align: right;
}
.codeDetail {
font-size: 12px;
color: #333;
word-break: break-all;
overflow: hidden;
}
.generalContent {
position: relative;
background-color: rgb(246, 246, 249);
margin-bottom: 15px;
border: 18px solid #fff;
border-top: 0;
padding: 0 8px;
overflow: auto;
.tip {
background: rgba(69, 63, 63, 81%);
padding: 6px;
border-radius: 5px;
color: #fff;
white-space: nowrap;
}
}
.codeImg {
height: 50px;
}
.customersList {
display: flex;
align-items: center;
font-size: 15px;
background-color: rgb(246, 246, 249);
padding: 8px;
.customersImg {
height: 37px;
border-radius: 50%;
margin-right: 8px;
}
.name {
font-size: 13px;
font-weight: 500;
margin-right: 8px;
}
.time {
color: #909399;
font-size: 12px;
}
.customersSuccess {
flex: 1;
font-size: 13px;
text-align: right;
color: #06c160;
}
}
.customersBox {
padding: 18px;
background-color: #fff;
}
.activityPoster {
padding: 18px;
font-size: 18px;
background-color: #fff;
margin-top: 18px;
}
.activityPosterImg {
width: 100%;
margin-top: 18px;
}
</style>