Authored by lzhy

修改提现

@@ -115,29 +115,6 @@ export default { @@ -115,29 +115,6 @@ export default {
115 this.shopPhone = checkTel; 115 this.shopPhone = checkTel;
116 }); 116 });
117 }, 117 },
118 -  
119 - //验证短信验证码  
120 - verifySmsCode(verifyCode) {  
121 - if (!verifyCode || verifyCode === '') {  
122 - this.$Notice.error({  
123 - title: '提交错误',  
124 - desc: '验证码不能为空',  
125 - });  
126 - return false;  
127 - }  
128 - this.financeService.verifySmsCode({ phone: this.shopPhone, verifyCode }).then(res => {  
129 - if (res.code !== 200) {  
130 - this.$Notice.error({  
131 - title: '提交错误',  
132 - desc: res.message,  
133 - });  
134 - return false;  
135 - } else {  
136 - return true;  
137 - }  
138 - });  
139 - },  
140 -  
141 //获取短信验证码 118 //获取短信验证码
142 getVerifyCode() { 119 getVerifyCode() {
143 if (this.shopPhone === '') { 120 if (this.shopPhone === '') {
@@ -226,29 +203,41 @@ export default { @@ -226,29 +203,41 @@ export default {
226 return false; 203 return false;
227 } 204 }
228 const applyParams = this.beforeSave(); 205 const applyParams = this.beforeSave();
229 -  
230 - if (!this.verifySmsCode(applyParams.verifyCode)) { 206 + if (!applyParams.verifyCode || applyParams.verifyCode === '') {
  207 + this.$Notice.error({
  208 + title: '提交错误',
  209 + desc: '验证码不能为空',
  210 + });
231 return false; 211 return false;
232 } 212 }
233 -  
234 - this.$Loading.start();  
235 - this.submitDisabled = true;  
236 - return this.financeService.shopWithdrawApply(applyParams).then(result => {  
237 - if (result.code === 200) {  
238 - this.$Loading.finish();  
239 - this.$Notice.success({  
240 - title: '提交成功',  
241 - desc: '确认提现成功!',  
242 - });  
243 - this.backList();  
244 - } else {  
245 - this.$Loading.error();  
246 - this.submitDisabled = false;  
247 - this.$Notice.error({ 213 + const _this = this;
  214 + this.financeService.verifySmsCode({ phone: this.shopPhone, verifyCode: applyParams.verifyCode }).then(res => {
  215 + if (res.code !== 200) {
  216 + _this.$Notice.error({
248 title: '提交错误', 217 title: '提交错误',
249 - desc: result.message, 218 + desc: res.message,
250 }); 219 });
  220 + return false;
251 } 221 }
  222 + _this.$Loading.start();
  223 + _this.submitDisabled = true;
  224 + _this.financeService.shopWithdrawApply(applyParams).then(result => {
  225 + if (result.code === 200) {
  226 + _this.$Loading.finish();
  227 + _this.$Notice.success({
  228 + title: '提交成功',
  229 + desc: '确认提现成功!',
  230 + });
  231 + _this.backList();
  232 + } else {
  233 + _this.$Loading.error();
  234 + _this.submitDisabled = false;
  235 + _this.$Notice.error({
  236 + title: '提交错误',
  237 + desc: result.message,
  238 + });
  239 + }
  240 + });
252 }); 241 });
253 }, 242 },
254 submit() { 243 submit() {