|
|
@@ -1,5 +1,16 @@
|
|
|
import axios from '~plugins/axios'
|
|
|
|
|
|
+// 载入历史记录
|
|
|
+function StoreFocusList ({ commit }, params = {}) {
|
|
|
+ commit('storeInfo/REQUEST_FOCUSLIST')
|
|
|
+ return axios.get(`/trade/storeFocus/ifFocus?storeid=${params.id}`)
|
|
|
+ .then(response => {
|
|
|
+ commit('storeInfo/GET_FOCUSLIST_SUCCESS', response.data)
|
|
|
+ }, err => {
|
|
|
+ commit('storeInfo/GET_FOCUSLIST_FAILURE', err)
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
export const actions = {
|
|
|
// 根据UUID获取某店铺信息
|
|
|
findStoreInfoFromUuid ({ commit }, params = {}) {
|
|
|
@@ -7,6 +18,9 @@ export const actions = {
|
|
|
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)
|
|
|
})
|
|
|
@@ -65,6 +79,7 @@ export const actions = {
|
|
|
commit('storeInfo/REQUEST_FOCUSLIST')
|
|
|
return axios.get(`/trade/storeFocus/ifFocus?storeid=${params.id}`)
|
|
|
.then(response => {
|
|
|
+ console.log(response.data)
|
|
|
commit('storeInfo/GET_FOCUSLIST_SUCCESS', response.data)
|
|
|
}, err => {
|
|
|
commit('storeInfo/GET_FOCUSLIST_FAILURE', err)
|
|
|
@@ -75,7 +90,6 @@ export const actions = {
|
|
|
return axios.post(`/trade/storeFocus/save`, storeName)
|
|
|
.then(response => {
|
|
|
commit('storeInfo/GET_FOCUS_SUCCESS', response.data)
|
|
|
- console.log(response.data)
|
|
|
if (response.data === 'success') {
|
|
|
commit('storeInfo/GET_FOCUSLIST_SUCCESS', 'true')
|
|
|
}
|