hanjing лет назад: 6
Родитель
Сommit
9a81bb78e9

+ 2 - 2
app/src/main/java/com/sheep/gamegroup/di/modules/NetModule.java

@@ -49,10 +49,10 @@ public class NetModule {
     public Retrofit provideRetrofit(OkHttpClient okhttpClient) {
         Retrofit retrofit = new Retrofit.Builder()
                 .client(okhttpClient)
-                .baseUrl(SheepApp.getInstance().getConnectAddress().getAppUrl()+"v1/")
+//                .baseUrl(SheepApp.getInstance().getConnectAddress().getAppUrl()+"v1/")
 //                .baseUrl("http://10.8.220.239:8080/v1/")
 //                .baseUrl("http://10.8.240.155:8080/v1/")
-//                .baseUrl("http://ss.17xmy.com/v1/")
+                .baseUrl("http://ss.17xmy.com/v1/")
                 .addConverterFactory(StringConverterFactory.create())
                 .addConverterFactory(FastJsonConverterFactory.create())
 //                .addConverterFactory(GsonConverterFactory.create(EntityUtils.gson))//

+ 30 - 20
app/src/main/java/com/sheep/gamegroup/view/activity/MiddleSchemeAct.java

@@ -17,12 +17,14 @@ import com.sheep.gamegroup.model.entity.SlideshowEty;
 import com.sheep.gamegroup.model.entity.WebParams;
 import com.sheep.gamegroup.util.ActionUtil;
 import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.ConfigUtil;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.SysAppUtil;
 import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
+import com.sheep.jiuyan.samllsheep.Config;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.bean.UserCenterModule;
@@ -62,7 +64,7 @@ public class MiddleSchemeAct extends Activity {
 //                    if (TestUtil.isTest())
 //                        G.showToast(uri.toString());
                     LogUtil.println("SheepApp mActivityCount" + SheepApp.getInstance().mActivityCount);
-                    if(SheepApp.getInstance().mActivityCount == 0) {
+                    if (SheepApp.getInstance().mActivityCount == 0 && !"game_coupon".equals(uri.getQueryParameter("type"))) {
                         ActionUtil.getInstance().addNextAction("scheme", uri);
                         tryGoSplashAct(SheepApp.getInstance(), uri);
                     } else {
@@ -76,7 +78,7 @@ public class MiddleSchemeAct extends Activity {
     //解析并跳转
     public static void parseAndJumpUri(Activity activity, Uri uri) {
         String type = uri.getQueryParameter("type");
-        if(type == null){
+        if (type == null) {
 //            尝试获取game_id
             //sheep://small.kfzs.com/xmy?game_id=1385&code=976873
             tryGoSplashAct(activity, uri);
@@ -84,7 +86,7 @@ public class MiddleSchemeAct extends Activity {
         }
         //尝试解密数据
         String json = BaseMessageConverter.decrypt(uri.getQueryParameter("data"));
-        switch (type){
+        switch (type) {
             default://尝试获取game_id
                 tryGoSplashAct(activity, uri);
                 break;
@@ -100,6 +102,13 @@ public class MiddleSchemeAct extends Activity {
             case "wfa"://跳转原生福利专区
                 Jump2View.getInstance().toActWelfareSpecialArea();
                 break;
+            case "game_coupon":
+                Jump2View.getInstance().goWeb(
+                        activity,
+                        new WebParams(
+                                Config.getUrlByPath(Config.PATH_MY_GAME_COUPON, "authorization", json),
+                                "代金券中心"));
+                break;
             //sheep://small.kfzs.com/xmy?type=jhl&data={"Jump":"1"}
             case "jump_home_list"://跳转homeList
             case "jhl":
@@ -108,7 +117,7 @@ public class MiddleSchemeAct extends Activity {
                     CommonUtil.getInstance().goNative(activity, item, "view");
                 } catch (Exception e) {
                     e.printStackTrace();
-                    if(TestUtil.isTest() && TextUtils.isEmpty(e.getMessage()))
+                    if (TestUtil.isTest() && TextUtils.isEmpty(e.getMessage()))
                         G.showToast(e.getMessage());
                 }
                 break;
@@ -120,18 +129,18 @@ public class MiddleSchemeAct extends Activity {
                     CommonUtil.getInstance().goNative(activity, item, "view");
                 } catch (Exception e) {
                     e.printStackTrace();
-                    if(TestUtil.isTest() && TextUtils.isEmpty(e.getMessage()))
+                    if (TestUtil.isTest() && TextUtils.isEmpty(e.getMessage()))
                         G.showToast(e.getMessage());
                 }
                 break;
-                //跳转试玩赚钱
-                //sheep://small.kfzs.com/xmy?type=jss&data={"Type":1}
-                //跳转连续任务
-                //sheep://small.kfzs.com/xmy?type=jss&data={"Type":6}
-                //跳转办卡赚钱
-                //sheep://small.kfzs.com/xmy?type=jss&data={"Type":3}
-                //跳转游戏详情 "Id": 351, "name": "神都夜行录",
-                //sheep://small.kfzs.com/xmy?type=jss&data={"Type":16,"Ext":"{\"id\":351}"}
+            //跳转试玩赚钱
+            //sheep://small.kfzs.com/xmy?type=jss&data={"Type":1}
+            //跳转连续任务
+            //sheep://small.kfzs.com/xmy?type=jss&data={"Type":6}
+            //跳转办卡赚钱
+            //sheep://small.kfzs.com/xmy?type=jss&data={"Type":3}
+            //跳转游戏详情 "Id": 351, "name": "神都夜行录",
+            //sheep://small.kfzs.com/xmy?type=jss&data={"Type":16,"Ext":"{\"id\":351}"}
             case "jump_slide_show"://跳转banner(主页banner或者游戏banner)
             case "jss":
                 try {
@@ -139,7 +148,7 @@ public class MiddleSchemeAct extends Activity {
                     CommonUtil.getInstance().clickBanner(activity, item);
                 } catch (Exception e) {
                     e.printStackTrace();
-                    if(TestUtil.isTest() && TextUtils.isEmpty(e.getMessage()))
+                    if (TestUtil.isTest() && TextUtils.isEmpty(e.getMessage()))
                         G.showToast(e.getMessage());
                 }
                 break;
@@ -154,11 +163,11 @@ public class MiddleSchemeAct extends Activity {
                 String className = uri.getQueryParameter("className");
                 boolean packageNameIsEmpty = TextUtils.isEmpty(packageName);
                 boolean classNameIsEmpty = TextUtils.isEmpty(className);
-                if(packageNameIsEmpty && classNameIsEmpty){
+                if (packageNameIsEmpty && classNameIsEmpty) {
                     tryGoSplashAct(activity, uri);
-                } else if(packageNameIsEmpty){
+                } else if (packageNameIsEmpty) {
                     runApp(activity, activity.getPackageName(), className);
-                } else if(classNameIsEmpty) {
+                } else if (classNameIsEmpty) {
                     PackageUtil.startApp(activity, packageName);
                 } else {
                     runApp(activity, packageName, className);
@@ -206,14 +215,15 @@ public class MiddleSchemeAct extends Activity {
 //                        finish();
 //                    }
     }
-    public static void runApp(Activity activity, String packageName, String className){
+
+    public static void runApp(Activity activity, String packageName, String className) {
         try {
             Intent intent = new Intent();
             intent.setClassName(packageName, className);
             activity.startActivity(intent);
         } catch (Exception e) {
             e.printStackTrace();
-            if(TestUtil.isTest() && TextUtils.isEmpty(e.getMessage()))
+            if (TestUtil.isTest() && TextUtils.isEmpty(e.getMessage()))
                 G.showToast(e.getMessage());
         }
     }
@@ -230,7 +240,7 @@ public class MiddleSchemeAct extends Activity {
      */
     public static void tryGoSplashAct(Context context, Uri uri) {
         String game_id = uri.getQueryParameter("game_id");
-        if(!TextUtils.isEmpty(game_id))//有game_id时设置game_id的回调到主页,用于展示会长推广弹出框
+        if (!TextUtils.isEmpty(game_id))//有game_id时设置game_id的回调到主页,用于展示会长推广弹出框
             ActionUtil.getInstance().addNextAction(SHOW_DIALOG_GAME_OR_GIFT_TASK, game_id);
         Jump2View.getInstance().newTaskTopStartAct(context, SplashAct.class, null);
     }

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

@@ -64,6 +64,8 @@ public class Config {
     public static final String PATH_DIRECTIONAL_VOUCHER = STATION_SMALL_SHEEP_GAME_COINS + "/cash-coupon-list";
     //代金券
     public static final String PATH_DIRECTIONAL_RECHARGE = STATION_SMALL_SHEEP_GAME_COINS + "/recharge";
+
+    public static final String PATH_MY_GAME_COUPON = STATION_SMALL_SHEEP_GAME_COINS + "/game-coupon";
     //新春活动
     public static final String PATH_NEW_SPRING_ACTIVITIES = STATION_SPRING_FESTIVAL_ACTIVITIES + "/home-page";
     //我的宠物

+ 2 - 2
app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java

@@ -338,7 +338,7 @@ public class SheepApp extends MultiDexApplication {
 
         LocationClientOption option = new LocationClientOption();
         //经纬度
-        option.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
+        option.setLocationMode(LocationClientOption.LocationMode.Battery_Saving);
 //可选,设置定位模式,默认高精度
 //LocationMode.Hight_Accuracy:高精度;
 //LocationMode. Battery_Saving:低功耗;
@@ -356,7 +356,7 @@ public class SheepApp extends MultiDexApplication {
 //如果设置为0,则代表单次定位,即仅定位一次,默认为0
 //如果设置非0,需设置1000ms以上才有效
 
-        option.setOpenGps(true);
+        option.setOpenGps(false);
 //可选,设置是否使用gps,默认false
 //使用高精度和仅用设备两种定位模式的,参数必须设置为true
 

+ 2 - 1
app/src/main/res/values/gamegroup_styles.xml

@@ -136,9 +136,10 @@
         <item name="android:windowFrame">@null</item>  
         <!--是否模糊-->  
         <item name="android:backgroundDimEnabled">true</item>  
-        <item name="android:windowIsTranslucent">true</item>
+        <item name="android:windowIsTranslucent">false</item>
         <item name="android:background">@color/transparent</item>
         <item name="android:backgroundDimAmount">0.6</item>
+        <item name="android:windowDisablePreview">true</item>
     </style>
     <!--全屏透明背景-->
     <style name="AppTheme.fullTranslucent" parent="@style/AppTheme.fullScreen">