shaogen1995 3 years ago
parent
commit
82f8e99242
2 changed files with 37 additions and 34 deletions
  1. 1 0
      .gitignore
  2. 36 34
      src/views/gui/menu.vue

+ 1 - 0
.gitignore

@@ -1,6 +1,7 @@
 .DS_Store
 node_modules
 /dist
+/data
 
 
 # local env files

+ 36 - 34
src/views/gui/menu.vue

@@ -3,7 +3,7 @@
     <!-- 点击底部答题的弹窗 -->
     <div class="myAnswer" v-if="myAnswer">
       <iframe :src="myAnswerSrc" frameborder="0"></iframe>
-      <div class="backAnswer" @click="myAnswer=false"></div>
+      <div class="backAnswer" @click="myAnswer = false"></div>
     </div>
     <div class="pinBottom center">
       <div id="view-controllers"></div>
@@ -168,7 +168,7 @@
               />
             </div>
 
-             <div
+            <div
               data-original-title="opeenen"
               @click="openLink"
               rel="tooltip"
@@ -246,7 +246,7 @@
     <div class="pinBottom right hideTarget">
       <div class="rightViewContainer clearfix">
         <!-- 后面追加的浏览量 -->
-        <div class="myMoods" v-if="myMoods">人气:{{myMoods}}</div>
+        <div class="myMoods" v-if="myMoods">人气:{{ myMoods }}</div>
         <div class="gui-floor">
           <div class="gui-floor-title"></div>
           <div class="gui-floor-icon">
@@ -324,10 +324,10 @@ import vshare from "@/components/share";
 //   832:'http://139.9.33.142/game/sj2/'
 // }
 
-let ISGAME={
+let ISGAME = {
   801: true,
-  832:false
-}
+  832: false,
+};
 export default {
   components: {
     gameList,
@@ -335,10 +335,10 @@ export default {
   },
   data() {
     return {
-      myAnswer:false,//点击底部答题出现的弹窗
-      myAnswerSrc:'',
-      myMoods:'',//访问人气数量
-      havegame:ISGAME[window.number],
+      myAnswer: false, //点击底部答题出现的弹窗
+      myAnswerSrc: "",
+      myMoods: "", //访问人气数量
+      havegame: ISGAME[window.number],
       isGuide: true,
       showShare: false,
       showGameList: false,
@@ -349,27 +349,29 @@ export default {
     handleShare() {
       this.showShare = true;
     },
-    openLink(){
-      if(window.number==='832') this.myAnswerSrc = 'http://bwg.daoga.com.cn/game/sj2/'
-      else if (window.number==='801') this.myAnswerSrc = 'http://bwg.daoga.com.cn/game/sj/'
-      else return
-      this.myAnswer=true
+    openLink() {
+      if (window.number === "832")
+        this.myAnswerSrc = "http://bwg.daoga.com.cn/game/sj2/";
+      else if (window.number === "801")
+        this.myAnswerSrc = "http://bwg.daoga.com.cn/game/sj/";
+      else return;
+      this.myAnswer = true;
       // this.isMobile?(window.location.href=LinkDATA[window.number]):(window.open(LinkDATA[window.number],'_blank'))
-    }
+    },
   },
   mounted() {
-    fetch('http://47.112.166.173:8109/api/count/saveVisit/'+window.number)	
-  .then(response => response.json())
-  .then(data => {
-    this.myMoods=data.data.visitSum
-    // console.log(data)
-    });
-  }
+    fetch("http://47.112.166.173:8109/api/count/saveVisit/" + window.number)
+      .then((response) => response.json())
+      .then((data) => {
+        this.myMoods = data.data.visitSum;
+        // console.log(data)
+      });
+  },
 };
 </script>
 
 <style lang="less" scoped>
-.myMoods{
+.myMoods {
   position: fixed;
   left: 5px;
   top: 28px;
@@ -393,23 +395,23 @@ export default {
     }
   }
 }
-#hotList{
-  display: none!important;
+#hotList {
+  display: none !important;
 }
-.myAnswer{
+.myAnswer {
   z-index: 999;
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
-  background-color: rgba(0,0,0,.6);
-  iframe{
+  background-color: rgba(0, 0, 0, 0.6);
+  iframe {
     width: 100%;
     height: 100%;
   }
-  .backAnswer{
-    background-image: url('../../assets/images/goBack.png');
+  .backAnswer {
+    background-image: url("../../assets/images/goBack.png");
     position: absolute;
     height: 50px;
     width: 50px;
@@ -423,9 +425,9 @@ export default {
   }
   @media screen and (max-width: 600px) {
     .backAnswer {
-    top: auto;
-    bottom: 15px;
+      top: auto;
+      bottom: 15px;
     }
-}
+  }
 }
 </style>