123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917 |
- <template>
- <!-- pc端才使用 v-touch-->
- <!--
- v-touch:swipe.left="() => onSwipeChange(1)"
- v-touch:swipe.right="() => onSwipeChange(-1)"
- :swipe-options="{ direction: 'horizontal' }"
- -->
- <div
- class="ZMoveBox"
- @touchstart="(e) => touchstart(e.touches[0].pageX)"
- @touchmove="(e) => touchmove(e.touches[0].pageX)"
- @touchend="(e) => touchend((val) => onSwipeChange(val))"
- >
- <div
- class="ZMbox"
- :style="`width: ${pageWidth * pageNum}px;
- transform: translateX(-${indexAc * pageWidth}px) translateZ(0)
- `"
- >
- <div
- v-for="(item1, index1) in listArr"
- :key="index1"
- :class="`ROW ${item1.classWai}`"
- :style="`width:${pageWidth}px; opacity:${
- index1 === indexAc ? '1' : isOpcMove ? '0' : ''
- }`"
- >
- <!-- 热点 -->
- <HotspotComp
- v-if="index1 === 0"
- class="hotspot"
- @click="
- router.replace({
- name: 'BambooHot',
- })
- "
- />
- <div
- v-show="index1 === indexAc"
- class="ROWtxt"
- >
- <div
- v-if="item1.nameArr"
- class="ROWtxtTabBox"
- >
- <div
- v-for="(item2, index2) in item1.nameArr"
- :key="index2"
- :style="{background: item2.txt == '画作'?'none':''}"
- class="ROWtxtTab animation-show-long-hide"
- @click="item2.fu()"
- >
- {{ item2.txt }}
- </div>
- </div>
- <div
- v-else
- class="ROWlast"
- >
- <img
- src="@/assets/images/wu-jing-cang.png"
- alt=""
- >
- <div
- class="game-box"
- @click="OpenScene()"
- >
- 线上展厅
- </div>
- <div
- class="online-box"
- @click="
- () => {
- store.state.haveShownStartup = false;
- router.replace('/?back=1');
- }
- "
- >
- 重新开始
- </div>
- <div class="about-box">
- <img
- class="about-open"
- src="@/assets/images/icon-about-open.png"
- @click="isShowAboutText = !isShowAboutText"
- >
- <img
- :style="{opacity: isShowAboutText ? '1':'0'}"
- src="@/assets/images/about-us.png"
- >
- <!-- <div style="display: flex">
- <div style="font-weight: bold;">
- 《无尽藏》展览策展人:
- </div><span>庞鸥</span>
- </div>
- <div style="font-weight: bold;margin-top: 5px;">
- 线上策展团队:
- </div>
- <div class="about-bottom">
- 南京博物院: 张莅坤 刘佳 李文彬 张晓婉
- 珠海市四维时代网络科技有限公司
- </div> -->
- <!-- <div class="about-bottom">
- </div> -->
- </div>
- </div>
- <div
- v-if="item1.nameArr"
- class="ROWtxtIcon"
- >
- {{ item1.name }}
- <img
- class="deco"
- :class="{'deco2': item1.name == '画作创作'}"
- src="@/assets/images/more-content-deco.png"
- alt=""
- draggable="false"
- >
- </div>
- </div>
- <!--
- :style="`transform: translateX(${isMoveFu(index1, item3.num)}px)`"
- -->
- <img
- v-for="(item3, index3) in item1.imgArr"
- :key="index3"
- :class="`${item3.className}`"
- :src="
- require(`@/assets/images/fade-chapter-wood/${item3.imgName}${item3.imgName === '1_01'|| item3.imgName === '1_02' || item3.imgName === '1_03' || item3.imgName === '1_04' ? '.webp':'.png'}`)
- "
- :style="`transform: translateX(${isMoveFu(
- index1,
- item3.num
- )}px) translateZ(0)`"
- alt=""
- >
- </div>
- </div>
- <!-- 全局遮罩 -->
- <div class="shandow-box" />
- <!-- 指示器 -->
- <ProgressBar
- class="pagination"
- :totle-unit="4"
- :type="1"
- :cur-percentage="indexAc"
- color-ac="#7B916B"
- color="#7B916B60"
- @go-to-slide="clickSonIndFu"
- />
- <!-- 返回按钮 -->
- <BtnBack
- style="z-index: 200"
- @click="router.replace('/?back=1')"
- />
- <!-- 提示语 -->
- <div :class="`operation-tip ${titShow && route.query.anchorIdx !='3' ? '' : 'operation-tipHide'}`">
- 左右滑动
- <img
- class=""
- :src="require(`@/assets/images/icon_operation_h_green.png`)"
- alt=""
- draggable="false"
- >
- </div>
- <!-- 跳转的视频 -->
- <Transition name="fade-in">
- <div
- v-if="isShowVideo"
- :class="`RWbox`"
- >
- <video
- ref="videoRef"
- :src="
- require(`@/assets/videos/${
- isShowVideo === 'RWvideo'
- ? 'fade-at-mo-zhu'
- : 'fade-at-shuang-gou'
- }.mp4`)
- "
- playsinline
- muted
- webkit-playsinline="true"
- x5-video-player-type="h5"
- @ended="
- router.replace({
- name: isShowVideo === 'RWvideo' ? 'PoemList' : 'ShuanggouDetail',
- })
- "
- />
- <img
- v-show="isShowVideo === 'RWvideo'"
- class="RWvideoTxt"
- src="@/assets/images/RW/titile_mozhu-min.png"
- alt=""
- >
- </div>
- </Transition>
- </div>
- </template>
- <script setup>
- import { ref, onBeforeMount, nextTick, onMounted } from "vue"
- import { useRoute, useRouter } from "vue-router"
- import { useStore } from "vuex"
- import useMoveFu from "../moveFu"
- const { touchstart, touchmove, touchend } = useMoveFu()
- const listArr = [
- {
- name: "双钩设色",
- nameArr: [
- {
- txt: "查看详情",
- fu: () => {
- playVideoFu("XQvideo")
- },
- },
- ],
- classWai: "ROW1",
- imgArr: [
- { className: "ROW1_1", imgName: "1_01", num: 100 },
- { className: "ROW1_2", imgName: "1_02", num: 100 },
- { className: "ROW1_3", imgName: "2_01", num: 80 },
- // { className: "ROW1_4", imgName: "2_03", num: 80 },
- // { className: "ROW1_5", imgName: "3_01", num: 60 },
- { className: "ROW1_6", imgName: "4_01", num: 120 },
- { className: "ROW1_7", imgName: "4_02", num: 120 },
- ],
- },
- {
- name: "墨竹",
- nameArr: [
- {
- txt: "人文",
- fu: () => {
- playVideoFu("RWvideo")
- },
- },
- {
- txt: "画作",
- fu: () => {
- playVideoFu("PaintingList", true)
- },
- },
- {
- txt: "竹谱",
- fu: () => {
- playVideoFu("BambooBook", true)
- },
- },
- ],
- classWai: "ROW2",
- imgArr: [
- { className: "ROW2_1", imgName: "1_03", num: 100 },
- { className: "ROW2_2", imgName: "2_02", num: 80 },
- { className: "ROW2_3", imgName: "2_03", num: 80 },
- // { className: "ROW2_4", imgName: "3_01", num: 60 },
- // { className: "ROW2_5", imgName: "3_02", num: 60 },
- { className: "ROW2_6", imgName: "4_01", num: 120 },
- { className: "ROW2_7", imgName: "4_02", num: 120 },
- // { className: "ROW2_8", imgName: "4_05", num: 40 },
- ],
- },
- {
- name: "画作创作",
- nameArr: [
- {
- txt: "开始体验",
- fu: () => {
- router.replace("/game")
- },
- },
- ],
- classWai: "ROW3",
- imgArr: [
- // { className: "ROW3_1", imgName: "4_07", num: 40 },
- { className: "ROW3_2", imgName: "4_08", num: 120 },
- // { className: "ROW3_3", imgName: "4_09", num: 40 },
- // { className: "ROW3_4", imgName: "4_10", num: 40 },
- // { className: "ROW3_5", imgName: "4_12", num: 40 },
- // { className: "ROW3_6", imgName: "3_04", num: 60 },
- { className: "ROW3_7", imgName: "2_02", num: 80 },
- { className: "ROW3_8", imgName: "2_04", num: 80 },
- { className: "ROW3_9", imgName: "2_05", num: 80 },
- { className: "ROW3_10", imgName: "1_04", num: 100 },
- { className: "ROW3_11", imgName: "1_01", num: 100 },
- ],
- },
- {
- name: "最后一页",
- classWai: "ROW4",
- imgArr: [
- { className: "ROW4_1", imgName: "4_08", num: 120 },
- // { className: "ROW4_2", imgName: "4_09", num: 40 },
- // { className: "ROW4_3", imgName: "4_10", num: 40 },
- // { className: "ROW4_4", imgName: "4_12", num: 40 },
- // { className: "ROW4_5", imgName: "3_03", num: 60 },
- { className: "ROW4_6", imgName: "3_04", num: 80 },
- { className: "ROW4_7", imgName: "2_04", num: 80 },
- { className: "ROW4_8", imgName: "2_04-1", num: 80 },
- { className: "ROW4_9", imgName: "1_05", num: 100 },
- // { className: "ROW4_10", imgName: "2_05", num: 100 },
- ],
- },
- ]
- const route = useRoute()
- const router = useRouter()
- const store = useStore()
- const isShowAboutText = ref(false)
- // 点击指示器移动透明的问题
- const isOpcMove = ref(true)
- // 点击线上展厅
- const OpenScene = () => {
- const musicDom = document.getElementById("bg-music")
- musicDom.pause()
- router.replace("/scene")
- // window.open('https://www.4dkankan.com/spg.html?m=KJ-et2X3su4ofm', '_parent')
- // window.location.replace('https://www.4dkankan.com/spg.html?m=KJ-et2X3su4ofm')
- // window.location.replace('http://192.168.20.50:8082/spg.html?m=KJ-et2X3su4ofm')
- window.location.replace('./scene/smg.html?m=KJ-et2X3su4ofm')
- }
- // 提示语的显示隐藏
- const titShow = ref(true)
- // 向右是-1
- // 向左是 1
- const indexFlag = ref(0)
- // 左右滑动
- const onSwipeChange = (val) => {
- let numResTemp = indexAc.value + val
- let indexFlagTemp = -val
- if (val === -1 && indexAc.value === 0) {
- return
- }
- if (val === 1 && indexAc.value === listArr.length - 1) {
- return
- }
- titShow.value = false
- indexAc.value = numResTemp
- indexFlag.value = indexFlagTemp
- }
- // 点击底部的指示器 改变 indexAc
- const clickSonIndFu = (index) => {
- if (index === indexAc.value) return
- titShow.value = false
- isOpcMove.value = false
- setTimeout(() => {
- isOpcMove.value = true
- }, 300)
- indexAc.value = index
- }
- // 是否触发移动的逻辑
- const isMoveFu = (index, num) => {
- let numRes
- if (index === indexAc.value) numRes = 0
- else numRes = indexFlag.value * num * 2
- return numRes
- }
- // 当前页面的宽度
- const pageWidth = ref(0)
- // 当前有4个页面
- const pageNum = 4
- onMounted(() => {
- // alert(window.innerWidth)
- if (window.innerWidth >= 600) {
- pageWidth.value = window.innerWidth
- } else {
- pageWidth.value = window.innerWidth >= 500 ? 500 : window.innerWidth
- }
- })
- // 当前页面的索引
- const indexAc = ref(0)
- onBeforeMount(() => {
- if (route.query.anchorIdx) {
- indexAc.value = Number(route.query.anchorIdx)
- }
- })
- // 视频的显示和播放
- const isShowVideo = ref("")
- const videoRef = ref(null)
- // 点击查看详情 / 人文
- const playVideoFu = (val, flag) => {
- if (flag) {
- router.replace({
- name: val,
- })
- } else {
- isShowVideo.value = val
- nextTick(() => {
- videoRef.value.play()
- })
- }
- }
- </script>
- <style lang="less" scoped>
- body {
- -webkit-transform: translate3d(0, 0, 0);
- transform: translate3d(0, 0, 0);
- }
- .ZMoveBox {
- width: 100%;
- height: 100%;
- background-color: #f5f5f3;
- position: relative;
- .ZMbox {
- width: 1000px;
- height: 100%;
- overflow: hidden;
- position: relative;
- left: 0;
- top: 0;
- display: flex;
- background-image: url("../assets/images/fade-chapter-wood/bg-more-content.jpg");
- background-size: contain;
- transition: transform 1.2s;
- -webkit-transform: translateZ(0);
- -moz-transform: translateZ(0);
- -ms-transform: translateZ(0);
- -o-transform: translateZ(0);
- transform: translateZ(0);
- -webkit-backface-visibility: hidden;
- backface-visibility: hidden;
- .ROW {
- position: relative;
- transition: opacity 1.2s;
- height: 100%;
- .hotspot {
- position: absolute;
- top: 46%;
- left: 15%;
- z-index: 20;
- @media screen and (min-width: 600px) {
- left: 8%;
- }
- }
- .ROWtxt {
- z-index: 100;
- position: relative;
- top: 28%;
- left: 55%;
- .ROWtxtTabBox {
- position: absolute;
- top: 65%;
- left: -10%;
- .ROWtxtTab {
- padding: 20px 0;
- background-image: url(@/assets/images/fade-chapter-btn-bg-big.png);
- background-size: contain;
- background-repeat: no-repeat;
- background-position: center center;
- font-family: KaiTi;
- font-weight: 400;
- writing-mode: vertical-lr;
- letter-spacing: 0;
- white-space: pre;
- color: #b8ae7a;
- margin-bottom: 10px;
- font-size: 20px;
- margin-bottom: 0;
- @media screen and (min-width: 600px) {
- font-size: 28px;
- }
- }
- }
- div.ROWtxtIcon {
- pointer-events: none;
- font-size: 38px;
- font-family: KingHwa_OldSong;
- color: #474747;
- writing-mode: vertical-lr;
- letter-spacing: 0.3em;
- white-space: pre;
- position: relative;
- @media screen and (min-width: 600px) {
- font-size: 60px;
- }
- img.deco {
- z-index: 10;
- position: absolute;
- bottom: 1em;
- right: -0.05em;
- width: 40%;
- }
- img.deco2{
- @media screen and (min-width: 600px) {
- right: auto;
- left: -0.05em;
- }
- }
- }
- }
- & > img {
- position: absolute;
- bottom: 0;
- height: 100%;
- transition: transform 1.2s;
- -webkit-transform: translateZ(0);
- -moz-transform: translateZ(0);
- -ms-transform: translateZ(0);
- -o-transform: translateZ(0);
- transform: translateZ(0);
- -webkit-backface-visibility: hidden;
- backface-visibility: hidden;
- }
- .ROW1_1 {
- z-index: 5;
- left: 0;
- }
- .ROW1_2 {
- z-index: 4;
- right: -15%;
- @media screen and (min-width: 600px) {
- right: -8%;
- }
- }
- .ROW1_3 {
- z-index: 3;
- left: 0%;
- }
- .ROW1_4 {
- z-index: 3;
- right: -50%;
- }
- .ROW1_5 {
- z-index: 2;
- right: -12%;
- }
- .ROW1_6 {
- height: 35%;
- left: -5%;
- }
- .ROW1_7 {
- height: 45%;
- left: 20%;
- }
- .ROW2_1 {
- z-index: 5;
- right: -13%;
- @media screen and (min-width: 600px) {
- right: -8%;
- }
- }
- .ROW2_2 {
- z-index: 4;
- right: -22%;
- @media screen and (min-width: 600px) {
- right: -14%;
- }
- }
- .ROW2_3 {
- z-index: 4;
- left: -38%;
- @media screen and (min-width: 600px) {
- left: -28%;
- }
- }
- .ROW2_4 {
- z-index: 3;
- left: -38%;
- }
- .ROW2_5 {
- z-index: 3;
- right: 2%;
- }
- .ROW2_6 {
- left: 0;
- height: 30%;
- @media screen and (min-width: 600px) {
- left: -28%;
- }
- }
- .ROW2_7 {
- left: -24%;
- height: 40%;
- }
- .ROW2_8 {
- left: 0%;
- }
- .ROW3_1 {
- left: -24%;
- }
- .ROW3_2 {
- height: 30%;
- right: -14%;
- }
- .ROW3_3 {
- right: -14%;
- }
- .ROW3_4 {
- right: -24%;
- }
- .ROW3_5 {
- right: -36%;
- }
- .ROW3_6 {
- z-index: 3;
- right: -3%;
- }
- .ROW3_7 {
- z-index: 4;
- left: -48%;
- @media screen and (min-width: 600px) {
- left: -36%;
- }
- }
- .ROW3_8 {
- z-index: 4;
- right: -20%;
- }
- .ROW3_9 {
- z-index: 4;
- right: -37%;
- @media screen and (min-width: 600px) {
- right: -25%;
- }
- }
- .ROW3_10 {
- z-index: 5;
- right: -3%;
- @media screen and (min-width: 600px) {
- right: 2%;
- }
- }
- .ROW3_11 {
- z-index: 5;
- left: -15%;
- @media screen and (min-width: 600px) {
- left: -12%;
- }
- }
- .ROW4_1 {
- z-index: 5;
- left: 2%;
- height: 40%;
- @media screen and (min-width: 600px) {
- left: 13%;
- }
- }
- .ROW4_2 {
- left: -26%;
- }
- .ROW4_3 {
- left: -13%;
- }
- .ROW4_4 {
- left: -28%;
- }
- .ROW4_5 {
- z-index: 3;
- right: 8%;
- }
- .ROW4_6 {
- z-index: 3;
- left: -30%;
- @media screen and (min-width: 600px) {
- left: -18%;
- }
- }
- .ROW4_7 {
- z-index: 4;
- left: -70%;
- @media screen and (min-width: 600px) {
- left: 51%;
- }
- }
- .ROW4_8 {
- z-index: 4;
- right: -5%;
- @media screen and (min-width: 600px) {
- right: -2%;
- }
- }
- .ROW4_9 {
- z-index: 5;
- right: -5%;
- @media screen and (min-width: 600px) {
- right: -2%;
- }
- }
- .ROW4_10 {
- z-index: 4;
- left: -60%;
- }
- }
- .ROW2 {
- .ROWtxt {
- top: 28%;
- left: 52%;
- .ROWtxtTabBox {
- top: 38%;
- left: -9%;
- }
- }
- }
- // 最后一页的文字
- .ROW4 {
- .ROWtxt {
- top: 15%;
- left: 37%;
- }
- }
- .ROWlast {
- font-family: "KingHwa_OldSong";
- color: white;
- z-index: 20;
- width: 20%;
- @media screen and (min-width: 600px) {
- width: 19%;
- }
- & > img {
- pointer-events: none;
- width: 118px;
- @media screen and (min-width: 600px) {
- width: 115%;
- }
- }
- .game-box {
- width: 198%;
- background: url(@/assets/images/game-bg.png);
- background-size: 100% 100%;
- padding: 60%;
- white-space: nowrap;
- display: flex;
- justify-content: center;
- align-items: center;
- margin-top: 40%;
- margin-left: -25%;
- font-size: 18px;
- @media screen and (min-width: 600px) {
- font-size: 24px;
- margin-top: 25%;
- }
- }
- .online-box {
- font-weight: 700;
- color: #768c77;
- width: 50%;
- white-space: nowrap;
- display: flex;
- justify-content: center;
- align-items: center;
- margin-left: 54%;
- font-size: 18px;
- @media screen and (min-width: 600px) {
- font-size: 24px;
- margin-left: 45%;
- }
- }
- .about-box{
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- color: #688067;
- font-size: 12px;
- transform: translateX(-30%);
- position: fixed;
- bottom: 35px;
- >.about-open{
- width: 20px;
- height: 20px;
- margin-bottom: 5px;
- @media screen and (min-width: 600px) {
- width: 35px;
- height: 35px;
- }
- }
- >img{
- width: 75vw;
- @media screen and (min-width: 600px) {
- width: 65vw;
- }
- }
- >div{
- white-space: nowrap;
- }
- >.strong{
- font-weight: bold;
- }
- .about-bottom{
- // width: calc(230 / v-bind("windowSizeWhenDesignForRef") * v-bind("windowSizeInCssForRef"));
- text-align: justify;
- text-align-last: justify;
- white-space: pre-wrap;
- }
- }
- }
- }
- // 视频盒子
- .RWbox {
- position: absolute;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- z-index: 150;
- .RWvideoTxt {
- width: 18%;
- position: absolute;
- z-index: 10;
- top: 32%;
- left: 44%;
- }
- & > video {
- width: 100%;
- }
- }
- .shandow-box{
- width: 100%;
- height:100px;
- left:0;
- background: linear-gradient(0deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 100%);
- position:absolute;
- bottom: 0;
- z-index: 2;
- }
- // 指示器
- .pagination {
- position: absolute;
- z-index: 20;
- left: 50%;
- transform: translateX(-50%);
- bottom: 2%;
- }
- // 提示语
- .operation-tip {
- position: absolute;
- z-index: 30;
- left: 50%;
- bottom: 7%;
- transform: translateX(-50%);
- color: #7f9470;
- font-size: 12px;
- letter-spacing: 3px;
- pointer-events: none;
- display: flex;
- align-items: center;
- opacity: 1;
- transition: opacity 1s;
- @media screen and (min-width: 600px) {
- font-size: 22px;
- }
- img {
- width: 30px;
- @media screen and (min-width: 600px) {
- width: 50px;
- }
- }
- }
- .operation-tipHide {
- opacity: 0;
- }
- }
- </style>
|