|
10 | 10 | import android.widget.ImageView; |
11 | 11 |
|
12 | 12 | import org.yh.library.YHGlide; |
13 | | -import org.yh.library.okhttp.YHRequestFactory; |
14 | | -import org.yh.library.okhttp.callback.HttpCallBack; |
15 | 13 | import org.yh.library.ui.BindView; |
16 | 14 | import org.yh.library.ui.I_PermissionListener; |
17 | 15 | import org.yh.library.ui.YHViewInject; |
18 | 16 | import org.yh.library.utils.Constants; |
19 | 17 | import org.yh.library.utils.FileUtils; |
20 | | -import org.yh.library.utils.JsonUitl; |
21 | | -import org.yh.library.utils.LogUtils; |
22 | 18 | import org.yh.yhframe.app.MyApplication; |
23 | 19 | import org.yh.yhframe.base.BaseActiciy; |
24 | | -import org.yh.yhframe.bean.JsonLoginModel; |
25 | 20 | import org.yh.yhframe.service.MyIntentService; |
26 | 21 | import org.yh.yhframe.service.MyService; |
27 | 22 |
|
28 | | -import java.util.HashMap; |
29 | 23 | import java.util.List; |
30 | | -import java.util.Map; |
31 | 24 |
|
32 | 25 |
|
33 | 26 | public class MainActivity extends BaseActiciy |
@@ -194,79 +187,102 @@ public void initData() |
194 | 187 | // } |
195 | 188 | // }, TAG); |
196 | 189 |
|
197 | | - YHRequestFactory.getRequestManger().get("", "http://116.196.82.249:8181/login?name=youhao&pass=123456", null, new HttpCallBack() |
198 | | - { |
199 | | - @Override |
200 | | - public void onSuccess(String t) |
201 | | - { |
202 | | - super.onSuccess(t); |
203 | | - JsonLoginModel jsonMenuModel = JsonUitl.stringToTObject(t, JsonLoginModel.class); |
204 | | - LogUtils.e(TAG, jsonMenuModel + ""); |
205 | | - } |
206 | | - |
207 | | - @Override |
208 | | - public void onFailure(int errorNo, String strMsg) |
209 | | - { |
210 | | - super.onFailure(errorNo, strMsg); |
211 | | - LogUtils.e(TAG, strMsg + errorNo); |
212 | | - } |
213 | | - |
214 | | - @Override |
215 | | - public void onFinish() |
216 | | - { |
217 | | - super.onFinish(); |
218 | | - LogUtils.e(TAG, "onFinish()"); |
219 | | - } |
220 | | - }, TAG); |
221 | | - |
222 | | - |
223 | | - Map<String, String> parms1 = new HashMap<>(); |
224 | | - parms1.put("code", "admin"); |
225 | | - parms1.put("password", "7c4a8d09ca3762af61e59520943dc26494f8941b"); |
226 | | - YHRequestFactory.getRequestManger().post("", "http://192.168.0.129:8181/login", null, parms1, new HttpCallBack() |
227 | | - { |
228 | | - @Override |
229 | | - public void onSuccess(String t) |
230 | | - { |
231 | | - super.onSuccess(t); |
232 | | - } |
233 | | - |
234 | | - @Override |
235 | | - public void onFailure(int errorNo, String strMsg) |
236 | | - { |
237 | | - super.onFailure(errorNo, strMsg); |
238 | | - LogUtils.e(TAG, strMsg + errorNo); |
239 | | - } |
240 | | - |
241 | | - @Override |
242 | | - public void onFinish() |
243 | | - { |
244 | | - super.onFinish(); |
245 | | - LogUtils.e(TAG, "onFinish()"); |
246 | | - } |
247 | | - }, TAG+"1"); |
| 190 | +// YHRequestFactory.getRequestManger().get("", "http://116.196.82.249:8181/login?name=youhao&pass=123456", null, new HttpCallBack() |
| 191 | +// { |
| 192 | +// @Override |
| 193 | +// public void onSuccess(String t) |
| 194 | +// { |
| 195 | +// super.onSuccess(t); |
| 196 | +// JsonLoginModel jsonMenuModel = JsonUitl.stringToTObject(t, JsonLoginModel.class); |
| 197 | +// LogUtils.e(TAG, jsonMenuModel + ""); |
| 198 | +// } |
| 199 | +// |
| 200 | +// @Override |
| 201 | +// public void onFailure(int errorNo, String strMsg) |
| 202 | +// { |
| 203 | +// super.onFailure(errorNo, strMsg); |
| 204 | +// LogUtils.e(TAG, strMsg + errorNo); |
| 205 | +// } |
| 206 | +// |
| 207 | +// @Override |
| 208 | +// public void onFinish() |
| 209 | +// { |
| 210 | +// super.onFinish(); |
| 211 | +// LogUtils.e(TAG, "onFinish()"); |
| 212 | +// } |
| 213 | +// }, TAG); |
248 | 214 |
|
249 | 215 |
|
250 | | - YHRequestFactory.getRequestManger().postString("", "http://115.159.123.101:8085/interface/terminal_profile", null, "{\"sns\":\"123456789012345\"}", new HttpCallBack() |
251 | | - { |
252 | | - @Override |
253 | | - public void onSuccess(String t) |
254 | | - { |
255 | | - super.onSuccess(t); |
256 | | - } |
| 216 | +// Map<String, String> parms1 = new HashMap<>(); |
| 217 | +// parms1.put("code", "admin"); |
| 218 | +// parms1.put("password", "7c4a8d09ca3762af61e59520943dc26494f8941b"); |
| 219 | +// YHRequestFactory.getRequestManger().post("", "http://192.168.0.129:8181/login", null, parms1, new HttpCallBack() |
| 220 | +// { |
| 221 | +// @Override |
| 222 | +// public void onSuccess(String t) |
| 223 | +// { |
| 224 | +// super.onSuccess(t); |
| 225 | +// } |
| 226 | +// |
| 227 | +// @Override |
| 228 | +// public void onFailure(int errorNo, String strMsg) |
| 229 | +// { |
| 230 | +// super.onFailure(errorNo, strMsg); |
| 231 | +// LogUtils.e(TAG, strMsg + errorNo); |
| 232 | +// } |
| 233 | +// |
| 234 | +// @Override |
| 235 | +// public void onFinish() |
| 236 | +// { |
| 237 | +// super.onFinish(); |
| 238 | +// LogUtils.e(TAG, "onFinish()"); |
| 239 | +// } |
| 240 | +// }, TAG+"1"); |
257 | 241 |
|
258 | | - @Override |
259 | | - public void onFailure(int errorNo, String strMsg) |
260 | | - { |
261 | | - super.onFailure(errorNo, strMsg); |
262 | | - } |
263 | 242 |
|
264 | | - @Override |
265 | | - public void onFinish() |
266 | | - { |
267 | | - super.onFinish(); |
268 | | - } |
269 | | - },TAG); |
| 243 | +// YHRequestFactory.getRequestManger().postString("", "http://115.159.123.101:8085/interface/terminal_profile", null, "{\"sns\":\"123456789012345\"}", new HttpCallBack() |
| 244 | +// { |
| 245 | +// @Override |
| 246 | +// public void onSuccess(String t) |
| 247 | +// { |
| 248 | +// super.onSuccess(t); |
| 249 | +// } |
| 250 | +// |
| 251 | +// @Override |
| 252 | +// public void onFailure(int errorNo, String strMsg) |
| 253 | +// { |
| 254 | +// super.onFailure(errorNo, strMsg); |
| 255 | +// } |
| 256 | +// |
| 257 | +// @Override |
| 258 | +// public void onFinish() |
| 259 | +// { |
| 260 | +// super.onFinish(); |
| 261 | +// } |
| 262 | +// },TAG); |
| 263 | +// YHRequestFactory.getRequestManger().get("", "http://192.168.0.129:8181/patient/info?patient_id=802040&department_id=125", null, new HttpCallBack() |
| 264 | +// { |
| 265 | +// @Override |
| 266 | +// public void onSuccess(String t) |
| 267 | +// { |
| 268 | +// super.onSuccess(t); |
| 269 | +// LogUtils.e(TAG,t); |
| 270 | +// } |
| 271 | +// |
| 272 | +// @Override |
| 273 | +// public void onFailure(int errorNo, String strMsg) |
| 274 | +// { |
| 275 | +// super.onFailure(errorNo, strMsg); |
| 276 | +// LogUtils.e(TAG,errorNo + " " + strMsg); |
| 277 | +// } |
| 278 | +// |
| 279 | +// @Override |
| 280 | +// public void onFinish() |
| 281 | +// { |
| 282 | +// super.onFinish(); |
| 283 | +// LogUtils.e(TAG,"onFinish()"); |
| 284 | +// } |
| 285 | +// },TAG); |
270 | 286 | } |
271 | 287 |
|
272 | 288 | public String convert(String utfString) |
|
0 commit comments