data-model.vue
21.7 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
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
<script setup lang="ts" name="DataModel">
import { computed, onMounted } from "vue";
import moment from "moment";
import { getWeekday } from "@/until/index";
import saishiyuce from "@/assets/images/ic_saishiyuce.png";
import niuniufenxi from "@/assets/images/ic_niuniufenxi.png";
import haiwaiyuce from "@/assets/images/ic_haiwaiyuce.png";
import saishiyuce_bg from "@/assets/images/bg_saishiyuce.png";
import niuniufenxi_bg from "@/assets/images/bg_niuniufenxi.png";
import haiwaiyuce_bg from "@/assets/images/bg_haiwaiyuce.png";
import ic_lock from "@/assets/images/ic_lock.png";
import ic_mingzhong from "@/assets/images/ic_mingzhong.png";
interface DataModelProps {
yiqiu_id: string,
game_predict_list: any;
nnjq_data_list: any;
user_info: any;
hwyc_predict_list: any;
ssyc_detail: any;
nnjq_detail: any;
hwyc_detail: any;
is_look: any;
}
// $props
const props = withDefaults(defineProps<DataModelProps>(), {});
// $props
// $data
// $data
// $computed
const ssyc_hit = computed(() => {
const source = props.ssyc_detail;
if (!source|| moment().isBefore(source?.match_time)) return false;
if (
source?.predict_items?.is_hit ||
source?.ailuo_items?.is_hit ||
source?.balls_items?.is_hit
) {
return true;
} else {
return false;
}
});
const nnjq_hit = computed(() => {
const source = props.nnjq_detail;
if (!source?.score || moment().isBefore(source?.match_time) || ![4, 10, 12].includes(source?.status)) return false;
try {
const score = JSON.parse(source.score);
const scoreTxt = score.join(":");
const allScore = score?.reduce((acc: number, num: number) => {
acc += num;
return acc;
}, 0);
const scoreResult = source?.prediction_7202?.includes(scoreTxt);
if (scoreResult) return scoreResult;
const ballResult = source?.prediction_7203?.some((item: any) =>
item.includes(allScore)
);
if (ballResult) return ballResult;
source?.prediction_7203?.forEach((item: any) => {
if (item === "胜" && score[0] > score[1]) {
return true;
} else if (item === "平" && score[0] == score[1]) {
return true;
} else if (item === "负" && score[0] < score[1]) {
return true;
}
});
} catch (error) {
console.log("nnjq_hit ===== err", error);
return false;
}
});
const hwyc_hit = computed(() => {
const source = props.hwyc_detail;
if (!source?.score || moment().isBefore(source?.match_time) || ![4, 10, 12].includes(source?.status)) return false;
try {
const score = JSON.parse(source.score);
if (
score[0] > score[1] &&
source?.macao_prediction?.p === source?.host_name
) {
return true;
} else if (
score[0] < score[1] &&
source?.macao_prediction?.p === source?.away_name
) {
return true;
}
if (
source[0] == source?.oversea_info_0?.predict_result?.home &&
source[0] == source?.oversea_info_0?.predict_result?.guest
) {
return true;
}
if (
source[0] == source?.predictz_info?.predict_result?.home &&
source[0] == source?.predictz_info?.predict_result?.guest
) {
return true;
}
return false;
} catch (error) {
console.log("hwyc_hit ===== err", error);
return false;
}
});
// $computed
// $watch
// $watch
// $methods
const link_to = (path: string) => {
if (!path) return;
// window.location.replace(path);
localStorage.setItem('propsal_back', 'true');
// 创建一个 <a> 标签并模拟点击
let link = document.createElement('a');
link.href = path;
link.click();
}
// $methods
// $lifecycle
onMounted(() => {});
// $lifecycle
</script>
<template>
<div class="data-model-component">
<!-- 赛事预测 -->
<section class="model-item">
<header class="info-conent acce-render">
<div
:style="`background-image: url(${saishiyuce});`"
class="logo"
></div>
<div class="message">
<div class="main">
<span class="title">赛事预测</span>
<span v-if="game_predict_list?.predict_hit_count" class="small-tag">近期红{{ game_predict_list?.predict_hit_count }}场</span>
<span v-else class="small-tag">近期连红</span>
<span v-if="!is_look.zq_ssyc" class="tip"
>{{ 1500 + Math.ceil(Math.random() * 10) }}人已开通</span
>
</div>
<div class="intro">海量数据分析,唯一结合多家计算法</div>
</div>
</header>
<div
v-if="is_look.zq_ssyc && ssyc_detail?.balls_items && ssyc_detail?.ailuo_items && ssyc_detail?.predict_items"
class="data-content acce-render"
>
<header class="data-title">
<div class="left">
<span>{{ getWeekday(ssyc_detail?.match_time) }}</span>
<span v-if="ssyc_detail?.is_jingcai">{{ ssyc_detail?.sporttery_number }}</span>
<span style="margin: 0 4px">{{
moment(ssyc_detail?.match_time).format("MM/DD HH:mm")
}}</span
><span>开赛</span>
</div>
<div class="right">
<div class="tit-text">{{ ssyc_detail?.home_name }}</div>
<div class="tit-text">VS</div>
<div class="tit-text">{{ ssyc_detail?.away_name }}</div>
</div>
</header>
<main class="data-table">
<div class="data-table-row header">
<div class="data-table-col">马斯克预测</div>
<div class="data-table-col">爱因预测</div>
<div class="data-table-col">牛顿进球</div>
</div>
<div class="data-table-row">
<div
v-if="ssyc_detail?.predict_items?.values"
class="data-table-col"
>
{{ ssyc_detail?.predict_items?.values.join("") }}(<span
style="color: #227aff"
>{{ ssyc_detail?.predict_items?.rate }}可能</span
>)
</div>
<div v-if="ssyc_detail?.ailuo_items?.values" class="data-table-col">
{{ ssyc_detail?.ailuo_items?.values.join("") }}
</div>
<div v-if="ssyc_detail?.balls_items?.values" class="data-table-col">
{{ ssyc_detail?.balls_items?.values.join("、") }}球
</div>
</div>
</main>
<div class="link-tag" @click="link_to('/model/predict?zq&from_vue')">
<span>查看其他场次</span>
<svg-icon className="right-icon" iconName="in" />
</div>
<img v-if="ssyc_hit" class="flag" :src="ic_mingzhong" alt="link" />
</div>
<!-- !is_look.zq_ssyc && ssyc_detail?.balls_items && ssyc_detail?.ailuo_items && ssyc_detail?.predict_items -->
<div
v-if="!is_look.zq_ssyc"
class="desc-content acce-render"
>
<div
v-lazy="{ style: `backgroundImage: url(${saishiyuce_bg});` }"
class="desc-box"
@click="link_to('/model/predict?zq&from_vue')"
>
通过等级数据分析,结合多家机构计算方案,依托海量的联赛数据,建立回归分析组合序列,得出稳健型赛事赛果,内容包含赛事胜平负和进球数推荐。
</div>
<div
class="tool"
@click="link_to(user_info?.user_id
? '/user/vip_zq?zq&vip_name=ZQ_SSYC&from=/game'
: '/login?return_url=/game/predict?yiqiuid=' + yiqiu_id)"
>
<img class="lock" :src="ic_lock" alt="lock" />
<span>已对本场做出预测,开通查看</span>
<span class="tag">98/月</span>
</div>
<img v-if="ssyc_hit" class="hit-icon" :src="ic_mingzhong" alt="link" />
</div>
<div v-if="is_look.zq_ssyc && (!ssyc_detail?.balls_items || !ssyc_detail?.ailuo_items || !ssyc_detail?.predict_items)" class="tip-content acce-render">
<div class="content-box">
<p class="desc">暂未对本场比赛进行预测</p>
<div class="link-box" v-on:click="link_to('/model/predict?zq&from_vue')">
<span>查看其他场次</span>
<svg-icon className="right-icon" iconName="in" />
</div>
</div>
</div>
</section>
<!-- 牛牛分析 -->
<section class="model-item">
<header class="info-conent acce-render">
<div
:style="`background-image: url(${niuniufenxi});`"
class="logo"
></div>
<div class="message">
<div class="main">
<span class="title">牛牛分析</span>
<span class="small-tag">连续场次红</span>
<span v-if="!is_look.zq_nnjq" class="tip"
>{{ 1510 + Math.ceil(Math.random() * 10) }}人已开通</span
>
</div>
<div class="intro">通过大趋势和赛果分布结合,筛选出来的比赛</div>
</div>
</header>
<div v-if="is_look.zq_nnjq && nnjq_detail && nnjq_data_list && nnjq_data_list?.matchs?.length" class="data-content acce-render">
<header class="data-title">
<div class="left">
<span>{{ getWeekday(nnjq_detail?.match_time) }}</span>
<span v-if="nnjq_detail?.is_jingcai">{{ nnjq_detail?.sporttery_number }}</span>
<span style="margin: 0 4px">{{
moment(nnjq_detail?.match_time).format("MM/DD HH:mm")
}}</span
><span>开赛</span>
</div>
<div class="right">
<div class="tit-text">{{ nnjq_detail?.host_name }}</div>
<div class="tit-text">VS</div>
<div class="tit-text">{{ nnjq_detail?.away_name }}</div>
</div>
</header>
<main class="data-table">
<div class="data-table-row header">
<div class="data-table-col">胜平负</div>
<div class="data-table-col">比分</div>
<div class="data-table-col">总进球数</div>
</div>
<div class="data-table-row">
<div class="data-table-col">
{{ nnjq_detail?.prediction_7206?.join("、") }}
</div>
<div class="data-table-col">
{{ nnjq_detail?.prediction_7202?.join("、") }}
</div>
<div class="data-table-col">
{{ nnjq_detail?.prediction_7203?.join("、") }}
</div>
</div>
</main>
<div class="link-tag" @click="link_to('/model/jie_qiu?zq&from_vue')">
<span>查看其他场次</span>
<svg-icon className="right-icon" iconName="in" />
</div>
<img v-if="nnjq_hit" class="flag" :src="ic_mingzhong" alt="link" />
</div>
<!-- !is_look.zq_nnjq && nnjq_detail && nnjq_data_list && nnjq_data_list?.matchs && nnjq_data_list?.matchs.length > 0 -->
<div v-if="!is_look.zq_nnjq" class="desc-content acce-render">
<div
:style="`background-image: url(${niuniufenxi_bg});`"
class="desc-box"
@click="link_to('/model/jie_qiu?zq&from_vue')"
>
结合主客队双方的实力、攻防系数、进球/失球态势、历史对阵、近期成绩等多重数据进行分析,给出进球数、比分及胜平负方面的辅助分析。
</div>
<div
class="tool"
@click="link_to(user_info?.user_id
? '/user/vip_zq?zq&vip_name=ZQ_NNJQ&from=/game'
: '/login?return_url=/game/predict?yiqiuid=' + yiqiu_id)"
>
<img class="lock" :src="ic_lock" alt="lock" />
<span>已对本场做出预测,开通查看</span>
<span class="tag">168/月</span>
</div>
<img v-if="nnjq_hit" class="hit-icon" :src="ic_mingzhong" alt="link" />
</div>
<div v-if="is_look.zq_nnjq && (!nnjq_detail || !nnjq_data_list || !nnjq_data_list?.matchs?.length)" class="tip-content acce-render">
<div class="content-box">
<p class="desc">暂未对本场比赛进行预测</p>
<div class="link-box" @click="link_to('/model/jie_qiu?zq&from_vue')">
<span>查看其他场次</span>
<svg-icon className="right-icon" iconName="in" />
</div>
</div>
</div>
</section>
<!-- 海外预测 -->
<section class="model-item acce-render">
<header class="info-conent acce-render">
<div
:style="`background-image: url(${haiwaiyuce});`"
class="logo"
></div>
<div class="message">
<div class="main">
<span class="title">海外预测</span>
<span class="small-tag">比分正确率高</span>
<span v-if="!is_look.zq_hwyc" class="tip"
>{{ 1420 + Math.ceil(Math.random() * 10) }}人已开通</span
>
</div>
<div class="intro">合作机构海量分析,稳定型推荐</div>
</div>
</header>
<div v-if="is_look.zq_hwyc && hwyc_detail && hwyc_detail?.predictz_info && hwyc_predict_list?.matchs?.length" class="data-content acce-render">
<header class="data-title">
<div class="left">
<span>{{ getWeekday(hwyc_detail?.match_time) }}</span>
<span v-if="hwyc_detail?.is_jingcai">{{ hwyc_detail?.sporttery_number }}</span>
<span style="margin: 0 4px">{{
moment(hwyc_detail?.match_time).format("MM/DD HH:mm")
}}</span
><span>开赛</span>
</div>
<div class="right">
<div class="tit-text">{{ hwyc_detail?.host_name }}</div>
<div class="tit-text">VS</div>
<div class="tit-text">{{ hwyc_detail?.away_name }}</div>
</div>
</header>
<main class="data-table">
<div class="data-table-row header">
<div class="data-table-col">澳门</div>
<div class="data-table-col">欧洲</div>
<div class="data-table-col">美国</div>
</div>
<div class="data-table-row">
<div v-if="hwyc_detail?.macao_prediction" class="data-table-col">
{{
hwyc_detail?.macao_prediction?.p?.length > 4
? hwyc_detail?.macao_prediction?.p.substr(0, 4)
: hwyc_detail?.macao_prediction?.p
}}
</div>
<div v-if="hwyc_detail?.predictz_info" class="data-table-col">
{{
hwyc_detail?.predictz_info?.predict_result?.result == "Home"
? "主胜"
: hwyc_detail?.predictz_info?.predict_result?.result == "Away"
? "客胜"
: "平"
}}<br />{{ hwyc_detail?.predictz_info?.predict_result?.home }} -
{{ hwyc_detail?.predictz_info?.predict_result?.guest }}
</div>
<div v-if="hwyc_detail?.oversea_info_0" class="data-table-col">
{{
hwyc_detail?.oversea_info_0?.predict_result?.home >
hwyc_detail?.oversea_info_0?.predict_result?.guest
? "主胜"
: hwyc_detail?.oversea_info_0?.predict_result?.guest >
hwyc_detail?.oversea_info_0?.predict_result?.home
? "客胜"
: "平"
}}<br />{{ hwyc_detail?.oversea_info_0?.predict_result?.home }} -
{{ hwyc_detail?.oversea_info_0?.predict_result?.guest }}
</div>
</div>
</main>
<div class="link-tag" @click="link_to('/model/hwyc?zq&from_vue')">
<span>查看其他场次</span>
<svg-icon className="right-icon" iconName="in" />
</div>
<img v-if="hwyc_hit" class="flag" :src="ic_mingzhong" alt="link" />
</div>
<!-- !is_look.zq_hwyc && hwyc_detail && hwyc_detail?.predictz_info && hwyc_predict_list && hwyc_predict_list?.matchs && hwyc_predict_list?.matchs.length > 0 -->
<div v-if="!is_look.zq_hwyc" class="desc-content acce-render">
<div
:style="`background-image: url(${haiwaiyuce_bg});`"
class="desc-box"
@click="link_to('/model/hwyc?zq&from_vue')"
>
专供海外资讯站情报专家观点,战局分布型足球赛事分析,根据现有统计对阵冷热方案,分析指数异向波动及调整。分析以胜平负为主,比分为辅。
</div>
<div
class="tool"
@click="link_to(user_info?.user_id
? '/user/vip_zq?zq&vip_name=ZQ_HWYC&from=/game'
: '/login?return_url=/game/predict?yiqiuid=' + yiqiu_id)"
>
<img class="lock" :src="ic_lock" alt="lock" />
<span>已对本场做出预测,开通查看</span>
<span class="tag">88/月</span>
</div>
<img v-if="hwyc_hit" class="hit-icon" :src="ic_mingzhong" alt="link" />
</div>
<div v-if="is_look.zq_hwyc && (!hwyc_detail || !hwyc_detail?.predictz_info || !hwyc_predict_list?.matchs?.length)" class="tip-content acce-render">
<div class="content-box">
<p class="desc">暂未对本场比赛进行预测</p>
<div class="link-box" @click="link_to('/model/hwyc?zq&from_vue')">
<span>查看其他场次</span>
<svg-icon className="right-icon" iconName="in" />
</div>
</div>
</div>
</section>
</div>
</template>
<style lang="scss">
.data-model-component {
background-color: #f6f6f6;
.model-item {
position: relative;
padding: 10px;
background-color: #fff;
margin-bottom: 10px;
.info-conent {
display: flex;
align-items: center;
.logo {
width: 28px;
height: 28px;
background-repeat: no-repeat;
background-size: contain;
background-position: 50%;
border-radius: 50%;
}
}
.message {
flex: 1;
padding-left: 10px;
.title {
font-size: 14px;
margin-right: 8px;
}
.small-tag {
padding: 0 8px;
color: #fc4644;
font-size: 12px;
border: 1px solid #fc4644;
border-radius: 12px;
}
.tip {
font-size: 12px;
color: #ccc;
float: right;
}
.intro {
font-size: 12px;
color: #ccc;
}
}
.desc-content {
position: relative;
padding-top: 10px;
font-size: 12px;
.desc-box {
padding: 10px 14px;
height: 120px;
color: #fff;
border-radius: 8px;
background-size: contain;
background-repeat: no-repeat;
&:nth-child(1) {
background-color: #55393e;
}
&:nth-child(2) {
background-color: #2c294b;
}
&:nth-child(3) {
background-color: #3d2949;
}
}
.tool {
color: #fff;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 72%;
padding: 8px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 10px;
background-color: #ac9fa1;
.tag {
margin: 0 4px;
color: #482a32;
border-radius: 9px;
padding: 0 6px;
background-color: #fff6d7;
}
.lock {
width: 20px;
height: 20px;
margin-right: 5px;
}
}
.tool::before {
content: "";
position: absolute;
bottom: 0px; /* 将伪元素定位到顶部 */
left: -5px;
right: -5px;
height: 80%;
z-index: -1;
background-color: #ac9fa1;
clip-path: polygon(
2% 0%,
98% 0%,
100% 100%,
0% 100%
); /* 使用clip-path实现梯形 */
}
}
.data-content {
position: relative;
padding-top: 10px;
font-size: 12px;
.data-title {
font-size: 12px;
display: flex;
align-items: center;
justify-content: space-between;
}
.left {
color: #666666;
margin-right: 12px;
}
.right {
flex: 1;
display: flex;
justify-content: space-between;
}
.tit-text {
font-size: 14px;
font-weight: 500;
}
.data-table-row {
display: flex;
gap: 1px;
text-align: center;
background-color: #fff;
.data-table-col {
flex: 1;
padding: 8px;
display: flex;
align-items: center;
justify-content: center;
}
}
.data-table-row.header {
color: #777777;
}
.data-table-row:not(.header) .data-table-col {
background-color: #fff3db;
}
.link-tag {
padding-top: 8px;
display: flex;
align-items: center;
justify-content: center;
color: #aaaaaa;
}
.flag {
position: absolute;
width: 52px;
height: 52px;
right: 10px;
bottom: 5px;
}
}
.hit-icon {
position: absolute;
width: 52px;
height: 52px;
right: 10px;
bottom: 5px;
}
.tip-content {
position: relative;
padding-top: 10px;
font-size: 12px;
.content-box {
padding: 10px 14px;
height: 120px;
color: #fff;
border-radius: 8px;
background-color: #f5f5f5;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.desc {
text-align: center;
color: #aaaaaa;
}
.link-box {
width: 120px;
display: flex;
padding-left: 4px;
height: 21px;
line-height: 21px;
align-items: center;
justify-content: center;
background-color: #fff3d0;
border-radius: 10px;
color: #424242;
margin: 12px;
}
}
}
}
.right-icon {
width: 14px;
height: 14px;
margin-left: 2px;
}
}
</style>