diff --git a/resource/js/unit.js b/resource/js/unit.js
index 2de6cb2..76dd456 100644
--- a/resource/js/unit.js
+++ b/resource/js/unit.js
@@ -10,9 +10,9 @@ sysComm = {
//阿里云测试环境,别删
-//var parkcloudbaseUrl = 'http://192.168.1.196:8100/';// url公用地址
+var parkcloudbaseUrl = 'http://192.168.1.196:8101/';// url公用地址
-var parkcloudbaseUrl = 'http://127.0.0.1:8100/';// url公用地址
+// var parkcloudbaseUrl = 'http://127.0.0.1:8100/';// url公用地址
@@ -567,5 +567,22 @@ var commonClass = {
}
}
}
+/**
+ * jquery 解绑绑定函数.
+ * wangfs 2018-01-11.
+ */
+var documentBindFunc ={
+ /**
+ * @param event 事件名称如:click
+ * @param element 元素 如:id,class 元素等
+ * @param func 函数
+ * 例子:documentBindFunc.on('click','#berthmanage-addBtn',function () {});
+ */
+ on: function (event, element, func) {
+ $(document).off(event, element);
+ $(document).on(event, element, func);
+ }
+
+};
$("#loginShowName").text(fn.getUserName());
diff --git a/topages/hourscount/hourscount.js b/topages/hourscount/hourscount.js
index 7e60eca..261f6b5 100644
--- a/topages/hourscount/hourscount.js
+++ b/topages/hourscount/hourscount.js
@@ -100,7 +100,7 @@ var fun= {
},
//查询announce
queryBtn:function(){
- $(document).on('click','#queryBtn',function(){
+ documentBindFunc.on('click','#queryBtn',function(){
fun.queryAsraDailyAllForList();
});
},
diff --git a/topages/staffmanage/staffmanage.js b/topages/staffmanage/staffmanage.js
index 7fbe4e8..bdeb359 100644
--- a/topages/staffmanage/staffmanage.js
+++ b/topages/staffmanage/staffmanage.js
@@ -88,7 +88,7 @@ var fun = {
return req;
},
queryBtn:function () {
- $("#queryBtn").on('click',function () {
+ documentBindFunc.on('click','#queryBtn',function () {
fun.createTableData();
})
}
diff --git a/topages/workfill/workfill.js b/topages/workfill/workfill.js
index 1790ea2..06762ff 100644
--- a/topages/workfill/workfill.js
+++ b/topages/workfill/workfill.js
@@ -49,7 +49,7 @@ var fun = {
},
//退出
logout:function(){
- $(document).on('click','#logoutId',function(){
+ documentBindFunc.on('click','#logoutId',function(){
fn.loginOut();
});
},
@@ -215,18 +215,18 @@ var fun = {
};
fun.init();
// 上一周点击time-opr-prevbtn
-$('#time-opr-prevbtn').on('click',function () {
+documentBindFunc.on('click','#time-opr-prevbtn',function () {
fun.timeoprprevbtn();
fun.getAsraDailyListMsg();
});
// 下一周点击time-opr-nextbtn
-$('#time-opr-nextbtn').on('click',function () {
+documentBindFunc.on('click','#time-opr-nextbtn',function () {
fun.timeoprnextbtn();
fun.getAsraDailyListMsg();
});
//提交事件
-$(document).on('click','.workfill-list-btn',function () {
+documentBindFunc.on('click','.workfill-list-btn',function () {
var _this=$(this);
if(_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').hasClass('display-none')){
_this.text('提交');
diff --git a/topages/workquery/workquery.js b/topages/workquery/workquery.js
index b0fda9c..0366676 100644
--- a/topages/workquery/workquery.js
+++ b/topages/workquery/workquery.js
@@ -146,7 +146,7 @@ var fun={
},
//查询announce
queryBtn:function(){
- $(document).on('click','#queryBtn',function(){
+ documentBindFunc.on('click','#queryBtn',function(){
fun.queryAsraDailyAllForList();
});
},