app.js 684 B

12345678910111213141516171819202122232425262728293031323334
  1. var openWebview = function(url) {
  2. mui.openWindow({
  3. url: url,
  4. id: getId(url),
  5. waiting:{
  6. autoShow:false
  7. }
  8. })
  9. }
  10. var getId = function(url) {
  11. var aStr = url.split("/");
  12. var aid = null;
  13. if (aStr.length != 0) {
  14. aid = aStr[aStr.length - 1].split(".");
  15. } else {
  16. aid = aStr.split(".");
  17. }
  18. //console.log(aid[0]);
  19. return aid[0];
  20. }
  21. // 重新加载Webview窗口显示的HTML页面
  22. function reloadWebview() {
  23. plus.webview.currentWebview().reload(true);
  24. }
  25. //测试的账号
  26. var commonUserCode = "U20160322000001";
  27. var commonDoctorCode = "D20160322000001";
  28. var commonUserName = "李碧玉";
  29. var hospital="厦门中山医院";
  30. var commonServerUrl = "http://www.xmtyw.cn";