shaogen1995 2 years ago
parent
commit
dd3e48f3d6

+ 23 - 0
SWKK/.gitignore

@@ -0,0 +1,23 @@
+.DS_Store
+node_modules
+/dist
+
+
+# local env files
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?

+ 19 - 0
SWKK/README.md

@@ -0,0 +1,19 @@
+# aa
+
+## Project setup
+```
+npm install
+```
+
+### Compiles and hot-reloads for development
+```
+npm run serve
+```
+
+### Compiles and minifies for production
+```
+npm run build
+```
+
+### Customize configuration
+See [Configuration Reference](https://cli.vuejs.org/config/).

+ 5 - 0
SWKK/babel.config.js

@@ -0,0 +1,5 @@
+module.exports = {
+  presets: [
+    '@vue/cli-plugin-babel/preset'
+  ]
+}

File diff suppressed because it is too large
+ 26103 - 0
SWKK/package-lock.json


+ 27 - 0
SWKK/package.json

@@ -0,0 +1,27 @@
+{
+  "name": "aa",
+  "version": "0.1.0",
+  "private": true,
+  "scripts": {
+    "serve": "vue-cli-service serve",
+    "build": "vue-cli-service build"
+  },
+  "dependencies": {
+    "core-js": "^3.6.5",
+    "vue": "^2.6.11",
+    "vue-router": "^3.2.0"
+  },
+  "devDependencies": {
+    "@vue/cli-plugin-babel": "~4.5.13",
+    "@vue/cli-plugin-router": "~4.5.13",
+    "@vue/cli-service": "~4.5.13",
+    "less": "^3.0.4",
+    "less-loader": "^5.0.0",
+    "vue-template-compiler": "^2.6.11"
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions",
+    "not dead"
+  ]
+}

BIN
SWKK/public/favicon.ico


+ 17 - 0
SWKK/public/index.html

@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
+    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+    <title>雨花台烈士纪念馆</title>
+  </head>
+  <body>
+    <noscript>
+      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
+    </noscript>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+  </body>
+</html>

+ 15 - 0
SWKK/src/App.vue

@@ -0,0 +1,15 @@
+<template>
+  <div id="app">
+    <Router-view />
+  </div>
+</template>
+
+<style lang="less">
+#app {
+  width: 100vw;
+  height: 100vh;
+  min-width: 1900px;
+  min-height: 800px;
+  overflow: auto;
+}
+</style>

BIN
SWKK/src/assets/img/HomeBac.jpg


BIN
SWKK/src/assets/img/HomeBtnn.png


BIN
SWKK/src/assets/img/skip.png


BIN
SWKK/src/assets/media/bacMusic.mp3


BIN
SWKK/src/assets/media/bacVideo.mp4


+ 47 - 0
SWKK/src/assets/style/base.css

@@ -0,0 +1,47 @@
+* {
+  margin: 0;
+  padding: 0;
+  box-sizing: border-box;
+  user-select: none;
+}
+
+/*修改提示文字的颜色*/
+input::-webkit-input-placeholder {
+  /* WebKit browsers */
+  color: #B7B7B7;
+}
+
+input:-moz-placeholder {
+  /* Mozilla Firefox 4 to 18 */
+  color: #B7B7B7;
+}
+
+input::-moz-placeholder {
+  /* Mozilla Firefox 19+ */
+  color: #B7B7B7;
+}
+
+input:-ms-input-placeholder {
+  /* Internet Explorer 10+ */
+  color: #B7B7B7;
+}
+
+.viewer-title {
+  display: none !important;
+}
+
+.viewer-prev {
+  display: none !important;
+}
+
+.viewer-next {
+  display: none !important;
+}
+
+.viewer-navbar {
+  display: none !important;
+}
+
+.viewer-close {
+  display: none !important;
+}

+ 39 - 0
SWKK/src/components/Swkk.vue

