 已经在项目的根目录生成api文件加了,但是不知道怎么使用,我的是vue项目
Activity
whirly77cai commentedon Jan 25, 2018
me too. found nothing on the document.
chuangker commentedon Jan 26, 2018
直接 import 这个 api 就行了呀。
ghostchan commentedon May 7, 2018
同不会用,能不能提供个小demo,谢谢
breederComrade commentedon Dec 11, 2018
在你需要调用的地方导入接口,我项目叫sass_admin,具体你可以看api/index 文件导出的
import { sass_admin } from '../../api/index';
在你需要调用的地方调用/api/sass_admin/index 内的方法
方法对应的是你在easymack上新建的方法
因为他是创建了一个axios实例对象 所以你可以通过下面方法传参
sass_admin.test_get({ params: { fuck: 1 } });