Преглед на файлове

邀请赚钱h5配置到主页

zengjiebin преди 7 години
родител
ревизия
d89cefe888

+ 19 - 16
app/src/main/java/com/sheep/gamegroup/module/webview/fragment/FgtWebX5.java

@@ -121,28 +121,31 @@ public class FgtWebX5 extends BaseFgtWeb {
 
     public static FgtWebX5 newInstance(WebParams webParams) {
         FgtWebX5 fragment = new FgtWebX5();
-        Bundle bundle = new Bundle();
-        DataUtil.putObject(bundle, webParams);
-        fragment.setArguments(bundle);
+        fragment.webParams = webParams;
+//        Bundle bundle = new Bundle();
+//        DataUtil.putObject(bundle, webParams);
+//        fragment.setArguments(bundle);
         return fragment;
     }
 
     public FgtWebX5() {
     }
 
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
-        View rootView = super.onCreateView(inflater, container, savedInstanceState);
-        Bundle bundle = getArguments();
-        if (bundle != null) {
-            WebParams webParams = DataUtil.getObject(bundle, WebParams.class);
-            if(webParams != null){
-                this.webParams = webParams;
-                checkWebParams(webParams);
-            }
-        }
-        return rootView;
-    }
+//    @Override
+//    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+//        View rootView = super.onCreateView(inflater, container, savedInstanceState);
+//        Bundle bundle = getArguments();
+//        if (bundle != null) {
+//            WebParams webParams = DataUtil.getObject(bundle, WebParams.class);
+//            if(webParams != null){
+//                this.webParams = webParams;
+//                checkWebParams(webParams);
+//                initView();
+//                initListener();
+//            }
+//        }
+//        return rootView;
+//    }
 
     //忽略 添加有范商城快捷入口
     public static final String KEY_IGNORE_ADD_YOU_FAN_LAUNCHER = "ignore_add_you_fan_launcher";

+ 6 - 1
app/src/main/java/com/sheep/gamegroup/util/MainTab.java

@@ -2,14 +2,18 @@ package com.sheep.gamegroup.util;
 
 import android.support.v4.app.Fragment;
 
+import com.sheep.gamegroup.model.entity.WebParams;
 import com.sheep.gamegroup.module.game.fragment.FgtGameCenter;
 import com.sheep.gamegroup.module.skin.util.SkinUtil;
+import com.sheep.gamegroup.module.webview.fragment.FgtWebX5;
 import com.sheep.gamegroup.view.fragment.FgtAskGetMoney;
 import com.sheep.gamegroup.view.fragment.FgtAskGetMoneyNewYear;
 import com.sheep.gamegroup.view.fragment.FgtFind;
 import com.sheep.gamegroup.view.fragment.FgtPersonalCenter;
 import com.sheep.gamegroup.view.fragment.FgtSmallSheep;
+import com.sheep.jiuyan.samllsheep.Config;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
 
 /**
  * Created by realicing on 2018/1/4.
@@ -52,7 +56,8 @@ public enum MainTab {
     FgtMainAskGetMoney(R.string.main_tab_invite) {
         @Override
         public Fragment getFragment() {
-            return SkinUtil.isLoadNewYearSkin() ? new FgtAskGetMoneyNewYear() : new FgtAskGetMoney();
+//            return SkinUtil.isLoadNewYearSkin() ? new FgtAskGetMoneyNewYear() : new FgtAskGetMoney();
+            return FgtWebX5.newInstance(new WebParams(Config.getUrlByPath(Config.PATH_SMALL_SHEEP_INVITATION_HOME), "邀请赚钱"));
         }
 
         @Override

+ 4 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/Config.java

@@ -38,6 +38,8 @@ public class Config {
     private static final String STATION_TURNTABLE = "/turntable/#";
     private static final String STATION_IQIYI_VIP_MEMBER = "/iqiyi_vip_member/#";
     private static final String STATION_SPRING_FESTIVAL_ACTIVITIES = "/spring_festival_activities/#";
+    //邀请赚钱
+    private static final String STATION_SMALL_SHEEP_INVITATION = "/small_sheep_invitation/#";
     //游戏金币
     private static final String STATION_SMALL_SHEEP_GAME_COINS = "/small_sheep_game_coins/#";
     //定向奖励
@@ -82,6 +84,8 @@ public class Config {
     public static final String PATH_WELFARE_DETAIL = STATION_WELFARE + "/detail";
     //赏金任务列表
     public static final String PATH_WELFARE_MONEY_REWARD_LIST = STATION_WELFARE + "/money-reward-list";
+    //邀请赚钱主页
+    public static final String PATH_SMALL_SHEEP_INVITATION_HOME = STATION_WELFARE + "/home-page";
     public static final String NAME_WELFARE_MONEY_REWARD_LIST = "赏金任务";
     //small_station地址 key
     public static final String KEY_SMALL_STATION_URL = "small_station_url";