admin
2021-05-14 1b4b3fed2569ac21ad6feb0a3a2c051175e7c36e
app/src/main/java/com/tejia/lijin/app/ui/recommend/ShareExplosionsGoodsDetailActivity.java
@@ -64,6 +64,7 @@
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;
@@ -833,8 +834,7 @@
    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")) {
@@ -1214,7 +1214,7 @@
    /**
     * 获取PID 信息
     */
    private void getTBLinkInfo(String uid) {
    private void getTBLinkInfo(Long uid) {
        if (shapeLoadingDialog == null) {
            shapeLoadingDialog = new ShapeLoadingDialog.Builder(this).build();
@@ -1685,8 +1685,7 @@
    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")) {
@@ -1711,8 +1710,7 @@
     * 添加到收藏
     */
    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")) {
@@ -1744,8 +1742,7 @@
     * 添加到分享库
     */
    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")) {
@@ -1855,9 +1852,7 @@
    }
    private void bindInfo2() {
        SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE);
        String uid = sp.getString("uid", "");
        getTBLinkInfo(uid);
        getTBLinkInfo(UserUtil.getUid(ShoppingApplication.application));
        isTBStartBind = false;
    }
@@ -1871,8 +1866,7 @@
    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) {
@@ -1910,7 +1904,7 @@
                        }).create().show();
//                        getTaobaoShareLink();
                    } else if (source.equalsIgnoreCase("zigou")) {
                        getTBLinkInfo(getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""));
                        getTBLinkInfo(UserUtil.getUid(ShoppingApplication.application));
                    }
                }
            }
@@ -1932,8 +1926,7 @@
    }
    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"));
@@ -1943,7 +1936,7 @@
                    } 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();
                        }
@@ -2150,9 +2143,7 @@
    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")) {
@@ -2254,8 +2245,7 @@
     * @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) {