@@ -0,0 +1,39 @@
+<template>
+  <div class="Swkk">Swkk</div>
+</template>
+
+<script>
+export default {
+  name: "Swkk",
+  //import引入的组件需要注入到对象中才能使用
+  components: {},
+  data() {
+    //这里存放数据
+    return {};
+  },
+  //监听属性 类似于data概念
+  computed: {},
+  //监控data中的数据变化
+  watch: {},
+  //方法集合
+  methods: {},
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+<style lang='less' scoped>
+.Swkk{
+  width: 100%;
+  height: 100%;
+  background-color: aqua;
+}
+</style>

+ 94 - 0
SWKK/src/components/Video.vue

@@ -0,0 +1,94 @@
+<template>
+  <div class="Video" :class="{ none: show }">
+    <video
+      id="VideoDom"
+      src="../assets/media/bacVideo.mp4"
+      muted
+      autoplay
+    ></video>
+    <div class="skip" :class="{ active: skip }" @click="show = true">跳过</div>
+  </div>
+</template>
+
+<script>
+export default {
+  //import引入的组件需要注入到对象中才能使用
+  components: {},
+  data() {
+    //这里存放数据
+    return {
+      skip: false,
+      show: false,
+    };
+  },
+  //监听属性 类似于data概念
+  computed: {},
+  //监控data中的数据变化
+  watch: {},
+  //方法集合
+  methods: {},
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    setTimeout(() => {
+      this.skip = true;
+    }, 3000);
+    let dom = document.querySelector("#VideoDom");
+    dom.addEventListener("ended", () => {
+      this.show=true
+    });
+  },
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+<style lang='less' scoped>
+.Video {
+  display: none;
+  transition: opacity 0.5s;
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  position: absolute;
+  top: 0;
+  left: 0;
+  z-index: 30;
+  video {
+    position: absolute;
+    top: 50%;
+    transform: translateY(-50%);
+    width: 100%;
+  }
+  .skip {
+    opacity: 0;
+    pointer-events: none;
+    transition: opacity 0.3s;
+    cursor: pointer;
+    background-image: url("../assets/img/skip.png");
+    background-size: 100% 100%;
+    position: absolute;
+    bottom: 50px;
+    right: 50px;
+    width: 60px;
+    height: 60px;
+    line-height: 60px;
+    text-align: center;
+    font-size: 16px;
+    color: #a50f0f;
+  }
+  .active {
+    opacity: 1;
+    pointer-events: auto;
+  }
+}
+.none {
+  opacity: 0;
+  pointer-events: none;
+}
+</style>

+ 12 - 0
SWKK/src/main.js

@@ -0,0 +1,12 @@
+import Vue from 'vue'
+import App from './App.vue'
+import router from './router'
+
+import './assets/style/base.css'
+
+Vue.config.productionTip = false
+
+new Vue({
+  router,
+  render: h => h(App)
+}).$mount('#app')

+ 19 - 0
SWKK/src/router/index.js

@@ -0,0 +1,19 @@
+import Vue from 'vue'
+import VueRouter from 'vue-router'
+
+Vue.use(VueRouter)
+
+const routes = [
+  {
+    path: '/',
+    name: 'Home',
+    component: () => import('../views/Home.vue')
+  },
+
+]
+
+const router = new VueRouter({
+  routes
+})
+
+export default router

+ 78 - 0
SWKK/src/views/Home.vue

@@ -0,0 +1,78 @@
+<template>
+  <div class="Home">
+    <Video />
+    <div class="bacImg" :class="{ none: bacImg }">
+      <div class="btnn" @click="bacImg = true">&emsp;进入展馆</div>
+    </div>
+    <Swkk>
+  </div>
+</template>
+
+<script>
+import Video from "../components/Video.vue";
+import Swkk from "../components/Swkk.vue";
+export default {
+  name: "Home",
+  components: { Video,Swkk },
+  data() {
+    //这里存放数据
+    return {
+      bacImg: true,
+    };
+  },
+  //监听属性 类似于data概念
+  computed: {},
+  //监控data中的数据变化
+  watch: {},
+  //方法集合
+  methods: {},
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+<style lang='less' scoped>
+.Home {
+  width: 100%;
+  height: 100%;
+  .bacImg {
+    transition: opacity 0.5s;
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    z-index: 29;
+    background-image: url("../assets/img/HomeBac.jpg");
+    background-size: 100% 100%;
+    .btnn {
+      cursor: pointer;
+      position: absolute;
+      bottom: 70px;
+      left: 50%;
+      transform: translateX(-50%);
+      width: 302px;
+      height: 140px;
+      line-height: 190px;
+      font-weight: 700;
+      text-align: center;
+      font-size: 24px;
+      color: #930909;
+      background-image: url("../assets/img/HomeBtnn.png");
+      background-size: 100% 100%;
+    }
+  }
+  .none {
+    opacity: 0;
+    pointer-events: none;
+  }
+}
+</style>

BIN
vue/src/assets/img/HomeBac.jpg


BIN
vue/src/assets/img/HomeBtnn.png


BIN
vue/src/assets/img/skip.png


BIN
vue/src/assets/media/bacVideo.mp4


+ 5 - 0
vue/src/router/index.js

@@ -14,6 +14,11 @@ const routes = [
     name: 'Goods',
     component: () => import('../views/Goods/index.vue')
   },
+  {
+    path: '/Video',
+    name: 'Video',
+    component: () => import('../views/Video/index.vue')
+  },
 ]
 
 const router = new VueRouter({

+ 2 - 2
vue/src/views/Goods/index.vue

@@ -175,7 +175,7 @@ export default {
   methods: {
     mySearch() {},
     rightClisk(type) {
-      if (type === 1) this.$router.push("/");
+      if (type === 1) this.$router.replace("/");
       if (type === 2) this.music = !this.music;
       if (type === 3) {
         if (this.like) return;
@@ -189,7 +189,7 @@ export default {
     //点击复制链接
     copyPcTxt() {
       // 存储传递过来的数据
-      let OrderNumber = window.location.href;
+      let OrderNumber = window.location.origin;
       // 创建一个input 元素
       // createElement() 方法通过指定名称创建一个元素
       let newInput = document.createElement("input");

+ 2 - 2
vue/src/views/Home.vue

@@ -13,7 +13,7 @@
     </div>
     <!-- 底部列表 -->
     <div class="tab">
-      <div class="row">场馆漫游</div>
+      <div class="row" @click="$router.replace('/Video')">场馆漫游</div>
       <div class="row row2">全景风貌</div>
       <div class="row row3" @click="toGoods">文物赏析</div>
     </div>
@@ -45,7 +45,7 @@ export default {
     toGoods() {
       let dom = document.querySelector("#bacMusic");
       dom.pause();
-      this.$router.push("/Goods");
+      this.$router.replace("/Goods");
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)

+ 141 - 0
vue/src/views/Video/index.vue

@@ -0,0 +1,141 @@
+<!--  -->
+<template>
+  <div class="Video">
+    <div class="videoBox" :class="{ none: show }">
+      <video
+        id="VideoDom"
+        src="../../assets/media/bacVideo.mp4"
+        muted
+        autoplay
+      ></video>
+      <div class="skip" :class="{ active: skip }" @click="show = true">
+        跳过
+      </div>
+    </div>
+
+    <div class="bacImg">
+      <div class="btnn" @click="toSwkk">&emsp;进入展馆</div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "Video",
+  components: {},
+  data() {
+    //这里存放数据
+    return {
+      skip: false,
+      show: false,
+    };
+  },
+  //监听属性 类似于data概念
+  computed: {},
+  //监控data中的数据变化
+  watch: {},
+  //方法集合
+  methods: {
+    toSwkk(){
+      window.location.replace('/Swkk')
+    }
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    setTimeout(() => {
+      this.skip = true;
+    }, 3000);
+    let dom = document.querySelector("#VideoDom");
+    dom.addEventListener("ended", () => {
+      this.show = true;
+    });
+  },
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+<style lang='less' scoped>
+.Video {
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  position: absolute;
+  top: 0;
+  left: 0;
+  .videoBox {
+    background-color: #fff;
+    transition: opacity 0.5s;
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    z-index: 30;
+  }
+  video {
+    position: absolute;
+    top: 50%;
+    transform: translateY(-50%);
+    width: 100%;
+  }
+  .skip {
+    opacity: 0;
+    pointer-events: none;
+    transition: opacity 0.3s;
+    cursor: pointer;
+    background-image: url("../../assets/img/skip.png");
+    background-size: 100% 100%;
+    position: absolute;
+    bottom: 50px;
+    right: 50px;
+    width: 60px;
+    height: 60px;
+    line-height: 60px;
+    text-align: center;
+    font-size: 16px;
+    color: #a50f0f;
+  }
+  .active {
+    opacity: 1;
+    pointer-events: auto;
+  }
+}
+.bacImg {
+  transition: opacity 0.5s;
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 29;
+  background-image: url("../../assets/img/HomeBac.jpg");
+  background-size: 100% 100%;
+  .btnn {
+    cursor: pointer;
+    position: absolute;
+    bottom: 70px;
+    left: 50%;
+    transform: translateX(-50%);
+    width: 302px;
+    height: 140px;
+    line-height: 190px;
+    font-weight: 700;
+    text-align: center;
+    font-size: 24px;
+    color: #930909;
+    background-image: url("../../assets/img/HomeBtnn.png");
+    background-size: 100% 100%;
+  }
+}
+.none {
+  opacity: 0;
+  pointer-events: none;
+}
+</style>