12
12
*/
13
13
14
14
public class BaseApi {
15
-
16
15
public static final int HOST_FORMAL = 1 ;//正式环境
17
16
public static final int HOST_TEST = 2 ;//测试环境
18
17
public static final int HOST_DEV = 3 ;//开发环境
@@ -39,21 +38,9 @@ public class BaseApi {
39
38
* 通行证
40
39
*/
41
40
public static String PASS_BASE_URL = "" ;
42
- /**
43
- * h5
44
- */
45
- public static String H5_BASE_URL = "" ;
46
- /**
47
- * 用户图像
48
- */
49
- public static String USER_AVATAR_BASE_URL = "" ;
50
- /**
51
- * 版本更新
52
- */
53
- public static String CLOUD_BASE_URL = "" ;
54
41
55
42
/**
56
- * environment: 1,外网 2,内网测试 3,内网开发
43
+ * environment: 1,外网生产 2,内网测试 3,内网开发
57
44
*/
58
45
public static void init (Context context , int environment , String locale ) {
59
46
HOST_NOW = environment ;
@@ -62,33 +49,21 @@ public static void init(Context context, int environment, String locale) {
62
49
case 1 :
63
50
PASS_BASE_URL = "https://api.github.com/" ;
64
51
65
- H5_BASE_URL = "http://h5.putao.com/" ;
66
- USER_AVATAR_BASE_URL = "http://account.file.putaocloud.com/file/" ;
67
- CLOUD_BASE_URL = "http://api-cloud.putao.com" ;
68
52
break ;
69
53
case 2 :
70
54
PASS_BASE_URL = "https://api.github.com/" ;
71
55
72
- H5_BASE_URL = "http://dev.fe.ptdev.cn/" ;
73
- USER_AVATAR_BASE_URL = "http://account.file.dev.putaocloud.com/file/" ;
74
- CLOUD_BASE_URL = "http://test-api-cloud.ptdev.cn" ;
75
56
break ;
76
57
case 3 :
77
58
PASS_BASE_URL = "https://api.github.com/" ;
78
59
79
- H5_BASE_URL = "http://dev.fe.ptdev.cn/" ;
80
- USER_AVATAR_BASE_URL = "http://account.file.dev.putaocloud.com/file/" ;
81
- CLOUD_BASE_URL = "http://dev-api-cloud.ptdev.cn/" ;
82
60
break ;
83
61
}
84
62
85
63
sDeviceId = AppUtils .getRealDeviceId (context );
86
64
sVersion = AppUtils .getVersionName (context );
87
65
}
88
66
89
- //生成孩子二维码
90
- public static final String CREATE_QR_URL = "http://store.putao.com/ad/13" ;
91
-
92
67
public static boolean isInner () {
93
68
return HOST_NOW == HOST_DEV || HOST_NOW == HOST_TEST ;
94
69
}
@@ -104,51 +79,12 @@ public static class Url {
104
79
public static final String URL_LOGIN = "/authorizations" ;//登录
105
80
public static final String URL_USER = "/user" ;//获取用户信息
106
81
107
- public static final String URL_VERIFICATION = "api/verification" ;//发送图形验证码
108
- public static final String URL_CHECKMOBILE = "api/checkMobile" ;//手机注册与否检测
109
- public static final String URL_SAFESENDMSG = "api/safeSendMsg" ;//发送验证码安全接口
110
- public static final String URL_FORGET = "api/forget" ;//忘记密码(手机)
111
- public static final String URL_SAFELOGIN = "api/safeLogin" ;//安全登录
112
- public static final String URL_CHANGEPASSWD = "api/changePasswd" ;//修改密码
113
- public static final String URL_UPDATETOKEN = "api/updateToken" ;//更新token
114
- public static final String URL_CHECKTOKEN = "api/checkToken" ;//验证token
115
- public static final String URL_GETNICKNAME = "api/getNickName" ;//获取昵称
116
- public static final String URL_SETNICKNAME = "api/setNickName" ;//设置昵称
117
-
118
- //==============================UploadApi=======================================//
119
- /**
120
- * 文件服务
121
- *
122
- * @see com.putao.ptpad.cn.retrofit.api.UploadApi {@link BaseApi#FILE_BASE_URL}.
123
- */
124
- public static final String URL_CHECK_SHA1 = "fileinfo" ;//校检sha1
125
- public static final String URL_UPLOAD_FILE = "upload" ;//上传文件
126
-
127
- //==============================QRCodeApi========================================//
128
- /**
129
- * 二维码扫码
130
- *
131
- * @see com.putao.ptpad.cn.retrofit.api.QRCodeApi {@link BaseApi#QRCODE_BASE_URL}.
132
- */
133
- public static final String URL_QR_SERVER_HANDLER = "handler" ;//二维码扫码流程
134
-
135
- //==================================H5===========================================//
136
82
/**
137
- * H5相关
83
+ * 通行证
138
84
*
139
- * @see {@link BaseApi#H5_BASE_URL }.
85
+ * @see com.jusenr.androidgithub.retrofit.api.RepoApi {@link BaseApi#PASS_BASE_URL }.
140
86
*/
141
- public static final String URL_H5_USED_TIME_TODAY = H5_BASE_URL + "ptpad/index.html?" ;//今日使用
142
- public static final String URL_H5_STUDY_REPORT = H5_BASE_URL + "pt_report/index.html" ;//学习报告
143
- public static final String URL_H5_WHERE_CHILD_QRCODE_1 = H5_BASE_URL + "qr_location/location_index_1.html" ;//二维码在哪里-协助登录页面
144
- public static final String URL_H5_WHERE_CHILD_QRCODE_2 = H5_BASE_URL + "qr_location/location_index_2.html" ;//二维码在哪里-关联孩子页面
145
-
146
- //==================================版本===========================================//
147
-
148
- /**
149
- * 版本更新相关
150
- */
151
- public static final String URL_UPGRADE_CHECK = "version/checkupgrade" ;
152
-
87
+ //==============================RepoApi=======================================//
88
+ public static final String URL_SEARCH_REPOSITORIES = "/search/repositories" ;//搜索项目
153
89
}
154
90
}
0 commit comments