请求:
//config.js
const config = {
api_base_url: 'http://bl.7yue.pro/v1/',
appKey: "6IIn05GycnSfYBPo"
}
export {
config
}
//classic.js
import {HTTP} from '../util/http.js'
class ClassicModel extends HTTP{
getLatest(sCallback){
this.request({
url:'classic/latest',
success: (res)=> {
sCallback(res)
}
})
}
}
export {ClassicModel}
返回结果:
GET http://bl.7yue.pro/v1/classic/latest 401 (UNAUTHORIZED)