1234567891011121314151617181920212223242526272829303132 |
- interface UtilVarType {
- baseUrl:string,
- code:string|number,
- noContentCode:number,
- ENC:boolean,//是否进行加密
- }
- const UtilVar:UtilVarType = {
- baseUrl:"",
- code:1002, //登陆过期
- noContentCode:204, //请求成功但没有内容
- ENC:false,
- }
- const runtimeType:any = {
- production: () => {
-
- },
- //开发环境
- development: () => {
- UtilVar.baseUrl= "http://localhost:8181/api"
- },
- hash:()=>{
- }
-
- }
- // console.log(import.meta.env)
- runtimeType[import.meta.env.MODE]&&runtimeType[import.meta.env.MODE]()
- export default UtilVar
|