| | |
| | | |
| | | public static OkHttpClient mOkHttpClientSoon;//okHttpClient 实例 |
| | | |
| | | private final static String API_PACKAGE_NAME="com.youhuiquan.android"; |
| | | private final static String API_PACKAGE_NAME = "com.youhuiquan.android"; |
| | | |
| | | static { |
| | | mOkHttpClient = new OkHttpClient.Builder() |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | |