详情页bug修改

This commit is contained in:
851673013@qq.com 2022-06-21 11:33:12 +08:00
parent 01dc4a8c43
commit 7bc3912bb7
6 changed files with 79 additions and 5 deletions

View File

@ -12,7 +12,9 @@
<span class="name">{{ props.dataList.name }}</span> <span class="name">{{ props.dataList.name }}</span>
<div class="label-content"> <div class="label-content">
<p class="lable-father"> <p class="lable-father">
<span class="label">{{ props.dataList.type }}</span> <span class="label">
{{ componentType || props.dataList.type }}
</span>
<span class="label">{{ props.dataList.shareType }}</span> <span class="label">{{ props.dataList.shareType }}</span>
<span class="label">{{ props.dataList.shareCondition }}</span> <span class="label">{{ props.dataList.shareCondition }}</span>
</p> </p>
@ -77,6 +79,7 @@
}, },
}) })
} }
const componentType = ref('')
// //
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
@ -89,6 +92,12 @@
applicationArea.value = props.dataList.infoList.filter( applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域' (val) => val.attrType === '应用领域'
)[0].attrValue )[0].attrValue
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (obj) {
componentType.value = obj.attrValue
}
} }
watch( watch(
() => props.dataList, () => props.dataList,
@ -97,6 +106,12 @@
applicationArea.value = props.dataList.infoList.filter( applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域' (val) => val.attrType === '应用领域'
)[0].attrValue )[0].attrValue
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (obj) {
componentType.value = obj.attrValue
}
} }
} }
) )

View File

@ -12,7 +12,9 @@
<span class="name">{{ props.dataList.name }}</span> <span class="name">{{ props.dataList.name }}</span>
<div class="label-content"> <div class="label-content">
<p class="lable-father"> <p class="lable-father">
<span class="label">{{ props.dataList.type }}</span> <span class="label">
{{ componentType || props.dataList.type }}
</span>
<span class="label">{{ props.dataList.shareType }}</span> <span class="label">{{ props.dataList.shareType }}</span>
<span class="label">{{ props.dataList.shareCondition }}</span> <span class="label">{{ props.dataList.shareCondition }}</span>
</p> </p>
@ -86,10 +88,17 @@
message.success('收藏成功') message.success('收藏成功')
}) })
} }
const componentType = ref('')
if (props.dataList.infoList) { if (props.dataList.infoList) {
businessArea.value = props.dataList.infoList.filter( businessArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域' (val) => val.attrType === '应用领域'
)[0].attrValue )[0].attrValue
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (obj) {
componentType.value = obj.attrValue
}
} }
watch( watch(
() => props.dataList, () => props.dataList,
@ -98,6 +107,12 @@
businessArea.value = props.dataList.infoList.filter( businessArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域' (val) => val.attrType === '应用领域'
)[0].attrValue )[0].attrValue
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (obj) {
componentType.value = obj.attrValue
}
} }
} }
) )

View File

@ -151,6 +151,7 @@
font-size: 0.24rem; font-size: 0.24rem;
line-height: 0.24rem; line-height: 0.24rem;
margin-bottom: 0.2rem; margin-bottom: 0.2rem;
text-align: center;
max-width: 2rem; max-width: 2rem;
height: 0.24rem; height: 0.24rem;
display: -webkit-box; display: -webkit-box;

View File

@ -18,7 +18,7 @@
</div> </div>
<div class="right"> <div class="right">
<div @click="technical()">技术文档</div> <div @click="technical()">技术文档</div>
<div>新手指引</div> <div @click="technicaltow()">新手指引</div>
</div> </div>
</div> </div>
<div class="content-card"> <div class="content-card">
@ -126,6 +126,17 @@
// btoa(encodeURI(dataFrom.value.link)) // btoa(encodeURI(dataFrom.value.link))
// ) // )
} }
function technicaltow() {
let obj = props.dataList.infoList.filter(
(item) => item.attrType === '使用手册'
)[0]
console.log('dataFrom.value.link', obj.attrValue)
window.open(
window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' +
btoa(encodeURI(obj.attrValue))
)
}
watch( watch(
() => props.dataList, () => props.dataList,
(val) => { (val) => {

View File

@ -8,7 +8,10 @@
<template> <template>
<div class="application-presentation" v-if="flag"> <div class="application-presentation" v-if="flag">
<detals-title title="组件展示" type="IMAGE&VIDEO"></detals-title> <detals-title title="组件展示" type="IMAGE&VIDEO"></detals-title>
<div class="main"> <div
class="main"
:style="`${img}background-position:center;background-size:cover;`"
>
<div class="play" @click="showModal"></div> <div class="play" @click="showModal"></div>
</div> </div>
<a-modal <a-modal
@ -63,6 +66,7 @@
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
}) })
const flag = ref(true) const flag = ref(true)
const img = ref({})
console.log('111111111111111111111,', props.dataList) console.log('111111111111111111111,', props.dataList)
if (props.dataList.infoList) { if (props.dataList.infoList) {
let obj = props.dataList.infoList.filter( let obj = props.dataList.infoList.filter(
@ -72,7 +76,13 @@
if (!obj) { if (!obj) {
flag.value = false flag.value = false
} else { } else {
let imgindex = props.dataList.infoList.filter(
(item) => item.attrType === '组件图片'
)[0]
options.src = obj.attrValue options.src = obj.attrValue
if (imgindex) {
img.value = 'background:' + 'url(' + imgindex.attrValue + ') no-repeat;'
}
} }
} }
watch( watch(
@ -86,7 +96,14 @@
if (!obj) { if (!obj) {
flag.value = false flag.value = false
} else { } else {
let imgindex = props.dataList.infoList.filter(
(item) => item.attrType === '组件图片'
)[0]
options.src = obj.attrValue options.src = obj.attrValue
if (imgindex) {
img.value =
'background:' + 'url(' + imgindex.attrValue + ') no-repeat;'
}
} }
} }
} }

View File

@ -12,7 +12,9 @@
<span class="name">{{ props.dataList.name }}</span> <span class="name">{{ props.dataList.name }}</span>
<div class="label-content"> <div class="label-content">
<p class="lable-father"> <p class="lable-father">
<span class="label">{{ props.dataList.type }}</span> <span class="label">
{{ componentType || props.dataList.type }}
</span>
<span class="label">{{ props.dataList.shareType }}</span> <span class="label">{{ props.dataList.shareType }}</span>
<span class="label">{{ props.dataList.shareCondition }}</span> <span class="label">{{ props.dataList.shareCondition }}</span>
</p> </p>
@ -85,10 +87,17 @@
message.success('收藏成功') message.success('收藏成功')
}) })
} }
const componentType = ref('')
if (props.dataList.infoList) { if (props.dataList.infoList) {
applicationArea.value = props.dataList.infoList.filter( applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域' (val) => val.attrType === '应用领域'
)[0].attrValue )[0].attrValue
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (obj) {
componentType.value = obj.attrValue
}
} }
watch( watch(
() => props.dataList, () => props.dataList,
@ -97,6 +106,12 @@
applicationArea.value = props.dataList.infoList.filter( applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域' (val) => val.attrType === '应用领域'
)[0].attrValue )[0].attrValue
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (obj) {
componentType.value = obj.attrValue
}
} }
} }
) )