提交 f45b5783 authored 作者: Anix's avatar Anix

解决冲突,提交六枝梭戛

差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
v-for="(item, index) in imgList" v-for="(item, index) in imgList"
:key="index" :key="index"
> >
<img :src="$getFullUrl(item.pressUrl)" alt="" /> <img :src="$getFullUrl(item[imgKey])" alt="" />
<div class="enlarge" @click="handelPreviewImages(imgList,index)"> <div class="enlarge" @click="handelPreviewImages(imgList,index)">
<img src="@/assets/imgs/enlarge-s.png" alt="" /> <img src="@/assets/imgs/enlarge-s.png" alt="" />
</div> </div>
......
import Vue from 'vue' import Vue from "vue";
import VueRouter from 'vue-router' import VueRouter from "vue-router";
import Home from '../views/home' import Home from "../views/home";
Vue.use(VueRouter) Vue.use(VueRouter);
// keepAlive先全部为true 后期根据每个页面需求调整 // keepAlive先全部为true 后期根据每个页面需求调整
const routes = [ const routes = [
{ {
path: '/loopswiper', path: "/loopswiper",
name: 'loop', name: "loop",
component: () => import('@/views/home/components/swiper.vue'), component: () => import("@/views/home/components/swiper.vue"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
{ {
path: '/404', path: "/404",
component: () => import('@/views/404.vue'), component: () => import("@/views/404.vue"),
hidden: true hidden: true,
}, },
// 首页 // 首页
{ {
path: '/', path: "/",
name: 'home', name: "home",
component: Home, component: Home,
meta: { meta: {
keepAlive: false keepAlive: false,
} },
}, },
// 精品展 // 精品展
{ {
path: '/boutique/:title', path: "/boutique/:title",
name: 'boutique', name: "boutique",
component: () => import('@/views/boutique'), component: () => import("@/views/boutique"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 虚拟展厅 // 虚拟展厅
{ {
path: '/virtual', path: "/virtual",
name: 'virtual', name: "virtual",
component: () => import('@/views/virtual'), component: () => import("@/views/virtual"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 布展 // 布展
{ {
path: '/display', path: "/display",
name: 'display', name: "display",
component: () => import('@/views/display'), component: () => import("@/views/display"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 布展详情页 // 布展详情页
{ {
path: '/display/:themeType/:exhibitionId', path: "/display/:themeType/:exhibitionId",
name: 'displayDetail', name: "displayDetail",
component: () => import('@/views/display/Detail.vue'), component: () => import("@/views/display/Detail.vue"),
meta: { meta: {
keepAlive: false keepAlive: false,
} },
}, },
// 文物展 // 文物展
{ {
path: '/culturalRelic', path: "/culturalRelic",
name: 'culturalRelic', name: "culturalRelic",
component: () => import('@/views/culturalRelic'), component: () => import("@/views/culturalRelic"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 文物详情页 // 文物详情页
{ {
path: '/culturalRelic/:crId', path: "/culturalRelic/:crId",
name: 'culturalRelicDetail', name: "culturalRelicDetail",
component: () => import('@/views/culturalRelic/Detail.vue'), component: () => import("@/views/culturalRelic/Detail.vue"),
meta: { meta: {
keepAlive: false keepAlive: false,
} },
}, },
// 个人中心 // 个人中心
{ {
path: '/personal', path: "/personal",
name: 'personal', name: "personal",
component: () => import('@/views/personal'), component: () => import("@/views/personal"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// // 登录 // // 登录
// { // {
...@@ -102,95 +102,100 @@ const routes = [ ...@@ -102,95 +102,100 @@ const routes = [
// 注册页 // 注册页
{ {
path: '/register', path: "/register",
name: 'register', name: "register",
component: () => import('@/views/register'), component: () => import("@/views/register"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 博物馆 // 博物馆
{ {
path: '/museum', path: "/museum",
name: 'museum', name: "museum",
component: () => import('@/views/museum'), component: () => import("@/views/museum"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 博物馆详情 // 博物馆详情
{ {
path: '/museum/:id', path: "/museum/:id",
name: 'museumDetail', name: "museumDetail",
component: () => import('@/views/museum/Detail.vue'), component: () => import("@/views/museum/Detail.vue"),
meta: { meta: {
keepAlive: false keepAlive: false,
} },
}, },
// 文创 // 文创
{ {
path: '/ccProduct', path: "/ccProduct",
name: 'ccProduct', name: "ccProduct",
component: () => import('@/views/ccProduct'), component: () => import("@/views/ccProduct"),
meta: { meta: {
keepAlive: true keepAlive: true,
} },
}, },
// 文创详情 // 文创详情
{ {
path: '/ccProduct/:bccpId', path: "/ccProduct/:bccpId",
name: 'ccProductDetail', name: "ccProductDetail",
component: () => import('@/views/ccProduct/Detail.vue'), component: () => import("@/views/ccProduct/Detail.vue"),
meta: { meta: {
keepAlive: false keepAlive: false,
} },
}, },
{ {
path: '/jyycc', path: "/jyycc",
name: 'JYYCC', name: "JYYCC",
component: () => import('@/views/boutique/components/jyycc') component: () => import("@/views/boutique/components/jyycc"),
}, },
{ {
path: '/sdcs', path: "/sdcs",
name: 'SDCS', name: "SDCS",
component: () => import('@/views/boutique/components/SDCS') component: () => import("@/views/boutique/components/SDCS"),
}, },
{ {
path: '/zggzsgwdzjlz', path: "/jysg",
name: 'zggzsgwdzjlz', name: "JYSG",
component: () => import('@/views/boutique/components/zggzsgwdzjlz/index.vue') component: () => import("@/views/boutique/components/JYSG"),
}, },
{ {
path: '/lzsg', path: "/zggzsgwdzjlz",
name: 'LZSG', name: "zggzsgwdzjlz",
component: () => import('@/views/boutique/components/lzsg/index.vue') component: () =>
import("@/views/boutique/components/zggzsgwdzjlz/index.vue"),
},
{
path: "/lzsg",
name: "lzsg",
component: () =>
import("@/views/boutique/components/lzsg/index.vue"),
}, },
// 404 // 404
{ {
path: '*', path: "*",
redirect: '/404', redirect: "/404",
} },
] ];
/** /**
* 解决重复点击同一个路由报错的问题 * 解决重复点击同一个路由报错的问题
*/ */
// 获取原型对象上的push函数 // 获取原型对象上的push函数
const originalPush = VueRouter.prototype.push const originalPush = VueRouter.prototype.push;
// 修改原型对象中的push方法 // 修改原型对象中的push方法
VueRouter.prototype.push = function push(location) { VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err) return originalPush.call(this, location).catch((err) => err);
} };
const router = new VueRouter({ const router = new VueRouter({
routes, routes,
scrollBehavior(to, from, savePosition) { scrollBehavior(to, from, savePosition) {
// return 期望滚动到哪个的位置 // return 期望滚动到哪个的位置
return { return {
y: 0 y: 0,
} };
} },
}) });
export default router export default router;
差异被折叠。
...@@ -365,7 +365,6 @@ export default { ...@@ -365,7 +365,6 @@ export default {
}, },
methods: { methods: {
handleClickUnit1(item) { handleClickUnit1(item) {
this.part1CurUnit = item; this.part1CurUnit = item;
}, },
......
...@@ -2,7 +2,11 @@ ...@@ -2,7 +2,11 @@
<div class="smgz"> <div class="smgz">
<div class="face-img smgz-item"> <div class="face-img smgz-item">
<div class="back-img img wow animate__animated animate__fadeIn"> <div class="back-img img wow animate__animated animate__fadeIn">
<img src="@/assets/imgs/boutique/smgz-5/1_faceImage/bg.png" alt="" /> <img
src="@/assets/imgs/boutique/smgz-5/1_faceImage/bg.png"
id="@/assets/imgs/boutique/smgz-5/1_faceImage/bg.png"
alt=""
/>
</div> </div>
<div class="left-title img wow animate__animated animate__fadeInLeft"> <div class="left-title img wow animate__animated animate__fadeInLeft">
<img <img
...@@ -23,7 +27,11 @@ ...@@ -23,7 +27,11 @@
class="ms img wow animate__animated animate__fadeInRight" class="ms img wow animate__animated animate__fadeInRight"
data-wow-duration="2s" data-wow-duration="2s"
> >
<img src="@/assets/imgs/boutique/smgz-5/1_faceImage/ms.png" alt="" /> <img
src="@/assets/imgs/boutique/smgz-5/1_faceImage/ms.png"
id="@/assets/imgs/boutique/smgz-5/1_faceImage/ms.png"
alt=""
/>
</div> </div>
<div <div
class="more img wow animate__animated animate__fadeInUp" class="more img wow animate__animated animate__fadeInUp"
...@@ -442,12 +450,34 @@ export default { ...@@ -442,12 +450,34 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
// this.scroll(); // this.scroll();
window.addEventListener("scroll", this.scroll); window.addEventListener("scroll", this.scroll);
this.replaceImg();
}); });
}, },
destroyed() { destroyed() {
window.removeEventListener("scroll", this.scroll, false); window.removeEventListener("scroll", this.scroll, false);
}, },
methods: { methods: {
//替换从低清到高清
replaceImg() {
let imgs = document.getElementsByTagName("img");
let imgsArr = [...imgs];
imgsArr.forEach((i) => {
// url中包含了data-url压缩图的才进行替换
if (i.id && i.id.indexOf("smgz-5")) {
var imgObj = new Image(); //新建一个图片对象
let lowImgSrc = i.id;
let highImgSrc = lowImgSrc.replace("smgz-5", "smgz"); //最终显示的大图
let lowImg = document.getElementById(i.id);
imgObj.src = highImgSrc;
imgObj.onload = function () {
debugger;
lowImg.src = highImgSrc;
lowImg.classList.add('high')
};
}
});
},
handleChangeUnit(index) { handleChangeUnit(index) {
this.currentUnitPicIndex = index; this.currentUnitPicIndex = index;
this.$refs.unitSwiper.swiper.slideTo(index, 500, true); this.$refs.unitSwiper.swiper.slideTo(index, 500, true);
......
[
{
"name": "贵州古代教育史馆",
"img": "t-1.png",
"intro": "第一部分为贵州古代教育史馆,即“参差交错的贵州古代教育”,展示了原始形态教育社会(先秦到宋元)——明清时期的贵州教育(约19世纪中叶前)——地域文化馆(沙滩文化与影山文化)。尹真讲学的“务本堂”复制品及视频介绍。"
},
{
"name": "贵州近代教育史馆",
"img": "t-2.png",
"intro": "第二部分为贵州近代教育史馆,即“除旧布新的贵州近代教育”,展示了鸦片战争后贵州近代先贤促进贵州教育近代化的历程——近代学堂体系的建立——民国初期贵州教育——抗战时期教育文化内迁贵州及贵州近代教育体系建立。"
},
{
"name": "贵州现代教育史馆",
"img": "t-3.png",
"intro": "第三部分为贵州现代教育史馆,即(曲折发展的新中国初期贵州教育与快速发展的改革开放以来的贵州教育),展示了新中国初期贵州现代教育体系的建立——文革时期贵州曲折发展——改革开放后贵州教育的快速发展——十八大以来贵州教育取得的辉煌成就。"
},
{
"name": "贵州民族教育史馆",
"img": "t-4.png",
"intro": "第四部分为贵州现代教育史馆,即“多元教育模式的贵州少数民族教育概况”,展示了传统形态、封建形态、近代形态、现代形态的贵州民族教育发展概况。"
},
{
"name": "贵州名师馆",
"img": "t-5.png",
"intro": "第五部分为贵州历史上的名师,即“薪火相传的贵州近现代著名教师”,展示了明清以来贵州名师、先贤及其献身教育的精神。"
}
]
<template> <template>
<div class="botique"> <div class="botique">
<SMGZ v-if="currentTitle == '神秘贵州'" /> <SMGZ v-if="currentTitle == '神秘贵州'" />
<YLGDYW v-else-if="currentTitle == '夜郎国的疑问'" /> <YLGDYW v-else-if="currentTitle == '夜郎国的疑问'" />
<JYYCC v-else-if="currentTitle == '记忆与传承'" /> <JYYCC v-else-if="currentTitle == '记忆与传承'" />
<SDCS v-else-if="currentTitle == '四渡赤水出奇兵'" /> <SDCS v-else-if="currentTitle == '四渡赤水出奇兵'" />
<div v-else class="img-container"> <JYSG v-else-if="currentTitle == '贵州教育史馆'" />
<!-- <img :src="require(`@/assets/imgs/boutique/${currentTitle}.jpg`) <div v-else class="img-container">
" alt="" /> --> <el-empty description="暂无数据"></el-empty>
<el-empty description="暂无数据"></el-empty>
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
...@@ -18,47 +17,47 @@ import SMGZ from "./components/SMGZ"; ...@@ -18,47 +17,47 @@ import SMGZ from "./components/SMGZ";
import YLGDYW from "./components/YLGDYW"; import YLGDYW from "./components/YLGDYW";
import JYYCC from "./components/jyycc"; import JYYCC from "./components/jyycc";
import SDCS from "./components/SDCS"; import SDCS from "./components/SDCS";
import JYSG from "./components/JYSG";
export default { export default {
components: { SMGZ, YLGDYW, JYYCC,SDCS }, components: { SMGZ, YLGDYW, JYYCC, SDCS, JYSG },
watch: { watch: {
currentTitle: { currentTitle: {
handler: function (value) { handler: function (value) {
let color = ""; let color = "";
if (!value) { if (!value) {
return; return;
} }
switch (value) { switch (value) {
case "四渡赤水出奇兵": case "四渡赤水出奇兵":
color = "4"; color = "4";
break; break;
case "神秘贵州": case "神秘贵州":
color = "5"; color = "5";
break; break;
case "记忆与传承": case "记忆与传承":
color = "6"; color = "6";
break; break;
case "夜郎国的疑问": case "夜郎国的疑问":
color = "7"; color = "7";
break; break;
// case "cjm": // case "cjm":
// color = "1"; // color = "1";
}
this.$store.commit("app/CHANGE_NAV_COLOR", color);
},
immediate: true,
},
},
data() {
return {
currentTitle: ''
} }
this.$store.commit("app/CHANGE_NAV_COLOR", color);
},
immediate: true,
}, },
mounted() { },
this.currentTitle = this.$route.params.title data() {
} return {
} currentTitle: "",
};
},
mounted() {
this.currentTitle = this.$route.params.title;
},
};
</script> </script>
<style> <style>
</style> </style>
\ No newline at end of file
...@@ -48,7 +48,6 @@ export default { ...@@ -48,7 +48,6 @@ export default {
"displayType", "displayType",
"displayCharacter", "displayCharacter",
]); ]);
debugger
this.loadDetail(); this.loadDetail();
}, },
......
//此处为配置需跳转为精品展的展览
//在此处添加title后需在@/views/boutique/index.vue中引入对应的页面组件
export var titles = [
"神秘贵州",
"四渡赤水出奇兵",
"记忆与传承",
"夜郎国的疑问",
"贵州教育史馆",
];
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
v-for="(item, index) in displayDetail.imagesVo" v-for="(item, index) in displayDetail.imagesVo"
:key="index" :key="index"
> >
<img :src="$getFullUrl(item.pressUrl || item.url)" alt="" /> <img :src="$getFullUrl(item.middleUrl || item.url)" alt="" />
<div class="modal"></div> <div class="modal"></div>
</div> </div>
</div> </div>
......
...@@ -111,7 +111,7 @@ import ListBanner from "@/components/ListBanner"; ...@@ -111,7 +111,7 @@ import ListBanner from "@/components/ListBanner";
import { getList, getDisplayExistDict } from "@/api/display"; import { getList, getDisplayExistDict } from "@/api/display";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { debounce } from "@/utils/index"; import { debounce } from "@/utils/index";
import { titles} from './boutiqueTitles'
export default { export default {
name: "Display", name: "Display",
components: { ListBanner }, components: { ListBanner },
...@@ -141,12 +141,7 @@ export default { ...@@ -141,12 +141,7 @@ export default {
}, },
], ],
currentType: "", currentType: "",
boutiqueTitles: [ boutiqueTitles:titles
"神秘贵州",
"四渡赤水出奇兵",
"记忆与传承",
"夜郎国的疑问",
],
}; };
}, },
computed: { computed: {
...@@ -217,7 +212,6 @@ export default { ...@@ -217,7 +212,6 @@ export default {
handleClick(item) { handleClick(item) {
let index = this.boutiqueTitles.indexOf(item.title); let index = this.boutiqueTitles.indexOf(item.title);
// debugger
let newPage; let newPage;
if (index == -1) { if (index == -1) {
const { themeType, exhibitionId } = item; const { themeType, exhibitionId } = item;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论