api封装
get
export function getUnionBalance(query) {return request({url: \'/platform-manage/jd/price/getUnionBalance\',method: \'get\',params: query})}
post
后台接收的请求数据类型有两种方式application/json(axios默认的) application/x-www-form-urlencoded
两种方式处理方法
总结:qs.stringify(data)可将数据格式转化为application/x-www-form-urlencoded的形式
1)application/json
export function saveConfig(data) {return request({url: \'/platform-manage/jd/saveConfig\',method: \'post\',data})}
2)application/x-www-form-urlencoded
export function saveConfig(data) {return request({url: \'/platform-manage/jd/saveConfig\',method: \'post\',// data// qs.stringify可以转化为所需格式的数据data: qs.stringify(data)})}