// 項目中用到的所有分類樹的接口
import request from '@/utils/request'
// 這個是get拼接的傳參 第一次遇到這種風格.......
export function getStandardTree(data, type) {
return request({
url: '/classification/tree/' + data + "/" + type,
method: 'get',
})
}
// get請求 單個參數
export function getStandardTree2(data) {
return request({
url: '/classification/tree' + data,
method: 'get'
})
}
// 以下都是JSON格式傳參的接口
// get請求 多個參數
export function getStandardTree1(data) {
return request({
url: '/classification/tree',
method: 'get',
params: data
})
}
// post請求
export function getStandardTree3(data) {
return request({
url: '/classification/tree',
method: 'post',
data
})
}
平常我們一直說的axios傳參方式是: get傳參用params, post 用data; put和delelt與post傳參f相同
總結是上面幾類
axios在node包里也已經配置好了