1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
| interface UtilVarType {
| baseUrl:string,
| code:string|number,
| noContentCode:number,
| ENC:boolean,//是否进行加密
| }
|
| const UtilVar:UtilVarType = {
| baseUrl:"",
| code:401, //登陆过期
| noContentCode:204, //请求成功但没有内容
| ENC:false,
|
| }
| const runtimeType:any = {
|
| production: () => {
|
| },
| //开发环境
| development: () => {
| // UtilVar.baseUrl= `http://www.xihuanmantou.cn:19527`
|
| },
| hash:()=>{
|
| }
|
| }
| // console.log(import.meta.env)
| runtimeType[import.meta.env.MODE]&&runtimeType[import.meta.env.MODE]()
| export default UtilVar
|
|