Explorar o código

去除特殊的ui

y595705120 %!s(int64=2) %!d(string=hai) anos
pai
achega
171b74042f

+ 37 - 0
index.html

@@ -11,6 +11,43 @@
     <title>三明市建设人才服务中心</title>
   </head>
   <body style="margin:0px;">
+<!--    <div id="img_float" style="z-index: 101; left: 134px; width: 242px; height: 141px; position: absolute; top: 577px; visibility: visible; cursor: pointer;">
+      <div align="right" onclick="document.getElementById('img_float').style.display='none'"
+        style="color:red;font-size:12px;margin-bottom:0px;text-decoration:none;position:relative">[关闭]</div>
+      <div align="center" id="wmdImg">
+        <a href="http://zjj.sm.gov.cn/pc/201808/t20180829_1195705.htm" target="_blank">
+          <img id="wmdImgId1" class="wmdImg" width="242" height="141" src="/static/images/W020180829573455831351.jpg">
+        </a>
+      </div>
+    </div> -->
+<!--    <script>
+      var xPos=0;
+      var yPos=0;
+      var directionX=true;
+      var directionY=true;
+      var step=1;
+      var speed=30;
+      var float=document.getElementById("img_float");
+      function move(){
+        var height=document.documentElement.clientHeight;
+        var width=document.documentElement.clientWidth;
+        var imgHeight=float.offsetHeight;
+        var imgWidth=float.offsetWidth;
+        float.style.left=xPos+document.documentElement.scrollLeft+"px";
+        float.style.top=yPos+document.documentElement.scrollTop+"px";
+        if(directionX){xPos=xPos+step;}else{xPos=xPos-step;}
+        if(xPos<=0){xPos=0;directionX=true;}
+        if(xPos>=width-imgWidth){xPos=width-imgWidth;directionX=false;}
+        if(directionY){yPos=yPos+step;}else{yPos=yPos-step;}
+        if(yPos<=0){yPos=0;directionY=true;}
+        if(yPos>=height-imgHeight){yPos=height-imgHeight;directionY=false;}
+        t=setTimeout(move,speed);
+      }
+      float.οnmοuseοver=function(){clearTimeout(t);}
+      float.οnmοuseοut=function(){t=setTimeout("move()",speed);}
+      window.οnlοad=move();
+    </script>
+    -->
     <div id="app"></div>
     <!-- built files will be auto injected -->
   </body>

+ 14 - 2
src/components/nav/navbar.vue

@@ -1,9 +1,9 @@
 <template>
   <div>
     <div class="m-header ng-scope">
-      <div class="p-wrap-full tc" >
+      <div class="p-wrap-full tc" @click="goto('/')">
         <span class="logo " style="color: white;font-size: 56px;">
-          
+
           三明市建设人才服务中心  </span>
       </div>
     </div>
@@ -11,6 +11,18 @@
   </div>
 </template>
 
+<script>
+  export default {
+    methods:{
+      goto( path ){
+        if( this.$route.path != path){
+          this.$router.push({path})
+        }
+      }
+    }
+  }
+</script>
+
 <style lang="less">
   @import "./navbar.less";
 </style>

+ 3 - 38
src/containers/login/login.vue

@@ -72,29 +72,6 @@
         <un-login @login="login" :err="err"></un-login>
       </div>
     </el-dialog>
-
-
-    <el-dialog
-      class="fc tc"
-      :visible.sync="postDialog"
-      :fullscreen="true"
-      style="padding:0px;"
-      @close="postDialog= false"
-    >
-        <div class="postDialog">
-          <h1 class="tc" style="font-size: 50px; color: #000000;">{{postInfo.title}}</h1>
-          <h2 class="tc mt20" style="font-size: 30px;">
-            发布时间:{{postInfo.publishTime}}
-            <span class="ml30 ng-binding">来源:{{postInfo.author}}</span>
-            <span class="ml30 ng-binding">阅读数:{{postInfo.viewCount}}</span>
-          </h2>
-          <el-button @click="postDialog= false" class="floatbox" type="warning">
-            返回主页
-          </el-button>
-          <span v-html="postInfo.content" class="mt30 tl"></span>
-        </div>
-    </el-dialog>
-
   </div>
 </template>
 
@@ -122,8 +99,6 @@ export default {
         userName: "",
         idNum: "",
       },
-      postInfo:{},
-      postDialog:false,
       postList:[],
       loginDialog: false,
       err: {},
