tj
2025-05-21 7abdb24968bcb88f177851a30e41f282b9189a98
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
<template>
  <view class="container">
 
    <view class="movie-title">
      <view><u-text text="破.地狱" size="30"></u-text></view>
      <view><u-text text="The Last Dance" size="20"></u-text></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>
          <u-button text="more" size="normal" icon="play-right-fill" plain type="info"></u-button>
        </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>
        <u-tabs v-if="tabList.length" :list="tabList" :current="current" @change="onTabChange" @click="onTabChange"
          lineColor="#2979ff" activeStyle="color: #2979ff">
          <view slot="left" style="padding-left: 4px;" @tap="">
            <u-icon name="/static/common/order.png" size="40" bold></u-icon>
          </view>
          <view slot="right" style="padding-left: 4px;" @tap="$u.toast('插槽被点击')">
            <u-icon name="list" size="40" bold></u-icon>
          </view>
        </u-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></film-official-timeline>
          </swiper-item>
        </swiper>
      </view>
 
      <view class="comment-section">
        <u-button class="comment-btn" type="primary" plain>我要发言</u-button>
      </view>
    </scroll-view>
 
    <view class="back-to-top" @click="scrollToTop">
      <u-icon name="arrow-up" size="24" color="#666666" />
    </view>
  </view>
</template>
<script>
import FilmOfficialTimeline from './film-official-timeline.vue';
export default {
 
  components: {
    FilmOfficialTimeline
  },
  onLoad(option) {
    // 获取当前位置
    uni.getLocation({
      type: 'gcj02',
      success: (res) => {
        this.latitude = res.latitude
        this.longitude = res.longitude
        this.markers = [
          {
            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
          let custom = uni.getMenuButtonBoundingClientRect();
          this.offsetHeight = custom.bottom + custom.top - e.statusBarHeight + 68;
          // #endif
          console.log('height', this.offsetHeight)
        },
      });
  },
 
  data() {
    return {
      offsetHeight: 0,
      latitude: 0,
      longitude: 0,
      markers: [],
      current: 0,
      tabList: [
        { name: '剧情' },
        { name: '距离' },
        { name: '城市' },
      ],
    };
  },
  methods: {
    goBack() {
      uni.navigateBack();
    },
    scrollToTop() {
      uni.pageScrollTo({
        scrollTop: 0,
        duration: 300
      });
    }
    , onTabChange(item) {
      this.current = item.index; // 切换 swiper 面板
    },
    onSwiperChange(e) {
      this.current = e.detail.current; // 同步 tabs
    },
  }
};
</script>
<style lang="scss">
::v-deep .u-sticky {
  z-index: 999 !important;
  position: sticky;
  left: 0;
}
</style>
<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;
 
    .center-text {
      width: 100%;
      text-align: center;
      display: block;
    }
  }
 
 
}
 
.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;
}
 
.map-image {
  width: 100%;
  border-radius: 16rpx;
}
 
.comment-section {
  padding: 32rpx;
}
 
.comment-btn {
  width: 100% !important;
  height: 88rpx;
  line-height: 88rpx;
  background-color: #f5f5f5 !important;
  color: #666666 !important;
  font-size: 14px;
}
 
.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;
    /* 允许滚动内容 */
  }
}
</style>