| | |
| | | |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLogin; |
| | | import com.bumptech.glide.Glide; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | |
| | | pd = new ShapeLoadingDialog.Builder(this).build(); |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE) |
| | | .getString("uid", ""); |
| | | ShoppingApi.getGoodsCouponList(this, uid, Constant.GOODS_TYPE_JD, goodsId, new BasicTextHttpResponseHandler() { |
| | | |
| | | ShoppingApi.getGoodsCouponList(this, UserUtil.getUid(ShoppingApplication.application), Constant.GOODS_TYPE_JD, goodsId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | * @param info |
| | | */ |
| | | private void useFreeSingleTicket(FreeSingleTicket info) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.useFreeSingleTicket(GoodsDetailActivitySuning.this, uid, info.getId(), goodsId, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.useFreeSingleTicket(GoodsDetailActivitySuning.this, UserUtil.getUid(ShoppingApplication.application), info.getId(), goodsId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | |
| | | private void getGoodsDetail() { |
| | | isQuestDetail = true; |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.getGoodsInfoSuning(this, goodsId, uid, from, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getGoodsInfoSuning(this, goodsId, UserUtil.getUid(ShoppingApplication.application), from, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | if (!isLogin) { |
| | | receiveCouponHint(info.getLink()); |
| | | } else { |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | getSuningLinkInfo(info.getLink()); |
| | | } |
| | |
| | | |
| | | //分享奖金 |
| | | case R.id.ll_share_gain: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | copyLink = false; |
| | | startShare(isLogin); |
| | |
| | | if (!isLogin) { |
| | | receiveCouponHint(null); |
| | | } else { |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | getSuningLinkInfo(null); |
| | | } |
| | | break; |
| | | case R.id.fl_buy: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | if (mInfo == null || mInfo.getGoods() == null) |
| | | return; |
| | |
| | | break; |
| | | |
| | | case R.id.tv_big_btn: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | getGoodsMianDanCouponList(); |
| | | break; |
| | |
| | | } |
| | | dialog.show(); |
| | | timer();//5秒超时关闭 弹窗 |
| | | String uid = sp.getString("uid", ""); |
| | | ShoppingApi.getSuningLinkInfo(this, uid, goodsId, "goodsDetailJD", from, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getSuningLinkInfo(this, UserUtil.getUid(ShoppingApplication.application), goodsId, "goodsDetailJD", from, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | private void createShareLink() { |
| | | final ShapeLoadingDialog pb = new ShapeLoadingDialog.Builder(this).build(); |
| | | pb.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.createShareLink(this, uid, mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, null, null, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.createShareLink(this, UserUtil.getUid(ShoppingApplication.application), mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, null, null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |