From d47d76dc4c2ccd440514a6837ed04d95ba3bdc63 Mon Sep 17 00:00:00 2001 From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674> Date: 星期二, 28 三月 2017 16:15:12 +0800 Subject: [PATCH] --- VisitFace/DemoForBsk/app/src/main/java/com/bsk/zhangbo/demoforbsk/service/PlaceMng.java | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/VisitFace/DemoForBsk/app/src/main/java/com/bsk/zhangbo/demoforbsk/service/PlaceMng.java b/VisitFace/DemoForBsk/app/src/main/java/com/bsk/zhangbo/demoforbsk/service/PlaceMng.java index f71b190..689ef3f 100644 --- a/VisitFace/DemoForBsk/app/src/main/java/com/bsk/zhangbo/demoforbsk/service/PlaceMng.java +++ b/VisitFace/DemoForBsk/app/src/main/java/com/bsk/zhangbo/demoforbsk/service/PlaceMng.java @@ -10,7 +10,7 @@ import java.util.List; -import cn.com.basic.face.discern.common.ResultBean; +import cn.com.basic.face.discern.common.BaseCommonCallBack; import cn.com.basic.face.discern.entity.Place; /** @@ -30,13 +30,16 @@ try { RequestParams params = new RequestParams(AppApi.BASEURL + AppApi.PLACE_LIST); params.addBodyParameter(Place.FieldNames.authorizationId, authorationId); - ResultBean resultBean = x.http().postSync(params, ResultBean.class); - List<Place> places = resultBean.getListBeanOfType(Place.class); - if (places.size() > 0) { - BaseApplication.getInstance().setPlace(places.get(0)); - } else { - Toast.makeText(BaseApplication.getInstance(), "鏁版嵁搴撲腑鎵句笉鍒拌璁惧", Toast.LENGTH_SHORT).show(); - } + x.http().post(params, new BaseCommonCallBack() { + public void success() { + List<Place> places = resultBean.getListBeanOfType(Place.class); + if (places.size() > 0) { + BaseApplication.getInstance().setPlace(places.get(0)); + } else { + Toast.makeText(BaseApplication.getInstance(), "鏁版嵁搴撲腑鎵句笉鍒拌璁惧", Toast.LENGTH_SHORT).show(); + } + } + }); } catch (Throwable e) { e.printStackTrace(); Toast.makeText(BaseApplication.getInstance(), "鏁版嵁搴撲腑鎵句笉鍒拌璁惧", Toast.LENGTH_SHORT).show(); -- Gitblit v1.8.0