|
@@ -35,7 +35,7 @@ class HaveGainApplyPage extends Page { |
|
@@ -35,7 +35,7 @@ class HaveGainApplyPage extends Page { |
35
|
this.jumpVerify();
|
35
|
this.jumpVerify();
|
36
|
this.selector.$nameInput.on('input', this.changeBtnStatus.bind(this));
|
36
|
this.selector.$nameInput.on('input', this.changeBtnStatus.bind(this));
|
37
|
this.selector.$mobileInput.on('input', this.changeBtnStatus.bind(this));
|
37
|
this.selector.$mobileInput.on('input', this.changeBtnStatus.bind(this));
|
38
|
- this.selector.$fillIn.on('click', that.tapFillIn);
|
38
|
+ this.selector.$fillIn.on('click', that.tapFillIn.bind(this));
|
39
|
this.selector.$agreement.on('click', that.tapAgreement);
|
39
|
this.selector.$agreement.on('click', that.tapAgreement);
|
40
|
this.selector.$applyBtn.on('click', this.apply.bind(this));
|
40
|
this.selector.$applyBtn.on('click', this.apply.bind(this));
|
41
|
}
|
41
|
}
|
|
@@ -81,6 +81,7 @@ class HaveGainApplyPage extends Page { |
|
@@ -81,6 +81,7 @@ class HaveGainApplyPage extends Page { |
81
|
let errStatus = 0;
|
81
|
let errStatus = 0;
|
82
|
let name = $.trim(this.selector.$nameInput.val());
|
82
|
let name = $.trim(this.selector.$nameInput.val());
|
83
|
let mobile = $.trim(this.selector.$mobileInput.val());
|
83
|
let mobile = $.trim(this.selector.$mobileInput.val());
|
|
|
84
|
+ let wxInput = $('.account-name.required').find('em').length > 0;
|
84
|
|
85
|
|
85
|
if (name === '') {
|
86
|
if (name === '') {
|
86
|
errStatus = 1;
|
87
|
errStatus = 1;
|
|
@@ -88,6 +89,8 @@ class HaveGainApplyPage extends Page { |
|
@@ -88,6 +89,8 @@ class HaveGainApplyPage extends Page { |
88
|
errStatus = 2;
|
89
|
errStatus = 2;
|
89
|
} else if (!/^1[0-9]{10}$/.test(mobile)) {
|
90
|
} else if (!/^1[0-9]{10}$/.test(mobile)) {
|
90
|
errStatus = 21;
|
91
|
errStatus = 21;
|
|
|
92
|
+ } else if (!wxInput) {
|
|
|
93
|
+ errStatus = 3;
|
91
|
}
|
94
|
}
|
92
|
|
95
|
|
93
|
if (errStatus) {
|
96
|
if (errStatus) {
|
|
@@ -101,6 +104,7 @@ class HaveGainApplyPage extends Page { |
|
@@ -101,6 +104,7 @@ class HaveGainApplyPage extends Page { |
101
|
}
|
104
|
}
|
102
|
|
105
|
|
103
|
tapFillIn(event) {
|
106
|
tapFillIn(event) {
|
|
|
107
|
+ let _this = this;
|
104
|
let $event = $(event.target);
|
108
|
let $event = $(event.target);
|
105
|
|
109
|
|
106
|
if ($event.hasClass('disable')) {
|
110
|
if ($event.hasClass('disable')) {
|
|
@@ -137,6 +141,7 @@ class HaveGainApplyPage extends Page { |
|
@@ -137,6 +141,7 @@ class HaveGainApplyPage extends Page { |
137
|
|
141
|
|
138
|
$accountName.html(`账号:<em>${account}</em> 粉丝:<em data-fans="${fans}">${fansFix}</em>`); // eslint-disable-line
|
142
|
$accountName.html(`账号:<em>${account}</em> 粉丝:<em data-fans="${fans}">${fansFix}</em>`); // eslint-disable-line
|
139
|
dialog.hideDialog();
|
143
|
dialog.hideDialog();
|
|
|
144
|
+ _this.changeBtnStatus();
|
140
|
$event.text('已填写').addClass('disable');
|
145
|
$event.text('已填写').addClass('disable');
|
141
|
});
|
146
|
});
|
142
|
}
|
147
|
}
|
|
@@ -183,6 +188,8 @@ class HaveGainApplyPage extends Page { |
|
@@ -183,6 +188,8 @@ class HaveGainApplyPage extends Page { |
183
|
tip.show('请输入手机号');
|
188
|
tip.show('请输入手机号');
|
184
|
} else if (errStatus === 21) {
|
189
|
} else if (errStatus === 21) {
|
185
|
tip.show('请输入正确的手机号');
|
190
|
tip.show('请输入正确的手机号');
|
|
|
191
|
+ } else if (errStatus === 3) {
|
|
|
192
|
+ tip.show('请填写微信账号');
|
186
|
}
|
193
|
}
|
187
|
|
194
|
|
188
|
if (errStatus) {
|
195
|
if (errStatus) {
|