| | |
| | | private int type; |
| | | private GoodsDetailVO goodsDetail; |
| | | //淘宝是否授权成功 |
| | | private boolean needTaoBaoAuth = false; |
| | | private boolean taoBaoAuthSuccess = false; |
| | | private boolean pddAuthSuccess = false; |
| | | |
| | |
| | | //去登录 |
| | | Intent intent = new Intent(mContext, LoginSelectActivity.class); |
| | | intent.putExtra("from", "淘宝"); |
| | | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| | | mContext.startActivity(intent); |
| | | action = ACTION_LOGIN; |
| | | return; |
| | |
| | | switch (goodsDetail.getGoods().getGoodsType()) { |
| | | case Constant.GOODS_TYPE_TB: |
| | | //判断是否授权成功 |
| | | if (!taoBaoAuthSuccess) { |
| | | if (needTaoBaoAuth && !taoBaoAuthSuccess) { |
| | | getTaoBaoH5AuthInfo(getSource(), goodsDetail.getGoods().getGoodsId(), true, new IAuthResult() { |
| | | @Override |
| | | public void onSuccess() { |
| | |
| | | |
| | | } |
| | | |
| | | public void startClick(int type, IPreEventListener preEventListener) { |
| | | public void startClick(int type, boolean needTaoBaoAuth, IPreEventListener preEventListener) { |
| | | action = 0; |
| | | taoBaoAuthSuccess = false; |
| | | this.needTaoBaoAuth = needTaoBaoAuth; |
| | | this.type = type; |
| | | click(preEventListener); |
| | | } |