admin
2020-07-14 41b23417cd62af3cd77b695a2b03446243431fc1
MDShopping/src/main/java/com/yeshi/ec/rebate/myapplication/ui/recommend/GoodsDetailActivityPDD.java
@@ -115,11 +115,11 @@
public class GoodsDetailActivityPDD extends BaseFragmentActivity implements View.OnClickListener {
    private ImageView iv_top_left, iv_back, iv_shop_img,
            iv_notif_portrait, iv_imgtext_status, iv_share, iv_top_right,
             iv_loading, iv_vip;
            iv_loading, iv_vip;
    private TextView tv_top_title1, tv_top_title2, tv_top_title3, tv_top_title4, tv_shop_name,
            tv_shop_des, tv_shop_service, tv_shop_logistics, tv_shop_des_grade,
            tv_shop_logistics_grade, tv_shop_service_grade, tv_notif_name,
            tv_notif_des, tv_shop_see ;
            tv_notif_des, tv_shop_see;
    private FrameLayout fl_back_face, fl_content;
    private LinearLayout ll_goods_detail_transition_top, ll_shop,
            ll_guess_like, ll_labels, ll_address;
@@ -183,7 +183,6 @@
    //推荐语
    private LinearLayout ll_recommend;
    private TextView tv_recommend;
    private void setBottom(GoodsDetail mInfo) {
@@ -371,9 +370,6 @@
        tv_shop_logistics_grade = findViewById(R.id.tv_shop_logistics_grade);
        tv_shop_service_grade = findViewById(R.id.tv_shop_service_grade);
        iv_vip = findViewById(R.id.iv_vip);
        v_cover = findViewById(R.id.v_cover);
@@ -703,18 +699,18 @@
        View view = getLayoutInflater().inflate(R.layout.item_share_from_filter,
                null, false);
        // 创建PopupWindow实例,200,150分别是宽度和高度
        mTopRightPopupWindow = new PopupWindow(view, (int) (SystemCommon.getScreenWidth(this) / 2), ViewGroup.LayoutParams.WRAP_CONTENT, true);
        mTopRightPopupWindow = new PopupWindow(view, (int) (SystemCommon.getScreenWidth(this) / 3), ViewGroup.LayoutParams.WRAP_CONTENT, true);
        // 设置动画效果 [R.style.AnimationFade 是自己事先定义好的]
//        pw_filter.setAnimationStyle(R.style.pop_multiple);
        mTopRightPopupWindow.setTouchable(true);
        mTopRightPopupWindow.setOutsideTouchable(false);
        mTopRightPopupWindow.setFocusable(false);
        ListView lv = view.findViewById(R.id.lv_filter_pw);
        mulList.add(new TopMenuRightPopContent("复制链接", R.drawable.ic_goods_detail_copy_link));
        mulList.add(new TopMenuRightPopContent("帮助中心", R.drawable.ic_goods_detail_help_center));
        mulList.add(new TopMenuRightPopContent("新手攻略", R.drawable.ic_goods_detail_novice));
        mulList.add(new TopMenuRightPopContent("联系客服", R.drawable.ic_goods_detail_contact_kefu));
        mulList.add(new TopMenuRightPopContent("我要吐槽", R.drawable.ic_goods_detail_criticism));
//        mulList.add(new TopMenuRightPopContent("复制链接", R.drawable.ic_goods_detail_copy_link));
//        mulList.add(new TopMenuRightPopContent("帮助中心", R.drawable.ic_goods_detail_help_center));
//        mulList.add(new TopMenuRightPopContent("新手攻略", R.drawable.ic_goods_detail_novice));
        mulList.add(new TopMenuRightPopContent("联系客服",null));
        mulList.add(new TopMenuRightPopContent("我要吐槽", null));
        shareFromAdapter = new TopMenuRightPopContentAdapter(this, mulList);
        lv.setAdapter(shareFromAdapter);
@@ -726,26 +722,9 @@
                GoodsCustomEvent.goodsDetailMoreBtn(GoodsDetailActivityPDD.this, mulList.get(position).getName());
                SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE);
                if (position == 0) {
                    ClipboardUtil.copy(getApplicationContext(), h5Url);
                    Toast.makeText(GoodsDetailActivityPDD.this, "链接复制成功", Toast.LENGTH_LONG).show();
                } else if (position == 1) {
                    Intent intent1 = new Intent(GoodsDetailActivityPDD.this, ShareBrowserActivity.class);
                    intent1.putExtra("title", "帮助中心");
                    intent1.putExtra("url", sp.getString("help", ""));
                    startActivity(intent1);
                } else if (position == 2) {
                    RecordImageTextVideo textVideo = new RecordImageTextVideo(GoodsDetailActivityPDD.this);
                    String url = textVideo.getvideoMoreUrl();
                    if (StringUtils.isEmpty(url)) {
                        url = textVideo.gettxtImgUtl();
                    }
                    Intent intent = new Intent(GoodsDetailActivityPDD.this, ShareBrowserActivity.class);
                    intent.putExtra("url", url);
                    startActivity(intent);
                } else if (position == 3) {
//                    startActivity(new Intent(GoodsDetailActivityTB.this, ContactUsActivity.class));
                    KeFuUtil.jumpKeFu(GoodsDetailActivityPDD.this, "商品详情");
                } else if (position == 4) {
                } else if (position == 1) {
                    startActivity(new Intent(GoodsDetailActivityPDD.this, GoComplainActivity.class));
                }
            }
