Procházet zdrojové kódy

web view add invitation_code param

hanjing před 7 roky
rodič
revize
2d7583b9aa

+ 4 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/WebParams.java

@@ -19,6 +19,7 @@ public class WebParams implements Serializable {
     private boolean forResult = false;
     private boolean forResult = false;
     private int action;
     private int action;
     private String tokenKey = "authorization";
     private String tokenKey = "authorization";
+    private String invitationCodeKey = "invitation_code";
 
 
     public WebParams(String url) {
     public WebParams(String url) {
         this.url = url;
         this.url = url;
@@ -110,6 +111,9 @@ public class WebParams implements Serializable {
         return tokenKey;
         return tokenKey;
     }
     }
 
 
+    public String getInvitationCodeKey(){
+        return invitationCodeKey;
+    }
 
 
     //有些内部h5界面不显示标题,是通过js方法来设置的,会导致屏幕闪一下,所以暂时加一下筛选
     //有些内部h5界面不显示标题,是通过js方法来设置的,会导致屏幕闪一下,所以暂时加一下筛选
     public WebParams checkShowTitle() {
     public WebParams checkShowTitle() {

+ 3 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/ActWebX5.java

@@ -20,11 +20,13 @@ import android.view.animation.AnimationUtils;
 import android.widget.ImageView;
 import android.widget.ImageView;
 import android.widget.ProgressBar;
 import android.widget.ProgressBar;
 
 
+import com.sheep.gamegroup.db.DBUtils;
 import com.sheep.gamegroup.model.entity.WebParams;
 import com.sheep.gamegroup.model.entity.WebParams;
 import com.sheep.gamegroup.module.webview.util.WebResourceRequestAdapter;
 import com.sheep.gamegroup.module.webview.util.WebResourceRequestAdapter;
 import com.sheep.gamegroup.module.webview.util.WebResourceResponseAdapter;
 import com.sheep.gamegroup.module.webview.util.WebResourceResponseAdapter;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.Constant;
 import com.sheep.gamegroup.util.Constant;
+import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.LogUtil;
@@ -392,6 +394,7 @@ public class ActWebX5 extends BaseActWeb {
                 loadUrl = addUrlQuery(url, webParams.getTokenKey(), SpUtils.getToken(SheepApp.getInstance()));
                 loadUrl = addUrlQuery(url, webParams.getTokenKey(), SpUtils.getToken(SheepApp.getInstance()));
                 loadUrl = addUrlQuery(loadUrl, "pf", Config.YF_SHOP_PLATFORM);
                 loadUrl = addUrlQuery(loadUrl, "pf", Config.YF_SHOP_PLATFORM);
             }
             }
+            loadUrl = addUrlQuery(loadUrl, webParams.getInvitationCodeKey(), DataUtil.getInstance().getInvitationCode());
             LogUtil.println("ActWeb loadUrl = " + loadUrl);
             LogUtil.println("ActWeb loadUrl = " + loadUrl);
             webViewLoadUrl(mWebView, loadUrl);
             webViewLoadUrl(mWebView, loadUrl);
         } else {
         } else {