Example #1
0
 /** 定位回调 */
 @Override
 public void location(double lng, double lat, String address) {
   if (httpDialog != null) {
     httpDialog.dismiss();
   }
   ContentUtils.putSharePre(this, Constants.SHARED_PREFERENCE_NAME, Constants.LATITUDE, lat + "");
   ContentUtils.putSharePre(this, Constants.SHARED_PREFERENCE_NAME, Constants.LONGITUDE, lng + "");
   ContentUtils.putSharePre(this, Constants.SHARED_PREFERENCE_NAME, Constants.ADDRESS, address);
 }
Example #2
0
 private void downApp(AppUpDataBean uB) {
   String url = uB.getUrl();
   Downloader downloader = Downloader.getInstance(MainActivity.this);
   long id = downloader.download(url);
   ContentUtils.putSharePre(
       MainActivity.this, Constants.SHARED_PREFERENCE_NAME, Constants.APPDOWNLOAD_ID, id);
 }
Example #3
0
  private void typeUserDownload(ArrayList<ShouyeServiceBean> datas) {
    ContentUtils.putSharePre(
        MainActivity.this, Constants.SHARED_PREFERENCE_NAME, Constants.DDFW, "0");
    ContentUtils.putSharePre(
        MainActivity.this, Constants.SHARED_PREFERENCE_NAME, Constants.HHPF, "0");
    for (int i = 0; i < datas.size(); i++) {
      if (1 == datas.get(i).getId()) {
        ContentUtils.putSharePre(
            MainActivity.this, Constants.SHARED_PREFERENCE_NAME, Constants.DDFW, "1");
      } else if (3 == datas.get(i).getId()) {
        ContentUtils.putSharePre(
            MainActivity.this, Constants.SHARED_PREFERENCE_NAME, Constants.HHPF, "3");
      } else {

      }
    }
  }
Example #4
0
 /** 获取财务室各项收入 */
 public void getCount() {
   if (ContentUtils.getLoginStatus(this)) { // 获取登陆状态
     if (!TextUtils.isEmpty(userShopInfoBean.getBusinessId())) { // 获取店铺id是否为空
       getUserAccount(); // 账户总额
       getShopAccount(); // 店铺总额
       getBalance(); // 可用余额
       getAmountinCash(); // 提现中金额
       getShopAccountToday(); // 店铺今日收入
     }
   }
 }
Example #5
0
 @Override
 protected void onTitleRightClickTv() {
   super.onTitleRightClickTv();
   boolean isLogin = ContentUtils.getLoginStatus(this);
   boolean re = false;
   switch (curPosition) {
     case POSITION0:
       re = JumpIntent.jumpLogin_addShop(isLogin, API.SHOPS, this);
       if (re) {
         isChange = true;
         ChangeShopActivity.myShopChange = this;
         Intent intent_more = new Intent(this, ChangeShopActivity.class);
         startActivity(intent_more);
       }
       break;
   }
 }
Example #6
0
  private void setShoyYeTitle() {
    if (ContentUtils.getLoginStatus(this)) {
      if (!(TextUtils.isEmpty(userShopInfoBean.getShopName())
          || null == userShopInfoBean.getShopName())) {
        setPageTitle(userShopInfoBean.getShopName());
      }
    } else {
      setPageTitle("首页");
    }
    // System.out.println("userShopInfoBean.getShopName()---"+userShopInfoBean.getShopName());
    // if (TextUtils.isEmpty(userShopInfoBean.getShopName())
    // || null == userShopInfoBean.getShopName()) {
    // setPageTitle("首页");
    // } else {
    // setPageTitle(userShopInfoBean.getShopName());
    // }

  }
Example #7
0
  /** 返回键监听 */
  @Override
  public boolean onKeyDown(int keyCode, KeyEvent event) {

    if (keyCode == KeyEvent.KEYCODE_BACK) {

      if ((System.currentTimeMillis() - mExitTime) > 1000) {
        ContentUtils.showMsg(this, getResources().getString(R.string.balck_tuichu));

        mExitTime = System.currentTimeMillis();

      } else {

        finish();
      }

      return true;
    }

    return super.onKeyDown(keyCode, event);
  }
Example #8
0
 @Override
 protected void onTitleRightClick1() {
   super.onTitleRightClick1();
   boolean isLogin = ContentUtils.getLoginStatus(this);
   boolean re = false;
   switch (curPosition) {
     case POSITION0: // 二维码扫描
       // re = JumpIntent.jumpLogin_addShop(isLogin, API.SWEEP, this);
       // if (re) {
       // // pickImage();
       // startActivityForResult((new Intent(this,
       // OrderProductActivity.class)),
       // GlzxPagerFragment.OrderProductActivity_code);
       // }
       break;
     case POSITION3: // 其他
       re = JumpIntent.jumpLogin_addShop1(isLogin, API.OTHER, this);
       if (re) {
         Intent intent_more = new Intent(this, OtherActivity.class);
         startActivityForResult(intent_more, OTHERACTIVITY_CODE);
       }
       break;
   }
 }
Example #9
0
  /** 获取已有的服务商城列表 */
  public void getServiceMall() {
    if (ContentUtils.getLoginStatus(this) && !TextUtils.isEmpty(userShopInfoBean.getBusinessId())) {
      okHttpsImp.getMoreServerMall(
          new MyResultCallback<String>() {

            @Override
            public void onResponseResult(Result result) {
              String reString = result.getData();
              if (!TextUtils.isEmpty(reString)) {
                try {
                  JSONObject jsonObject = new JSONObject(reString);
                  reString = jsonObject.getString("appsList");
                  if (null != reString) {
                    mDatas.clear();
                    mDatas =
                        (ArrayList<ShouyeServiceBean>)
                            JSON.parseArray(reString, ShouyeServiceBean.class);

                    typeUserDownload(mDatas);

                    ShouyeServiceBean service = new ShouyeServiceBean();
                    service.setDefaultservice(2);
                    service.setAppName("收款");
                    service.setId(99);
                    mDatas.add(0, service);

                    ShouyeServiceBean endservie = new ShouyeServiceBean();
                    endservie.setDefaultservice(1);
                    endservie.setAppName("服务商城");
                    endservie.setId(100);
                    mDatas.add(mDatas.size(), endservie);
                    setFill();

                    ((ShouYeFragment) fm_shouye).getServiceMall(mDatas);
                  }
                } catch (JSONException e) {
                  e.printStackTrace();
                }
              }
            }

            @Override
            public void onResponseFailed(String msg) {
              filltheseats();
            }
          },
          BaseActivity.userShopInfoBean.getBusinessId());
    } else {

      new Handler()
          .postDelayed(
              new Runnable() {

                @Override
                public void run() {
                  filltheseats();
                }
              },
              50);
    }
  }
Example #10
0
 public void postCID() {
   if (ContentUtils.getLoginStatus(this)) {
     postClientId();
   }
 }