guhongwei 5 years ago
parent
commit
b8d03552cf
2 changed files with 26 additions and 7 deletions
  1. 4 2
      src/pages/index/views/home.vue
  2. 22 5
      src/pages/newsList/views/item.vue

+ 4 - 2
src/pages/index/views/home.vue

@@ -72,7 +72,7 @@
           查看更多
           查看更多
         </el-col>
         </el-col>
       </el-row>
       </el-row>
-      <el-row type="flex" v-for="(item, index) in notice.infoList" :key="index" class="data_list">
+      <el-row type="flex" @click.native="toHtml(`news.html#/${item.id}`)" v-for="(item, index) in notice.infoList" :key="index" class="data_list">
         <el-col :span="7"> 【{{ notice.title }}】 </el-col>
         <el-col :span="7"> 【{{ notice.title }}】 </el-col>
         <el-col :span="17">
         <el-col :span="17">
           <p class="textOver">{{ item.title }}</p>
           <p class="textOver">{{ item.title }}</p>
@@ -144,7 +144,9 @@ export default {
       if (type) {
       if (type) {
         let url = '';
         let url = '';
         if (typeof this.user === 'object') {
         if (typeof this.user === 'object') {
-          this.user.corpid === undefined ? (url = 'student.html#/') : (url = 'http://hr.smart.cc-lotus.info/weixin/auth?redirect_uri=http://hr.smart.cc-lotus.info/mobile/#/');
+          this.user.corpid === undefined
+            ? (url = 'student.html#/')
+            : (url = 'http://hr.smart.cc-lotus.info/weixin/auth?redirect_uri=http://hr.smart.cc-lotus.info/mobile/#/');
         } else {
         } else {
           url = 'register.html#/';
           url = 'register.html#/';
         }
         }

+ 22 - 5
src/pages/newsList/views/item.vue

@@ -2,14 +2,20 @@
   <div id="item">
   <div id="item">
     <list-layout @search="toSearch" :needSearch="false" :hasMore="hasMore">
     <list-layout @search="toSearch" :needSearch="false" :hasMore="hasMore">
       <template v-slot:content>
       <template v-slot:content>
-        <el-row style="background:#fff" v-for="(item, index) in list" :key="index" :gutter="10" @click.native="toHtml(item)">
+        <el-row
+          style="background:#fff;padding: 5px 0;border-bottom: 1px dashed #ccc;"
+          v-for="(item, index) in list"
+          :key="index"
+          :gutter="10"
+          @click.native="toHtml(item)"
+        >
           <el-col :span="8">
           <el-col :span="8">
             <el-image fit="cover" :src="item.pic ? item.pic : defaultImg"></el-image>
             <el-image fit="cover" :src="item.pic ? item.pic : defaultImg"></el-image>
           </el-col>
           </el-col>
           <el-col :span="16">
           <el-col :span="16">
-            <el-col :span="24">{{ item.title }}</el-col>
+            <el-col :span="24" class="title">{{ item.title }}</el-col>
             <el-col :span="24" class="content_word">
             <el-col :span="24" class="content_word">
-              <span v-html="item.content"></span>
+              <p v-html="item.content"></p>
             </el-col>
             </el-col>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
@@ -47,9 +53,20 @@ export default {
 </script>
 </script>
 
 
 <style lang="less" scoped>
 <style lang="less" scoped>
+p {
+  padding: 0;
+  margin: 0;
+}
 .content_word {
 .content_word {
-  font-size: 12px;
-  color: #3333338f;
+  height: 45px;
+  overflow: hidden;
+}
+
+/deep/.content_word p p {
+  padding: 0;
+  margin: 0;
+}
+.title {
   overflow: hidden;
   overflow: hidden;
   text-overflow: ellipsis;
   text-overflow: ellipsis;
   white-space: nowrap;
   white-space: nowrap;