tj
2025-05-27 fa74612c99459a8b4e94121d2d3bfcc42915208b
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
<template>
    <view>
      <view class="container">
        <view class="movie-title">
          <view><up-text text="破.地狱" size="30rpx" /></view>
          <view><up-text text="The Last Dance" size="20rpx" /></view>
        </view>
  
        <scroll-view scroll-y class="content">
          <view class="movie-info">
  
            <image
              class="movie-poster"
              src="https://ai-public.mastergo.com/ai/img_res/1ef11f7a594da679d35cddf809a63ec7.jpg"
              mode="aspectFill"
            />
            <view class="movie-details">
              <view class="scene-number">
                <text>片场</text>
                <text>17</text>
              </view>
              <view class="movie-tags">
                <text class="tag">剧情/家庭</text>
                <text class="tag">中国香港</text>
                <text class="tag">2024</text>
              </view>
              <up-button text="more" size="normal" icon="play-right-fill" plain type="info" />
            </view>
          </view>
  
          <view class="movie-desc">
            <text class="desc-text">
              聚焦香港殡葬文化下的人际关系和生死观念,多数取景地都在殡仪服务扎堆的红磡。
            </text>
            <text class="desc-text">
              主要拍摄的殡仪馆外景是万国殡仪馆,不过根据电影官方发布的制作花絮,殡仪馆内景大厅是另外搭建的。
            </text>
            <text class="desc-text">
              道生接手的"长生店"是位于九龙城福佬村道的百年老字号合昌殡仪,"Hello文"吃宵夜的地方在九龙湾的康乐茶居,火化延姐的地方在葵涌火葬场,甄小姐存户的东华义庄是香港目前唯一仍在运营的义庄。
            </text>
          </view>
  
          <view class="map-container">
            <map
              style="width: 100%; height: 500rpx;"
              :latitude="latitude"
              :longitude="longitude"
              :markers="markers"
              scale="16"
              show-location
            ></map>
          </view>
  
          <view>
            <up-tabs
              v-if="tabList.length"
              :list="tabList"
              :current="current"
              @change="onTabChange"
              @click="onTabChange"
              line-color="#2979ff"
              active-style="color: #2979ff"
            >
              <template #left>
                <view style="padding-left: 4px;">
                  <up-icon name="/static/common/order.png" size="40rpx" bold />
                </view>
              </template>
              <template #right>
                <view style="padding-left: 4px;" @tap="$u.toast('插槽被点击')">
                  <up-icon name="list" size="40rpx" bold />
                </view>
              </template>
            </up-tabs>
  
            <swiper class="swiper-box" :current="current" @change="onSwiperChange" duration="300">
              <swiper-item v-for="(item, index) in tabList" :key="index" class="swiper-item">
                <film-official-timeline />
              </swiper-item>
            </swiper>
          </view>
  
          <view class="comment">
            <comment-item
              avatar="https://img.yzcdn.cn/vant/cat.jpeg"
              nickname="图墙精选"
              :isAuthor="true"
              content="如果路线里全是常规景区,没一个特殊的点位,那就是普通团,除非他的住宿安排的很好。。要不然和普通团没任何区别,都是去景区挤,然后上车赶路"
              :images="urls2"
              date="2天前"
              address="湖北"
              :likes="30"
              @reply="showCommentLayer"
            />
          </view>
        </scroll-view>
  
        <view class="back-to-top" @click="scrollToTop">
          <up-icon name="arrow-up" size="24rpx" color="#666666" />
        </view>
  
        <view class="comment-box">
          <view class="input-row">
            <view class="comment-input" @click="showCommentLayer">
              <up-text
                size="12px"
                text="说点什么......"
                margin="0rpx 0rpx 0rpx 20rpx"
                color="#B9B9B9"
                confirm-type="send"
              />
            </view>
            <up-icon name="heart" size="60rpx" color="#B9B9B9" label="11" />
            <up-icon name="star" size="60rpx" color="#B9B9B9" label="22" />
            <up-icon name="chat" size="60rpx" color="#B9B9B9" label="33" />
          </view>
        </view>
      </view>
  
      <comment-popup v-model="commentShow" />
    </view>
  </template>
  
  <script setup lang="ts">
  import { ref, onMounted } from 'vue';
  import FilmOfficialTimeline from './film-official-timeline.vue';
  
  // 你需要保证这些组件是你项目里已注册的组件
  // comment-item 和 comment-popup 也需在全局或当前组件注册
  
  const latitude = ref(0);
  const longitude = ref(0);
  const markers = ref<any[]>([]);
  const current = ref(0);
  const commentShow = ref(false);
  const tabList = ref([
    { name: '剧情' },
    { name: '距离' },
    { name: '城市' },
  ]);
  
  const urls2 = ref<string[]>([
    // 这里补充你 comment-item 组件使用的图片数组示例
    'https://img.yzcdn.cn/vant/cat.jpeg',
    'https://img.yzcdn.cn/vant/cat.jpeg',
  ]);
  
  // 获取位置信息和系统信息
  onMounted(() => {
    uni.getLocation({
      type: 'gcj02',
      success: (res) => {
        latitude.value = res.latitude;
        longitude.value = res.longitude;
        markers.value = [
          {
            id: 1,
            latitude: res.latitude,
            longitude: res.longitude,
            title: '我的位置',
            iconPath: '/static/common/marker.png',
            width: 30,
            height: 30,
          },
        ];
      },
    });
  
    uni.getSystemInfo({
      success: (e) => {
        // #ifdef MP-WEIXIN
        const custom = uni.getMenuButtonBoundingClientRect();
        // 你可以定义 offsetHeight 如果需要
        // offsetHeight.value = custom.bottom + custom.top - e.statusBarHeight + 68;
        // #endif
        // console.log('height', offsetHeight.value);
      },
    });
  });
  
  function onTabChange(item: { index: number }) {
    current.value = item.index;
  }
  function onSwiperChange(e: any) {
    current.value = e.detail.current;
  }
  function showCommentLayer() {
    commentShow.value = true;
  }
  function scrollToTop() {
    uni.pageScrollTo({
      scrollTop: 0,
      duration: 300,
    });
  }
  </script>
  
  <style lang="scss" scoped>
  .container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #ffffff;
  
    .movie-title {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
  }
  
  .content {
    flex: 1;
    overflow: auto;
  }
  
  .movie-info {
    padding: 32rpx;
    display: flex;
    gap: 32rpx;
  }
  
  .movie-poster {
    width: 400rpx;
    height: 500rpx;
    border-radius: 16rpx;
    flex-shrink: 0;
  }
  
  .movie-details {
    flex: 1;
  }
  
  .scene-number {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 32px;
    color: #333333;
    font-weight: bold;
    margin-bottom: 16rpx;
  }
  
  .movie-tags {
    display: flex;
    flex-direction: column;
    gap: 16rpx;
    margin-bottom: 32rpx;
  }
  
  .tag {
    font-size: 14px;
    color: #666666;
  }
  
  .movie-desc {
    padding: 32rpx;
    border-top: 1px dashed #f5f5f5;
    border-bottom: 1px dashed #f5f5f5;
  }
  
  .desc-text {
    display: block;
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    margin-bottom: 24rpx;
  }
  
  .map-container {
    padding: 32rpx;
  }
  
  .back-to-top {
    position: fixed;
    right: 32rpx;
    bottom: 32rpx;
    width: 80rpx;
    height: 80rpx;
    border-radius: 40rpx;
    background-color: #ffffff;
    box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .swiper-box {
    min-height: 50vh;
  
    .swiper-item {
      height: 100%;
      overflow: auto;
    }
  }
  
  .comment-box {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20rpx 20rpx;
    background-color: #fff;
    box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
    z-index: 999;
    height: 100rpx;
  
    .input-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 80%;
  
      .comment-input {
        width: 300rpx;
        background-color: #f4f4f6;
        border-radius: 50rpx;
        height: 60rpx;
        display: flex;
        align-items: center;
      }
    }
  }
  
  .comment {
    margin: 10rpx;
    margin-bottom: 180rpx;
  }
  </style>