api.js

import apiConfig from ‘./config‘;


let Api = {
domain: process.env.URL,
imgUrl: process.env.imgURL,
// api

/*======= 用户 =======*/
// 登陆
login(username, password) {
let data = {
username: username,
password: password
};
return apiConfig.post(‘mobile-api/login‘, data).then( response => response);
},
// 登出
logout() {
return apiConfig.get(‘mobile-api/logout‘).then(response => response);
}
};
export default Api;

api.js

上一篇:AcWing255 第K小数(整体二分)


下一篇:idea常用快捷键