jeecg-boot在前端使用GET请求说明:
1.在页面中导入相关依赖:
import { deleteAction, getAction,downFile } from '@/api/manage'
导入发送get请求的依赖
2.请求方法:
getAction(this.url.list).then((res) => {console.log(res)})
请求方法
jeecg-boot在前端使用POST请求说明:
1.导入相关依赖:
导入发送post请求的依赖
2.请求方法:
httpAction(httpurl,formData,method).then((res)=>{console.log(res)})
请求方法
若请求时使用token,需要以下操作:
1.导入获取token的依赖:
获取token的依赖
2.页面属性中声明header字段:
页面中声明header字段
3. created ()方法中给this.header赋值: