|
@@ -72,15 +72,15 @@ export const actions = {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
// 获取轮播配置
|
|
// 获取轮播配置
|
|
|
- loadBanners ({ commit }) {
|
|
|
|
|
- commit('carousel/REQUEST_BANNER')
|
|
|
|
|
- return axios.get('/api/carousel/home%20page%20banner')
|
|
|
|
|
- .then(response => {
|
|
|
|
|
- commit('carousel/GET_BANNER_SUCCESS', response.data)
|
|
|
|
|
- }, err => {
|
|
|
|
|
- commit('carousel/GET_BANNER_FAILURE', err)
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // loadBanners ({ commit }) {
|
|
|
|
|
+ // commit('carousel/REQUEST_BANNER')
|
|
|
|
|
+ // return axios.get('/api/carousel/home%20page%20banner')
|
|
|
|
|
+ // .then(response => {
|
|
|
|
|
+ // commit('carousel/GET_BANNER_SUCCESS', response.data)
|
|
|
|
|
+ // }, err => {
|
|
|
|
|
+ // commit('carousel/GET_BANNER_FAILURE', err)
|
|
|
|
|
+ // })
|
|
|
|
|
+ // },
|
|
|
// 获取子器件类目
|
|
// 获取子器件类目
|
|
|
loadProductKinds ({ commit }, params = {}) {
|
|
loadProductKinds ({ commit }, params = {}) {
|
|
|
let id = params.id
|
|
let id = params.id
|
|
@@ -137,15 +137,15 @@ export const actions = {
|
|
|
commit('search/RESET_KEYWORDS')
|
|
commit('search/RESET_KEYWORDS')
|
|
|
},
|
|
},
|
|
|
// 热卖推荐页面
|
|
// 热卖推荐页面
|
|
|
- loadProductHot ({commit}, params = {}) {
|
|
|
|
|
- commit('original/REQUEST_HOT')
|
|
|
|
|
- return axios.get('/api/commodity/latest', {params})
|
|
|
|
|
- .then(response => {
|
|
|
|
|
- commit('original/GET_HOT_SUCCESS', response.data)
|
|
|
|
|
- }, err => {
|
|
|
|
|
- commit('original/GET_HOT_FAILURE', err)
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // loadProductHot ({commit}, params = {}) {
|
|
|
|
|
+ // commit('original/REQUEST_HOT')
|
|
|
|
|
+ // return axios.get('/api/commodity/latest', {params})
|
|
|
|
|
+ // .then(response => {
|
|
|
|
|
+ // commit('original/GET_HOT_SUCCESS', response.data)
|
|
|
|
|
+ // }, err => {
|
|
|
|
|
+ // commit('original/GET_HOT_FAILURE', err)
|
|
|
|
|
+ // })
|
|
|
|
|
+ // },
|
|
|
// 器件详情页面
|
|
// 器件详情页面
|
|
|
// 获得器件详情信息
|
|
// 获得器件详情信息
|
|
|
loadComponentDetail ({commit}, params = {}) {
|
|
loadComponentDetail ({commit}, params = {}) {
|
|
@@ -296,55 +296,55 @@ export const actions = {
|
|
|
}, err => {
|
|
}, err => {
|
|
|
commit('messageBoardInformation/GET_INFORMATION_FAILURE', err)
|
|
commit('messageBoardInformation/GET_INFORMATION_FAILURE', err)
|
|
|
})
|
|
})
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
// 获取帮助中心信息
|
|
// 获取帮助中心信息
|
|
|
- loadHelpSnapsho ({ commit }, params = {}) {
|
|
|
|
|
- commit('help/REQUEST_SNAPSHO')
|
|
|
|
|
- return axios.get('/api/help-service/helps', {params})
|
|
|
|
|
- .then(response => {
|
|
|
|
|
- commit('help/GET_SNAPSHO_SUCCESS', response.data)
|
|
|
|
|
- }, err => {
|
|
|
|
|
- commit('help/GET_SNAPSHO_FAILURE', err)
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // loadHelpSnapsho ({ commit }, params = {}) {
|
|
|
|
|
+ // commit('help/REQUEST_SNAPSHO')
|
|
|
|
|
+ // return axios.get('/api/help-service/helps', {params})
|
|
|
|
|
+ // .then(response => {
|
|
|
|
|
+ // commit('help/GET_SNAPSHO_SUCCESS', response.data)
|
|
|
|
|
+ // }, err => {
|
|
|
|
|
+ // commit('help/GET_SNAPSHO_FAILURE', err)
|
|
|
|
|
+ // })
|
|
|
|
|
+ // },
|
|
|
// 获取帮助中心二级菜单
|
|
// 获取帮助中心二级菜单
|
|
|
- loadHelpList ({ commit }, params = {}) {
|
|
|
|
|
- commit('help/REQUEST_HELPLIST')
|
|
|
|
|
- return axios.get('/api/help-service/issues', {params})
|
|
|
|
|
- .then(response => {
|
|
|
|
|
- commit('help/GET_HELPLIST_SUCCESS', response.data)
|
|
|
|
|
- }, err => {
|
|
|
|
|
- commit('help/GET_HELPLIST_FAILURE', err)
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // loadHelpList ({ commit }, params = {}) {
|
|
|
|
|
+ // commit('help/REQUEST_HELPLIST')
|
|
|
|
|
+ // return axios.get('/api/help-service/issues', {params})
|
|
|
|
|
+ // .then(response => {
|
|
|
|
|
+ // commit('help/GET_HELPLIST_SUCCESS', response.data)
|
|
|
|
|
+ // }, err => {
|
|
|
|
|
+ // commit('help/GET_HELPLIST_FAILURE', err)
|
|
|
|
|
+ // })
|
|
|
|
|
+ // },
|
|
|
// 获取帮助中心名称
|
|
// 获取帮助中心名称
|
|
|
- loadHelpTitle ({ commit }, params = {}) {
|
|
|
|
|
- let id = params.id
|
|
|
|
|
- commit('help/REQUEST_TITLE')
|
|
|
|
|
- return axios.get(`/api/help-service/${id}`, {params})
|
|
|
|
|
- .then(response => {
|
|
|
|
|
- commit('help/GET_TITLE_SUCCESS', response.data)
|
|
|
|
|
- }, err => {
|
|
|
|
|
- commit('help/GET_TITLE_FAILURE', err)
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // loadHelpTitle ({ commit }, params = {}) {
|
|
|
|
|
+ // let id = params.id
|
|
|
|
|
+ // commit('help/REQUEST_TITLE')
|
|
|
|
|
+ // return axios.get(`/api/help-service/${id}`, {params})
|
|
|
|
|
+ // .then(response => {
|
|
|
|
|
+ // commit('help/GET_TITLE_SUCCESS', response.data)
|
|
|
|
|
+ // }, err => {
|
|
|
|
|
+ // commit('help/GET_TITLE_FAILURE', err)
|
|
|
|
|
+ // })
|
|
|
|
|
+ // },
|
|
|
// 获取详情
|
|
// 获取详情
|
|
|
- loadHelpDetail ({ commit }, params = {}) {
|
|
|
|
|
- let id = params.id
|
|
|
|
|
- commit('help/REQUEST_DETAIL')
|
|
|
|
|
- return axios.get(`/api/help-service/issues/${id}`, {params})
|
|
|
|
|
- .then(response => {
|
|
|
|
|
- commit('help/GET_DETAIL_SUCCESS', response.data)
|
|
|
|
|
- let id = response.data.navId
|
|
|
|
|
- commit('help/REQUEST_TITLE')
|
|
|
|
|
- return axios.get(`/api/help-service/${id}`)
|
|
|
|
|
- .then(response => {
|
|
|
|
|
- commit('help/GET_TITLE_SUCCESS', response.data)
|
|
|
|
|
- }, err => {
|
|
|
|
|
- commit('help/GET_TITLE_FAILURE', err)
|
|
|
|
|
- })
|
|
|
|
|
- }, err => {
|
|
|
|
|
- commit('help/GET_DETAIL_FAILURE', err)
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // loadHelpDetail ({ commit }, params = {}) {
|
|
|
|
|
+ // let id = params.id
|
|
|
|
|
+ // commit('help/REQUEST_DETAIL')
|
|
|
|
|
+ // return axios.get(`/api/help-service/issues/${id}`, {params})
|
|
|
|
|
+ // .then(response => {
|
|
|
|
|
+ // commit('help/GET_DETAIL_SUCCESS', response.data)
|
|
|
|
|
+ // let id = response.data.navId
|
|
|
|
|
+ // commit('help/REQUEST_TITLE')
|
|
|
|
|
+ // return axios.get(`/api/help-service/${id}`)
|
|
|
|
|
+ // .then(response => {
|
|
|
|
|
+ // commit('help/GET_TITLE_SUCCESS', response.data)
|
|
|
|
|
+ // }, err => {
|
|
|
|
|
+ // commit('help/GET_TITLE_FAILURE', err)
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }, err => {
|
|
|
|
|
+ // commit('help/GET_DETAIL_FAILURE', err)
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }
|
|
|
}
|
|
}
|