|
|
@ -86,8 +86,9 @@ public class MainActivity extends AppCompatActivity { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// String url = getIntent().getStringExtra("url");
|
|
|
// String url = getIntent().getStringExtra("url");
|
|
|
|
|
|
// String url ="http://192.168.66.184:8080/#/";
|
|
|
// String url ="https://ggl.dingguagua.vip/#/";
|
|
|
// String url ="https://ggl.dingguagua.vip/#/";
|
|
|
String url = "https://apps.dingguagua.vip/#/"; |
|
|
String url = "https://app.dingguagua.vip/#/"; |
|
|
|
|
|
|
|
|
web.getSettings().setJavaScriptEnabled(true); //加上这一行网页为响应式的
|
|
|
web.getSettings().setJavaScriptEnabled(true); //加上这一行网页为响应式的
|
|
|
web.getSettings().setPluginState(WebSettings.PluginState.ON); |
|
|
web.getSettings().setPluginState(WebSettings.PluginState.ON); |
|
|
@ -99,7 +100,7 @@ public class MainActivity extends AppCompatActivity { |
|
|
//设置缓存大小为50M
|
|
|
//设置缓存大小为50M
|
|
|
web.getSettings().setCacheMode(50*1024*1024); |
|
|
web.getSettings().setCacheMode(50*1024*1024); |
|
|
// 缓存的路径
|
|
|
// 缓存的路径
|
|
|
String appCacheDir = this.getApplication().getDir("ggcache", Context.MODE_PRIVATE).getPath(); |
|
|
// String appCacheDir = this.getApplication().getDir("ggcache", Context.MODE_PRIVATE).getPath();
|
|
|
// web.getSettings().setAppCachePath(appCacheDir);
|
|
|
// web.getSettings().setAppCachePath(appCacheDir);
|
|
|
web.getSettings().setAllowFileAccess(true); |
|
|
web.getSettings().setAllowFileAccess(true); |
|
|
// web.getSettings().setAppCacheEnabled(true);
|
|
|
// web.getSettings().setAppCacheEnabled(true);
|
|
|
@ -110,9 +111,9 @@ public class MainActivity extends AppCompatActivity { |
|
|
web.getSettings().setDatabaseEnabled(true); |
|
|
web.getSettings().setDatabaseEnabled(true); |
|
|
String dbPath =this.getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath(); |
|
|
String dbPath =this.getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath(); |
|
|
web.getSettings().setDatabasePath(dbPath); |
|
|
web.getSettings().setDatabasePath(dbPath); |
|
|
|
|
|
|
|
|
web.setInitialScale(100); |
|
|
web.setInitialScale(100); |
|
|
web.loadUrl(url); |
|
|
web.loadUrl(url+"?dev=dggapp"); |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 处理webclient |
|
|
* 处理webclient |
|
|
|