1234567891011121314151617181920 |
- const {
- http
- } = uni.$u
- // 获取SKU价格
- // export const getGoodsPriceReq = (params, config = {}) => http.get('/api/goods/getGoodsPrice', params, config)
- export const getGoodsPriceReq = (params, config = {}) => {
- let apiUrl = '/api/goods/getGoodsPrice'
- Object.keys(params).forEach((item, index) => {
- if (index == 0) {
- apiUrl += `?${item}=${params[item]}`
- } else {
- apiUrl += `&${item}=${params[item]}`
- }
- })
- console.log('处理后的apiUrl', apiUrl);
- return http.get(apiUrl, params, config)
- }
|