Ejemplo n.º 1
0
 public void updateUserPoint(long point) {
   try {
     long nowPoint = MyData.getData().getUserBean().getAllKeDouBi();
     nowPoint = nowPoint + point;
     MyData.getData().getUserBean().setAllKeDouBi(nowPoint);
     MyToast.showCustomerToast("获得金币: " + point + "个");
   } catch (Exception e) {
     MyToast.showCustomerToast("网络异常增加金币失败");
   }
 }
Ejemplo n.º 2
0
  private void dealResult(JSONObject response, int point) {
    try {
      isOK = response.getBoolean("isok");
      if (isOK) {
        int type = response.getInt("type");
        if (type == ADD_MONEY_OUT_SIZE) {
          MyToast.showCustomerToast("增加金币失败 本区每天限制做任务" + maxNum + "个");
        } else if (type == ADD_MONEY_SUCCESS) {
          updateUserPoint(point);
        }

      } else {
        MyToast.showCustomerToast("网络异常增加金币失败");
      }
    } catch (Exception e) {
      MyToast.showCustomerToast("网络异常增加金币失败");
    }
  }
Ejemplo n.º 3
0
 @Override
 public void onFailure(Throwable error, String content) {
   super.onFailure(error, content);
   LogUtil.D("增加金币失败: " + content + error);
   MyToast.showCustomerToast("网络异常增加金币失败");
 }
Ejemplo n.º 4
0
 public void showNetErrorToast() {
   MyToast.showCustomerToast("" + "获取数据失败 请检查网络");
 }
Ejemplo n.º 5
0
 public void showGetMoneyErrorToast() {
   MyToast.showCustomerToast("" + "获取金币失败 请检查网络");
 }
Ejemplo n.º 6
0
 public void showErrorToast() {
   MyToast.showCustomerToast("" + "初始化失败 请重试");
 }