ai-watch-app/config/api.js

9 lines
512 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// post请求获取菜单
export const post = (url,params, config = {}) => uni.$u.http.post(url, params, config)
// get请求获取菜单注意get请求的配置等都在第二个参数中详见前面解释
export const get = (url,data,toast,responseType = '') => uni.$u.http.get(url, {params: data,custom:{toast:toast||false},responseType:responseType})
// export const baseUrl = 'http://test.sc2.agrimedia.cn'; // APP测试
export const baseUrl = 'https://ai.agrimedia.cn/'; // APP线上