api.js 这段代码不太理解,import api from 'create-api' ,这个引用在那里
wwb568109135 opened this issue · 2 comments
wwb568109135 commented
import api from 'create-api'
const prefix = ${api.host}/api
const store = {}
export default store
store.fetch = (model, query) => {
const target = ${prefix}/${model}
return api.axios.get(target, { params: query }).then((response) => {
const result = response.data
return result
})
}
smallpath commented
wwb568109135 commented
谢谢 之前一直没有找到这个create-api他的引用,现在知道了,谢谢楼主!