|
|
@@ -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.text.TextUtils;
|
|
|
import android.util.Log;
|
|
|
|
|
|
import com.sheep.gamegroup.absBase.BaseContainerActivity;
|
|
|
@@ -12,6 +13,7 @@ import com.sheep.gamegroup.module.webview.fragment.FgtWeb;
|
|
|
import com.sheep.gamegroup.module.webview.fragment.FgtWebX5;
|
|
|
import com.sheep.jiuyan.samllsheep.Config;
|
|
|
import com.sheep.jiuyan.samllsheep.base.BaseFragment;
|
|
|
+import com.sheep.jiuyan.samllsheep.utils.SpUtils;
|
|
|
import com.snail.antifake.jni.EmulatorDetectUtil;
|
|
|
import com.umeng.socialize.UMShareAPI;
|
|
|
import com.umeng.socialize.UMShareListener;
|
|
|
@@ -48,8 +50,16 @@ public class ActWebX5 extends BaseContainerActivity implements UMShareListener {
|
|
|
public void initWebParams() {
|
|
|
Intent intent = getIntent();
|
|
|
if (intent.hasExtra("exurl")) {
|
|
|
- webParams = new WebParams(intent.getStringExtra("exurl"),
|
|
|
- intent.getStringExtra("extitle"));
|
|
|
+ String token = intent.getStringExtra("extoken");
|
|
|
+ if (TextUtils.isEmpty(token)) {
|
|
|
+ finish();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ token = SpUtils.exchangeToken(token);
|
|
|
+ String url = intent.getStringExtra("exurl");
|
|
|
+ url += url.contains("?") ? "&" : "?";
|
|
|
+ url += "authorization=" + token;
|
|
|
+ webParams = new WebParams(url, intent.getStringExtra("extitle"));
|
|
|
} else {
|
|
|
webParams = (WebParams) intent.getSerializableExtra(WebParams.class.getSimpleName());
|
|
|
orientPara = intent.getIntExtra("extra_orient", -1);
|