| | |
| | | import com.weikou.beibeivideo.util.BeibeiConstant; |
| | | import com.weikou.beibeivideo.util.UserUtil; |
| | | |
| | | import org.apache.http.Header; |
| | | import org.json.JSONArray; |
| | | import org.json.JSONObject; |
| | | |
| | | import okhttp3.Call; |
| | | import okhttp3.Callback; |
| | |
| | | } |
| | | |
| | | |
| | | /*************事件上报**************/ |
| | | |
| | | public static void readNews(Context context, ResponseHandlerInterface handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | if (UserUtil.getUid(context) != null) |
| | | params.put("Uid", UserUtil.getUid(context)); |
| | | String loginUid = UserUtil.getLoginUid(context); |
| | | if (loginUid != null) { |
| | | params.put("LoginUid", loginUid); |
| | | } |
| | | commonPost(context, BASE_URL + "event/readNews", params, handler); |
| | | } |
| | | |
| | | |
| | | public static void playDrawVideo(Context context,String source, String from, boolean finish, ResponseHandlerInterface handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | if (UserUtil.getUid(context) != null) |
| | | params.put("Uid", UserUtil.getUid(context)); |
| | | String loginUid = UserUtil.getLoginUid(context); |
| | | if (loginUid != null) { |
| | | params.put("LoginUid", loginUid); |
| | | } |
| | | params.put("From", from); |
| | | params.put("Source", source); |
| | | params.put("Finish", finish + ""); |
| | | commonPost(context, BASE_URL+ "event/playDrawVideo", params, handler); |
| | | } |
| | | |
| | | public static void readNovel(Context context, long duration,ResponseHandlerInterface handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | if (UserUtil.getUid(context) != null) |
| | | params.put("Uid", UserUtil.getUid(context)); |
| | | String loginUid = UserUtil.getLoginUid(context); |
| | | if (loginUid != null) { |
| | | params.put("LoginUid", loginUid); |
| | | } |
| | | params.put("Duration", duration + ""); |
| | | commonPost(context, BASE_URL + "event/readNovel", params, handler); |
| | | } |
| | | |
| | | |
| | | public static LinkedHashMap<String, String> validateParams( |
| | | LinkedHashMap<String, String> params, Context context) { |
| | | params.put("System", "1"); |