Commit 99985848 by tangguangrui

添加月卡绑定功能

parent ff75f907
......@@ -77,7 +77,7 @@ public class HttpPostHelper {
@Override
public void onFailure(HttpException error, String msg) {
LogUtils.e("请求失败:", msg);
callback.requestFailure("-3","请求失败!");
callback.requestFailure("-3",msg);
callback.requestFinish();
}
});
......@@ -116,7 +116,7 @@ public class HttpPostHelper {
@Override
public void onFailure(HttpException error, String msg) {
LogUtils.e("请求失败:", "error : " +msg + error.getLocalizedMessage());
callback.requestFailure("-3","请求失败!");
callback.requestFailure("-3",msg);
callback.requestFinish();
}
});
......@@ -182,7 +182,7 @@ public class HttpPostHelper {
@Override
public void onFailure(HttpException error, String msg) {
KLog.e("HttpPostRequest*** 请求失败["+ System.currentTimeMillis()+"] url=" + url + "--" + "错误信息:"+msg);
callback.requestFailure("-3","网络开小差啦,请重试呦。。。");
callback.requestFailure("-3",msg);
callback.requestFinish();
}
});
......
......@@ -14,8 +14,8 @@ public class Constant {
public static String BaseImagesDir = Utils.getRootFilePath() + "/image/";
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-mircrosoft-building.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_DETAIL = Host + "mini/visit/user/detail/";
public static final String API_GET_QINIU_TOKEN = Host + "cms/property/common/ignore/qiniu";
......
......@@ -18,6 +18,7 @@ import cn.dankal.base.http.HttpPostHelper;
import cn.dankal.base.http.NOToastHttpCallBack;
import cn.dankal.base.utils.LogUtils;
import cn.dankal.base.utils.NetPicUtil;
import cn.dankal.base.utils.ToastUtils;
import cn.mctower.visitor.model.MonthCardDetailBean;
import cn.mctower.visitor.model.MonthCardRqCodeBean;
import cn.mctower.visitor.model.QiNiuTokenBean;
......@@ -36,6 +37,8 @@ public class MonthCardDetailActivity extends NetBaseAppCompatActivity {
TextView openTime;
@ViewInject(R.id.availableTime)
TextView availableTime;
@ViewInject(R.id.bindTimes)
TextView bindTimes;
@ViewInject(R.id.carCardNum)
TextView carCardNum;
@ViewInject(R.id.carNum)
......@@ -142,6 +145,7 @@ public class MonthCardDetailActivity extends NetBaseAppCompatActivity {
carNum.setText(bean.cardNo);
applyReason.setText(bean.description);
}
bindTimes.setText(bean.replaceCount+"次");
initQiNiuToken();
}
}
......@@ -186,22 +190,25 @@ public class MonthCardDetailActivity extends NetBaseAppCompatActivity {
private void showBigPic(int id){
if(bean.vehicleImgArray != null && bean.vehicleImgArray.size() > 0) {
if(qiNiuTokenBean != null && !TextUtils.isEmpty(qiNiuTokenBean.url)) {
if (bean.vehicleImgArray != null && bean.vehicleImgArray.size() > 0) {
switch (id) {
case R.id.pic1:
if(bean.vehicleImgArray.size() > 0)
netPicUtil.display(bigPic,bean.vehicleImgArray.get(0));
if (bean.vehicleImgArray.size() > 0)
netPicUtil.display(bigPic, qiNiuTokenBean.url + bean.vehicleImgArray.get(0));
break;
case R.id.pic2:
if(bean.vehicleImgArray.size() > 1)
netPicUtil.display(bigPic,bean.vehicleImgArray.get(1));
if (bean.vehicleImgArray.size() > 1)
netPicUtil.display(bigPic, qiNiuTokenBean.url + bean.vehicleImgArray.get(1));
break;
case R.id.pic3:
if(bean.vehicleImgArray.size() > 2)
netPicUtil.display(bigPic,bean.vehicleImgArray.get(2));
if (bean.vehicleImgArray.size() > 2)
netPicUtil.display(bigPic, qiNiuTokenBean.url + bean.vehicleImgArray.get(2));
break;
}
bigPicFrame.setVisibility(View.VISIBLE);
}
} else
ToastUtils.show("图片路劲信息获取失败");
}
}
......@@ -17,6 +17,7 @@ public class MonthCardDetailBean {
public String userUuid;
public String uuid;
public String description;
public String replaceCount;
public List<String> vehicleImgArray;
public static class MonthCardBean {
......
......@@ -101,6 +101,27 @@
android:layout_below="@id/availableTime"
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>
......
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