优化已知问题
This commit is contained in:
@@ -1,53 +1,52 @@
|
||||
<template>
|
||||
<!-- 主体部分 -->
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-20">
|
||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||
<template #content>
|
||||
<span class="text-large font-600"> 产品详情 </span>
|
||||
</template>
|
||||
<template #extra>
|
||||
<div class="h-[32px]"></div>
|
||||
</template>
|
||||
<!-- 主体部分 -->
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-20">
|
||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||
<template #content>
|
||||
<span class="text-large font-600"> 产品详情 </span>
|
||||
</template>
|
||||
<template #extra>
|
||||
</template>
|
||||
|
||||
<!-- 应用介绍 -->
|
||||
<PageBanner :form="page" @done="reload"/>
|
||||
<!-- 应用介绍 -->
|
||||
<PageBanner :form="page" @done="reload"/>
|
||||
|
||||
<!-- 评分插件 -->
|
||||
<AppInfo :form="form" />
|
||||
<!-- 评分插件 -->
|
||||
<AppInfo :form="form"/>
|
||||
|
||||
<!-- 应用截屏 -->
|
||||
<div id="screen-item" class="screen-item my-6">
|
||||
<el-descriptions title="截屏" class="mt-5" />
|
||||
<el-scrollbar class="bg-white p-5">
|
||||
<div class="flex" v-if="form.files">
|
||||
<el-image
|
||||
v-for="(item,index) in JSON.parse(form.files)"
|
||||
:key="index"
|
||||
class="scrollbar-item w-[240px] max-h-[625px] mr-4 mb-3"
|
||||
:src="item"
|
||||
:zoom-rate="1.2"
|
||||
:max-scale="7"
|
||||
:min-scale="0.2"
|
||||
:preview-src-list="srcList"
|
||||
:initial-index="4"
|
||||
fit="contain"
|
||||
/>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<el-descriptions title="详细介绍" class="mt-5" />
|
||||
<MdPreview id="preview-only" class="px-3" :modelValue="form.content || '暂无详细内容'" />
|
||||
</div>
|
||||
<!-- 应用截屏 -->
|
||||
<div id="screen-item" class="screen-item my-6">
|
||||
<el-descriptions class="mt-5" title="截屏"/>
|
||||
<el-scrollbar class="bg-white p-5">
|
||||
<div v-if="form.files" class="flex">
|
||||
<el-image
|
||||
v-for="(item,index) in JSON.parse(form.files)"
|
||||
:key="index"
|
||||
:initial-index="4"
|
||||
:max-scale="7"
|
||||
:min-scale="0.2"
|
||||
:preview-src-list="srcList"
|
||||
:src="item"
|
||||
:zoom-rate="1.2"
|
||||
class="scrollbar-item w-[240px] max-h-[625px] mr-4 mb-3"
|
||||
fit="contain"
|
||||
/>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<el-descriptions class="mt-5" title="详细介绍"/>
|
||||
<MdPreview id="preview-only" :modelValue="form.content || '暂无详细内容'" class="px-3"/>
|
||||
</div>
|
||||
|
||||
<!-- 评分及评价 -->
|
||||
<Comments :productId="form.companyId" :comments="comments" :count="commentsTotal" @done="doComments" />
|
||||
<!-- 评分及评价 -->
|
||||
<Comments :comments="comments" :count="commentsTotal" :productId="form.companyId" @done="doComments"/>
|
||||
|
||||
<div class="h-[100px]"></div>
|
||||
<div class="h-[100px]"></div>
|
||||
|
||||
</el-page-header>
|
||||
</div>
|
||||
</el-page-header>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ArrowLeft,View, Monitor, Search,Cpu, Platform, Avatar } from '@element-plus/icons-vue'
|
||||
import {ArrowLeft, View, Monitor, Search, Cpu, Platform, Avatar, MoreFilled} from '@element-plus/icons-vue'
|
||||
import type {ApiResult, PageResult} from "~/api";
|
||||
import {useServerRequest} from "~/composables/useServerRequest";
|
||||
import {usePage} from "~/composables/configState";
|
||||
@@ -59,13 +58,14 @@ import Comments from './components/Comments.vue';
|
||||
import type {CompanyComment} from "~/api/system/companyComment/model";
|
||||
import {getCmsWebsiteAll} from "~/api/cms/cmsWebsite";
|
||||
import type {CmsWebsite} from "~/api/cms/cmsWebsite/model";
|
||||
import { MdPreview } from 'md-editor-v3';
|
||||
import {MdPreview} from 'md-editor-v3';
|
||||
// preview.css相比style.css少了编辑器那部分样式
|
||||
import 'md-editor-v3/lib/preview.css';
|
||||
|
||||
// 引入状态管理
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const user = useUser();
|
||||
const page = usePage();
|
||||
const comments = ref<CompanyComment[]>([]);
|
||||
const commentsTotal = ref(0);
|
||||
@@ -194,7 +194,7 @@ const reloadComments = async () => {
|
||||
// status: 1
|
||||
}
|
||||
})
|
||||
if(commentsResponse.value && commentsResponse.value?.data){
|
||||
if (commentsResponse.value && commentsResponse.value?.data) {
|
||||
comments.value = commentsResponse.value?.data?.list
|
||||
commentsTotal.value = commentsResponse.value?.data?.count;
|
||||
}
|
||||
@@ -217,7 +217,7 @@ const reload = async () => {
|
||||
}
|
||||
|
||||
// 应用截图
|
||||
if(data.files){
|
||||
if (data.files) {
|
||||
const imgArr = JSON.parse(data.files);
|
||||
imgArr.map((item: any) => {
|
||||
srcList.value.push(item)
|
||||
@@ -232,17 +232,17 @@ const reload = async () => {
|
||||
})
|
||||
|
||||
}).catch(err => {
|
||||
console.log(err,'加载失败...')
|
||||
console.log(err, '加载失败...')
|
||||
})
|
||||
}
|
||||
|
||||
watch(
|
||||
() => route.params.id,
|
||||
(id) => {
|
||||
navId.value = getNavIdByParamsId(id);
|
||||
reload();
|
||||
},
|
||||
{ immediate: true }
|
||||
() => route.params.id,
|
||||
(id) => {
|
||||
navId.value = getNavIdByParamsId(id);
|
||||
reload();
|
||||
},
|
||||
{immediate: true}
|
||||
);
|
||||
</script>
|
||||
|
||||
@@ -253,9 +253,11 @@ watch(
|
||||
height: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
.scrollbar-flex-content {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.scrollbar-item {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user