Quellcode durchsuchen

代华辉提交,jcl.js升级,解决特殊字符串解析失败问题

chengwb3 vor 7 Jahren
Ursprung
Commit
8ed6a149fc
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 3 3
      display-server/src/main/webapp/res/js/base/jcl.js

+ 3 - 3
display-server/src/main/webapp/res/js/base/jcl.js

720
			return r;
720
			return r;
721
		},
721
		},
722
		parseString:function(str){
722
		parseString:function(str){
723
			str=$.parseJsonString(str);
723
			//str=$.parseJsonString(str);
724
			//console.log("#####this.parseObject");
724
			//console.log("#####this.parseObject");
725
			return window.JSON && window.JSON.parse ? this.parseObject(window.JSON.parse(str)) 
725
			return window.JSON && window.JSON.parse ? this.parseObject(window.JSON.parse(str)) 
726
					: (new Function("this.parseObject(" +str+")")).apply(this);
726
					: (new Function("this.parseObject(" +str+")")).apply(this);
733
				}else if(obj[p] && $.isObject(obj[p])){
733
				}else if(obj[p] && $.isObject(obj[p])){
734
					this.add(p,new $.DataMap(obj[p]));
734
					this.add(p,new $.DataMap(obj[p]));
735
				}else{
735
				}else{
736
					this.add(p,(obj[p]==undefined || obj[p]==null)?"":obj[p]);
736
					this.add(p,(obj[p]==undefined || obj[p]==null)?"":obj[p]+"");
737
				} 
737
				} 
738
			}
738
			}
739
		}
739
		}
811
			return this.length; 
811
			return this.length; 
812
		},	
812
		},	
813
		parseString:function(str){
813
		parseString:function(str){
814
			str=$.parseJsonString(str);
814
			//str=$.parseJsonString(str);
815
			//console.log("#####this.parseArray");
815
			//console.log("#####this.parseArray");
816
			return window.JSON && window.JSON.parse ? this.parseArray(window.JSON.parse(str)) : 
816
			return window.JSON && window.JSON.parse ? this.parseArray(window.JSON.parse(str)) : 
817
				(new Function("this.parseArray(" +str+")")).apply(this);	
817
				(new Function("this.parseArray(" +str+")")).apply(this);