|
|
@@ -179,5 +179,56 @@ export const actions = {
|
|
|
}, err => {
|
|
|
commit('brandCategories/GET_CATEGORIES_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)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取帮助中心名称
|
|
|
+ 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)
|
|
|
+ console.log('parent', 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)
|
|
|
+ })
|
|
|
}
|
|
|
}
|