fu-hsi-web/src/config/net.config.js

28 lines
908 B
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/**
* @description 导出默认网路配置
**/
const network = {
// 默认的接口地址 如果是开发环境和生产环境走vab-mock-server当然你也可以选择自己配置成需要的接口地址
baseURL:
process.env.NODE_ENV === 'development'
? 'http://192.168.10.25:8097/fu-hsi-server'
: '/fuHsiApi',
// 配后端数据的接收方式application/json;charset=UTF-8或者application/x-www-form-urlencoded;charset=UTF-8
contentType: 'application/json;charset=UTF-8',
// 消息框消失时间
messageDuration: 3000,
// 最长请求时间
requestTimeout: 1200000000,
// 操作正常code支持String、Array、int多种类型
successCode: [200, 0],
// 登录失效code
invalidCode: 320,
// 后台接口请求报错code
requestError: 500,
// 无权限code
noPermissionCode: 401,
// 接口是否加密
encrypt: true
}
module.exports = network