|
@@ -10,6 +10,7 @@ import android.content.Context;
|
|
|
import android.os.Build;
|
|
|
import android.os.Bundle;
|
|
|
import android.os.Handler;
|
|
|
+import android.os.Looper;
|
|
|
import android.support.annotation.NonNull;
|
|
|
import android.support.annotation.Nullable;
|
|
|
import android.support.annotation.RequiresApi;
|
|
@@ -114,6 +115,7 @@ import com.hboxs.base_library.util.FileUtil;
|
|
|
import com.hboxs.base_library.util.LanguageUtil;
|
|
|
import com.hboxs.base_library.util.LogUtil;
|
|
|
import com.hboxs.base_library.util.LogUtils;
|
|
|
+import com.hboxs.base_library.util.PreventSpeedClickUtil;
|
|
|
import com.hboxs.base_library.util.SharedPreferencesUtils;
|
|
|
import com.hboxs.base_library.util.UiUtil;
|
|
|
import com.orhanobut.hawk.Hawk;
|
|
@@ -617,6 +619,7 @@ public class IceCreamFragment extends BaseAutoExitFragment implements View.OnCli
|
|
|
}
|
|
|
Log.d(TAG, "onClick:orderHelper 商品名字:" + orderHelper.getOrderList().get(i).selectTag + " 单个商品价格:" + totalSum + " 数量:" + orderHelper.getOrderList().get(i).buyCount);
|
|
|
}
|
|
|
+ Log.d(TAG, "onClick:priceList "+priceList);
|
|
|
}
|
|
|
showLoading();
|
|
|
if (App.app.payChannel == Constant.PAY_FREE || manualReason != null) {
|
|
@@ -663,7 +666,7 @@ public class IceCreamFragment extends BaseAutoExitFragment implements View.OnCli
|
|
|
// }
|
|
|
if (!CommunicationHelper.getInstance().canGenerateOrder()) {
|
|
|
ToastUtil.getInstance().showText(CommunicationHelper.getInstance().getWhyCanOrderText());
|
|
|
- return;//是否开机
|
|
|
+// return;//是否开机
|
|
|
}
|
|
|
addShopCart();
|
|
|
|
|
@@ -740,7 +743,12 @@ public class IceCreamFragment extends BaseAutoExitFragment implements View.OnCli
|
|
|
ToastUtil.getInstance().showText(UiUtil.getStringRes(R.string.only_one_code));
|
|
|
return; // 直接返回,不继续执行
|
|
|
} else {
|
|
|
- getDiscountCodeOverseas(arrayCode[shoppingNumber], id);
|
|
|
+ if (PreventSpeedClickUtil.isFastClick()){
|
|
|
+ Log.d(TAG, "PreventSpeedClickUtil:1 ");
|
|
|
+ getDiscountCodeOverseas(arrayCode[shoppingNumber], id);
|
|
|
+ }else {
|
|
|
+ Log.d(TAG, "PreventSpeedClickUtil:2 ");
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
// manualMake();
|
|
@@ -808,15 +816,19 @@ public class IceCreamFragment extends BaseAutoExitFragment implements View.OnCli
|
|
|
protected void onTimeOutFinish() {
|
|
|
if (Global.hasmoney.doubleValue() + Global.hascoin.doubleValue() > 0) {
|
|
|
Log.d(TAG, "onTimeOutFinish: stop0");
|
|
|
- try {
|
|
|
- // 延时2分钟
|
|
|
- Log.d(TAG, "onTimeOutFinish: stop1");
|
|
|
- Thread.sleep(2 * 60 * 1000);
|
|
|
- } catch (InterruptedException e) {
|
|
|
- // 处理中断异常
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
+ // 使用Handler进行延时操作
|
|
|
+ new Handler().postDelayed(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ checkManualMode();
|
|
|
+ }
|
|
|
+ },4*60*1000);
|
|
|
+ } else {
|
|
|
+ checkManualMode();
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ private void checkManualMode() {
|
|
|
if (isManualMode()) {
|
|
|
PlcLog.getInstance().e_s("BaseFragment", "是我发生了超时退出回到了主界面 ---" + this);
|
|
|
getActivity().finish();
|
|
@@ -827,6 +839,7 @@ public class IceCreamFragment extends BaseAutoExitFragment implements View.OnCli
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@Override
|
|
|
public void onAnimationStart(Animation animation) {
|
|
|
|