Commit 99985848 by tangguangrui

添加月卡绑定功能

parent ff75f907
...@@ -77,7 +77,7 @@ public class HttpPostHelper { ...@@ -77,7 +77,7 @@ public class HttpPostHelper {
@Override @Override
public void onFailure(HttpException error, String msg) { public void onFailure(HttpException error, String msg) {
LogUtils.e("请求失败:", msg); LogUtils.e("请求失败:", msg);
callback.requestFailure("-3","请求失败!"); callback.requestFailure("-3",msg);
callback.requestFinish(); callback.requestFinish();
} }
}); });
...@@ -116,7 +116,7 @@ public class HttpPostHelper { ...@@ -116,7 +116,7 @@ public class HttpPostHelper {
@Override @Override
public void onFailure(HttpException error, String msg) { public void onFailure(HttpException error, String msg) {
LogUtils.e("请求失败:", "error : " +msg + error.getLocalizedMessage()); LogUtils.e("请求失败:", "error : " +msg + error.getLocalizedMessage());
callback.requestFailure("-3","请求失败!"); callback.requestFailure("-3",msg);
callback.requestFinish(); callback.requestFinish();
} }
}); });
...@@ -182,7 +182,7 @@ public class HttpPostHelper { ...@@ -182,7 +182,7 @@ public class HttpPostHelper {
@Override @Override
public void onFailure(HttpException error, String msg) { public void onFailure(HttpException error, String msg) {
KLog.e("HttpPostRequest*** 请求失败["+ System.currentTimeMillis()+"] url=" + url + "--" + "错误信息:"+msg); KLog.e("HttpPostRequest*** 请求失败["+ System.currentTimeMillis()+"] url=" + url + "--" + "错误信息:"+msg);
callback.requestFailure("-3","网络开小差啦,请重试呦。。。"); callback.requestFailure("-3",msg);
callback.requestFinish(); callback.requestFinish();
} }
}); });
......
...@@ -14,8 +14,8 @@ public class Constant { ...@@ -14,8 +14,8 @@ public class Constant {
public static String BaseImagesDir = Utils.getRootFilePath() + "/image/"; public static String BaseImagesDir = Utils.getRootFilePath() + "/image/";
public static String Host = "https://api-mircrosoft-building.dankal.cn/v1/"; //测试 // public static String Host = "https://api-mircrosoft-building.dankal.cn/v1/"; //测试
// public static String Host = "https://api.mctower.dankal.cn/v1/"; //正式 public static String Host = "https://api.mctower.dankal.cn/v1/"; //正式
public static final String API_VISIT_RECORD_LIST = Host + "mini/visit/users"; public static final String API_VISIT_RECORD_LIST = Host + "mini/visit/users";
public static final String API_VISIT_DETAIL = Host + "mini/visit/user/detail/"; public static final String API_VISIT_DETAIL = Host + "mini/visit/user/detail/";
public static final String API_GET_QINIU_TOKEN = Host + "cms/property/common/ignore/qiniu"; public static final String API_GET_QINIU_TOKEN = Host + "cms/property/common/ignore/qiniu";
......
...@@ -18,6 +18,7 @@ import cn.dankal.base.http.HttpPostHelper; ...@@ -18,6 +18,7 @@ import cn.dankal.base.http.HttpPostHelper;
import cn.dankal.base.http.NOToastHttpCallBack; import cn.dankal.base.http.NOToastHttpCallBack;
import cn.dankal.base.utils.LogUtils; import cn.dankal.base.utils.LogUtils;
import cn.dankal.base.utils.NetPicUtil; import cn.dankal.base.utils.NetPicUtil;
import cn.dankal.base.utils.ToastUtils;
import cn.mctower.visitor.model.MonthCardDetailBean; import cn.mctower.visitor.model.MonthCardDetailBean;
import cn.mctower.visitor.model.MonthCardRqCodeBean; import cn.mctower.visitor.model.MonthCardRqCodeBean;
import cn.mctower.visitor.model.QiNiuTokenBean; import cn.mctower.visitor.model.QiNiuTokenBean;
...@@ -36,6 +37,8 @@ public class MonthCardDetailActivity extends NetBaseAppCompatActivity { ...@@ -36,6 +37,8 @@ public class MonthCardDetailActivity extends NetBaseAppCompatActivity {
TextView openTime; TextView openTime;
@ViewInject(R.id.availableTime) @ViewInject(R.id.availableTime)
TextView availableTime; TextView availableTime;
@ViewInject(R.id.bindTimes)
TextView bindTimes;
@ViewInject(R.id.carCardNum) @ViewInject(R.id.carCardNum)
TextView carCardNum; TextView carCardNum;
@ViewInject(R.id.carNum) @ViewInject(R.id.carNum)
...@@ -142,6 +145,7 @@ public class MonthCardDetailActivity extends NetBaseAppCompatActivity { ...@@ -142,6 +145,7 @@ public class MonthCardDetailActivity extends NetBaseAppCompatActivity {
carNum.setText(bean.cardNo); carNum.setText(bean.cardNo);
applyReason.setText(bean.description); applyReason.setText(bean.description);
} }
bindTimes.setText(bean.replaceCount+"次");
initQiNiuToken(); initQiNiuToken();
} }
} }
...@@ -186,22 +190,25 @@ public class MonthCardDetailActivity extends NetBaseAppCompatActivity { ...@@ -186,22 +190,25 @@ public class MonthCardDetailActivity extends NetBaseAppCompatActivity {
private void showBigPic(int id){ private void showBigPic(int id){
if(bean.vehicleImgArray != null && bean.vehicleImgArray.size() > 0) { if(qiNiuTokenBean != null && !TextUtils.isEmpty(qiNiuTokenBean.url)) {
switch (id) { if (bean.vehicleImgArray != null && bean.vehicleImgArray.size() > 0) {
case R.id.pic1: switch (id) {
if(bean.vehicleImgArray.size() > 0) case R.id.pic1:
netPicUtil.display(bigPic,bean.vehicleImgArray.get(0)); if (bean.vehicleImgArray.size() > 0)
break; netPicUtil.display(bigPic, qiNiuTokenBean.url + bean.vehicleImgArray.get(0));
case R.id.pic2: break;
if(bean.vehicleImgArray.size() > 1) case R.id.pic2:
netPicUtil.display(bigPic,bean.vehicleImgArray.get(1)); if (bean.vehicleImgArray.size() > 1)
break; netPicUtil.display(bigPic, qiNiuTokenBean.url + bean.vehicleImgArray.get(1));
case R.id.pic3: break;
if(bean.vehicleImgArray.size() > 2) case R.id.pic3:
netPicUtil.display(bigPic,bean.vehicleImgArray.get(2)); if (bean.vehicleImgArray.size() > 2)
break; netPicUtil.display(bigPic, qiNiuTokenBean.url + bean.vehicleImgArray.get(2));
break;
}
bigPicFrame.setVisibility(View.VISIBLE);
} }
bigPicFrame.setVisibility(View.VISIBLE); } else
} ToastUtils.show("图片路劲信息获取失败");
} }
} }
...@@ -17,6 +17,7 @@ public class MonthCardDetailBean { ...@@ -17,6 +17,7 @@ public class MonthCardDetailBean {
public String userUuid; public String userUuid;
public String uuid; public String uuid;
public String description; public String description;
public String replaceCount;
public List<String> vehicleImgArray; public List<String> vehicleImgArray;
public static class MonthCardBean { public static class MonthCardBean {
......
...@@ -101,6 +101,27 @@ ...@@ -101,6 +101,27 @@
android:layout_below="@id/availableTime" android:layout_below="@id/availableTime"
android:layout_marginTop="12dp"/> android:layout_marginTop="12dp"/>
<TextView
android:id="@+id/bindTimesTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="本月已绑定次数"
android:textColor="#ABB2B7"
android:textSize="14sp"
android:layout_below="@id/carCardTitle"
android:layout_marginTop="12dp"/>
<TextView
android:id="@+id/bindTimes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="xxxxxx"
android:textColor="#2D506B"
android:textSize="14sp"
android:layout_alignParentRight="true"
android:layout_below="@id/carCardTitle"
android:layout_marginTop="12dp"/>
</cn.mctower.visitor.RoundLayout> </cn.mctower.visitor.RoundLayout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment