tj
2025-05-28 6ef1b14f735acdc3ff77a50da1bb09a5bb983dcc
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
<template>
    <view>
      <!-- <view class="card" v-if="!showVideo"> -->
        <view class="card">
        <view class="main-title">每一帧画面,都藏着一个等待探索的世界</view>
        <view class="sub-title">
          从经典场景到幕后故事,开启你的专属影视朝圣之旅
        </view>
  
        <view class="btn-group">
          <view class="custom-btn explore-btn" @click="startExplore">
            <text class="btn-text">开始探索</text>
            <up-icon name="play-right-fill" size="34rpx" color="black" class="btn-icon" />
          </view>
  
          <view class="custom-btn route-btn" @click="hotRoute">
            <text class="btn-text">热门路线</text>
            <up-icon
              name="/static/common/road-map-fill.png"
              size="34rpx"
              color="white"
              class="btn-icon"
            />
          </view>
        </view>
  
        <view class="recommend">
          <up-icon name="/static/common/earth.png" color="#fff" size="30" />
          <up-notice-bar
            :text="noticeList"
            direction="column"
            speed="2000"
            font-size="30rpx"
            url="/static/common/earth.png"
            bgColor="transparent"
            color="#fff"
            icon=" "
          />
        </view>
      </view>
  
      <!-- 视频播放区域 -->
      <!-- <view v-else class="video-wrapper">
        <video
          :src="currentVideo"
          controls
          autoplay
          @ended="onVideoEnd"
          style="width: 100%; height: 400rpx;"
        ></video>
      </view> -->
    </view>
  </template>
  
  <script setup lang="ts">
  import { ref, computed } from 'vue'
  
  const showVideo = ref(false)
  const currentIndex = ref(0)
  
  const videoList = [
    'https://geo-app.tos-cn-beijing.volces.com/1.mp4',
    'https://geo-app.tos-cn-beijing.volces.com/2.mp4',
  ]
  
  const noticeList = [
    '欢迎来到场景博物馆',
    '全新内容已上线,快来探索',
    '今日推荐:《盗梦空间》背后的故事',
  ]
  
  const currentVideo = computed(() => videoList[currentIndex.value])
  
  function startExplore() {
    // 跳转到具体页面
    uni.navigateTo({
      url: '/sub-pages/film-list/film-list',
    })
  }
  
  function onVideoEnd() {
    currentIndex.value = (currentIndex.value + 1) % videoList.length
    showVideo.value = false
  }
  
  function hotRoute() {
    uni.showToast({
      title: '跳转热门路线',
      icon: 'none',
    })
  }
  </script>
  <style scoped>
  .card {
      padding: 50rpx 40rpx;
      border-radius: 24rpx;
      background: linear-gradient(135deg, #ff7e5f, #9e2cf8);
      color: #fff;
  }
  
  .main-title {
      font-size: 60rpx;
      font-weight: bold;
      line-height: 1.6;
      margin-bottom: 20rpx;
      letter-spacing: 4rpx;
      text-align: center;
  }
  
  .sub-title {
      font-size: 32rpx;
      opacity: 0.9;
      line-height: 1.4;
      margin-bottom: 40rpx;
      text-align: center;
      letter-spacing: 3rpx;
  }
  
  .btn-group {
      display: flex;
      justify-content: space-between;
      gap: 20rpx;
      margin-bottom: 30rpx;
  }
  
  .explore-btn {
      background-color: #fff !important;
      color: #000 !important;
      flex: 1;
  }
  
  .route-btn {
      border: 1px solid #fff;
      background-color: transparent;
      color: #fff;
      flex: 1;
  }
  
  .recommend {
      display: flex;
      align-items: center;
      background-color: rgba(30, 30, 30, 0.8);
      padding: 10rpx;
      padding-left: 50rpx;
      border-radius: 100rpx;
  }
  
  .recommend-text {
      margin-left: 12rpx;
      font-size: 24rpx;
  }
  </style>
  <style scoped>
  .btn-group {
      display: flex;
      gap: 20rpx;
      margin-top: 30rpx;
  }
  
  .custom-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16rpx 32rpx;
      border-radius: 20rpx;
      font-size: 28rpx;
      font-weight: bold;
      height: 60rpx;
  }
  
  .explore-btn {
      background-color: #3c9cff;
      color: #fff;
      border: 2rpx solid #fff;
  }
  
  .route-btn {
      color: #fff;
      border: 2rpx solid #fff;
  }
  
  .btn-icon {
      margin-left: 20rpx;
  }
  
  .btn-text {
      line-height: 1;
      margin-left: 20rpx;
      margin-right: 20rpx;
  }
  </style>