| | |
| | | fit="cover" |
| | | :preview-src-list="[info.url]" |
| | | preview-teleported |
| | | /> |
| | | ></el-image> |
| | | |
| | | <video v-else :src="info.url" autoplay muted playsinline preload="metadata" /> |
| | | </div> |
| | |
| | | </div> |
| | | </template> |
| | | <script setup> |
| | | import { ElImage } from 'element-plus' |
| | | import { ElImage, ElIcon } from 'element-plus' |
| | | |
| | | // src="@/assets/images/home/useEventOperate/eventErr.png" |
| | | import { Close } from '@element-plus/icons-vue' |
| | | import { getEventDetails } from '@/api/home/aggregation' |
| | |
| | | loading.value = true |
| | | const res = await getEventDetails({ id: props.data.eventId }) |
| | | info.value = res.data.data |
| | | |
| | | info.value.url = import.meta.env.VITE_APP_AIRLINE_URL + info.value.url |
| | | info.value.url = disposeUrl(info.value) |
| | | loading.value = false |
| | | }) |
| | | |
| | | const disposeUrl = ({ url, media_type }) => { |
| | | if (media_type == 'PHOTO_TYPE') { |
| | | const parts = url.split('.') |
| | | parts[parts.length - 2] += '_small' // 在最后一个点前插入 _small |
| | | |
| | | return import.meta.env.VITE_APP_AIRLINE_URL + parts.join('.') |
| | | } |
| | | |
| | | return import.meta.env.VITE_APP_AIRLINE_URL + url |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | margin-right: 10px; |
| | | |
| | | > img, |
| | | video { |
| | | video, |
| | | div { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |