hanjing %!s(int64=6) %!d(string=hai) anos
pai
achega
6e31dc145d

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

@@ -1020,7 +1020,7 @@ public class Jump2View {
         }
     }
 
-    public void goWebSingle(Context context, WebParams webParams, boolean needNewTask) {
+    public void goWebSingle(Context context, WebParams webParams, boolean needNewTask, int orient) {
         String url = webParams.checkShowTitle().getUrl();
         if (TextUtils.isEmpty(url)) {
             G.showToast(R.string.service_data_error);
@@ -1046,7 +1046,7 @@ public class Jump2View {
         }
         Intent intent = new Intent(context, ActWebX5Single.class);
         intent.putExtra(WebParams.class.getSimpleName(), webParams);
-        intent.putExtra("extra_orient", 1);
+        intent.putExtra("extra_orient", orient);
         if (needNewTask) {
             intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
         }
@@ -3004,24 +3004,24 @@ public class Jump2View {
         Jump2View.getInstance().goWeb(SheepApp.getInstance(), webParams);
     }
 
-    public void gotoGameVipRecharge(int discountId, String packageName, String token) {
+    public void gotoGameVipRecharge(int discountId, String packageName, String token, int orient) {
         SdkLoginUser gameUser = DDProviderHelper.getInstance().getSdkLoginUser(token);
         if (gameUser != null) {
             token = gameUser.getToken();
         }
         String url = Config.getUrlByPath(Config.PATH_DIRECTIONAL_RECHARGE + "/" + discountId, "packagename", packageName, "authorization", token, "ssnocache", "1");
         WebParams webParams = new WebParams(url, "抢购优惠").setShowTitle(false);
-        Jump2View.getInstance().goWebSingle(SheepApp.getInstance(), webParams, true);
+        Jump2View.getInstance().goWebSingle(SheepApp.getInstance(), webParams, true, orient);
     }
 
-    public void gotoGameGoldCoins(String token) {
+    public void gotoGameGoldCoins(String token, int orient) {
         SdkLoginUser gameUser = DDProviderHelper.getInstance().getSdkLoginUser(token);
         if (gameUser != null) {
             token = gameUser.getToken();
         }
         String url = Config.getUrlByPath(Config.PATH_DIRECTIONAL_MAKEGOLD, "authorization", token, "ssnocache", "1");
         WebParams webParams = new WebParams(url, "金丹传说").setShowTitle(false);
-        Jump2View.getInstance().goWebSingle(SheepApp.getInstance(), webParams, true);
+        Jump2View.getInstance().goWebSingle(SheepApp.getInstance(), webParams, true, orient);
     }
 
     /**

+ 4 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/ActWebX5.java

@@ -3,6 +3,7 @@ package com.sheep.gamegroup.view.activity;
 import android.content.Intent;
 import android.content.pm.ActivityInfo;
 import android.support.v4.app.Fragment;
+import android.util.Log;
 
 import com.sheep.gamegroup.absBase.BaseContainerActivity;
 import com.sheep.gamegroup.model.api.IWeb;
@@ -41,6 +42,7 @@ public class ActWebX5 extends BaseContainerActivity {
         Intent intent = getIntent();
         webParams = (WebParams) intent.getSerializableExtra(WebParams.class.getSimpleName());
         orientPara = intent.getIntExtra("extra_orient", -1);
+        Log.e("WebRecharge", "orient: " + orientPara);
     }
 
     @Override
@@ -60,11 +62,12 @@ public class ActWebX5 extends BaseContainerActivity {
         runOnUiThread(new Runnable() {
             @Override
             public void run() {
-                if (fragment instanceof IWeb && orientPara > 0) {
+                if (fragment instanceof IWeb && (orientPara == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE || orientPara == ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE)) {
                     IWeb webFragment = (IWeb) fragment;
                     String url = webFragment.getWebUrl();
                     if (url.contains(Config.PATH_DIRECTIONAL_RECHARGE)
                             || url.contains(Config.PATH_DIRECTIONAL_MAKEGOLD)) {
+                        Log.e("WebRecharge", "execute orient ");
                         setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
                     }
                 }

+ 12 - 3
app/src/main/java/com/sheep/gamegroup/view/activity/MiddleSchemeAct.java

@@ -124,12 +124,21 @@ public class MiddleSchemeAct extends Activity {
                 int discountId = Integer.parseInt(paras[0]);
                 String packageName = paras[1];
                 String token = paras[2];
-                Jump2View.getInstance().gotoGameVipRecharge(discountId, packageName, token);
+                int orient = -1;
+                if (paras.length == 4) {
+                    orient = Integer.parseInt(paras[3]);
+                }
+                Jump2View.getInstance().gotoGameVipRecharge(discountId, packageName, token, orient);
                 break;
             }
             case "makegold": {
-                String token = json;
-                Jump2View.getInstance().gotoGameGoldCoins(token);
+                String[] paras = json.split(",");
+                String token = paras[0];
+                int orient = -1;
+                if(paras.length==2){
+                    orient = Integer.parseInt(paras[1]);
+                }
+                Jump2View.getInstance().gotoGameGoldCoins(token, orient);
                 break;
             }
             //sheep://small.kfzs.com/xmy?type=jhl&data={"Jump":"1"}

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/RechargeResultAct.java

@@ -87,7 +87,7 @@ public class RechargeResultAct extends BaseActivity {
 
     @Override
     public void finish() {
-        if (fromorient > 0) {
+        if (fromorient == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE || fromorient == ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE) {
             setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
         }
         if (!TextUtils.isEmpty(gowhere)) {