Showing
1 changed file
with
15 additions
and
3 deletions
@@ -26,7 +26,8 @@ var provFn, | @@ -26,7 +26,8 @@ var provFn, | ||
26 | identityFn; | 26 | identityFn; |
27 | 27 | ||
28 | var alertConfig, | 28 | var alertConfig, |
29 | - makeAlert; | 29 | + makeAlert, |
30 | + identityFlag = false; | ||
30 | 31 | ||
31 | // j面跳转对象 | 32 | // j面跳转对象 |
32 | var redirect = { | 33 | var redirect = { |
@@ -158,11 +159,16 @@ function clearSelectUl($a, code) { | @@ -158,11 +159,16 @@ function clearSelectUl($a, code) { | ||
158 | $ul.empty(); | 159 | $ul.empty(); |
159 | $wrap.removeClass('active'); | 160 | $wrap.removeClass('active'); |
160 | } | 161 | } |
161 | - | ||
162 | /** | 162 | /** |
163 | * 最终提交表单 | 163 | * 最终提交表单 |
164 | */ | 164 | */ |
165 | function submitIdentity(json) { | 165 | function submitIdentity(json) { |
166 | + | ||
167 | + if (identityFlag) { | ||
168 | + return; | ||
169 | + } | ||
170 | + identityFlag = true; | ||
171 | + | ||
166 | // xls-3提交认证埋点 | 172 | // xls-3提交认证埋点 |
167 | givePoint('YB_STUDENT_ATTCT_SUBMIT', {SRC_ID: 2, SUBMIT_RES: 1}); | 173 | givePoint('YB_STUDENT_ATTCT_SUBMIT', {SRC_ID: 2, SUBMIT_RES: 1}); |
168 | $.ajax({ | 174 | $.ajax({ |
@@ -172,10 +178,12 @@ function submitIdentity(json) { | @@ -172,10 +178,12 @@ function submitIdentity(json) { | ||
172 | }).then(function(data) { | 178 | }).then(function(data) { |
173 | if (data.code === 200) { | 179 | if (data.code === 200) { |
174 | window.location.href = data.data; | 180 | window.location.href = data.data; |
175 | - | 181 | + |
176 | // xls-4认证成功埋点 | 182 | // xls-4认证成功埋点 |
177 | givePoint('YB_STUDENT_ATTCT_RESULT', {SRC_ID: 5, SUBMIT_RES: 1}); | 183 | givePoint('YB_STUDENT_ATTCT_RESULT', {SRC_ID: 5, SUBMIT_RES: 1}); |
178 | } else { | 184 | } else { |
185 | + identityFlag = false; | ||
186 | + | ||
179 | $identityForm.addClass('hide'); | 187 | $identityForm.addClass('hide'); |
180 | $('identity-back-wrap').remove(); | 188 | $('identity-back-wrap').remove(); |
181 | $identityWrap.append(identityFn({msg: data.message})); | 189 | $identityWrap.append(identityFn({msg: data.message})); |
@@ -708,3 +716,7 @@ $(function() { | @@ -708,3 +716,7 @@ $(function() { | ||
708 | F_URL: url, F_INDEX: 6, I_INDEX: parseInt(index, 0) + 1}); | 716 | F_URL: url, F_INDEX: 6, I_INDEX: parseInt(index, 0) + 1}); |
709 | }); | 717 | }); |
710 | }); | 718 | }); |
719 | + | ||
720 | +window.onbeforeunload = function(){ | ||
721 | + clearForm(); | ||
722 | +} |
-
Please register or login to post a comment