提交 8c2e8900 authored 作者: 龙菲's avatar 龙菲

增加文创列表和文创详情

上级 5e5db8de
...@@ -9,3 +9,19 @@ export function getLiteratureList(data) { ...@@ -9,3 +9,19 @@ export function getLiteratureList(data) {
data data
}) })
} }
export function getCcProductList(data) {
return request({
url: 'bizCcProducts/listByPage',
method: 'post',
data
})
}
export function getCcProductDetail(params) {
return request({
url: '/bizCcProducts/findById',
method: 'get',
params
})
}
...@@ -35,6 +35,15 @@ export function getMuseumListPage(data) { ...@@ -35,6 +35,15 @@ export function getMuseumListPage(data) {
}) })
} }
export function getAllDeptIdAndName(data) {
return request({
url: '/sys/getAllDeptIdAndName',
method: 'get',
data
})
}
// 根据博物馆id查询详情(需token) // 根据博物馆id查询详情(需token)
......
差异被折叠。
...@@ -201,6 +201,12 @@ export default { ...@@ -201,6 +201,12 @@ export default {
path: "/museum", path: "/museum",
}; };
} }
if (value.name.indexOf("ccProduct") != -1) {
this.currentTab = {
name: "文创产品",
path: "/ccProduct",
};
}
if (value.params.themeType) { if (value.params.themeType) {
this.$store.commit("app/CHANGE_NAV_COLOR", value.params.themeType); this.$store.commit("app/CHANGE_NAV_COLOR", value.params.themeType);
...@@ -266,6 +272,10 @@ export default { ...@@ -266,6 +272,10 @@ export default {
name: "博物馆", name: "博物馆",
path: "/museum", path: "/museum",
}, },
{
name: "文创产品",
path: "/ccProduct",
},
], ],
currentTab: { currentTab: {
name: "首页", name: "首页",
......
...@@ -127,6 +127,24 @@ const routes = [ ...@@ -127,6 +127,24 @@ const routes = [
keepAlive: false keepAlive: false
} }
}, },
// 文创
{
path: '/ccProduct',
name: 'ccProduct',
component: () => import('@/views/ccProduct'),
meta: {
keepAlive: true
}
},
// 文创详情
{
path: '/ccProduct/:bccpId',
name: 'ccProductDetail',
component: () => import('@/views/ccProduct/Detail.vue'),
meta: {
keepAlive: false
}
},
// 404 // 404
{ {
......
...@@ -29,13 +29,14 @@ export function getFullUrl(url) { ...@@ -29,13 +29,14 @@ export function getFullUrl(url) {
if (url && url.indexOf('http') != -1 && url.indexOf('files') != -1) { if (url && url.indexOf('http') != -1 && url.indexOf('files') != -1) {
let urlArr = url.split('files') let urlArr = url.split('files')
fullUrl = '/files' + urlArr[1] fullUrl = '/files' + urlArr[1]
} else if (url && url.indexOf('http') == -1 && url.indexOf('files') == -1) {
fullUrl = '/files' + url
} else { } else {
fullUrl = url fullUrl = url
} }
return fullUrl return fullUrl
} }
/** /**
* 预览文件 * 预览文件
* @param href 预览地址 * @param href 预览地址
......
<template>
<div class="ccproduct-detail">
<div class="back" @click="handleBack">
<svg-icon icon-class="mz-fh"></svg-icon>
返回上页</div>
<div class="wrapper">
<div class="header">
<div class="dc-left wow animate__animated animate__fadeInLeft">
<img src="@/assets/imgs/ccproduct/dc5.png" alt="" />
</div>
<div class="text wow animate__animated animate__fadeIn">文创</div>
</div>
<div class="body">
<div class="title wow animate__animated animate__fadeInLeft">{{ productInfo.title }}</div>
<div class="intro wow animate__animated animate__fadeInRight" v-html="productInfo.intro"></div>
<div class="images wow animate__animated animate__fadeInUp">
<div
class="img-container"
v-for="(item, index) in productInfo.imagesVo"
:key="index"
>
<img :src="$getFullUrl(item.pressUrl)" />
</div>
</div>
<div class="deptName wow animate__animated animate__fadeInLeft">产品来源:{{ productInfo.deptName }}</div>
</div>
<!-- <div class="footer">
<div class="dc-right">
<img src="@/assets/imgs/ccproduct/dc4.png" alt="" />
</div>
</div> -->
</div>
</div>
</template>
<script>
import { getCcProductDetail } from "@/api/literature";
export default {
name: "ccProductDetail",
data() {
return {
productInfo: {},
};
},
async mounted() {
let bccpId = this.$route.params.bccpId;
this.loadProductDetail(bccpId);
},
methods: {
async loadProductDetail(bccpId) {
const params = {
bccpId,
};
let res = await getCcProductDetail(params);
this.productInfo = res.data;
},
handleBack() {
this.$router.go(-1);
},
},
};
</script>
<style lang="scss" scoped>
.ccproduct-detail {
background: url("@/assets/imgs/ccproduct/wc-bg.png");
min-height: calc(100vh - 300px);
padding: 40px 13%;
.back{
color: #999;
margin: 30px 0;
cursor: pointer;
}
.wrapper {
background-color: #fff;
min-height: calc(100vh - 300px);
.header {
position: relative;
.dc-right {
position: absolute;
right: 0;
bottom: 10px;
}
.dc-left {
position: absolute;
left: 0;
top: 0;
}
.text {
font-family: "SourceHanSerifCN-Bold";
font-size: 180px;
position: absolute;
right: 0;
top: 10px;
color: #f1f1f1;
}
}
.body{
padding: 400px 100px;
.title{
font-size: 32px;
font-family: "SourceHanSerifCN-Bold";
color: #333;
}
.intro,.deptName{
color: #999;
}
.intro{
&>p{
color: #666;
}
}
.images{
padding: 20px 0;
display: flex;
.img-container{
width: 400px;
height: 400px;
background-color: #f7f7f7;
margin: 20px;
img{
width: 100%;
height: 100%;
object-fit: contain;
}
}
}
}
// .footer{
// position: relative;
// .dc-right{
// right: 0;
// top: 0;
// position: absolute;
// }
// }
}
}
</style>
\ No newline at end of file
差异被折叠。
...@@ -4,11 +4,6 @@ ...@@ -4,11 +4,6 @@
<div class="content-wrapper"> <div class="content-wrapper">
<div class="content"> <div class="content">
<div class="search wow animate__animated animate__fadeIn"> <div class="search wow animate__animated animate__fadeIn">
<!-- <el-row
style="width: 100%; display: flex; align-items: center"
:span="2"
>
<el-col :span="6"> -->
<el-input <el-input
class="input item" class="input item"
v-model="keyword" v-model="keyword"
...@@ -17,9 +12,6 @@ ...@@ -17,9 +12,6 @@
clearable clearable
> >
</el-input> </el-input>
<!-- </el-col> -->
<!-- <el-col :span="6"> -->
<el-select <el-select
class="type item" class="type item"
v-model="type" v-model="type"
...@@ -36,8 +28,6 @@ ...@@ -36,8 +28,6 @@
> >
</el-option> </el-option>
</el-select> </el-select>
<!-- </el-col> -->
<!-- <el-col :span="6"> -->
<el-cascader <el-cascader
class="years item" class="years item"
v-model="years" v-model="years"
...@@ -50,7 +40,6 @@ ...@@ -50,7 +40,6 @@
ref="years" ref="years"
> >
</el-cascader> </el-cascader>
<!-- </el-col> -->
<el-col :span="3"> <el-col :span="3">
<div class="search-button" @click="search" style="width: 100%"> <div class="search-button" @click="search" style="width: 100%">
<svg-icon icon-class="search"></svg-icon> <svg-icon icon-class="search"></svg-icon>
...@@ -59,11 +48,6 @@ ...@@ -59,11 +48,6 @@
</el-col> </el-col>
<el-col :span="3" class="threeD" @click.native="handleClickThreeD"> <el-col :span="3" class="threeD" @click.native="handleClickThreeD">
<!-- <div class="threeD" @click="handleClickThreeD">
<div class="box">
<i class="el-icon-check" v-show="onlyShow3d"></i>
</div>
</div> -->
<svg-icon <svg-icon
:icon-class="onlyShow3d ? 'filter-s' : 'filter'" :icon-class="onlyShow3d ? 'filter-s' : 'filter'"
></svg-icon> ></svg-icon>
......
...@@ -128,10 +128,8 @@ ...@@ -128,10 +128,8 @@
import ListBanner from "@/components/ListBanner"; import ListBanner from "@/components/ListBanner";
import { getMuseumListPage } from "@/api/org"; import { getMuseumListPage } from "@/api/org";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { debounce } from "@/utils/index";
export default { export default {
name: "Museum", name: "Museum",
// components: { SearchBar, NavBar, Footer },
components: { ListBanner }, components: { ListBanner },
data() { data() {
return { return {
...@@ -229,8 +227,6 @@ export default { ...@@ -229,8 +227,6 @@ export default {
}, },
handleRegionChange(value) { handleRegionChange(value) {
console.log(value);
console.log(value[value.length - 1]);
this.regionCode = value; this.regionCode = value;
this.loadData(); this.loadData();
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论