y595705120 3 years ago
parent
commit
4390d137ed

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

@@ -1,8 +1,8 @@
 <template>
   <div>
     <div class="m-header ng-scope">
-      <div class="p-wrap-full">
-        <span class="logo " style="color: white;font-size: 30px;">  三明市建设人才服务中心  </span>
+      <div class="p-wrap-full tc" >
+        <span class="logo " style="color: white;font-size: 56px;">  三明市建设人才服务中心  </span>
       </div>
     </div>
 

+ 3 - 3
src/containers/login/components/isLogin.vue

@@ -7,7 +7,7 @@
         <img v-else  src="../../../assets/images/user-img_hash24aa2f2347.jpg">
       </a>
       <div class="info-detail">
-        <div class="pt20">欢迎您,
+        <div class="pt20 fs18">欢迎您,
           <span class="aw ng-binding" :title="user.nickname" style="display:inline" >
             {{user.nickname}}
           </span>
@@ -16,8 +16,8 @@
     </div>
 
 
-    <div class="login-entry" style="width: 100%;">
-      <button class="btn-b-b w196" @click="gotoPage('/center/home')">进入学习中心</button>
+    <div class="login-entry " style="width: 100%;">
+      <button class="btn-b-b w196 fs15" @click="gotoPage('/center/home')">进入学习中心</button>
      </div>
 
 

+ 57 - 4
src/containers/login/login.vue

@@ -3,9 +3,22 @@
     <navbar :user="userInfo" @openLoginDialog="openLoginDialog"></navbar>
     <div class="banner-box">
       <div class="p-wrap-full clear pt30">
-        <div class="training-category opacity-bg fl ">
-          <img alt="" class="mimg" src="/static/swiper/1.jpg"/>
-        </div>
+        <el-card class="training-category opacity-bg fl" style="border-radius: 20px;" >
+          <!-- <img alt="" class="mimg" src="/static/swiper/1.jpg"/> -->
+          <h1 align="center" style="background-color: white; color: #000000; padding-top: 10px;">文件通知</h1>
+          <el-table :data="postList"  highlight-current-row   :show-header="false" max-height="300px" >
+            <el-table-column  label="Id" min-width="600px">
+              <template slot-scope="{row, $index}">
+                <span @click="gotoDetail(row.postId)">{{$index+1}}、{{ row.title }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column  width="160px">
+              <template slot-scope="{row}">
+                <span>{{ row.publishTime  }}</span>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-card>
 
         <div class="m-login opacity-bg fr">
           <is-login v-if="loginOk" :user="userInfo" @logout="logout"></is-login>
@@ -52,6 +65,26 @@
         <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="closeDialog"
+    >
+        <div class="postDialog">
+          <p class="tc" style="font-size: 50px;">{{postInfo.title}}</p>
+          <p 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>
+          </p>
+          <span v-html="postInfo.content" style="padding-top: -50px;"></span>
+        </div>
+    </el-dialog>
+
   </div>
 </template>
 
@@ -79,6 +112,9 @@ export default {
         userName: "",
         idNum: "",
       },
+      postInfo:{},
+      postDialog:false,
+      postList:[],
       loginDialog: false,
       err: {},
     };
@@ -87,13 +123,15 @@ export default {
   	...mapGetters("user", ["typeList", "userInfo"])
   },
   beforeMount(){
-    console.log("beforeMount", this.userInfo )
      if( this.userInfo && this.userInfo.token){
        this.loginOk = true
      }else{
        this.loginOk = false
      }
   },
+  created(){
+    this.getPostList()
+  },
   methods: {
     ...mapActions("user", ["loadBaseInfo", "doLogout", "doLogin"]),
     logout() {
@@ -113,6 +151,21 @@ export default {
         }
       })
     },
+    getPostList(){
+      httpServer("course.getPostList", {page:1,type:'操作指南'}).then( res=>{
+        this.postList = res.data.list.splice(0,5)
+      })
+    },
+    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')
+    },
     gotoCourse(item){
       if ( !localStorage.token ) {
         this.$message.successMsg("请先登入", 1)