jeecg-boot在前端使用GET请求说明:
1.在页面中导入相关依赖:
import { deleteAction, getAction,downFile } from '@/api/manage'

2.请求方法:
getAction(this.url.list).then((res) => {console.log(res)})

jeecg-boot在前端使用POST请求说明:
1.导入相关依赖:

2.请求方法:
httpAction(httpurl,formData,method).then((res)=>{console.log(res)})

若请求时使用token,需要以下操作:
1.导入获取token的依赖:

2.页面属性中声明header字段:

3. created ()方法中给this.header赋值:

网友评论