1.0.8 • Published 5 years ago
youth-framework v1.0.8
framework
#api接口调用实例代码
import Server from 'youth-framework' const url = '/demo'
/ eslint class-methods-use-this: 0 / class API { constructor(server) { this.axios = server.axios }
/**
* 登录
*/
async login (params) {
try {
const res = await this.axios('post', url + '/api/strongLogin', params)
return res
} catch (err) {
throw err
}
}
}