| | |
| | | import com.google.gson.Gson; |
| | | import com.loopj.android.http.AsyncHttpClient; |
| | | import com.loopj.android.http.SyncHttpClient; |
| | | import com.tejia.lijin.app.entity.goods.ShareCommonGoods; |
| | | import com.tejia.lijin.app.entity.user.TeamScreenInfo; |
| | | import com.tejia.lijin.app.util.DeviceInfoUtil; |
| | | import com.tejia.lijin.app.util.ToolUtil; |
| | | import com.tejia.lijin.app.util.clipboard.ClipboardUtil; |
| | | import com.tejia.lijin.app.util.user.LoginAndInviteStatusUtil; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.DeviceUuidFactory; |
| | | import com.wpc.library.util.GetManifestDataUtil; |
| | | import com.wpc.library.util.MacUtil; |
| | |
| | | import com.wpc.library.util.common.PackageUtils2; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.wpc.library.util.security.MD5Utils; |
| | | import com.tejia.lijin.app.entity.goods.ShareCommonGoods; |
| | | import com.tejia.lijin.app.entity.user.TeamScreenInfo; |
| | | import com.tejia.lijin.app.util.ToolUtil; |
| | | import com.tejia.lijin.app.util.clipboard.ClipboardUtil; |
| | | import com.tejia.lijin.app.util.user.LoginAndInviteStatusUtil; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.yeshi.push.entity.PushRomType; |
| | | |
| | | import org.apache.http.Header; |
| | | import org.json.JSONArray; |
| | |
| | | public static OkHttpClient mOkHttpClient;//okHttpClient 实例 |
| | | |
| | | public static OkHttpClient mOkHttpClientSoon;//okHttpClient 实例 |
| | | |
| | | public 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); |
| | | } |
| | | |
| | |
| | | commonPost(context, BASE_URL2 + "brand/getShopInfoV2", params, handler); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 用户协议按钮监听 |
| | | * |
| | | * @param context |
| | | * @param uid |
| | | * @param type 0-不同意 1-同意 2-同意-窗口关闭 |
| | | * @param handler |
| | | */ |
| | | public static void userProtocolListener(Context context, Long uid, int type, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("type", type + ""); |
| | | if (uid != null) { |
| | | params.put("uid", uid + ""); |
| | | } |
| | | commonPost(context, BASE_URL2 + "config/userProtocolListen", params, handler); |
| | | } |
| | | |
| | | /** |
| | | * 获取店铺 足迹 /足迹列表 |
| | |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (uid != null) |
| | | params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "recommend/getRecommendIndex", params, handler); |
| | | commonPostWithFailture(context, BASE_URL2 + "recommend/getRecommendIndexTJ", 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); |
| | | } |
| | | |
| | |
| | | public static void sendCircle(Context context, Long uid, String id, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid + ""); |
| | | if (uid != null) |
| | | params.put("uid", uid + ""); |
| | | params.put("id", id + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "user/cloud/sendCircle", params, handler); |
| | | } |
| | |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, uid, true)) |
| | | return; |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid + ""); |
| | | if (uid != null) |
| | | params.put("uid", uid + ""); |
| | | params.put("type", type + ""); |
| | | params.put("id", id); |
| | | if (goodsId != null) |
| | |
| | | */ |
| | | public static void evaluateCopyComment(Context context, Long uid, String id, String cid, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid + ""); |
| | | if (uid != null) |
| | | params.put("uid", uid + ""); |
| | | params.put("cid", cid); |
| | | params.put("id", id); |
| | | commonPostWithFailture(context, BASE_URL2 + "dynamic/evaluateComment", params, handler); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 复制推荐语 |
| | | * |
| | | * @param context |
| | | * @param uid |
| | | * @param id |
| | | * @param handler |
| | | */ |
| | | public static void evaluateCopyRecommend(Context context, Long uid, String id, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (uid != null) |
| | | params.put("uid", uid + ""); |
| | | params.put("id", id); |
| | | commonPostWithFailture(context, BASE_URL2 + "dynamic/evaluateCopyRecommend", params, handler); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 转链 |
| | | * |
| | | * @param context |
| | | * @param uid |
| | | * @param link |
| | | * @param handler |
| | | */ |
| | | public static void evaluateConvertLink(Context context, Long uid, String link, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (uid != null) |
| | | params.put("uid", uid + ""); |
| | | params.put("link", link); |
| | | commonPostWithFailture(context, BASE_URL2 + "dynamic/convertLink", 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); |
| | | params.put("type", type + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "lostOrder/findLostOrder", params, handler); |
| | | } |
| | | |
| | | /** |
| | |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("text", text); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPost(context, BASE_URL2 + "search/getRecommendInfo", params, handler); |
| | | commonPost(context, BASE_URL2 + "search/getRecommendInfoTJ", 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); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (notifyType != null) |
| | | params.put("notifyType", notifyType); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPost(context, BASE_URL2 + "search/searchGoods", params, handler); |
| | | commonPost(context, BASE_URL2 + "search/searchGoodsTJ", params, handler); |
| | | } |
| | | |
| | | /** |
| | |
| | | commonPostWithFailture(context, BASE_URL + "user/bindWeiXin", params, handler); |
| | | } |
| | | |
| | | |
| | | public static void bindQQ(Context context, Long uid, String qqUser, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("qqUser", qqUser); |
| | | commonPostWithFailture(context, BASE_URL + "user/bindQQ", params, handler); |
| | | } |
| | | |
| | | /** |
| | | * app更新 |
| | | * |
| | |
| | | commonPost1(context, BASE_URL + "customer/saveInfo", params, paramsFiles, handler); |
| | | } |
| | | |
| | | /** |
| | | * 绑定OPPO推送 |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void bindOPPOPush(Context context, Long uid, String registerId, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("registerId", registerId); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "push/registerOppo", params, handler); |
| | | } |
| | | |
| | | /** |
| | | * 绑定VIVO推送 |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void bindVIVOPush(Context context, Long uid, String registerId, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("regId", registerId); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "push/registerVivo", params, handler); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 绑定XM推送 |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void bindXMPush(Context context, Long uid, String regId, BasicTextHttpResponseHandler handler) { |
| | | public static void bindPushToken(Context context, Long uid, PushRomType pushRomType, String token, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("regId", regId); |
| | | params.put("type", pushRomType.name()); |
| | | params.put("token", token); |
| | | if (uid != null) |
| | | params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "push/registerXM", params, handler); |
| | | commonPostWithFailture(context, BASE_URL + "push/bindToken", 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); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param context vcode短信验证码 phone电话号码 code微信登录的code |
| | | * @param handler loginType 1电话 2微信 |
| | | */ |
| | | public static void loginNew(Context context, String vcode, String phone, String code, String loginType, BasicTextHttpResponseHandler handler) { |
| | | public static void loginNew(Context context, String vcode, String phone, String code, String loginType, String accessToken, String qqUser, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("vcode", vcode); |
| | | params.put("phone", phone); |
| | | params.put("code", code); |
| | | if (vcode != null) |
| | | params.put("vcode", vcode); |
| | | if (phone != null) |
| | | params.put("phone", phone); |
| | | if (code != null) |
| | | params.put("code", code); |
| | | params.put("loginType", loginType); |
| | | if (accessToken != null) { |
| | | params.put("aliAccessToken", accessToken); |
| | | } |
| | | |
| | | if (qqUser != null) { |
| | | params.put("qqUser", qqUser); |
| | | } |
| | | |
| | | commonPostWithFailture(context, BASE_URL2 + "user/login", params, handler); |
| | | } |
| | | |
| | |
| | | * @param context vcode短信验证码 phone电话号码 code微信登录的code |
| | | * @param handler loginType 1电话 2微信 |
| | | */ |
| | | public static void bindPhoneNew(Context context, String vcode, String phone, Long uid, BasicTextHttpResponseHandler handler) { |
| | | public static void bindPhoneNew(Context context, String vcode, String phone, String accessToken, Long uid, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("vcode", vcode); |
| | | params.put("phone", phone); |
| | | if (vcode != null) |
| | | params.put("vcode", vcode); |
| | | if (phone != null) |
| | | params.put("phone", phone); |
| | | if (accessToken != null) |
| | | params.put("aliAccessToken", accessToken); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "user/bindPhoneNew", params, handler); |
| | | } |
| | | |
| | | |
| | | public static void bindPhoneWithOutLogin(Context context, String vcode, String phone, String key, BasicTextHttpResponseHandler handler) { |
| | | public static void bindPhoneWithOutLogin(Context context, String vcode, String phone, String accessToken, String key, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("vcode", vcode); |
| | | params.put("phone", phone); |
| | | if (vcode != null) |
| | | params.put("vcode", vcode); |
| | | if (phone != null) |
| | | params.put("phone", phone); |
| | | params.put("key", key); |
| | | if (accessToken != null) |
| | | params.put("aliAccessToken", accessToken); |
| | | commonPostWithFailture(context, BASE_URL2 + "user/bindPhoneLogin", params, handler); |
| | | } |
| | | |
| | |
| | | commonPostWithFailture(context, BASE_URL + "customer/getextractprocess", params, handler); |
| | | } |
| | | |
| | | /** |
| | | * 绑定华为推送 |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void bindHMPush(Context context, String token, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("token", token); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "push/bindHWPush", params, handler); |
| | | } |
| | | |
| | | /** |
| | | * 获取网页配置信息 |
| | |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("auctionId", goodsId); |
| | | params.put("from", from); |
| | | if (from != null) |
| | | params.put("from", from); |
| | | if (!StringUtils.isEmpty(source)) |
| | | params.put("source", source); |
| | | commonPostWithFailture(context, BASE_URL + "goods/gettaobaolink", 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); |
| | | } |
| | | |
| | |
| | | if (from != null) |
| | | params.put("from", from); |
| | | commonPostWithFailture(context, BuXinConstant.HOST + "/fanli/api/lijin/goods/buyWithLijin", params, handler); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取用户礼金的创建信息 |
| | | * |
| | | * @param context |
| | | * @param goodsId |
| | | * @param goodsType |
| | | * @param uid |
| | | * @param handler |
| | | */ |
| | | public static void getUserLijinCreatedInfo(Context context, String goodsId, Integer goodsType, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (goodsId != null) |
| | | params.put("goodsId", goodsId); |
| | | if (goodsType != null) |
| | | params.put("goodsType", goodsType + ""); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BuXinConstant.HOST + "/fanli/api/lijin/user/getUserLijinCreatedInfo", params, handler); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取礼金的用户等级 |
| | | * |
| | | * @param context |
| | | * @param uid |
| | | * @param handler |
| | | */ |
| | | public static void getLijinUserLevel(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BuXinConstant.HOST + "/fanli/api/lijin/user/getUserLevel", params, handler); |
| | | } |
| | | |
| | | |
| | |
| | | commonPostWithFailture(context, BASE_URL2 + "goods/listSimpleGoods", params, handler); |
| | | } |
| | | |
| | | |
| | | public static void getSendingHongBao(Context context, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | Long uid = UserUtil.getUid(context); |
| | | if (uid != null) |
| | | params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "lijin/hongbao/getSendingHongBao", params, handler); |
| | | } |
| | | |
| | | public static void getHongBaoBalance(Context context, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | Long uid = UserUtil.getUid(context); |
| | | if (uid != null) |
| | | params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "lijin/hongbao/getHongBaoBalance", params, handler); |
| | | } |
| | | |
| | | public static void recieveHongBao(Context context, String id, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | Long uid = UserUtil.getUid(context); |
| | | if (uid != null) |
| | | params.put("uid", uid + ""); |
| | | params.put("id", id); |
| | | commonPostWithFailture(context, BASE_URL2 + "lijin/hongbao/recieveHongBao", params, handler); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 团队资金统计 |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | private static String getDeviceId(Context context) { |
| | | SharedPreferences deviceInfo = context.getSharedPreferences("deviceInfo", MODE_PRIVATE); |
| | | String deviceId = deviceInfo.getString("device", ""); |
| | | if (StringUtils.isEmpty(deviceId)) { |
| | | deviceId = new DeviceUuidFactory(context).getDeviceUuid() + ""; |
| | | if (!StringUtils.isEmpty(deviceId)) { |
| | | SharedPreferences.Editor editor = deviceInfo.edit(); |
| | | editor.putString("device", deviceId); |
| | | editor.commit(); |
| | | } |
| | | } |
| | | return deviceId; |
| | | } |
| | | |
| | | private static String getUtdid(Context context) { |
| | | SharedPreferences deviceInfo = context.getSharedPreferences("deviceInfo", MODE_PRIVATE); |
| | | String utdid = deviceInfo.getString("utdid", ""); |
| | | if (StringUtils.isEmpty(utdid)) { |
| | | utdid = com.ta.utdid2.device.UTDevice.getUtdid(context); |
| | | if (!StringUtils.isEmpty(utdid)) { |
| | | SharedPreferences.Editor editor = deviceInfo.edit(); |
| | | editor.putString("utdid", utdid); |
| | | editor.commit(); |
| | | } |
| | | } |
| | | if (StringUtils.isEmpty(utdid)) |
| | | return ""; |
| | | else |
| | | return utdid; |
| | | } |
| | | |
| | | public static LinkedHashMap<String, String> validateParams( |
| | | LinkedHashMap<String, String> params, Context context) { |
| | |
| | | |
| | | int version = PackageUtils2.getVersionCode(context); |
| | | long time = System.currentTimeMillis(); |
| | | String deviceType = MobileUtil.getSystemModel(); |
| | | params.put("packages", "com.youhuiquan.android"); |
| | | String deviceType = DeviceInfoUtil.getSystemModel(context); |
| | | params.put("packages", API_PACKAGE_NAME); |
| | | params.put("Version", version + ""); |
| | | params.put("appkey", BuXinConstant.TAO_BAO_KE_KEY); |
| | | params.put("platform", "android"); |
| | | params.put("apiversion", "1"); |
| | | |
| | | params.put("channel", GetManifestDataUtil.getAppMetaData(context, "UMENG_CHANNEL")); |
| | | String imei = MobileUtil.getIMEI(context); |
| | | String imei = DeviceInfoUtil.getIMEI(context); |
| | | if (!StringUtils.isEmpty(imei)) |
| | | params.put("imei", imei); |
| | | params.put("osVersion", MobileUtil.getSystemVersion()); |
| | | params.put("osVersion", DeviceInfoUtil.getSystemVersion(context)); |
| | | params.put("network", NetUtils.getNetworkState(context)); |
| | | |
| | | params.put("deviceType", StringUtils.isEmpty(deviceType) ? "" : deviceType); |
| | | params.put("time", time + ""); |
| | | params.put("Device", getDeviceId(context)); |
| | | params.put("utdid", getUtdid(context)); |
| | | params.put("Device", DeviceInfoUtil.getDeviceId(context)); |
| | | params.put("utdid", DeviceInfoUtil.getUtdid(context)); |
| | | |
| | | Iterator<String> its = params.keySet().iterator(); |
| | | List<String> list = new ArrayList<>(); |
| | |
| | | // } |
| | | int version = PackageUtils2.getVersionCode(context); |
| | | long time = System.currentTimeMillis(); |
| | | String deviceType = MobileUtil.getSystemModel(); |
| | | params.put("packages", "com.youhuiquan.android"); |
| | | String deviceType = DeviceInfoUtil.getSystemModel(context); |
| | | params.put("packages", API_PACKAGE_NAME); |
| | | params.put("Version", version + ""); |
| | | params.put("appkey", BuXinConstant.TAO_BAO_KE_KEY); |
| | | params.put("platform", "android"); |
| | | params.put("apiversion", "1"); |
| | | params.put("channel", GetManifestDataUtil.getAppMetaData(context, "UMENG_CHANNEL")); |
| | | String imei = MobileUtil.getIMEI(context); |
| | | String imei = DeviceInfoUtil.getIMEI(context); |
| | | if (!StringUtils.isEmpty(imei)) { |
| | | params.put("imei", imei); |
| | | } |
| | | params.put("osVersion", MobileUtil.getSystemVersion()); |
| | | params.put("osVersion", DeviceInfoUtil.getSystemVersion(context)); |
| | | params.put("network", NetUtils.getNetworkState(context)); |
| | | params.put("deviceType", StringUtils.isEmpty(deviceType) ? "" : deviceType); |
| | | params.put("time", time + ""); |
| | | params.put("Device", getDeviceId(context)); |
| | | params.put("utdid", getUtdid(context)); |
| | | params.put("Device", DeviceInfoUtil.getDeviceId(context)); |
| | | params.put("utdid", DeviceInfoUtil.getUtdid(context)); |
| | | |
| | | |
| | | Iterator<String> its = params.keySet().iterator(); |
| | |
| | | // } |
| | | int version = PackageUtils2.getVersionCode(context); |
| | | long time = System.currentTimeMillis(); |
| | | String deviceType = MobileUtil.getSystemModel(); |
| | | params.put("packages", "com.youhuiquan.android"); |
| | | String deviceType = DeviceInfoUtil.getSystemModel(context); |
| | | params.put("packages", API_PACKAGE_NAME); |
| | | params.put("Version", version + ""); |
| | | params.put("appkey", BuXinConstant.TAO_BAO_KE_KEY); |
| | | params.put("platform", "android"); |
| | | params.put("apiversion", "1"); |
| | | params.put("channel", GetManifestDataUtil.getAppMetaData(context, "UMENG_CHANNEL")); |
| | | String imei = MobileUtil.getIMEI(context); |
| | | String imei = DeviceInfoUtil.getIMEI(context); |
| | | if (!StringUtils.isEmpty(imei)) |
| | | params.put("imei", imei); |
| | | params.put("osVersion", MobileUtil.getSystemVersion()); |
| | | params.put("osVersion", DeviceInfoUtil.getSystemVersion(context)); |
| | | params.put("network", NetUtils.getNetworkState(context)); |
| | | params.put("deviceType", StringUtils.isEmpty(deviceType) ? "" : deviceType); |
| | | params.put("time", time + ""); |
| | | params.put("Device", getDeviceId(context)); |
| | | params.put("utdid", getUtdid(context)); |
| | | params.put("Device", DeviceInfoUtil.getDeviceId(context)); |
| | | params.put("utdid", DeviceInfoUtil.getUtdid(context)); |
| | | |
| | | Iterator<String> its = params.keySet().iterator(); |
| | | List<String> list = new ArrayList<>(); |