Authored by 郭成尧

loading

@@ -6,6 +6,9 @@ @@ -6,6 +6,9 @@
6 let $ = require('yoho-jquery'), 6 let $ = require('yoho-jquery'),
7 ImgCheck = require('plugin/img-check'), 7 ImgCheck = require('plugin/img-check'),
8 tip = require('plugin/tip'); 8 tip = require('plugin/tip');
  9 +
  10 +let loading = require('plugin/loading');
  11 +
9 const validType = { 12 const validType = {
10 IMG_CHECK: 1, 13 IMG_CHECK: 1,
11 GEETEST: 2 14 GEETEST: 2
@@ -94,7 +97,9 @@ class Validate { @@ -94,7 +97,9 @@ class Validate {
94 } 97 }
95 return Promise.resolve({captcha}); 98 return Promise.resolve({captcha});
96 } else { 99 } else {
  100 + loading.showLoadingMask();
97 return new Promise((resolve) => { 101 return new Promise((resolve) => {
  102 + loading.hideLoadingMask();
98 this.$container.removeClass('hide'); 103 this.$container.removeClass('hide');
99 this.captchaObj.onSuccess(() => { 104 this.captchaObj.onSuccess(() => {
100 resolve(this.captchaObj.getValidate()); 105 resolve(this.captchaObj.getValidate());