@@ -891,6 +870,10 @@
                    h5Url = mInfo.getExtra().getH5Url();//产品h5 链接
                    couponUsers = mInfo.getExtra().getListCouponUser();
                    sList = mInfo.getExtra().getListShareUser();
                    if (couponUsers != null)
                        couponUsers.clear();
                    if (sList != null)
                        sList.clear();
                    noRebateHelpLink = mInfo.getExtra().getShare().getHelpLink();
                    if (mInfo.getGoods().getLabels() != null && mInfo.getGoods().getLabels().size() > 0)
@@ -925,6 +908,7 @@
                    tv_rebate_num.setText(" 返" + mInfo.getGoods().getMoneyInfo().getFanliMoney());
                    //设置推荐信息
                    mInfo.getGoods().setDescription("");
                    if (StringUtils.isEmpty(mInfo.getGoods().getDescription())) {
                        ll_recommend.setVisibility(View.GONE);
                    } else {
@@ -953,7 +937,6 @@
                    } else {
                        ll_shop.setVisibility(View.GONE);
                    }
                    if (mInfo.getGoods().isHasCoupon()) {
@@ -1110,7 +1093,7 @@
                    isClick = 0;
                }
            }  else if (isClick == 4) {
            } else if (isClick == 4) {
                if (AlibcLogin.getInstance().isLogin()) {
                    isClick = 0;
                    startActivity(new Intent(GoodsDetailActivityPDD.this, ShoppingTrolleyActivity.class));
@@ -1168,7 +1151,7 @@
            createShareLink();
        } else {
            isClick = 2;
            Toast.makeText(GoodsDetailActivityPDD.this, String.format("请先登录%s账号",getResources().getString(R.string.app_name)), Toast.LENGTH_LONG).show();
            Toast.makeText(GoodsDetailActivityPDD.this, String.format("请先登录%s账号", getResources().getString(R.string.app_name)), Toast.LENGTH_LONG).show();
            UserUtil.jumpLogin(GoodsDetailActivityPDD.this);
        }
    }
@@ -1255,7 +1238,7 @@
                GoodsCustomEvent.goodsDetailBuyCommon(this);
                if (!isLogin) {
                    isClick = 1;
                    Toast.makeText(GoodsDetailActivityPDD.this,String.format("请先登录%s账号",getResources().getString(R.string.app_name)), Toast.LENGTH_LONG).show();
                    Toast.makeText(GoodsDetailActivityPDD.this, String.format("请先登录%s账号", getResources().getString(R.string.app_name)), Toast.LENGTH_LONG).show();
                    UserUtil.jumpLogin(GoodsDetailActivityPDD.this);
                } else {
                    getPDDLinkInfo();
@@ -1272,20 +1255,20 @@
                getGoodsRecommend();
                break;
            //查看宝贝详情
            case R.id.fl_goods_detail:
                if (mInfo == null || mInfo.getGoods() == null)
                    return;
                if (isSpread) {
                    webView.setVisibility(View.GONE);
//                    ll_imgs.removeAllViews();
                    iv_imgtext_status.setImageDrawable(getResources().getDrawable(R.drawable.ic_detail_img_close));
                } else {
                    webView.setVisibility(View.VISIBLE);
                    iv_imgtext_status.setImageDrawable(getResources().getDrawable(R.drawable.ic_detail_img_open));
//                    getImgText();
                }
                isSpread = !isSpread;
                break;
//            case R.id.fl_goods_detail:
//                if (mInfo == null || mInfo.getGoods() == null)
//                    return;
//                if (isSpread) {
//                    webView.setVisibility(View.GONE);
////                    ll_imgs.removeAllViews();
//                    iv_imgtext_status.setImageDrawable(getResources().getDrawable(R.drawable.ic_detail_img_close));
//                } else {
//                    webView.setVisibility(View.VISIBLE);
//                    iv_imgtext_status.setImageDrawable(getResources().getDrawable(R.drawable.ic_detail_img_open));
////                    getImgText();
//                }
//                isSpread = !isSpread;
//                break;
            case R.id.tv_shop_see:
                if (mInfo == null || mInfo.getGoods() == null)
                    return;
@@ -1314,7 +1297,6 @@
                intent.putExtra("content", mInfo.getGoods().getTitle());
                startActivity(intent);
                break;
            case R.id.tv_big_btn:
@@ -1535,7 +1517,6 @@
            }
        });
    }
    class ImageAdapter extends PagerAdapter {