|
|
@@ -32,6 +32,7 @@ public class MineOrderListModel extends BaseModel implements MineOrderListContac
|
|
|
private boolean isLoading = false;//是否加载中
|
|
|
private int pageNum = 0;//第一页为1开始 初始为0
|
|
|
private boolean isLastPage;//是否已经最后一页
|
|
|
+ private boolean isSureLoading = false;//是否确认订单中
|
|
|
|
|
|
public MineOrderListModel(Context mContext) {
|
|
|
super(mContext);
|
|
|
@@ -93,9 +94,12 @@ public class MineOrderListModel extends BaseModel implements MineOrderListContac
|
|
|
*/
|
|
|
@Override
|
|
|
public void requestOrderSure(final MvpDataCallBack<Object> callBack, OrderBean bean) {
|
|
|
+ if (isSureLoading)
|
|
|
+ return;
|
|
|
+ isSureLoading = true;
|
|
|
RetrofitHttpParams params = new RetrofitHttpParams(mContext);
|
|
|
params.put("orderId", bean.getId());
|
|
|
- new OrderSubscribe(mContext).requestConfirmOrder(params.getRequestParams(), new ApiObserver<ApiNormalBean>(mContext,true) {
|
|
|
+ new OrderSubscribe(mContext).requestConfirmOrder(params.getRequestParams(), new ApiObserver<ApiNormalBean>(mContext, true, false) {
|
|
|
@Override
|
|
|
public void onSuccess(ApiNormalBean data) {
|
|
|
callBack.onData(data);
|
|
|
@@ -109,12 +113,14 @@ public class MineOrderListModel extends BaseModel implements MineOrderListContac
|
|
|
|
|
|
@Override
|
|
|
public void onFinish() {
|
|
|
+ isSureLoading = false;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 请求订单签约
|
|
|
+ *
|
|
|
* @param callBack
|
|
|
* @param bean
|
|
|
*/
|
|
|
@@ -122,7 +128,7 @@ public class MineOrderListModel extends BaseModel implements MineOrderListContac
|
|
|
public void requestOrderSign(final MvpDataCallBack<String> callBack, OrderBean bean) {
|
|
|
RetrofitHttpParams params = new RetrofitHttpParams(mContext);
|
|
|
params.put("orderId", bean.getId());
|
|
|
- new OrderSubscribe(mContext).requestConfirmECOrder(params.getRequestParams(), new ApiObserver<ApiSignBean>(mContext,true) {
|
|
|
+ new OrderSubscribe(mContext).requestConfirmECOrder(params.getRequestParams(), new ApiObserver<ApiSignBean>(mContext, true) {
|
|
|
@Override
|
|
|
public void onSuccess(ApiSignBean data) {
|
|
|
callBack.onData(data.getUrl());
|