bltcn
2024-08-27 376467b1561ec1e1b73b018c6a2c0fefd52f9167
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
<template>
    <div class="banner-comp">
        <div
            class="swiper-container"
            ref="swiper-container"
            :class="{ hiddenPagination: bannerList && bannerList.length < 2 }"
        >
            <div class="swiper-wrapper">
                <div class="swiper-slide" v-for="(item, index) in bannerList" :key="index">
                    <div class="item">
                        <img class="banner-bg" :src="item.url" alt />
                        <div v-if="item.flag === 1" class="content">
                            <h3 class="yjqd">一键启动FUNASR</h3>
                            <p class="text">
                                FUNASR希望在语音识别的学术研究和工业应用之间架起一座桥梁。通过发布工业级
                                <br />语音识别模型的训练和微调,研究人员和开发人员可以更方便地进行语音识别模型的
                                <br />研究和生产,并推动语音识别生态的发展。让语音识别更有趣!
                            </p>
 
                            <div class="lxwm">联系我们</div>
                            <div class="jzmd-wrap">
                                <div class="jzmd-title">捐赠名单</div>
                                <div class="jzmd-content swiper-container" ref="jzmd-swiper">
                                    <div class="swiper-wrapper">
                                        <div
                                            class="jzmd-row swiper-slide"
                                            v-for="(item,index) in jzmdRows"
                                            :key="index"
                                        >
                                            <div class="jzmd-item" v-if="jzmdList[2 * (item -1)]">
                                                <div class="name">{{ jzmdList[2 * (item -1)].name }}</div>
                                                <div class="num-text">
                                                    <span class="text">{{ jzmdList[2 * (item -1)].num }}</span>
                                                    <span class="unit">元</span>
                                                </div>
                                            </div>
                                            <div class="jzmd-item" v-if="jzmdList[2 * (item -1) + 1]">
                                                <div class="name">{{ jzmdList[2 * (item -1) + 1].name }}</div>
                                                <div class="num-text">
                                                    <span class="text">{{ jzmdList[2 * (item -1) + 1].num }}</span>
                                                    <span class="unit">元</span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
 
            <div class="swiper-pagination"></div>
        </div>
    </div>
</template>
 
<script>
import Swiper from 'swiper'
export default {
    name: 'banner-comp',
    data () {
        return {
            bannerList: [
                {
                    flag: 1,
                    url: require('./assets/images/banner.png')
                }
            ],
            swiperObj: null,
            jzmdSwiperObj: null,
            jzmdList: [
                {
                    name: '程俊陶',
                    num: 300
                },
                {
                    name: '黄明',
                    num: 236
                },
                {
                    name: '高志付',
                    num: 235
                },
                {
                    name: '陈翔',
                    num: 200
                },
                {
                    name: '夏侯杰',
                    num: 200
                },
                {
                    name: '黄药师',
                    num: 198
                },
                {
                    name: '肖炜',
                    num: 100
                },
                {
                    name: '刘柱',
                    num: 100
                },
                {
                    name: '黄水杯',
                    num: 85
                },
                {
                    name: '子龙',
                    num: 85
                }
            ]
        }
    },
    computed: {
        jzmdRows () {
            return Math.ceil(this.jzmdList.length / 2)
        }
    },
    mounted () {
        this.$nextTick(() => {
            this.initSwiper()
        })
        this.initJzmdSwiper()
    },
    methods: {
        initSwiper () {
            if (this.swiperObj) {
                this.swiperObj.destroy()
            }
            // const that = this
            this.swiperObj = new Swiper(this.$refs['swiper-container'], {
                slidesPerView: 1,
                direction: 'vertical',
                pagination: {
                    el: '.swiper-pagination',
                    dynamicBullets: true
                },
                on: {
                    slideChangeTransitionEnd: function () {},
                    init: function () {}
                }
            })
        },
        initJzmdSwiper () {
            if (this.jzmdSwiperObj) {
                this.jzmdSwiperObj.destroy()
            }
            // const that = this
            this.jzmdSwiperObj = new Swiper(this.$refs['jzmd-swiper'], {
                direction: 'vertical',
                autoplay: {
                    delay: 2000,
                    stopOnLastSlide: false,
                    disableOnInteraction: false
                },
                slidesPerView: 5,
                slidesPerGroup: 1,
                loop: true,
                loopedSlides: 7
            })
        }
    }
}
</script>
<style src="./assets/css/banner.scss" lang="scss"></style>