wangxy %!s(int64=2) %!d(string=hai) anos
pai
achega
f2391b040b

+ 3 - 3
assets/scss/cus-client/cus-client-page.scss

@@ -715,8 +715,8 @@
   .client-newsInfor-page{
     // banner
     .newsInfor-banner{
-      width: 100%;height: 305px;background-image: url("~static/images/client/newsInfor/newsInfor-banner-bg.png");overflow: hidden;
-      img{width: 1260px;overflow: hidden;margin: 0 auto;display: block}
+      width: 100%;height: 510px;background-image: url("~static/images/client/newsInfor/newsInfor-banner-bg.png");overflow: hidden;
+      img{width:100%;overflow: hidden;margin: 0 auto;display: block;height: 510px;}
     }
 
     // 菜单 ul
@@ -755,7 +755,7 @@
           div{
             margin-bottom: 8px;
             i{width: 20px;height: 20px;display: inline-block;margin-right: 14px;vertical-align: middle;background-image: url("~static/images/client/newsInfor/newsInfor-details-time.svg");}
-            i[type="visits"]{background-image: url("~static/images/client/newsInfor/newsInfor-details-visits.svg");}
+            i[type="visits"]{background-image: url("~static/gangweiIcon/z147.png");background-repeat: no-repeat;background-position: center;background-size: contain}
             span{@include setFontStyle(-6);display:inline-block;color: #666;margin-right: 60px;vertical-align: middle;}
           }
           p{height: 72px;@include setFontStyle(-4);color: rgba(0,0,0,0.65);line-height: 24px;margin-bottom: 32px;text-align: justify;@include multi-line-ellipsis(3);overflow: hidden;}

+ 43 - 36
components/news/NewsList.vue

@@ -2,56 +2,63 @@
   <li v-if="newsData" @click.prevent="checkInfo(newsData)">
     <div class="newsInfor-img-box" :style="{backgroundImage: `url(${newsData.pic || newsInforImg})`}"></div>
     <div class="newsInfor-list-content">
-      <h5>{{newsData.title}}</h5>
-      <div><span class="mta-hidden-sm">{{newsData.startTime}}</span></div>
-      <div class="mta-hidden-xs"><i></i><span>{{newsData.startTime}}</span><i type="visits"></i><span>{{newsData.visits}}</span>
+      <h5>{{ newsData.title }}</h5>
+      <div><span class="mta-hidden-sm">{{ changeFullDate(newsData.startTime) }}</span></div>
+      <div class="mta-hidden-xs"><i></i><span>{{ changeFullDate(newsData.startTime) }}</span><i type="visits"></i><span>{{ newsData.visits }}</span>
       </div>
-      <p>{{newsData.intro}}</p>
-      <a class="mta-hidden-xs" :href="`${baseUrl}/news/${newsData.code}`" >
-        <span>了解更多</span>
-      </a>
+      <p>{{ newsData.intro }}</p>
+      <!-- <a class="mta-hidden-xs" :href="`${baseUrl}/news/${newsData.code}`" >
+             <span>了解更多</span>
+        </a>-->
 
     </div>
   </li>
 </template>
 
 <script>
-  import { mapGetters } from 'vuex';
+import {mapGetters} from 'vuex';
 
-  export default {
-    name:     'NewList',
-    props:    {
-      newsData: {
-        type:    Object,
-        default: () => {
-        },
+export default {
+  name: 'NewList',
+  props: {
+    newsData: {
+      type: Object,
+      default: () => {
       },
     },
-    data() {
-      return {
-        newsInforImg: require(`~/static/images/client/newsInfor/newsInfor-list-img.png`),
-      };
+  },
+  data() {
+    return {
+      newsInforImg: require(`~/static/images/client/newsInfor/newsInfor-list-img.png`),
+    };
+  },
+  computed: {
+    baseUrl() {
+      return this.getBaseUrl;
     },
-    computed: {
-      baseUrl() {
-        return this.getBaseUrl;
-      },
-      ...mapGetters(['getBaseUrl']),
+    ...mapGetters(['getBaseUrl']),
+  },
+  methods: {
+    changeFullDate(myDate) {
+      const result = new Date(myDate);
+      const curYear = result.getFullYear().toString();
+      const curMonth = (result.getMonth() + 1).toString().padStart(2, '0');
+      const curDay = result.getDate().toString().padStart(2, '0');
+      return `${curYear}-${curMonth}-${curDay}`
     },
-    methods:  {
-      checkInfo(data) {
-        // console.log(window.localtion.href);
-        // console.log(self.localtion.href);
-        // console.log(document.URL);
-        const opt = {
-          id: data.code,
-        };
-        this.$router.push({ name: 'news-id', params: opt });
+    checkInfo(data) {
+      // console.log(window.localtion.href);
+      // console.log(self.localtion.href);
+      // console.log(document.URL);
+      const opt = {
+        id: data.code,
+      };
+      this.$router.push({name: 'news-id', params: opt});
 
-        this.$emit('know-more', data);
-      },
+      this.$emit('know-more', data);
     },
-  };
+  },
+};
 </script>
 
 <style scoped>

+ 3 - 2
pages/news/_id.vue

@@ -93,8 +93,9 @@
     methods:  {
       changeDate(myDate) {
         const result = new Date(myDate);
-
-        return `${result.getMonth()+1}-${result.getDate()}`
+        const curMonth = (result.getMonth()+1).toString().padStart(2,'0');
+        const curDay = result.getDate().toString().padStart(2,'0');
+        return `${curMonth}-${curDay}`
       },
       changeNews(id) {
         this.$router.push({ name: 'news-id', params: { id } });

+ 1 - 1
pages/news/index.vue

@@ -81,7 +81,7 @@
 
 
         let [res1] = await Promise.all([
-                                               await $axios.$post(`/home/banner/list`, { 'code': 5 }).then(res => {
+                                               await $axios.$post(`/home/banner/list`, { 'code': 17 }).then(res => {
                                                  return res;
                                                }),
                                              ]);