wangxy 2 년 전
부모
커밋
d628971f45
3개의 변경된 파일1개의 추가작업 그리고 37개의 파일을 삭제
  1. 1 11
      components/footer.vue
  2. 0 11
      components/footer2.vue
  3. 0 15
      store/index.js

+ 1 - 11
components/footer.vue

@@ -42,13 +42,6 @@
             <dd class="two-code-box">微信公众号<i class="two-dimensional-code"></i></dd>
             <!--<dd>新浪微博</dd>-->
           </dl>
-          <dl v-if="hotList.length">
-            <dt>热门推荐</dt>
-            <div style="display: flex;justify-content: flex-start;flex-wrap: wrap">
-              <dd style="width: 30%" v-for="item in hotList" :key="item.iiId" @click="checkNews(item)">{{item.biaoqian}}</dd>
-            </div>
-
-          </dl>
         </div>
         <div class="contact-right-box">
           <div class="right-sw-box">
@@ -93,10 +86,7 @@
       requestData() {
         return this.getFooterYouQingLianJie;
       },
-      hotList() {
-        return this.getHotList;
-      },
-      ...mapGetters(['getFooterYouQingLianJie','getBaseUrl', 'getHotList']),
+      ...mapGetters(['getFooterYouQingLianJie','getBaseUrl']),
     },
     data() {
       return {

+ 0 - 11
components/footer2.vue

@@ -33,10 +33,6 @@
                <dd class="two-code-box">微信公众号<i class="two-dimensional-code"></i></dd>
                <!--<dd>新浪微博</dd>-->
              </dl>
-             <dl v-if="hotList.length">
-               <dt>热门新闻</dt>
-               <dd v-for="item in hotList" :key="item.iiId" @click="checkNews(item)">{{item.biaoqian}}</dd>
-             </dl>
            </div>
            <div class="contact-right-box">
              <div class="right-sw-box">
@@ -61,15 +57,8 @@
 </template>
 
 <script>
-  import { mapState, mapGetters } from 'vuex';
   export default {
     name:    'mtaFooter',
-    computed: {
-      hotList() {
-        return this.getHotList;
-      },
-      ...mapGetters(['getHotList']),
-    },
     data() {
       return {
         swTwoCodeImg:   require(`~/static/images/client/component/sw-two-code.png`),

+ 0 - 15
store/index.js

@@ -5,15 +5,11 @@
 
 export const state = () => ({
   FooterYouQingLianJie: [],
-  hotList: [],
   BASE_URL: process.env.baseUrl,
   ActiveNav: '/'
 })
 
 export const getters = {
-  getHotList(state) {
-    return state.hotList;
-  },
   getFooterYouQingLianJie(state) {
     return state.FooterYouQingLianJie;
   },
@@ -33,17 +29,6 @@ export const mutations = {
   setActiveNav(state, payload) {
     state.ActiveNav = payload;
   },
-  setHotList(state, payload) {
-    state.hotList = payload;
-  }
-}
-
-export const actions = {
-  async nuxtServerInit({commit}, {$axios}) {
-    // 初始化store
-    const { data:data2 } = await $axios.post('/home/news/hot');
-    commit('setHotList', data2.data || []);
-  }
 }