| | |
| | | * @param requestInfo |
| | | * @param resultListener |
| | | */ |
| | | public static void buy(Activity activity, Context context, GoodsBuyRequestInfo requestInfo, IBuyGoodsResultListener resultListener) { |
| | | public static void fanli(Activity activity, Context context, GoodsBuyRequestInfo requestInfo, IBuyGoodsResultListener resultListener) { |
| | | |
| | | switch (requestInfo.getGoodsType()) { |
| | | case Constant.GOODS_TYPE_TB: |
| | |
| | | /** |
| | | * 打开指定链接 |
| | | */ |
| | | private static void jumpTB(Activity activity, TbPidInfo tInfo, String clickUrl, String couponUrl, final IBuyGoodsResultListener buyGoodsResultListener) { |
| | | public static void jumpTB(Activity activity, TbPidInfo tInfo, String clickUrl, String couponUrl, final IBuyGoodsResultListener buyGoodsResultListener) { |
| | | AlibcShowParams alibcShowParams = new AlibcShowParams(); |
| | | alibcShowParams.setOpenType(OpenType.Auto); |
| | | alibcShowParams.setBackUrl("alisdk://"); |
| | |
| | | |
| | | |
| | | private static void buyTB(final Activity activity, final Context context, GoodsBuyRequestInfo requestInfo, final IBuyGoodsResultListener buyGoodsResultListener) { |
| | | ShoppingApi.getTBLinkInfo(context,requestInfo.getUid(), requestInfo.getGoodsId(), requestInfo.getFrom(), "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getTBLinkInfo(context, requestInfo.getUid(), requestInfo.getGoodsId(), requestInfo.getFrom(), "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | /** |
| | | * 商品购买请求参数 |
| | | */ |
| | | static class GoodsBuyRequestInfo { |
| | | public static class GoodsBuyRequestInfo { |
| | | private int goodsType; |
| | | private String goodsId; |
| | | private String couponLink; |