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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* @author lsy
* @date 2019-09-16
**/
import 'dart:math';
import 'package:dio/dio.dart';
import 'package:gm_flutter/commonModel/base/BaseUtil.dart';
import 'DioUtil.dart';
/**
* 生产环境
*/
const String APP_HOST_RELEASE = "https://x6cgr5y5-gengmei.mock.coding.io";
/**
* 测试环境
*/
//const String APP_HOST_DEBUG = "http://backend.paas-merchant.envs";
//const String APP_HOST_DEBUG = "http://doctor.paas-merchant.env";
const String APP_HOST_DEBUG = "https://x6cgr5y5-gengmei.mock.coding.io";
/**
* 开发环境
*/
const String APP_HOST_DEV = "https://x6cgr5y5-gengmei.mock.coding.io";
class Api {
static String BUILD_CONFIG;
static String PROVIDER_NAME;
static Api intance = new Api._();
Api._();
static Api getInstance() {
return intance;
}
String getBaseUrl() {
if (!isDebug) {
return APP_HOST_RELEASE;
} else {
return APP_HOST_DEBUG;
}
}
}