huangbo 9 years ago
parent
commit
9162bfc52c

+ 5 - 1
display-server/web/biz/js/index.js

@ -5,7 +5,11 @@ require(["wmTabbar","common","mobile","util"], function(WmTabbar,Common,Mobile)
5 5
	$("#plugin-menu li,#ui-menu li").each(function(index, item) {
6 6
		if (item.getAttribute("action") != null) {
7 7
			$(item).tap(function() {
8
				Mobile.openPage(item.getAttribute("action"));
8
				var param = new Wade.DataMap();
9
				/*特殊符号测试*/
10
				param.put("flag",";/?:@&=+$,#()[]!#%*'");
11
				param.put("url","http://www.163.com?action=1&aaaa=2");
12
				Mobile.openPage(item.getAttribute("action"),param);
9 13
			});
10 14
		} else if(item.getAttribute("action") == null) {
11 15
			$(item).tap(function() {

+ 4 - 4
display-server/web/biz/js/plugin/network.js

@ -5,10 +5,10 @@ require(["domReady!","wadeMobile","wmTab","util"], function(doc,WadeMobile,wmTab
5 5
		WadeMobile.loadingStart('大量数据正在努力获取中……', '等待');
6 6
		WadeMobile.httpGet(function(htmlString) {
7 7
			//替换网页特殊字符
8
			htmlString = htmlString.replace(/<|>/g,function(m){
9
				if(m == '<')return "&lt;";
10
				if(m == '>')return "&gt;";
11
			});
8
//			htmlString = htmlString.replace(/<|>/g,function(m){
9
//				if(m == '<')return "&lt;";
10
//				if(m == '>')return "&gt;";
11
//			});
12 12
			/*var s="<style type=\"text/\css\">";
13 13
			var styleStartIndex = htmlString.indexOf(s)+s.length;
14 14
			var styleEndIndex=htmlString.indexOf("</style>",styleStartIndex);

+ 6 - 11
display-server/web/res/js/mobile/wade-mobile.js

@ -148,8 +148,8 @@ define(["jcl","base64","jcl","res/js/mobile/expand-mobile.js","biz/js/common/biz
148 148
            ifrm.setAttribute("name",ifrmName);
149 149
            document.body.appendChild(ifrm);
150 150
        }
151
        document.getElementById(ifrmName).src = encodeURIComponent(url);
152
        //document.getElementById(ifrmName).contentWindow.location = encodeURI(invocation);
151
        document.getElementById(ifrmName).contentWindow.location = encodeURIComponent(url);
152
        //document.getElementById(ifrmName).src = encodeURI(url);//无法处理&符号
153 153
        globalErrorKey = null;
154 154
	};
155 155
	
@ -209,19 +209,14 @@ define(["jcl","base64","jcl","res/js/mobile/expand-mobile.js","biz/js/common/biz
209 209
				if (callback) {
210 210
		            callbackDefine[callbackKey] = {callback:callback};
211 211
		        }
212
			},execCallback:function(callbackKey, data, isEncode){
212
			},execCallback:function(callbackKey, data, isEscape){
213 213
				globalErrorKey = callbackKey;
214 214
				var callbackItem = callbackDefine[callbackKey];
215 215
				if (callbackItem) {
216 216
					data = data=="null"?null:data;
217
		        	if(data){
218
		        		//tik5213
219
		        		//特别注意
220
		        		//此处为无效操作
221
		        		//只作暂时保留
222
		        		if(isEncode){
223
		        			var tmp_data = unescape(data);	//替代方案Base64.decode64(data);
224
		        			console.log("isEncode = " + isEncode + " result: " + tmp_data)
217
		        	if(data)
218
		        		if(isEscape){
219
		        			data = unescape(data);
225 220
		        		}
226 221
		        	}
227 222
		            if (callbackItem.callback) {