浏览代码

优化终端判断

tik5213 9 年之前
父节点
当前提交
a5971dfaa2
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      display-server/web/res/js/mobile/wade-mobile.js

+ 5 - 2
display-server/web/res/js/mobile/wade-mobile.js

@ -3,8 +3,7 @@
3 3
 */
4 4
define(["jcl","base64","res/js/mobile/expand-mobile.js","biz/js/common/biz-mobile.js"],function(Wade,Base64) {
5 5
	//终端类型,a为android,i为ios
6
	var terminalType = window["TerminalType"];
7
    var deviceType = (function(){
6
	var deviceType = (function(){
8 7
		var sUserAgent = navigator.userAgent.toLowerCase();
9 8
		var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
10 9
		var bIsIphone = sUserAgent.match(/iphone os/i) == "iphone os";
@ -18,6 +17,10 @@ define(["jcl","base64","res/js/mobile/expand-mobile.js","biz/js/common/biz-mobil
18 17
			return null;
19 18
		}
20 19
	})();
20
	if(!window["TerminalType"]){
21
		window["TerminalType"] = deviceType;
22
	}
23
	var terminalType = window["TerminalType"];
21 24
	
22 25
	WadeMobile = (function(){
23 26
        return{