|
|
@@ -10,6 +10,19 @@ function StoreFocusList ({ commit }, params = {}) {
|
|
|
commit('storeInfo/GET_FOCUSLIST_FAILURE', err)
|
|
|
})
|
|
|
}
|
|
|
+// 根据UUID获取某店铺信息
|
|
|
+function findStoreInfoFromUuid ({ commit }, params = {}) {
|
|
|
+ commit('storeInfo/REQUEST_STORE_INFO')
|
|
|
+ return axios.get('/api/store-service/stores', { params })
|
|
|
+ .then(response => {
|
|
|
+ commit('storeInfo/GET_STORE_INFO_SUCCESS', response.data)
|
|
|
+ return Promise.all([
|
|
|
+ StoreFocusList({ commit }, {id: response.data.id})
|
|
|
+ ])
|
|
|
+ }, err => {
|
|
|
+ commit('storeInfo/GET_STORE_INFO_FAILURE', err)
|
|
|
+ })
|
|
|
+}
|
|
|
|
|
|
export const actions = {
|
|
|
// 根据UUID获取某店铺信息
|
|
|
@@ -35,6 +48,9 @@ export const actions = {
|
|
|
return axios.get(`/api/commodity/component/${commodity.uuid}`)
|
|
|
.then(response => {
|
|
|
commit('storeInfo/GET_COMPONENT_SUCCESS', response.data)
|
|
|
+ return Promise.all([
|
|
|
+ findStoreInfoFromUuid({ commit }, {uuid: commodity.storeid})
|
|
|
+ ])
|
|
|
}, err => {
|
|
|
commit('storeInfo/GET_COMPONENT_FAILURE', err)
|
|
|
})
|