|
@@ -81,7 +81,7 @@ const audioChange = () => {
|
|
|
}
|
|
|
|
|
|
const initShowState = () => {
|
|
|
- if (dynamicDetail.value.files.moduleUrl != '') {
|
|
|
+ if (dynamicDetail.value.files.moduleUrl) {
|
|
|
initModule()
|
|
|
} else if (dynamicDetail.value.files.images.length > 0) {
|
|
|
initImages()
|
|
@@ -90,7 +90,6 @@ const initShowState = () => {
|
|
|
}
|
|
|
audioBgUrl.value = dynamicDetail.value.files.audio
|
|
|
|
|
|
- console.log(dynamicDetail.value)
|
|
|
}
|
|
|
|
|
|
const getDetailById = async () => {
|
|
@@ -126,6 +125,8 @@ const getDetailById = async () => {
|
|
|
})[0]
|
|
|
|
|
|
initShowState()
|
|
|
+
|
|
|
+ console.log(dynamicDetail.value.files)
|
|
|
} else {
|
|
|
showToast(res.msg)
|
|
|
}
|
|
@@ -134,36 +135,6 @@ const getDetailById = async () => {
|
|
|
onBeforeMount(async () => {
|
|
|
getDetailById()
|
|
|
|
|
|
- // dynamicDetail.value = {
|
|
|
- // age: '唐朝',
|
|
|
- // createTime: '2024-04-19 09:03:01',
|
|
|
- // creatorId: 1,
|
|
|
- // creatorName: '',
|
|
|
- // description: '故明威将军大河卫指挥佥事许公墓志拓片故明威将军大河卫指挥佥事许公墓志拓片',
|
|
|
- // dirCode: '',
|
|
|
- // fileIds: '',
|
|
|
- // fileTypes: '',
|
|
|
- // id: 2,
|
|
|
- // name: '故明威将军大河卫指挥佥事许公墓志拓片',
|
|
|
- // publishDate: '2024-04-18',
|
|
|
- // size: '志盖边长 40.5 厘米、厚 8.5 厘米、志石边长 41 厘米、厚 9.5 厘米',
|
|
|
- // texture: '草',
|
|
|
- // thumb:
|
|
|
- // 'https://k.sinaimg.cn/n/spider20230919/11/w499h312/20230919/77f0-2a03ee3faecf423cf77b2a2a119a714e.png/w700d1q75cms.jpg?by=cms_fixed_width',
|
|
|
- // type: '其他',
|
|
|
- // updateTime: '2024-04-19 09:03:01',
|
|
|
- // files: {
|
|
|
- // images: ['https://super.4dage.com/data/TEST/edit/20230407_114029890.jpg', 'https://super.4dage.com/data/TEST/edit/20230524_155459428.png'],
|
|
|
- // moduleUrl: 'https://4dscene.4dage.com/culturalrelics/demo2/Model.html?m=HG01',
|
|
|
- // audio: 'https://houseoss.4dkankan.com/project/bjfljtl/audio/bgMusic.mp3',
|
|
|
- // // 可能是单个可能是多个
|
|
|
- // videos: ['https://super.4dage.com/data/TEST/edit/20230228_161113155.mp4'],
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // 初始化显示状态
|
|
|
- // initShowState()
|
|
|
-
|
|
|
})
|
|
|
</script>
|
|
|
|
|
@@ -179,8 +150,8 @@ onBeforeMount(async () => {
|
|
|
<video v-if="curState === 'videos'" :src="curMediaList[curMediaIndex]" controls></video>
|
|
|
<iframe v-if="curState === 'module'" :src="curMediaList[curMediaIndex]" frameborder="0"></iframe>
|
|
|
|
|
|
- <div class="option-box">
|
|
|
- <div v-if="dynamicDetail.files.moduleUrl != ''" @click="initModule()"
|
|
|
+ <div class="option-box" >
|
|
|
+ <div v-if="dynamicDetail.files.moduleUrl" @click="initModule()"
|
|
|
:class="{ active: curState === 'module' }">模型</div>
|
|
|
<div v-if="dynamicDetail.files.images.length != 0" @click="initImages()"
|
|
|
:class="{ active: curState === 'images' }">图片<span v-show="curState === 'images'">{{
|
|
@@ -192,7 +163,7 @@ onBeforeMount(async () => {
|
|
|
}}</span></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="info-box">
|
|
|
+ <div class="info-box" :style="{marginTop:curState != null ? '' :'0px'}">
|
|
|
<div class="title">{{ dynamicDetail.name }}</div>
|
|
|
<!-- <div class="age">{{ dynamicDetail.age + '·' + dynamicDetail.texture }}</div> -->
|
|
|
<div class="age">
|