| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- import axios from '~plugins/axios'
- export const actions = {
- // 获取搜索kind
- searchForKinds ({ commit }, params = {}) {
- commit('searchKinds/REQUEST_KINDS', params)
- return axios.get(`/search/componentGoods/collect`, {params})
- .then(response => {
- commit('searchKinds/GET_KINDS_SUCCESS', response.data)
- }, err => {
- commit('searchKinds/GET_KINDS_FAILURE', err)
- })
- },
- // 获取搜索brand
- searchForBrands ({ commit }, params = {}) {
- commit('searchBrands/REQUEST_BRANDS', params)
- return axios.get(`/search/componentGoods/collect`, {params})
- .then(response => {
- commit('searchBrands/GET_BRANDS_SUCCESS', response.data)
- }, err => {
- commit('searchBrands/GET_BRANDS_FAILURE', err)
- })
- },
- // 获取搜索list
- searchForList ({ commit }, params = {}) {
- commit('searchList/REQUEST_LIST', params)
- return axios.get(`/api/product/component/search/compGoods`, {params})
- .then(response => {
- commit('searchList/GET_LIST_SUCCESS', response.data)
- }, err => {
- commit('searchList/GET_LIST_FAILURE', err)
- })
- },
- // 获取搜索货源
- searchForStoreType ({ commit }, params = {}) {
- commit('searchStoreType/REQUEST_STORETYPE', params)
- return axios.get(`/search/componentGoods/collect`, {params})
- .then(response => {
- commit('searchStoreType/GET_STORETYPE_SUCCESS', response.data)
- }, err => {
- commit('searchStoreType/GET_STORETYPE_FAILURE', err)
- })
- },
- // 获取搜索币种
- searchForCrname ({ commit }, params = {}) {
- commit('searchCrname/REQUEST_CRNAME', params)
- return axios.get(`/search/componentGoods/collect`, {params})
- .then(response => {
- commit('searchCrname/GET_CRNAME_SUCCESS', response.data)
- }, err => {
- commit('searchCrname/GET_CRNAME_FAILURE', err)
- })
- }
- }
|