feat:更新上传图片和视频组件
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
<el-card class="record-card">
|
||||
<span class="record-content">完成人:{{ item.person }}</span>
|
||||
<el-image v-if="item.imageUrl"
|
||||
:src="AListPath + item.imageUrl"
|
||||
:preview-src-list="[AListPath + item.imageUrl]"
|
||||
:src="AListUrl + item.imageUrl"
|
||||
:preview-src-list="[AListUrl + item.imageUrl]"
|
||||
fit="contain" alt="暂无图片" class="record-image"/>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useFoodStore } from '@/store/food.ts'
|
||||
import { AListPath } from '@/utils'
|
||||
import { AListUrl } from '@/utils'
|
||||
import { SvgIcon } from 'vue3-common'
|
||||
|
||||
const foodStore = useFoodStore()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="life-record-card card-item">
|
||||
<el-image v-if="props.foodItem?.recordList.length > 0"
|
||||
:src="AListPath + props.foodItem?.recordList[0].imageUrl"
|
||||
:src="AListUrl + props.foodItem?.recordList[0].imageUrl"
|
||||
:preview-src-list="previewImageList"
|
||||
:initial-index="0"
|
||||
show-progress
|
||||
@@ -68,7 +68,7 @@ import { IFoodRecipe } from '@/types/food.ts'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { formatDate } from 'vue3-common/utils/dateUtil'
|
||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||
import { AListPath } from '@/utils'
|
||||
import { AListUrl } from '@/utils'
|
||||
|
||||
const router = useRouter()
|
||||
const foodStore = useFoodStore()
|
||||
@@ -90,7 +90,7 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
const previewImageList = computed(() => {
|
||||
return props.foodItem?.recordList.map((item) => `${AListPath}${item.imageUrl}`)
|
||||
return props.foodItem?.recordList.map((item) => `${AListUrl}${item.imageUrl}`)
|
||||
})
|
||||
|
||||
const editFoodRecipeClick = async () => {
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
<!-- 单媒体内容(图片优先于视频) -->
|
||||
<el-image
|
||||
v-if="props.item?.imageUrl"
|
||||
:src="AListPath + props.item?.imageUrl"
|
||||
:preview-src-list="[AListPath + props.item?.imageUrl]"
|
||||
:src="AListUrl + props.item?.imageUrl"
|
||||
:preview-src-list="[AListUrl + props.item?.imageUrl]"
|
||||
fit="contain"
|
||||
class="media-content"/>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
v-if="props.item?.videoUrl"
|
||||
controls
|
||||
class="media-content">
|
||||
<source :src="AListPath + props.item?.videoUrl" type="video/mp4">
|
||||
<source :src="AListUrl + props.item?.videoUrl" type="video/mp4">
|
||||
</video>
|
||||
|
||||
<!-- 展开/收起按钮 -->
|
||||
@@ -76,7 +76,7 @@ import { deepCopyObject } from 'vue3-common/utils/dataUtil'
|
||||
import { useJournalStore } from '@/store/journal.ts'
|
||||
import { useAppStore } from '@/store/app.ts'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { AListPath } from '@/utils'
|
||||
import { AListUrl } from '@/utils'
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="life-record-card card-item">
|
||||
<el-image :src="AListPath + props.productItem?.imageUrl"
|
||||
:preview-src-list="[AListPath + props.productItem?.imageUrl]"
|
||||
<el-image :src="AListUrl + props.productItem?.imageUrl"
|
||||
:preview-src-list="[AListUrl + props.productItem?.imageUrl]"
|
||||
fit="contain" alt="暂无成果">
|
||||
<template #error>
|
||||
<div class="image-slot">
|
||||
@@ -42,11 +42,6 @@
|
||||
<i class="fa-solid fa-chart-line" style="color: #FFA500"></i>
|
||||
{{ props.productItem.averagePrice }}元/天
|
||||
</div>
|
||||
|
||||
<div class="info-item">
|
||||
<i class="fa-solid fa-location-dot"></i>
|
||||
{{ props.productItem.channel }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-list">
|
||||
<div class="info-item">
|
||||
@@ -70,7 +65,7 @@ import { defineProps, onMounted, PropType } from 'vue'
|
||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||
import { IProduct } from '@/types/product.ts'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { AListPath } from '@/utils'
|
||||
import { AListUrl } from '@/utils'
|
||||
|
||||
const productStore = useProductStore()
|
||||
const router = useRouter()
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
<el-card class="record-card">
|
||||
<span class="record-content">旅行人:{{ item.persons.join('-') }}</span>
|
||||
<el-image v-for="(image, index) in item.imageList" :key="index"
|
||||
:src="AListPath + image"
|
||||
:preview-src-list="[AListPath + image]"
|
||||
:src="AListUrl + image"
|
||||
:preview-src-list="[AListUrl + image]"
|
||||
fit="contain" alt="暂无图片" class="record-image"/>
|
||||
|
||||
<video v-for="(video, index) in item.videoList"
|
||||
:key="index" controls style="width: 60%;min-height: 200px;">
|
||||
<source :src="AListPath + video" type="video/mp4">
|
||||
<source :src="AListUrl + video" type="video/mp4">
|
||||
您的浏览器不支持 HTML5 视频
|
||||
</video>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<script setup lang="ts">
|
||||
import { SvgIcon } from 'vue3-common'
|
||||
import { useTravelStore } from '@/store/travel.ts'
|
||||
import { AListPath } from '@/utils'
|
||||
import { AListUrl } from '@/utils'
|
||||
|
||||
const travelStore = useTravelStore()
|
||||
</script>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-carousel v-if="props.travelItem?.recordList.length > 0"
|
||||
arrow="always" @change="changeTravelEvent">
|
||||
<el-carousel-item v-for="(item, index) in props.travelItem?.recordList" :key="index">
|
||||
<el-image :src="AListPath + item.imageList[0]"
|
||||
<el-image :src="AListUrl + item.imageList[0]"
|
||||
fit="contain" alt="暂无图片">
|
||||
<template #error>
|
||||
<div class="image-slot">
|
||||
@@ -70,7 +70,7 @@ import { useRouter } from 'vue-router'
|
||||
import { formatDate } from 'vue3-common/utils/dateUtil'
|
||||
import { ITravelSpot } from '@/types/travel.ts'
|
||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||
import { AListPath } from '@/utils'
|
||||
import { AListUrl } from '@/utils'
|
||||
import { parsePerson } from '@/utils/home/travelUtil.ts'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
Reference in New Issue
Block a user