shaogen1995 3 лет назад
Родитель
Сommit
57f2dad357
38 измененных файлов с 707 добавлено и 10 удалено
  1. BIN
      web/public/data/1001.png
  2. BIN
      web/src/assets/SiYuanSongTiRegular/SourceHanSerifCN-Bold-2.otf
  3. BIN
      web/src/assets/SiYuanSongTiRegular/SourceHanSerifCN-ExtraLight-3.otf
  4. BIN
      web/src/assets/SiYuanSongTiRegular/SourceHanSerifCN-Heavy-4.otf
  5. BIN
      web/src/assets/SiYuanSongTiRegular/SourceHanSerifCN-Light-5.otf
  6. BIN
      web/src/assets/SiYuanSongTiRegular/SourceHanSerifCN-Medium-6.otf
  7. BIN
      web/src/assets/SiYuanSongTiRegular/SourceHanSerifCN-Regular-1.otf
  8. BIN
      web/src/assets/SiYuanSongTiRegular/SourceHanSerifCN-SemiBold-7.otf
  9. 6 3
      web/src/assets/css/base.css
  10. BIN
      web/src/assets/img/bgs.jpg
  11. BIN
      web/src/assets/img/btn_record.png
  12. BIN
      web/src/assets/img/card/1111.jpg
  13. BIN
      web/src/assets/img/cardAc.png
  14. BIN
      web/src/assets/img/close.png
  15. BIN
      web/src/assets/img/copy.png
  16. BIN
      web/src/assets/img/cunName/1001.png
  17. BIN
      web/src/assets/img/cunName/bs.png
  18. BIN
      web/src/assets/img/daily.png
  19. BIN
      web/src/assets/img/daily_active.png
  20. BIN
      web/src/assets/img/data.png
  21. BIN
      web/src/assets/img/data_active.png
  22. BIN
      web/src/assets/img/download.png
  23. BIN
      web/src/assets/img/hover.png
  24. BIN
      web/src/assets/img/introduction.png
  25. BIN
      web/src/assets/img/introduction_active.png
  26. BIN
      web/src/assets/img/like.png
  27. BIN
      web/src/assets/img/like_active.png
  28. BIN
      web/src/assets/img/msg.png
  29. BIN
      web/src/assets/img/normal.png
  30. BIN
      web/src/assets/img/number.png
  31. BIN
      web/src/assets/img/share.png
  32. BIN
      web/src/assets/img/share_active.png
  33. 7 1
      web/src/router/index.js
  34. 9 6
      web/src/views/Home.vue
  35. 154 0
      web/src/views/stair/component/card.vue
  36. 102 0
      web/src/views/stair/component/intro.vue
  37. 162 0
      web/src/views/stair/component/share.vue
  38. 267 0
      web/src/views/stair/index.vue

BIN
web/public/data/1001.png


BIN
web/src/assets/SiYuanSongTiRegular/SourceHanSerifCN-Bold-2.otf


BIN
web/src/assets/SiYuanSongTiRegular/SourceHanSerifCN-ExtraLight-3.otf


BIN
web/src/assets/SiYuanSongTiRegular/SourceHanSerifCN-Heavy-4.otf


BIN
web/src/assets/SiYuanSongTiRegular/SourceHanSerifCN-Light-5.otf


BIN
web/src/assets/SiYuanSongTiRegular/SourceHanSerifCN-Medium-6.otf


BIN
web/src/assets/SiYuanSongTiRegular/SourceHanSerifCN-Regular-1.otf


BIN
web/src/assets/SiYuanSongTiRegular/SourceHanSerifCN-SemiBold-7.otf


+ 6 - 3
web/src/assets/css/base.css

@@ -1,3 +1,9 @@
+@font-face{
+  font-family: '思源宋体';
+  src: url('../SiYuanSongTiRegular/SourceHanSerifCN-Bold-2.otf');
+  font-weight: normal;
+  font-style: normal;
+}
 * {
   margin: 0;
   padding: 0;
@@ -5,7 +11,4 @@
 }
 ul li {
   list-style: none;
-}
-body{
-  font-family: 'Source Han Serif CN-Bold';
 }

BIN
web/src/assets/img/bgs.jpg


BIN
web/src/assets/img/btn_record.png


