|
@@ -5,12 +5,12 @@ var company = {
|
|
|
importText: $('.import_text'), // 联想公司输入框
|
|
|
assoList: $('.assoList'), // 联想出的公司列表
|
|
|
assoUl: $('.asso_ul'),
|
|
|
+ isregister:true,
|
|
|
init: function () {
|
|
|
this.addEventKeys();
|
|
|
this.addEventLister();
|
|
|
this.iosBackInvoke();
|
|
|
$(comname).on('click', this.setCompanyName)
|
|
|
- // $(company.importCancel[0]).on('click', this.setCancel)
|
|
|
$(company.importText[0]).on('input', this.getCompanyList)
|
|
|
$(company.importText[0]).on('blur', this.inputLoseFocus)
|
|
|
},
|
|
@@ -30,11 +30,19 @@ var company = {
|
|
|
} else {
|
|
|
// 键盘收起事件处理
|
|
|
// alert("android 键盘收起事件处理")
|
|
|
- company.setCancel()
|
|
|
+ var params = window.location.search.substring(1)
|
|
|
+ if(params == '') {
|
|
|
+ company.association.fadeOut()
|
|
|
+ }else{
|
|
|
+ company.isregister = false
|
|
|
+ company.setCancel()
|
|
|
+ }
|
|
|
}
|
|
|
- });
|
|
|
+ },false);
|
|
|
}
|
|
|
},
|
|
|
+ // 解绑输入框失去焦点事件
|
|
|
+
|
|
|
isAndroid: function (_isAndroid,ua) {
|
|
|
if (_isAndroid === -1) {
|
|
|
_isAndroid = /Android/i.test(ua) ? 1 : 0;
|
|
@@ -53,7 +61,9 @@ var company = {
|
|
|
// 输入框失去焦点触发事件
|
|
|
inputLoseFocus: function () {
|
|
|
company.association.fadeOut()
|
|
|
- company.setCancel()
|
|
|
+ if(company.isregister){
|
|
|
+ company.setCancel()
|
|
|
+ }
|
|
|
},
|
|
|
// ios返回刷新问题
|
|
|
iosBackInvoke: function () {
|
|
@@ -74,7 +84,6 @@ var company = {
|
|
|
for (var i=0; i<assoLiAll.length; i++) {
|
|
|
$(assoLiAll[i]).on('click', function(){
|
|
|
$(comname).val($(this).find('.asso_res').text())
|
|
|
- // company.setCancel()
|
|
|
})
|
|
|
}
|
|
|
},
|