| | |
| | | public static void isCollect(Context context, String uid, String videoId, |
| | | String thirdType, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("Uid", uid); |
| | | if (uid != null) |
| | | params.put("Uid", uid); |
| | | params.put("Id", videoId); |
| | | params.put("ThirdType", thirdType); |
| | | params.put("Method", "isCollect"); |
| | |
| | | commonPost(context, BASE_URL + "user", params, handler); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 电话号码登录 |
| | | * |
| | | * @param context |
| | | * @param phone |
| | | * @param code |
| | | * @param handler |
| | | */ |
| | | public static void phoneLogin(Context context, String phone, |
| | | String code, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | |
| | | params.put("phone", phone); |
| | | params.put("code", code); |
| | | params.put("Method", "phoneLogin"); |
| | | commonPost(context, BASE_URL + "user", params, handler); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取验证码 |
| | | * |
| | |
| | | params.put("Method", "sendVerifyCode"); |
| | | commonPost(context, BASE_URL + "user", params, handler); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 发送短信验证码 |
| | | * @param context |
| | | * @param name |
| | | * @param handler |
| | | */ |
| | | public static void sendSMSCode(Context context, String name, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("phone", name); |
| | | params.put("Method", "sendSMSCode"); |
| | | commonPost(context, BASE_URL + "user", params, handler); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Email注册 |
| | |
| | | int version = PackageUtils2.getVersionCode(context); |
| | | long time = System.currentTimeMillis(); |
| | | String deviceType = DeviceInfoUtil.getSystemModel(context); |
| | | // params.put("Package", context.getPackageName()); |
| | | params.put("Package", "com.doudou.ysvideo"); |
| | | params.put("Package", context.getPackageName()); |
| | | // params.put("Package", "com.doudou.ysvideo"); |
| | | params.put("Version", version + ""); |
| | | params.put("Device", DeviceInfoUtil.getUtdid(context)); |
| | | params.put("UtdId", params.get("Device")); |