Explorar el Código

add new shopmall host

huangxi hace 4 años
padre
commit
84287983a2

+ 1 - 0
.gitignore

@@ -12,6 +12,7 @@
 /kfzslibrary
 /banner
 /app/src/main/obj
+/app/sheep/release/
 *.txt
 .idea/
 .idea/*

+ 4 - 1
.idea/gradle.xml

@@ -4,7 +4,9 @@
   <component name="GradleSettings">
     <option name="linkedExternalProjectsSettings">
       <GradleProjectSettings>
-        <option name="testRunner" value="GRADLE" />
+        <compositeConfiguration>
+          <compositeBuild compositeDefinitionSource="SCRIPT" />
+        </compositeConfiguration>
         <option name="distributionType" value="DEFAULT_WRAPPED" />
         <option name="externalProjectPath" value="$PROJECT_DIR$" />
         <option name="modules">
@@ -25,6 +27,7 @@
           </set>
         </option>
         <option name="resolveModulePerSourceSet" value="false" />
+        <option name="testRunner" value="PLATFORM" />
       </GradleProjectSettings>
     </option>
   </component>

+ 11 - 0
app/src/main/java/com/sheep/gamegroup/module/webview/fragment/FgtWebX5.java

@@ -40,6 +40,7 @@ import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 import com.sheep.jiuyan.samllsheep.wxutil.WXAPIUtil;
+import com.tencent.smtt.export.external.interfaces.ConsoleMessage;
 import com.tencent.smtt.export.external.interfaces.WebResourceError;
 import com.tencent.smtt.export.external.interfaces.WebResourceRequest;
 import com.tencent.smtt.export.external.interfaces.WebResourceResponse;
@@ -422,6 +423,14 @@ public class FgtWebX5 extends BaseFgtWebX5 {
                     act_web_loading_pb.setProgress(newProgress);
                 super.onProgressChanged(view, newProgress);
             }
+
+            @Override
+            public boolean onConsoleMessage(ConsoleMessage cm) {
+                LogUtil.println("YFSHOP",cm.message() + " -- From line "
+                        + cm.lineNumber() + " of "
+                        + cm.sourceId());
+                return super.onConsoleMessage(cm);
+            }
         });
         mWebView.setWebViewClient(new WebViewClient() {
 
@@ -580,6 +589,7 @@ public class FgtWebX5 extends BaseFgtWebX5 {
             if (webParams.getTokenKey() != null) {
                 if (url.startsWith(Config.YF_SHOP_HOME)
                         || url.startsWith("http://t.shop.17xmy.com/")
+                        || url.startsWith("http://www.youfanshop.com")
                         || url.startsWith("http://10.8.220.251")) {
                     webParams.tokenFirstUpperCase();
                 }
@@ -587,6 +597,7 @@ public class FgtWebX5 extends BaseFgtWebX5 {
                         || url.startsWith(Config.YF_SHOP_HOME)
                         || url.startsWith("http://t.shop.17xmy.com/")
                         || url.startsWith("http://10.8")
+                        || url.startsWith("http://www.youfanshop.com")
                         || url.startsWith("http://h5.17xmy.com/"))
                         && (!url.contains(webParams.getTokenKey()))) {
                     loadUrl = StringUtils.addUrlQuery(url, webParams.getTokenKey(), SpUtils.getToken(SheepApp.getInstance()));