import axios from 'axios'
export function getfangshi(type) {
return axios({
url: "/api",
method: "get",
params: {
type: type
}
}
)
}
export function postfangshi(senderCompanyId, receiverCompanyId) {
return axios({
url: '/api/virtual/companyGroup',
method: 'post',
data: {
senderCompanyId: senderCompanyId,
receiverCompanyId: receiverCompanyId
}
})
}
export function query(postageId) {
return axios({
url: "/api/query/" + postageId,
method: "get",
})
}
其中params 对应服务端requestparam
data 对应包含senderCompanyId receiverCompanyId 字段的实体类
@RequestMapping(value = "/query/{postageId}", method = RequestMethod.GET)@PathVariable("postageId")
vue api.js写法
于 2022-05-09 21:53:27 首次发布