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

修改文物详情接口

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