From cbb88109494ffc7916f6639c20ce05c0cec941a9 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 07 四月 2021 15:07:45 +0800
Subject: [PATCH] 3.9.1bug修复

---
 BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoAPI.java |   72 +++++++++++++++++++++++++++++++++---
 1 files changed, 66 insertions(+), 6 deletions(-)

diff --git a/BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoAPI.java b/BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoAPI.java
index 8a0cf5f..2e9e47f 100644
--- a/BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoAPI.java
+++ b/BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoAPI.java
@@ -757,12 +757,15 @@
     }
 
 
-    public static void getHomeAd(Context context, String uid, String vtid,
+    public static void getHomeAd(Context context, String uid, String vtid, String dataKey,
                                  ResponseHandlerInterface handler) {
         LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
         params.put("Method", "getHomeAd");
         params.put("Uid", uid);
         params.put("Vtid", vtid);
+        if (dataKey != null) {
+            params.put("DataKey", dataKey);
+        }
         commonPost(context, BASE_URL + "recommend", params, handler);
     }
 
@@ -831,12 +834,27 @@
     }
 
 
-    public static void getHomeType(Context context, String uid, String vtid,
+    public static void getHomeType(Context context, String uid, String vtid, String dataKey, int page, int pageSize,
                                    ResponseHandlerInterface handler) {
         LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
-        params.put("Method", "getHomeType");
+        params.put("Method", "getHomeTypeNew");
         params.put("Uid", uid);
         params.put("Vtid", vtid);
+        params.put("Page", page + "");
+        params.put("PageSize", pageSize + "");
+        if (dataKey != null) {
+            params.put("DataKey", dataKey);
+        }
+        commonPost(context, BASE_URL + "recommend", params, handler);
+    }
+
+
+    public static void getHomeVideoList(Context context, String id, int page,
+                                        ResponseHandlerInterface handler) {
+        LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
+        params.put("Method", "getHomeVideoList");
+        params.put("Id", id);
+        params.put("Page", page + "");
         commonPost(context, BASE_URL + "recommend", params, handler);
     }
 
@@ -1109,7 +1127,7 @@
     }
 
     public static void getVideoDetail(Context context, String uid,
-                                      String ResourceId, String videoId, Integer position, String loginid, String type,
+                                      String ResourceId, String videoId, Integer position, String loginid, String type, String from,
                                       ResponseHandlerInterface handler) {
         LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
         params.put("Method", "getVideoDetail");
@@ -1119,9 +1137,27 @@
         if (position != null) {
             params.put("Position", position + "");
         }
+
+        if (from != null) {
+            params.put("From", from + "");
+        }
         params.put("ResourceId", ResourceId);
         params.put("Type", type);
         commonPost(context, BASE_URL + "recommend", params, handler);
+
+    }
+
+
+    public static void uploadSession(Context context, String sessionId,
+                                     String type,
+                                     ResponseHandlerInterface handler) {
+        LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
+        params.put("Method", "uploadSession");
+        if (sessionId != null)
+            params.put("sessionId", sessionId);
+        if (type != null)
+            params.put("type", type);
+        commonPost(context, BASE_URL + "session", params, handler);
 
     }
 
@@ -1137,12 +1173,13 @@
      * @param handler
      */
     public static void getVideoEpisodeList(Context context, String uid,
-                                           String ResourceId, String videoId, int page,
+                                           String ResourceId, String videoId, int page,int pageSize,
                                            ResponseHandlerInterface handler) {
         LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
         params.put("Method", "getVideoEpisodeList");
         params.put("Uid", uid);
         params.put("Page", page + "");
+        params.put("PageSize", pageSize + "");
         params.put("VideoId", videoId);
         params.put("ResourceId", ResourceId);
         commonPost(context, BASE_URL + "recommend", params, handler);
@@ -1313,6 +1350,29 @@
     }
 
 
+    /**
+     * 浠樿垂瑙嗛鐨勮喘涔版椿鍔�
+     *
+     * @param context
+     * @param cid
+     * @param vid
+     * @param handler
+     */
+    public static void getPPTVVIPVideoActivity(Context context, String url, String cid, String vid,
+                                               ResponseHandlerInterface handler) {
+        String loginUid = UserUtil.getLoginUid(context);
+        LinkedHashMap<String, String> params = new LinkedHashMap<>();
+        if (loginUid != null)
+            params.put("loginUid", loginUid);
+        if (url != null) {
+            params.put("url", url);
+        }
+        params.put("cid", cid);
+        params.put("vid", vid);
+        commonPost(context, BASE_URL + "video/play/getPPTVVIPVideoActivity", params, handler);
+    }
+
+
     public static LinkedHashMap<String, String> validateParams(
             LinkedHashMap<String, String> params, Context context) {
         params.put("System", "1");
@@ -1365,7 +1425,7 @@
         for (Iterator<String> its = params.keySet().iterator(); its.hasNext(); ) {
             String key = its.next();
             if (params.get(key) != null) {
-                newParams.put(key,params.get(key));
+                newParams.put(key, params.get(key));
             }
         }
 

--
Gitblit v1.8.0