diff --git a/src/assets/api.js b/src/assets/api.js index 5828024a..c5f7c279 100644 --- a/src/assets/api.js +++ b/src/assets/api.js @@ -23,6 +23,12 @@ if (process.env.NODE_ENV == 'production') { if (process.env.NODE_ENV == 'development') { window.unifiedUrl = 'http://192.168.7.200:8888/#/login'; } + +const ApiUrl = + process.env.NODE_ENV === 'development' + ? 'http://192.168.7.127:8000' + : window.unifiedUrl + 'api'; + const upload = (method, url, params, responseType) => { let obj = { method: method, @@ -714,10 +720,6 @@ export const postLoginStandby = (data) => { //同统一登录获取菜单 export const getMenus = () => { - const ApiUrl = - process.env.NODE_ENV === 'development' - ? 'http://192.168.7.127:8000' - : window.unifiedUrl + 'api'; return req('unified', `${ApiUrl}/v1/menu/tree/marketing`); };