BIN
web/src/assets/img/card/1111.jpg


BIN
web/src/assets/img/cardAc.png


BIN
web/src/assets/img/close.png


BIN
web/src/assets/img/copy.png


BIN
web/src/assets/img/cunName/1001.png


BIN
web/src/assets/img/cunName/bs.png


BIN
web/src/assets/img/daily.png


BIN
web/src/assets/img/daily_active.png


BIN
web/src/assets/img/data.png


BIN
web/src/assets/img/data_active.png


BIN
web/src/assets/img/download.png


BIN
web/src/assets/img/hover.png


BIN
web/src/assets/img/introduction.png


BIN
web/src/assets/img/introduction_active.png


BIN
web/src/assets/img/like.png


BIN
web/src/assets/img/like_active.png


BIN
web/src/assets/img/msg.png


BIN
web/src/assets/img/normal.png


BIN
web/src/assets/img/number.png


BIN
web/src/assets/img/share.png


BIN
web/src/assets/img/share_active.png


+ 7 - 1
web/src/router/index.js

@@ -8,7 +8,13 @@ const routes = [
     path: '/',
     name: 'Home',
     component: () => import('../views/Home.vue')
-  }
+  },
+  {
+    path: '/stair/:id',
+    name: 'stair',
+    component: () => import('../views/stair/index.vue')
+  },
+  
 ]
 
 const router = new VueRouter({

+ 9 - 6
web/src/views/Home.vue

@@ -91,7 +91,7 @@
             ></div>
             <div class="sonBox">
               <div
-                @click="$router.push()"
+                @click="$router.push(`/stair/${val.id}`)"
                 :class="{ active: item.id === mapDataInd }"
                 v-for="val in item.son"
                 :key="val.id"
@@ -133,7 +133,7 @@ export default {
       // 数据最大值
       maxNum: 0,
       // 区域筛选的数据
-      mapDataInd: 1000,
+      mapDataInd: null,
       mapData: [
         {
           id: 1000,
@@ -169,9 +169,9 @@ export default {
   watch: {},
   //方法集合
   methods: {
-    cutInd(id){
-      if(this.mapDataInd===id) this.mapDataInd=null
-      else this.mapDataInd=id
+    cutInd(id) {
+      if (this.mapDataInd === id) this.mapDataInd = null;
+      else this.mapDataInd = id;
     },
     mySearch() {
       console.log("点击了搜索");
@@ -184,6 +184,8 @@ export default {
       arr.push(v.num);
     });
     this.maxNum = arr.reduce((a, b) => (a > b ? a : b));
+    // 默认打开第一个区域筛选
+    this.mapDataInd = this.mapData[0].id;
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {},
@@ -276,7 +278,8 @@ export default {
     .top {
       & > p {
         text-align: center;
-        font-size: 30px;
+        font-family: '思源宋体';
+        font-size: 28px;
       }
     }
     .search {

+ 154 - 0
web/src/views/stair/component/card.vue

@@ -0,0 +1,154 @@
+<!--  -->
+<template>
+  <div class="stairCard">
+    <div class="main">
+      <div class="title">观光打卡</div>
+      <div class="title2">参观景点VR场景<br />,完成打卡签到<br />!</div>
+
+      <div class="rowBox">
+        <div class="row" v-for="i in 4" :key="i">
+          <img src="../../../assets/img/card/1111.jpg" alt="" />
+          <div class="txt">
+            <p>开平碉楼</p>
+            <span>2022.04.13</span>
+          </div>
+          <!-- 已经打卡了 -->
+          <div class="bs" v-if="i===2"></div>
+        </div>
+      </div>
+      <!-- 关闭按钮 -->
+      <div class="close" @click="$emit('close')"></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "stairCard",
+  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>
+.stairCard {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100vw;
+  height: 100vh;
+  .main {
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    width: 1450px;
+    height: 660px;
+    &::before {
+      content: "";
+      position: absolute;
+      left: 0;
+      top: 0;
+      width: 100%;
+      height: 100%;
+      background: rgba(0, 0, 0, 0.6);
+      backdrop-filter: blur(4px);
+      z-index: -2;
+    }
+    .close {
+      cursor: pointer;
+      top: -7px;
+      right: 104px;
+      position: absolute;
+      width: 66px;
+      height: 105px;
+      background: url("../../../assets/img/close.png");
+      background-size: 100% 100%;
+    }
+    .title {
+      font-size: 36px;
+      font-family: "思源宋体";
+      position: absolute;
+      top: 0px;
+      right: 85px;
+      width: 20px;
+      height: 100%;
+      padding-top: 135px;
+    }
+    .title2 {
+      line-height: 30px;
+      text-align: center;
+      font-size: 18px;
+      position: absolute;
+      top: 0px;
+      right: 125px;
+      width: 24px;
+      height: 100%;
+      padding-top: 135px;
+    }
+    .rowBox {
+      position: absolute;
+      top: 110px;
+      right: 200px;
+      width: 1150px;
+      height: 440px;
+      display: flex;
+      justify-content: space-between;
+      .row {
+        position: relative;
+        width: 277px;
+        height: 440px;
+        background: url("../../../assets/img/btn_record.png");
+        background-size: 100% 100%;
+        padding: 15px;
+        & > img {
+          width: 100%;
+          height: 350px;
+          object-fit: cover;
+        }
+        .txt {
+          margin-top: 10px;
+          width: 100%;
+          height: 90px;
+          color: #887b67;
+          & > p {
+            font-size: 18px;
+          }
+          & > span {
+            font-size: 16px;
+          }
+        }
+        .bs{
+          position: absolute;
+          top: 50%;
+          left: 50%;
+          transform: translate(-50%,-50%);
+          width: 209px;
+          height: 90px;
+          background: url('../../../assets/img/cardAc.png');
+          background-size: 100% 100%;
+        }
+      }
+    }
+  }
+}
+</style>

Разница между файлами не показана из-за своего большого размера
+ 102 - 0
web/src/views/stair/component/intro.vue


+ 162 - 0
web/src/views/stair/component/share.vue

@@ -0,0 +1,162 @@
+<!--  -->
+<template>
+  <div class="stairShare">
+    <div class="main">
+      <div class="title">分享</div>
+      <div class="bigImg">
+        <img src="data/1001.png" alt="" />
+      </div>
+      <!-- 复制和下载 -->
+      <div class="btn">
+        <div class="lianjie" title="复制链接" @click="copy">
+          <img src="../../../assets/img/copy.png" alt="" />
+        </div>
+        <a href="data/1001.png" download title="下载">
+        <img src="../../../assets/img/download.png" alt="" />
+        </a>
+      </div>
+      <!-- 关闭按钮 -->
+      <div class="close" @click="$emit('close')"></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "stairShare",
+  components: {},
+  data() {
+    //这里存放数据
+    return {};
+  },
+  //监听属性 类似于data概念
+  computed: {},
+  //监控data中的数据变化
+  watch: {},
+  //方法集合
+  methods: {
+    copy() {
+      // 存储传递过来的数据
+      let OrderNumber = "9999999999";
+      // 创建一个input 元素
+      // createElement() 方法通过指定名称创建一个元素
+      let newInput = document.createElement("input");
+      // 讲存储的数据赋值给input的value值
+      newInput.value = OrderNumber;
+      // appendChild() 方法向节点添加最后一个子节点。
+      document.body.appendChild(newInput);
+      // 选中input元素中的文本
+      // select() 方法用于选择该元素中的文本。
+      newInput.select();
+      // 执行浏览器复制命令
+      //  execCommand方法是执行一个对当前文档,当前选择或者给出范围的命令
+      document.execCommand("Copy");
+      // 清空输入框
+      newInput.remove();
+      // 下面是element的弹窗 不需要的自行删除就好
+      this.$message({
+        message: `复制成功`,
+        type: "success",
+      });
+    },
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+<style lang='less' scoped>
+.stairShare {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100vw;
+  height: 100vh;
+  .main {
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    width: 1450px;
+    height: 700px;
+    &::before {
+      content: "";
+      position: absolute;
+      left: 0;
+      top: 0;
+      width: 100%;
+      height: 100%;
+      background: rgba(0, 0, 0, 0.6);
+      backdrop-filter: blur(4px);
+      z-index: -2;
+    }
+    .close {
+      cursor: pointer;
+      top: -7px;
+      right: 104px;
+      position: absolute;
+      width: 66px;
+      height: 105px;
+      background: url("../../../assets/img/close.png");
+      background-size: 100% 100%;
+    }
+    .title {
+      font-size: 36px;
+      font-family: "思源宋体";
+      position: absolute;
+      top: 0px;
+      right: 70px;
+      width: 20px;
+      height: 100%;
+      padding-top: 135px;
+    }
+    .bigImg {
+      position: absolute;
+      top: 80px;
+      right: 190px;
+      width: 1100px;
+      height: 540px;
+      & > img {
+        width: 100%;
+        height: 100%;
+        object-fit: cover;
+      }
+    }
+    .btn {
+      position: absolute;
+      bottom: 70px;
+      right: 70px;
+      width: 50px;
+      .lianjie {
+        cursor: pointer;
+        width: 50px;
+        height: 50px;
+        margin-bottom: 15px;
+        & > img {
+          width: 50px;
+          height: 50px;
+        }
+      }
+      a {
+        display: block;
+        cursor: pointer;
+        width: 50px;
+        height: 50px;
+        margin-bottom: 10px;
+        & > img {
+          width: 50px;
+          height: 50px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 267 - 0
web/src/views/stair/index.vue

@@ -0,0 +1,267 @@
+<template>
+  <div class="stair">
+    <!-- 左上浏览量 -->
+    <div class="upleft">
+      <div class="el-icon-arrow-left" @click="$router.push('/')">返回</div>
+      <div class="eye">浏览量:1235</div>
+    </div>
+    <!-- 右边村名 -->
+    <div class="rightCM">
+      <img class="name" src="../../assets/img/cunName/1001.png" alt="" />
+      <img class="bs" src="../../assets/img/cunName/bs.png" alt="" />
+    </div>
+    <!-- 中间选项 -->
+    <div class="conMain">
+      <div class="row" v-for="item in data" :key="item.id">{{ item.name }}</div>
+    </div>
+    <!-- 底部功能 -->
+    <div class="botBtn">
+      <div
+        @click="cutPage(item.id)"
+        class="btnRow"
+        v-for="item in btnData"
+        :key="item.id"
+        @mouseenter="btnDataInd = item.id"
+        @mouseleave="btnDataInd = null"
+      >
+        <img
+          :src="
+            require(`@/assets/img/${item.inco}${
+              (btnDataInd === item.id && item.id !== 4) ||
+              (item.id === 4) & isShowGood ||
+              (btnDataAc===item.id)
+                ? '_active'
+                : ''
+            }.png`)
+          "
+          alt=""
+        />
+        <!-- 点赞的数字 -->
+        <p v-if="item.id === 4">{{ likeNum }}</p>
+        <transition v-if="item.id === 4" name="likeAddAnimate">
+          <div class="good" v-show="isShowGood">
+            <div class="pic">
+              <img :src="require(`@/assets/img/like_active.png`)" alt="" />
+            </div>
+            <div class="num">+1</div>
+          </div>
+        </transition>
+        <!-- 鼠标移入的显示 -->
+        <div
+          class="hoverInco"
+          :class="{ hovAc: btnDataInd === item.id && !isShowGood }"
+        >
+          {{ item.name }}
+        </div>
+      </div>
+    </div>
+    <!-- 简介组件 -->
+    <StairIntro v-if="btnDataAc===1" @close='btnDataAc=null'/>
+    <!-- 打卡组件 -->
+    <StairCard v-if="btnDataAc===2" @close='btnDataAc=null'/>
+    <!-- 分享组件 -->
+    <StairShare v-if="btnDataAc===3" @close='btnDataAc=null'/>
+  </div>
+</template>
+
+<script>
+import StairIntro from './component/intro.vue'
+import StairCard from './component/card.vue'
+import StairShare from './component/share.vue'
+export default {
+  name: "stair",
+  components: {StairIntro,StairCard,StairShare},
+  data() {
+    //这里存放数据
+    return {
+      data: [
+        { id: 1, name: "寅宇卢公祠" },
+        { id: 2, name: "寅宇卢公祠" },
+        { id: 3, name: "寅宇卢公祠" },
+        { id: 4, name: "寅宇卢公祠" },
+      ],
+      btnData: [
+        { id: 1, name: "简介", inco: "introduction" },
+        { id: 2, name: "打卡", inco: "daily" },
+        { id: 3, name: "分享", inco: "share" },
+        { id: 4, name: "点赞", inco: "like" },
+        { id: 5, name: "资料", inco: "data" },
+      ],
+      btnDataInd: null,
+      btnDataAc: null,
+      likeNum: 0,
+      isShowGood: false,
+    };
+  },
+  //监听属性 类似于data概念
+  computed: {},
+  //监控data中的数据变化
+  watch: {},
+  //方法集合
+  methods: {
+    cutPage(id) {
+      // 点赞
+      if (id === 4) {
+        if (this.isShowGood) return;
+        this.isShowGood = true;
+        setTimeout(() => {
+          this.likeNum++;
+          this.isShowGood = false;
+        }, 1800);
+        return;
+      }else {
+        this.btnDataAc=id
+      }
+    },
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+<style lang='less' scoped>
+.stair {
+  position: relative;
+  padding: 20px 0 0 15px;
+  color: #fff;
+  width: 100%;
+  height: 100%;
+  background: url("../../assets/img/bgs.jpg");
+  background-size: 100% 100%;
+  .upleft {
+    display: flex;
+    align-items: center;
+    .el-icon-arrow-left {
+      cursor: pointer;
+      border-right: 1px solid #fff;
+      padding-right: 15px;
+      margin-right: 15px;
+    }
+    .eye {
+      background: url("../../assets/img/number.png") left center no-repeat;
+      padding-left: 50px;
+    }
+  }
+  .rightCM {
+    position: absolute;
+    top: 50px;
+    right: 20px;
+    .name {
+      width: 50px;
+      height: 316px;
+    }
+    .bs {
+      width: 42px;
+      height: 67px;
+    }
+  }
+  .conMain {
+    height: 400px;
+    position: absolute;
+    bottom: 170px;
+    left: 0;
+    width: 100%;
+    display: flex;
+    justify-content: space-around;
+    .row {
+      padding-top: 30px;
+      text-align: right;
+      line-height: 34px;
+      cursor: pointer;
+      width: 54px;
+      height: 303px;
+      background: url("../../assets/img/normal.png");
+      background-size: 100% 100%;
+      word-wrap: break-word;
+      letter-spacing: 20px;
+      margin-top: 100px;
+      &:nth-of-type(2n) {
+        margin-top: 0;
+      }
+      &:hover {
+        background: url("../../assets/img/hover.png");
+        background-size: 100% 100%;
+      }
+    }
+  }
+  .likeAddAnimate-enter-active,
+  .likeAddAnimate-leave-active {
+    transition: all 2s ease;
+  }
+  .likeAddAnimate-enter,
+  .likeAddAnimate-leave {
+    transform: translateY(0) scale(0);
+    opacity: 0;
+  }
+  .likeAddAnimate-enter-to,
+  .likeAddAnimate-leave-to {
+    transform: translateY(-50px) scale(1.2);
+    opacity: 1;
+  }
+  .good {
+    position: absolute;
+    top: -10px;
+    right: 0px;
+    display: flex;
+    .pic {
+      width: 35px;
+      > img {
+        width: 100%;
+        height: 100%;
+      }
+    }
+    .num {
+      margin-top: 10px;
+      margin-left: 10px;
+      color: #fff;
+      text-shadow: 0 0 10px rgba(0, 0, 0, 1);
+    }
+  }
+  .botBtn {
+    display: flex;
+    position: absolute;
+    bottom: 35px;
+    left: 30px;
+    .btnRow {
+      position: relative;
+      cursor: pointer;
+      text-align: center;
+      width: 87px;
+      height: 51px;
+      & > img {
+        width: 52px;
+        height: 51px;
+      }
+      .hoverInco {
+        opacity: 0;
+        transform: translateY(10px);
+        transition: all 0.5s;
+        line-height: 34px;
+        position: absolute;
+        top: -45px;
+        left: 0;
+        width: 87px;
+        height: 41px;
+        background: url("../../assets/img/msg.png");
+        background-size: 100% 100%;
+      }
+      .hovAc {
+        transform: translateY(0px);
+        opacity: 1;
+      }
+      & > p {
+        font-size: 14px;
+        text-align: center;
+      }
+    }
+  }
+}
+</style>