index.vue
6.9 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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
<script setup lang="ts" name="Rebate">
// $import
import { onBeforeMount, onMounted, onActivated, ref } from "vue";
import { useRouter, useRoute } from "vue-router";
import { useStore } from "vuex";
import ic_rebate from "@/assets/images/ic_rebate.png";
import bg_rebate_placard from "@/assets/images/bg_rebate_placard.png";
// $import
// $type
// $type
// $data
const route = useRoute();
const router = useRouter();
const store = useStore();
const common_data = ref(store.state.common_data);
const game_id = ref(route.query.yiqiuid);
const page_loading = ref(false);
const page_width = ref(769);
// $data
// $computed
// $computed
// $watch
// $watch
// $methods
const backRoute = () => {
//调用android原生方法
if ((window as any).Android?.onBack) {
(window as any).Android?.onBack();
return;
}
router.back();
};
const onPageRefresh = () => {
page_loading.value = false;
};
// $methods
// $lifecycle
onBeforeMount(() => {});
onMounted(() => {
window.scrollTo(0, 0); // 页面加载后滚动到顶部
});
// 缓存后再次被激活
onActivated(async () => {
window.scrollTo(0, 0); // 页面加载后滚动到顶部
});
// $lifecycle
</script>
<template>
<van-pull-refresh
class="rebate-detail-page"
v-model="page_loading"
@refresh="onPageRefresh"
>
<template #loosing>
<div class="refresh-txt">
<svg-icon
className="icon"
iconName="loading"
:class="{ 'is-spinning': page_loading }"
></svg-icon>
<span>释放即可刷新</span>
</div>
</template>
<template #loading>
<div class="refresh-txt">
<svg-icon
className="icon"
iconName="loading"
:class="{ 'is-spinning': page_loading }"
></svg-icon>
<span>加载中……</span>
</div>
</template>
<template #success>
<div class="refresh-txt">
<svg-icon
className="icon"
iconName="loading"
:class="{ 'is-spinning': page_loading }"
></svg-icon>
<span>加载完成</span>
</div>
</template>
<div class="page">
<header
:style="`padding-top:${common_data.appHeight}px; max-width: ${page_width}px`"
class="header-box-wrapper"
>
<div
:style="`margin-top:${common_data.appHeight}px; max-width: ${page_width}px`"
class="header-box"
>
<div class="tool-left">
<span class="back" @click="backRoute">
<svg-icon iconName="back"></svg-icon>
</span>
</div>
<div class="center-content">首单不红返</div>
</div>
<div
class="reserve-box"
></div>
</header>
<main class="rebate-content">
<div class="placard-wrapper">
<img class="photo" :src="bg_rebate_placard" alt="不中返" />
</div>
<div class="content-wrapper">
<div class="content-container">
<div class="label-row">
活动说明:
<div class="tag item-1"></div>
</div>
<div class="desc-content">
<pre class="pre-content batch">
1、用户购买带<div :style="`background-image: url(${ic_rebate});`" class="bg-icon rebate-tag"></div>标识的专家方案后,如推荐与实际赛果不符,可全额返券。
2、后续下单即可用券0元购买同金额的推荐方案。
3、如0元购买的推荐还不正确,可免费体验会员3天。
</pre>
</div>
<div class="label-row">
规则:
<div class="tag item-2"></div>
</div>
<div class="desc-content">
<pre class="pre-content batch">
1、2025年3月1日起首次下单均专家方案可参与;
2、所有用户均可参与1次;
3、退还时间:比赛结果公布24小时内,自动退至我的-卡券;
4、不红返活动不支持提现、退款,返还卷7天内使用有效;
5、更多问题,请留言或<a class="a-link" href="https://m.ydn.com/user/online_service">咨询客服</a>。
</pre>
</div>
</div>
</div>
<!-- <div class="tool-wrapper">
<div class="tool-btn" @click="backRoute">立即参与</div>
</div> -->
</main>
</div>
</van-pull-refresh>
</template>
<style lang="scss">
.rebate-detail-page {
height: 100vh;
position: relative;
overflow-y: auto;
background-image: linear-gradient(to bottom, #dc0f42, #dc0f42, #FF5F3A);
&::-webkit-scrollbar {
display: none;
}
.header-box-wrapper {
position: relative;
overflow: hidden;
max-width: 100%;
background-color: #ebf4fe;
}
.header-box {
z-index: 9998;
position: fixed;
top: 0;
width: 100%;
height: 44px;
min-width: 320px !important;
overflow: hidden;
color: #000;
background-color: #eaf4fe;
}
.tool-left {
position: absolute;
left: 10px;
top: 50%;
font-size: 16px;
transform: translateY(-50%);
}
.reserve-box {
width: 100%;
min-height: 44px;
background-color: #eaf4fe;
}
.center-content {
position: absolute;
left: 50%;
top: 50%;
font-size: 16px;
font-family: PingFangSC-Regular;
transform: translate(-50%, -50%);
}
.rebate-content {
overflow: auto;
.placard-wrapper {
height: 155px;
background-color: #e8e8e8;
.photo {
height: 155px;
}
}
.pre-content {
white-space: pre-wrap;
font-family: PingFangSC-Regular;
&.batch {
line-height: 28px;
}
}
.content-wrapper {
padding: 0 16px 30px 16px;
}
.content-container {
padding: 18px 16px 0 16px;
position: relative;
border-radius: 12px;
background-color: rgba(#fff, 0.9);
}
.label-row {
position: relative;
font-family: PingFangSC-Regular;
font-size: 16px;
font-weight: 700;
font-style: italic;
z-index: 2;
background-color: transparent;
.tag {
position: absolute;
bottom: 1px;
height: 10px;
z-index: -1;
border-radius: 10px;
background-color: #ff2b2c;
}
.item-1 {
width: 72px;
}
.item-2 {
width: 40px;
}
}
.desc-content {
padding-top: 6px;
font-size: 14px;
}
}
.tool-wrapper {
display: flex;
align-items: center;
justify-content: center;
padding: 10px;
.tool-btn {
width: 128px;
height: 36px;
border-radius: 18px;
color: #fff;
font-size: 18px;
line-height: 36px;
text-align: center;
background-color: #bb332a;
}
}
.rebate-tag {
display: inline-block;
width: 75px;
height: 16px;
margin-right: 6px;
background-repeat: no-repeat;
background-size: contain;
background-position: 50%;
vertical-align: middle;
margin-bottom: 4px;
}
.a-link {
color: #2778FF;
}
}
</style>