|
@@ -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 || []);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
|