| 12345678910111213141516171819202122232425262728 |
- import {axios} from '../utils/request'
- import {STORE_MODULE} from './_prefix'
- // 创建商店
- export const createStore = payload => {
- console.log(payload)
- return axios.post(`${STORE_MODULE}/`, payload,
- {headers: {'Content-Type': 'application/json','token': localStorage.getItem('token')}})
- .then(res => {
- return res;
- })
- }
- // 获取全部商店
- export const getAllStore = () => {
- return axios.get(`${STORE_MODULE}/`, )
- .then(res => {
- return res;
- })
- }
- // 获取指定商店
- export const getStoreById = storeId => {
- return axios.get(`${STORE_MODULE}/${storeId}`)
- .then(res => {
- return res;
- })
- }
|