|
|
@@ -60,8 +60,7 @@ export const actions = {
|
|
|
return Promise.all([
|
|
|
// 全局数据
|
|
|
store.dispatch('loadUserInfo'),
|
|
|
- store.dispatch('loadHotSearchDevice'),
|
|
|
- store.dispatch('loadHotSearchBrand')
|
|
|
+ store.dispatch('loadHotSearch')
|
|
|
])
|
|
|
},
|
|
|
// 获取用户信息
|
|
|
@@ -136,6 +135,17 @@ export const actions = {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ // 获取首页加载热门搜索列表
|
|
|
+ loadHotSearch({ commit }) {
|
|
|
+ commit('hotSearch/REQUEST_HOT')
|
|
|
+ return axios.get('/cmsApi?method=queryContentPage&module=index_hotModels&orderBy=order_number%20ASC')
|
|
|
+ .then(response => {
|
|
|
+ commit('hotSearch/GET_HOT_SUCCESS', response.data)
|
|
|
+ }, err => {
|
|
|
+ commit('hotSearch/GET_HOT_FAILURE', err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
// 获取楼层配置和特价信息
|
|
|
loadNewFloors({ commit }, params = {}) {
|
|
|
commit('floor/REQUEST_NEWLIST')
|
|
|
@@ -422,27 +432,6 @@ export const actions = {
|
|
|
commit('help/GET_DETAIL_FAILURE', err)
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- // 获取最多搜索量的 器件
|
|
|
- loadHotSearchDevice({ commit }) {
|
|
|
- commit('hotSearchDevice/REQUEST_HOT')
|
|
|
- return axios.get('/api/product/component/mostSearchComponent')
|
|
|
- .then(response => {
|
|
|
- commit('hotSearchDevice/GET_HOT_SUCCESS', response.data)
|
|
|
- }, err => {
|
|
|
- commit('hotSearchDevice/GET_HOT_FAILURE', err)
|
|
|
- })
|
|
|
- },
|
|
|
- // 获取最多搜索量的 品牌
|
|
|
- loadHotSearchBrand({ commit }) {
|
|
|
- commit('hotSearchBrand/REQUEST_HOT')
|
|
|
- return axios.get('/api/product/brand/mostSearchBrands')
|
|
|
- .then(response => {
|
|
|
- commit('hotSearchBrand/GET_HOT_SUCCESS', response.data)
|
|
|
- }, err => {
|
|
|
- commit('hotSearchBrand/GET_HOT_FAILURE', err)
|
|
|
- })
|
|
|
- },
|
|
|
// 获取用户开店信息
|
|
|
loadStoreStatus({ commit }, params = {}) {
|
|
|
commit('option/REQUEST_STORE_STATUS')
|