提交 06be6dce authored 作者: 龙菲's avatar 龙菲

修改文物详情接口

上级 d1322763
......@@ -14,7 +14,17 @@ export function getRCDetailById(params) {
method: 'get',
params
})
}
}
// 根据文物id查询详情(包含关联文物)
export function getRCDetailByIdV2(params) {
return request({
url: '/bizCulturalRelic/v2/listById',
method: 'get',
params
})
}
// 文物详情页关联文物
export function crRecommendByPage(data) {
return request({
......@@ -22,9 +32,9 @@ export function crRecommendByPage(data) {
method: 'post',
data
})
}
}
export function getRecommendCr(params){
export function getRecommendCr(params) {
return request({
url: '/bizCrRecommend/list',
method: 'get',
......
......@@ -11,9 +11,9 @@ import './icons'
import animated from 'animate.css';
// 滚动动画 wow.js
import {
WOW
} from '../public/static/js/wow'
// import {
// WOW
// } from '../public/static/js/wow'
import {
getFullUrl
} from '@/utils/index'
......
......@@ -131,7 +131,7 @@
</div>
</div>
<div class="cr-detail_relate_cr" v-if="relateRelics.length>0">
<div class="cr-detail_relate_cr" v-if="relateRelics.length > 0">
<CustomTitle text="关联文物" />
<el-row :gutter="40" class="cr-list">
<el-col
......@@ -229,7 +229,7 @@ import Video from "@/components/Video";
import CustomTitle from "@/components/CustomTitle";
import ReaderOperations from "@/components/ReaderOperations";
import QRCode from "qrcodejs2";
import { getRCDetailById, crRecommendByPage } from "@/api/culturalRelic";
import { getRCDetailByIdV2, crRecommendByPage } from "@/api/culturalRelic";
import { previewFile } from "@/utils/index";
export default {
components: {
......@@ -280,12 +280,12 @@ export default {
async loadDetail() {
let crId = this.$route.params.crId;
if (crId) {
let res = await getRCDetailById({ crId });
let res = await getRCDetailByIdV2({ crId });
if (res.code == 0) {
this.CRDetail = res.data;
// debugger
this.CRDetail = res.data.culturalRelicVo;
this.relateRelics = res.data.recommendList.records;
// 获取关联文物
this.loadCrRecommend();
// this.loadCrRecommend();
this.$nextTick(() => {
if (this.CRDetail.audiosVo && this.CRDetail.audiosVo.length > 0) {
this.$message.info("正在播放当前文物讲解音频,点击按钮可关闭");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论