| 
					
				 | 
			
			
				@@ -1,4 +1,47 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 动态请求数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @param {String} url - 请求链接 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @param data - 提交数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @param {function} successCallback - 返回成功回调 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @param {function} errorCallBack - 返回失败回调 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const postData = function (url, data, successCallback, errorCallBack, showWaiting = true) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (showWaiting) showWaitingView(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        type:"POST", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        url: url, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        data: {'data': JSON.stringify(data)}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        dataType: 'json', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        cache: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        timeout: 60000, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        beforeSend: function(xhr) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            let csrfToken = Cookies.get('csrfToken'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            xhr.setRequestHeader('x-csrf-token', csrfToken); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        success: function(result){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (result.err === 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (successCallback) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    successCallback(result.data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                toastr.error('error: ' + result.msg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (errorCallBack) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    errorCallBack(result.msg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (showWaiting) closeWaitingView(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        error: function(jqXHR, textStatus, errorThrown){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            toastr.error('error: ' + textStatus + " " + errorThrown); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (errorCallBack) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                errorCallBack(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (showWaiting) closeWaitingView(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * 提示框 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * @param string message 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -95,3 +138,102 @@ function trimInvalidChar(str) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 function cleanSymbols(str) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return $.trim(str).replace(/\\/g, '').replace(/\'/g, '').replace(/\"/g, '').replace(/\</g, '').replace(/\|/g, ''); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//关闭等待窗口 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function closeWaitingView() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    bShowWaiting = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const time = parseInt(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    setTimeout(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        var bgDiv = document.getElementById("bgDiv"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        var msgDiv = document.getElementById("msgDiv"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //移除背景遮罩层div 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(bgDiv != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            document.body.removeChild(bgDiv); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //移除中间信息提示层div 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(msgDiv != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            document.body.removeChild(msgDiv); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, Math.max(beginWaitingTime - time + 500, 0)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//显示等待窗口 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function showWaitingView() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // bShowWaiting = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // setTimeout(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     if (!bShowWaiting) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     beginWaitingTime = parseInt(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     var msgw = 300; //提示窗口的宽度 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     var msgh = 100; //提示窗口的高度 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     var sWidth, sHeight; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     sWidth = document.body.clientWidth; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     sHeight = document.body.clientHeight; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     //背景遮罩层div 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     var bgObj = document.createElement("div"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     bgObj.setAttribute('id', 'bgDiv'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     bgObj.style.zIndex = '9998'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     bgObj.style.position = "absolute"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     bgObj.style.top = "0px"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     bgObj.style.background = "#888"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     bgObj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     bgObj.style.opacity = "0.6"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     bgObj.style.left = "0px"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     bgObj.style.width = sWidth + "px"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     bgObj.style.height = sHeight + "px"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     document.body.appendChild(bgObj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     //信息提示层div 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     var msgObj = document.createElement("div"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     msgObj.style.zIndex = '9999'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     msgObj.setAttribute("id", "msgDiv"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     msgObj.setAttribute("align", "center"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     msgObj.style.position = "absolute"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     msgObj.style.font = "12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     msgObj.style.width = msgw + "px"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     msgObj.style.height = msgh + "px"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     msgObj.style.top = (document.documentElement.scrollTop + (sHeight - msgh) / 2) + "px"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     msgObj.style.left = (sWidth - msgw) / 2 + "px"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     document.body.appendChild(msgObj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     //中间等待图标 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     document.getElementById("msgDiv").innerHTML = '<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // }, 1000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    beginWaitingTime = parseInt(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var msgw = 300; //提示窗口的宽度 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var msgh = 100; //提示窗口的高度 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var sWidth, sHeight; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    sWidth = document.body.clientWidth; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    sHeight = document.body.clientHeight; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //背景遮罩层div 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var bgObj = document.createElement("div"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    bgObj.setAttribute('id', 'bgDiv'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    bgObj.style.zIndex = '9998'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    bgObj.style.position = "absolute"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    bgObj.style.top = "0px"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // bgObj.style.background = "#888"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    bgObj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    bgObj.style.opacity = "0.6"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    bgObj.style.left = "0px"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    bgObj.style.width = sWidth + "px"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    bgObj.style.height = sHeight + "px"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    document.body.appendChild(bgObj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //信息提示层div 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var msgObj = document.createElement("div"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    msgObj.style.zIndex = '9999'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    msgObj.setAttribute("id", "msgDiv"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    msgObj.setAttribute("align", "center"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    msgObj.style.position = "absolute"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    msgObj.style.font = "12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    msgObj.style.width = msgw + "px"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    msgObj.style.height = msgh + "px"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    msgObj.style.top = (document.documentElement.scrollTop + (sHeight - msgh) / 2) + "px"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    msgObj.style.left = (sWidth - msgw) / 2 + "px"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    document.body.appendChild(msgObj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //中间等待图标 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    document.getElementById("msgDiv").innerHTML = '<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 |