api.js
718 Bytes
import store from '@/store/index'
let BASE_URL = store.state.baseURL;
const MOCK_CONFIG_URL = 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config';
const env = process.env.NODE_ENV;
if(!BASE_URL) {
BASE_URL = env === 'development' ? 'http://192.168.0.63:8880'
: '';
}
const API = {
getMockConfig() {
return MOCK_CONFIG_URL + '/e_sheild_config';
},
LOGIN_CAPTCHA: BASE_URL + '/usercenter/captcha', // 非接口,直接url可展示验证码
LOGIN_ACTION: BASE_URL + '/usercenter/login', // 登录接口
MENU_TREE_ACTION: BASE_URL + '/usercenter/menu/permtree', // 用户登录成功后拉取权限菜单
}
export {
API
}