开发第一次遇到FromDate表单数据 做参数
转化方法:
先new FromData()对象
用append方法添加数据值
append()有两个参数 1.是属性名(参数名) 2.属性值 (动态数据)
let fd = new FormData()
fd.append('departureCode', searchData.departureCode)
fd.append('destinationCode', searchData.destinationCode)
fd.append('height', searchData.height)
fd.append('length', searchData.length)
fd.append('weight', searchData.weight)
fd.append('width', searchData.width)
axios.post(global.commonUrlPrefix + "/freightCalculation/calFreight/",fd).then(response => {
commit('changeLoadingState', false);
if (response.data.flag) {
commit('getResultSuccess', {
rowData: response.data.rows
})
}
})