@@ -167,14 +142,7 @@ export default {
       })
     },
     gotoDetail(postId){
-      httpServer("Course.getPostInfo", {postId}).then(({
-        data,
-        code
-      }) => {
-        this.postInfo = data
-        this.postDialog = true
-      })
-      // window.open(`https://oa.hqedust.com/#/file-info?articalId=${postId}`, '_brank')
+      this.$router.push({name:'news', query:{postId}})
     },
     gotoCourse(item){
       if ( !localStorage.token ) {
@@ -218,7 +186,7 @@ export default {
     background-color: #8bbdf5;
     position: fixed;
     transition: bottom ease .9s;
-    z-index: 3;
+    z-index: 0;
     right: 5%;
     top: 260px;
     text-align: center;
@@ -231,8 +199,5 @@ export default {
     height: 64%;
     margin: 11px auto 0;
 }
-.postDialog{
-  max-width: 1024px;
-  margin: 0 auto;
-}
+
 </style>

+ 68 - 0
src/containers/post/info.vue

@@ -0,0 +1,68 @@
+<template>
+  <div class="main">
+    <navbar :user="userInfo"></navbar>
+    <div style="width: 1094px;background-color: white;margin: 0 auto; border-radius: 10px;">
+      <div class="postDialog">
+        <h1 class="tc mt20" style="font-size: 50px; color: #000000;">
+        {{postInfo.title}}
+        </h1>
+        <h2 class="tc mt20" style="font-size: 30px;">
+          发布时间:{{postInfo.publishTime}}
+          <span class="ml30 ng-binding">来源:{{postInfo.author}}</span>
+          <span class="ml30 ng-binding">阅读数:{{postInfo.viewCount}}</span>
+        </h2>
+        <span v-html="postInfo.content" class="mt30 tl"></span>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {
+    httpServer
+  } from "@/components/httpServer/httpServer.js";
+  import navbar from "@/components/nav/navbar.vue";
+  import {
+    mapGetters
+  } from "vuex";
+  export default {
+    components: {
+      navbar
+    },
+    data() {
+      return {
+        postId: 0,
+        postInfo: {}
+      };
+    },
+    computed: {
+      ...mapGetters("user", ["userInfo"])
+    },
+    methods: {
+      gotoDetail() {
+        let postId = this.postId;
+        httpServer("Course.getPostInfo", {
+          postId
+        }).then(res => {
+          if (res.code == 200) {
+            this.postInfo = res.data
+          }
+        })
+      }
+    },
+    created() {
+      this.postId = +this.$route.query.postId || 0;
+      if (this.postId > 0) {
+        this.gotoDetail();
+      }
+    }
+  }
+</script>
+<style>
+  .postDialog {
+    background-color: white;
+    width: 800px;
+    margin: 0px auto;
+    padding: 20px;
+    margin-bottom: 100px;
+  }
+</style>

+ 6 - 0
src/router/index.js

@@ -3,6 +3,7 @@ import Router from 'vue-router'
 import login from '@/containers/login/login'
 // import Register from '@/containers/register/registation'
 import Register from '@/containers/register/register.vue'
+import NewInfo from '@/containers/post/info.vue'
 import Reset from '@/containers/reset/reset'
 import main from '@/containers/main/main'
 import center from '@/containers/center/center'
@@ -47,6 +48,11 @@ export default new Router({
       name: 'register',
       component: Register,
     },
+    {
+      path: '/news',
+      name: 'news',
+      component: NewInfo,
+    },
     {
       path: '/reset',
       name: 'reset',

+ 0 - 0
src/setting.js


+ 3 - 1
src/store/module/user.js

@@ -28,7 +28,9 @@ export const user = {
             localStorage.uid = ""
             localStorage.token=""
             sessionStorage.clear()
-            router.push('/')
+            if( location.pathname != '/'){
+              router.push('/')
+            }
         },
         ResetUserInfo(state, userInfo = {}) {
             state.userInfo = {...state.userInfo,

BIN=BIN
static/images/W020180829573455831351.jpg


+ 9 - 0
static/index.html

@@ -12,6 +12,15 @@
 </head>
 
 <body style=margin:0px;>
+  <div id="img_float" style="z-index: 101; left: 134px; width: 242px; height: 141px; position: absolute; top: 577px; visibility: visible; cursor: pointer;">
+    <div align="right" onclick="document.getElementById('img_float').style.display='none'"
+      style="color:red;font-size:12px;margin-bottom:0px;text-decoration:none;position:relative">[关闭]</div>
+    <div align="center" id="wmdImg">
+      <a href="http://zjj.sm.gov.cn/pc/201808/t20180829_1195705.htm" target="_blank">
+        <img id="wmdImgId1" class="wmdImg" width="242" height="141" src="./images/W020180829573455831351.jpg">
+      </a>
+    </div>
+  </div>
   <div id=app></div>
   <script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script>
   <script type=text/javascript src=./static/js/vendor.ed36f80b48754d8be4be.js></script>