From ddff7888bf7e754d12fb5fc85a58f3012f456490 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 05 六月 2021 17:26:03 +0800 Subject: [PATCH] 特价完善 --- app/src/main/java/com/tejia/lijin/app/ShoppingApi.java | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 40 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/tejia/lijin/app/ShoppingApi.java b/app/src/main/java/com/tejia/lijin/app/ShoppingApi.java index e514fde..9e5dac9 100644 --- a/app/src/main/java/com/tejia/lijin/app/ShoppingApi.java +++ b/app/src/main/java/com/tejia/lijin/app/ShoppingApi.java @@ -65,6 +65,8 @@ public static OkHttpClient mOkHttpClientSoon;//okHttpClient 瀹炰緥 + private final static String API_PACKAGE_NAME = "com.youhuiquan.android"; + static { mOkHttpClient = new OkHttpClient.Builder() .connectTimeout(10 * 1000, TimeUnit.MILLISECONDS) @@ -119,6 +121,10 @@ params.put("page", page); if (subId != null) params.put("subId", subId); + if (UserUtil.getUid(context) != null) { + params.put("uid", UserUtil.getUid(context) + ""); + } + commonPostWithFailture(context, BASE_URL2 + "hotsell/getList", params, handler); } @@ -257,6 +263,10 @@ if (!StringUtils.isEmpty(page)) params.put("page", page); params.put("goodsType", goodsType); + if (UserUtil.getUid(context) != null) { + params.put("uid", UserUtil.getUid(context) + ""); + } + commonPostWithFailture(context, BASE_URL2 + "recommend/getGoodList", params, handler); } @@ -545,6 +555,9 @@ params.put("startprice", startprice); params.put("endprice", endprice); params.put("totalSales", totalSales); + if (UserUtil.getUid(context) != null) { + params.put("uid", UserUtil.getUid(context) + ""); + } commonPostWithFailture(context, BASE_URL2 + "class/getSubGoods", params, handler); } @@ -558,6 +571,9 @@ LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); params.put("gcid", key); params.put("page", page); + if (UserUtil.getUid(context) != null) { + params.put("uid", UserUtil.getUid(context) + ""); + } commonPostWithFailture(context, BASE_URL2 + "class/getClassGoods", params, handler); } @@ -666,6 +682,11 @@ if (type != null && !type.equals("") && !type.equals("null") && !type.equals("0")) { params.put("type", type); } + + if (UserUtil.getUid(context) != null) { + params.put("uid", UserUtil.getUid(context) + ""); + } + commonPostWithFailture(context, BASE_URL2 + "commoncontent/getNavGoodsList", params, handler); } @@ -681,8 +702,7 @@ LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); params.put("orderId", orderId); params.put("userInfo.id", uid + ""); - params.put("type", type); - commonPostWithFailture(context, BASE_URL + "lostOrder/findLostOrder", params, handler); + commonPostWithFailture(context, BASE_URL2 + "lostOrder/findLostOrder", params, handler); } /** @@ -826,7 +846,7 @@ params.put("page", page); if (type != null) params.put("type", type); - commonPost(context, BASE_URL + "user/msg/getMsgList", params, handler); + commonPost(context, BASE_URL2 + "user/msg/getMsgList", params, handler); } /** @@ -1338,6 +1358,12 @@ params.put("slideVerify", slideVerify); params.put("phone", phone); commonPostWithFailture(context, BASE_URL + "sms/sendMSMLogin", params, handler); + } + + + public static void allowOneKeyLogin(Context context, BasicTextHttpResponseHandler handler) { + LinkedHashMap<String, String> params = new LinkedHashMap<>(); + commonPostWithFailture(context, BASE_URL + "sms/allowOneKeyLogin", params, handler); } /** @@ -2421,6 +2447,10 @@ LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); params.put("page", page + ""); params.put("cid", cid); + if (UserUtil.getUid(context) != null) { + params.put("uid", UserUtil.getUid(context) + ""); + } + commonPostWithFailture(context, BASE_URL2 + "dynamic/getList", params, handler); } @@ -2969,6 +2999,10 @@ params.put("page", page); if (uid != null) params.put("uid", uid + ""); params.put("goodsType", goodsType); + if (UserUtil.getUid(context) != null) { + params.put("uid", UserUtil.getUid(context) + ""); + } + commonPostWithFailture(context, BASE_URL2 + "shraeStorage/getlist", params, handler); } @@ -3595,7 +3629,7 @@ int version = PackageUtils2.getVersionCode(context); long time = System.currentTimeMillis(); String deviceType = MobileUtil.getSystemModel(); - params.put("packages", "com.youhuiquan.android"); + params.put("packages", API_PACKAGE_NAME); params.put("Version", version + ""); params.put("appkey", BuXinConstant.TAO_BAO_KE_KEY); params.put("platform", "android"); @@ -3645,7 +3679,7 @@ int version = PackageUtils2.getVersionCode(context); long time = System.currentTimeMillis(); String deviceType = MobileUtil.getSystemModel(); - params.put("packages", "com.youhuiquan.android"); + params.put("packages", API_PACKAGE_NAME); params.put("Version", version + ""); params.put("appkey", BuXinConstant.TAO_BAO_KE_KEY); params.put("platform", "android"); @@ -3704,7 +3738,7 @@ int version = PackageUtils2.getVersionCode(context); long time = System.currentTimeMillis(); String deviceType = MobileUtil.getSystemModel(); - params.put("packages", "com.youhuiquan.android"); + params.put("packages", API_PACKAGE_NAME); params.put("Version", version + ""); params.put("appkey", BuXinConstant.TAO_BAO_KE_KEY); params.put("platform", "android"); -- Gitblit v1.8.0