| | |
| | | import com.nostra13.universalimageloader.core.ImageLoader; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.wang.avi.AVLoadingIndicatorView; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | |
| | | |
| | | private void getGoodsDetail() { |
| | | isQuestDetail = true; |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.getGoodsInfoTB(this, goodsId, uid, from, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getGoodsInfoTB(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")) { |
| | |
| | | /** |
| | | * 获取PID 信息 |
| | | */ |
| | | private void getTBLinkInfo(String uid) { |
| | | private void getTBLinkInfo(Long uid) { |
| | | |
| | | if (shapeLoadingDialog == null) { |
| | | shapeLoadingDialog = new ShapeLoadingDialog.Builder(this).build(); |
| | |
| | | private void getTaobaoShareLink(String num) { |
| | | 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, num, null, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.createShareLink(this, UserUtil.getUid(ShoppingApplication.application), mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, num, null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | * 添加到收藏 |
| | | */ |
| | | private void collection() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.collectionGoods(ShareExplosionsGoodsDetailActivity.this, goodsId, uid, isCollect ? "2" : "1", mInfo.getGoods().getGoodsType() + "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.collectionGoods(ShareExplosionsGoodsDetailActivity.this, goodsId, UserUtil.getUid(ShoppingApplication.application), isCollect ? "2" : "1", mInfo.getGoods().getGoodsType() + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | * 添加到分享库 |
| | | */ |
| | | private void addSelectionStorehouse() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.addSelectionStoreHouse(ShareExplosionsGoodsDetailActivity.this, goodsId, uid, mInfo.getGoods().getGoodsType() + "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.addSelectionStoreHouse(ShareExplosionsGoodsDetailActivity.this, goodsId, UserUtil.getUid(ShoppingApplication.application), mInfo.getGoods().getGoodsType() + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | } |
| | | |
| | | private void bindInfo2() { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | getTBLinkInfo(uid); |
| | | getTBLinkInfo(UserUtil.getUid(ShoppingApplication.application)); |
| | | isTBStartBind = false; |
| | | } |
| | | |
| | |
| | | String orderUrl; |
| | | |
| | | private void getTaoBaoH5AuthInfo(final String source) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", null); |
| | | ShoppingApi.getTaoBaoAuthInfo(ShareExplosionsGoodsDetailActivity.this, uid, goodsId, source, true, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getTaoBaoAuthInfo(ShareExplosionsGoodsDetailActivity.this, UserUtil.getUid(ShoppingApplication.application), goodsId, source, true, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | }).create().show(); |
| | | // getTaobaoShareLink(); |
| | | } else if (source.equalsIgnoreCase("zigou")) { |
| | | getTBLinkInfo(getSharedPreferences("user", MODE_PRIVATE).getString("uid", "")); |
| | | getTBLinkInfo(UserUtil.getUid(ShoppingApplication.application)); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | private void getTaoBaoH5AuthInfo2(final String source) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", null); |
| | | ShoppingApi.getTaoBaoAuthInfo(ShareExplosionsGoodsDetailActivity.this, uid, goodsId, source, false, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getTaoBaoAuthInfo(ShareExplosionsGoodsDetailActivity.this, UserUtil.getUid(ShoppingApplication.application), goodsId, source, false, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, final JSONObject jsonObject) throws Exception { |
| | | // Log.e("mResult", "getTaoBaoH5AuthInfo2:code:" + jsonObject.optInt("code")); |
| | |
| | | } else if (source.equalsIgnoreCase("zigou")) { |
| | | // Log.e("mResult", "getTaoBaoH5AuthInfo2():isLogin---" + AlibcLogin.getInstance().isLogin()); |
| | | if (AlibcLogin.getInstance().isLogin()) { |
| | | getTBLinkInfo(getSharedPreferences("user", MODE_PRIVATE).getString("uid", "")); |
| | | getTBLinkInfo(UserUtil.getUid(ShoppingApplication.application)); |
| | | } else { |
| | | tbBuyLogin(); |
| | | } |
| | |
| | | private void getGoodsCouponList() { |
| | | final ShapeLoadingDialog pd = new ShapeLoadingDialog.Builder(this).build(); |
| | | pd.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE) |
| | | .getString("uid", ""); |
| | | ShoppingApi.getGoodsCouponList(this, uid, Constant.GOODS_TYPE_TB, goodsId, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getGoodsCouponList(this, UserUtil.getUid(ShoppingApplication.application), Constant.GOODS_TYPE_TB, 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(ShareExplosionsGoodsDetailActivity.this, uid, info.getId(), goodsId, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.useFreeSingleTicket(ShareExplosionsGoodsDetailActivity.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) { |