测试工具2增加设置验证码功能
Showing
1 changed file
with
226 additions
and
98 deletions
| ... | @@ -5,22 +5,115 @@ | ... | @@ -5,22 +5,115 @@ |
| 5 | <el-form ref="smsCode" :model="smsCode" label-width="0px"> | 5 | <el-form ref="smsCode" :model="smsCode" label-width="0px"> |
| 6 | <el-card class="darkred" shadow="always"> | 6 | <el-card class="darkred" shadow="always"> |
| 7 | <div slot="header" class="clearfix"> | 7 | <div slot="header" class="clearfix"> |
| 8 | <span>设置短信验证码</span> | 8 | <span>APP登录</span> |
| 9 | </div> | 9 | </div> |
| 10 | <div class="text item"> | 10 | <div class="text item"> |
| 11 | <el-form-item> | 11 | <el-form-item> |
| 12 | <el-input placeholder="请输入手机号" v-model="smsCode.phone" clearable></el-input> | 12 | <el-input placeholder="请输入手机号" v-model="smsCode.phone" clearable></el-input> |
| 13 | </el-form-item> | 13 | </el-form-item> |
| 14 | <div style="margin: 15px 0;"></div> | ||
| 14 | <el-form-item> | 15 | <el-form-item> |
| 15 | <el-input placeholder="请输入验证码" v-model="smsCode.code" clearable></el-input> | 16 | <el-button round @click="smsCodeSubmit">设置验证码</el-button> |
| 17 | </el-form-item> | ||
| 18 | </div> | ||
| 19 | </el-card> | ||
| 20 | </el-form> | ||
| 21 | </el-col> | ||
| 22 | <el-col :span="8"> | ||
| 23 | <el-form ref="smsCode" :model="smsCode" label-width="0px"> | ||
| 24 | <el-card class="darkred" shadow="always"> | ||
| 25 | <div slot="header" class="clearfix"> | ||
| 26 | <span>统计平台登录</span> | ||
| 27 | </div> | ||
| 28 | <div class="text item"> | ||
| 29 | <el-form-item> | ||
| 30 | <el-input placeholder="请输入手机号" v-model="smsCode.phone" clearable></el-input> | ||
| 16 | </el-form-item> | 31 | </el-form-item> |
| 17 | <div style="margin: 15px 0;"></div> | 32 | <div style="margin: 15px 0;"></div> |
| 18 | <el-form-item> | 33 | <el-form-item> |
| 19 | <el-button round @click="smsCodeSubmit">设置验证码</el-button> | 34 | <el-button round @click="smsCodeSubmitdata">设置验证码</el-button> |
| 35 | </el-form-item> | ||
| 36 | </div> | ||
| 37 | </el-card> | ||
| 38 | </el-form> | ||
| 39 | </el-col> | ||
| 40 | <el-col :span="8"> | ||
| 41 | <el-form ref="smsCode" :model="smsCode" label-width="0px"> | ||
| 42 | <el-card class="darkred" shadow="always"> | ||
| 43 | <div slot="header" class="clearfix"> | ||
| 44 | <span>小程序登录</span> | ||
| 45 | </div> | ||
| 46 | <div class="text item"> | ||
| 47 | <el-form-item> | ||
| 48 | <el-input placeholder="请输入手机号" v-model="smsCode.phone" clearable></el-input> | ||
| 49 | </el-form-item> | ||
| 50 | <div style="margin: 15px 0;"></div> | ||
| 51 | <el-form-item> | ||
| 52 | <el-button round @click="smsCodeSubmitxiaochengxu">设置验证码</el-button> | ||
| 53 | </el-form-item> | ||
| 54 | </div> | ||
| 55 | </el-card> | ||
| 56 | </el-form> | ||
| 57 | </el-col> | ||
| 58 | </el-row> | ||
| 59 | |||
| 60 | <el-row style="margin-bottom: 15px; margin-top: 5px"> | ||
| 61 | <el-col :span="8"> | ||
| 62 | <el-form ref="queryPhoneCode" :model="queryPhoneCode" label-width="0px"> | ||
| 63 | <el-card class="darkred" shadow="always"> | ||
| 64 | <div slot="header" class="clearfix"> | ||
| 65 | <span>云激活</span> | ||
| 66 | </div> | ||
| 67 | <div class="text item"> | ||
| 68 | <el-form-item> | ||
| 69 | <el-input placeholder="请输入手机号" v-model="smsCode.phone" clearable></el-input> | ||
| 70 | </el-form-item> | ||
| 71 | <div style="margin: 15px 0;"></div> | ||
| 72 | <el-form-item> | ||
| 73 | <el-button round @click="smsCodeSubmityunjihuo">设置验证码</el-button> | ||
| 74 | </el-form-item> | ||
| 75 | </div> | ||
| 76 | </el-card> | ||
| 77 | </el-form> | ||
| 78 | <el-dialog | ||
| 79 | title="短信验证码:" | ||
| 80 | :visible.sync="dialogQueryPhoneCode" | ||
| 81 | width="30%"> | ||
| 82 | <span>{{myQueryPhoneCode}}</span> | ||
| 83 | <span slot="footer" class="dialog-footer"> | ||
| 84 | <el-button type="primary" v-clipboard:copy="JSON.stringify(myQueryPhoneCode)" v-clipboard:success="onCopy" @click="dialogQueryPhoneCode = false">点击复制</el-button> | ||
| 85 | </span> | ||
| 86 | </el-dialog> | ||
| 87 | </el-col> | ||
| 88 | <el-col :span="8"> | ||
| 89 | <el-form ref="queryPhoneCode" :model="queryPhoneCode" label-width="0px"> | ||
| 90 | <el-card class="darkred" shadow="always"> | ||
| 91 | <div slot="header" class="clearfix"> | ||
| 92 | <span>活动报名</span> | ||
| 93 | </div> | ||
| 94 | <div class="text item"> | ||
| 95 | <el-form-item> | ||
| 96 | <el-input placeholder="请输入手机号" v-model="queryPhoneCode222.phone" clearable></el-input> | ||
| 97 | </el-form-item> | ||
| 98 | <el-form-item> | ||
| 99 | <el-input placeholder="请输入活动id" v-model="queryPhoneCode222.actid" clearable></el-input> | ||
| 100 | </el-form-item> | ||
| 101 | <div style="margin: 15px 0;"></div> | ||
| 102 | <el-form-item> | ||
| 103 | <el-button round @click="queryPhoneCodeSubmitactadd">设置验证码</el-button> | ||
| 20 | </el-form-item> | 104 | </el-form-item> |
| 21 | </div> | 105 | </div> |
| 22 | </el-card> | 106 | </el-card> |
| 23 | </el-form> | 107 | </el-form> |
| 108 | <el-dialog | ||
| 109 | title="短信验证码:" | ||
| 110 | :visible.sync="dialogQueryPhoneCode" | ||
| 111 | width="30%"> | ||
| 112 | <span>{{myQueryPhoneCode}}</span> | ||
| 113 | <span slot="footer" class="dialog-footer"> | ||
| 114 | <el-button type="primary" v-clipboard:copy="JSON.stringify(myQueryPhoneCode)" v-clipboard:success="onCopy" @click="dialogQueryPhoneCode = false">点击复制</el-button> | ||
| 115 | </span> | ||
| 116 | </el-dialog> | ||
| 24 | </el-col> | 117 | </el-col> |
| 25 | <el-col :span="8"> | 118 | <el-col :span="8"> |
| 26 | <el-form ref="queryPhoneCode" :model="queryPhoneCode" label-width="0px"> | 119 | <el-form ref="queryPhoneCode" :model="queryPhoneCode" label-width="0px"> |
| ... | @@ -33,7 +126,7 @@ | ... | @@ -33,7 +126,7 @@ |
| 33 | <el-input placeholder="请输入手机号" v-model="queryPhoneCode.phone" clearable></el-input> | 126 | <el-input placeholder="请输入手机号" v-model="queryPhoneCode.phone" clearable></el-input> |
| 34 | </el-form-item> | 127 | </el-form-item> |
| 35 | <el-form-item> | 128 | <el-form-item> |
| 36 | <el-select v-model="queryPhoneCode.huanjing" placeholder="请选择执行环境"> | 129 | <el-select v-model="queryPhoneCode.huanjing" placeholder="请选择执行环境" > |
| 37 | <el-option | 130 | <el-option |
| 38 | v-for="item in queryPhoneCodeOptions" | 131 | v-for="item in queryPhoneCodeOptions" |
| 39 | :key="item.value" | 132 | :key="item.value" |
| ... | @@ -59,6 +152,9 @@ | ... | @@ -59,6 +152,9 @@ |
| 59 | </span> | 152 | </span> |
| 60 | </el-dialog> | 153 | </el-dialog> |
| 61 | </el-col> | 154 | </el-col> |
| 155 | </el-row> | ||
| 156 | |||
| 157 | <el-row style="margin-bottom: 15px;"> | ||
| 62 | <el-col :span="8"> | 158 | <el-col :span="8"> |
| 63 | <el-form ref="baomingWeijihuo" :model="baomingWeijihuo" label-width="0px"> | 159 | <el-form ref="baomingWeijihuo" :model="baomingWeijihuo" label-width="0px"> |
| 64 | <el-card class="darkred" shadow="always"> | 160 | <el-card class="darkred" shadow="always"> |
| ... | @@ -83,8 +179,6 @@ | ... | @@ -83,8 +179,6 @@ |
| 83 | </el-card> | 179 | </el-card> |
| 84 | </el-form> | 180 | </el-form> |
| 85 | </el-col> | 181 | </el-col> |
| 86 | </el-row> | ||
| 87 | <el-row style="margin-bottom: 15px;"> | ||
| 88 | <el-col :span="8"> | 182 | <el-col :span="8"> |
| 89 | <el-form ref="apiTest" :model="apiTest" label-width="0px"> | 183 | <el-form ref="apiTest" :model="apiTest" label-width="0px"> |
| 90 | <el-card class="darkred" shadow="always"> | 184 | <el-card class="darkred" shadow="always"> |
| ... | @@ -166,67 +260,6 @@ | ... | @@ -166,67 +260,6 @@ |
| 166 | </el-form> | 260 | </el-form> |
| 167 | </el-col> | 261 | </el-col> |
| 168 | </el-row> | 262 | </el-row> |
| 169 | |||
| 170 | <el-row style="margin-bottom: 15px;"> | ||
| 171 | <el-col :span="8"> | ||
| 172 | <el-form ref="smsCode1" :model="smsCode222" label-width="0px"> | ||
| 173 | <el-card class="darkred" shadow="always"> | ||
| 174 | <div slot="header" class="clearfix"> | ||
| 175 | <span>测试设置短信验证码</span> | ||
| 176 | </div> | ||
| 177 | <div class="text item"> | ||
| 178 | <el-form-item> | ||
| 179 | <el-input placeholder="请输入手机号" v-model="smsCode222.phone" clearable></el-input> | ||
| 180 | </el-form-item> | ||
| 181 | <el-form-item> | ||
| 182 | <el-input placeholder="请输入验证码" v-model="smsCode222.code" clearable></el-input> | ||
| 183 | </el-form-item> | ||
| 184 | <div style="margin: 15px 0;"></div> | ||
| 185 | <el-form-item> | ||
| 186 | <el-button round @click="smsCodeSubmit222">测试设置验证码</el-button> | ||
| 187 | </el-form-item> | ||
| 188 | </div> | ||
| 189 | </el-card> | ||
| 190 | </el-form> | ||
| 191 | </el-col> | ||
| 192 | <el-col :span="8"> | ||
| 193 | <el-form ref="queryPhoneCode" :model="queryPhoneCode" label-width="0px"> | ||
| 194 | <el-card class="darkred" shadow="always"> | ||
| 195 | <div slot="header" class="clearfix"> | ||
| 196 | <span>测试查询短信验证码</span> | ||
| 197 | </div> | ||
| 198 | <div class="text item"> | ||
| 199 | <el-form-item> | ||
| 200 | <el-input placeholder="请输入手机号" v-model="queryPhoneCode222.phone" clearable></el-input> | ||
| 201 | </el-form-item> | ||
| 202 | <el-form-item> | ||
| 203 | <el-select v-model="queryPhoneCode222.huanjing" placeholder="请选择执行环境"> | ||
| 204 | <el-option | ||
| 205 | v-for="item in queryPhoneCode222Options" | ||
| 206 | :key="item.value" | ||
| 207 | :label="item.label" | ||
| 208 | :value="item.value"> | ||
| 209 | </el-option> | ||
| 210 | </el-select> | ||
| 211 | </el-form-item> | ||
| 212 | <div style="margin: 15px 0;"></div> | ||
| 213 | <el-form-item> | ||
| 214 | <el-button round @click="queryPhoneCodeSubmit222">查询验证码</el-button> | ||
| 215 | </el-form-item> | ||
| 216 | </div> | ||
| 217 | </el-card> | ||
| 218 | </el-form> | ||
| 219 | <el-dialog | ||
| 220 | title="短信验证码:" | ||
| 221 | :visible.sync="dialogQueryPhoneCode" | ||
| 222 | width="30%"> | ||
| 223 | <span>{{myQueryPhoneCode}}</span> | ||
| 224 | <span slot="footer" class="dialog-footer"> | ||
| 225 | <el-button type="primary" v-clipboard:copy="JSON.stringify(myQueryPhoneCode)" v-clipboard:success="onCopy" @click="dialogQueryPhoneCode = false">点击复制</el-button> | ||
| 226 | </span> | ||
| 227 | </el-dialog> | ||
| 228 | </el-col> | ||
| 229 | </el-row> | ||
| 230 | </div> | 263 | </div> |
| 231 | </template> | 264 | </template> |
| 232 | 265 | ||
| ... | @@ -316,16 +349,9 @@ | ... | @@ -316,16 +349,9 @@ |
| 316 | huanjing: [] | 349 | huanjing: [] |
| 317 | }, | 350 | }, |
| 318 | queryPhoneCode222: { | 351 | queryPhoneCode222: { |
| 319 | phone: '15910793402', | 352 | phone: '', |
| 320 | huanjing: [] | 353 | actid: '' |
| 321 | }, | 354 | }, |
| 322 | queryPhoneCode222Options: [{ | ||
| 323 | value: '0', | ||
| 324 | label: '测试环境' | ||
| 325 | }, { | ||
| 326 | value: '1', | ||
| 327 | label: '线上环境' | ||
| 328 | }], | ||
| 329 | queryPhoneCodeOptions: [{ | 355 | queryPhoneCodeOptions: [{ |
| 330 | value: '0', | 356 | value: '0', |
| 331 | label: '测试环境' | 357 | label: '测试环境' |
| ... | @@ -415,17 +441,48 @@ | ... | @@ -415,17 +441,48 @@ |
| 415 | 'Content-Type': 'application/x-www-form-urlencoded' | 441 | 'Content-Type': 'application/x-www-form-urlencoded' |
| 416 | } | 442 | } |
| 417 | } | 443 | } |
| 418 | this.$http.get('/tool2/smsCode?'+this.$qs.stringify({ | 444 | this.$http.get('/tool2/setAppSmsCode?'+this.$qs.stringify({ |
| 419 | phone: this.smsCode.phone, | 445 | phone: this.smsCode.phone |
| 420 | code: this.smsCode.code | ||
| 421 | }),config).then((res)=>{ | 446 | }),config).then((res)=>{ |
| 422 | console.log(res); | 447 | console.log(res); |
| 423 | if(res.data=='OK') { | 448 | if(res.data.toString().length == 4) { |
| 449 | this.myQueryPhoneCode = res.data, | ||
| 450 | this.dialogQueryPhoneCode = true | ||
| 451 | } else if(res.data=='phoneError') { | ||
| 424 | this.$message({ | 452 | this.$message({ |
| 425 | showClose: true, | 453 | showClose: true, |
| 426 | message: '设置短信验证码成功', | 454 | message: '手机号格式错误,必须是11位', |
| 427 | type: 'success' | 455 | type: 'error' |
| 428 | }); | 456 | }); |
| 457 | } else { | ||
| 458 | this.$message({ | ||
| 459 | showClose: true, | ||
| 460 | message: '设置短信验证码失败', | ||
| 461 | type: 'error' | ||
| 462 | }); | ||
| 463 | } | ||
| 464 | }).catch(error=>{ | ||
| 465 | console.log(error); | ||
| 466 | this.$message({ | ||
| 467 | showClose: true, | ||
| 468 | message: '服务器处理失败,请查看运营平台是否正常!', | ||
| 469 | type: 'error' | ||
| 470 | }); | ||
| 471 | }) | ||
| 472 | }, | ||
| 473 | smsCodeSubmitdata() { | ||
| 474 | let config = { | ||
| 475 | headers: { | ||
| 476 | 'Content-Type': 'application/x-www-form-urlencoded' | ||
| 477 | } | ||
| 478 | } | ||
| 479 | this.$http.get('/tool2/setDataSmsCode?'+this.$qs.stringify({ | ||
| 480 | phone: this.smsCode.phone | ||
| 481 | }),config).then((res)=>{ | ||
| 482 | console.log(res); | ||
| 483 | if(res.data.toString().length == 4) { | ||
| 484 | this.myQueryPhoneCode = res.data, | ||
| 485 | this.dialogQueryPhoneCode = true | ||
| 429 | } else if(res.data=='phoneError') { | 486 | } else if(res.data=='phoneError') { |
| 430 | this.$message({ | 487 | this.$message({ |
| 431 | showClose: true, | 488 | showClose: true, |
| ... | @@ -443,30 +500,59 @@ | ... | @@ -443,30 +500,59 @@ |
| 443 | console.log(error); | 500 | console.log(error); |
| 444 | this.$message({ | 501 | this.$message({ |
| 445 | showClose: true, | 502 | showClose: true, |
| 446 | message: '服务器处理失败,请核对参数!', | 503 | message: '服务器处理失败,请查看运营平台是否正常!', |
| 447 | type: 'error' | 504 | type: 'error' |
| 448 | }); | 505 | }); |
| 449 | }) | 506 | }) |
| 450 | }, | 507 | }, |
| 451 | //-----------------------------------------------------------测试---------------------------------- | 508 | smsCodeSubmitxiaochengxu() { |
| 452 | |||
| 453 | smsCodeSubmit222() { | ||
| 454 | let config = { | 509 | let config = { |
| 455 | headers: { | 510 | headers: { |
| 456 | 'Content-Type': 'application/x-www-form-urlencoded' | 511 | 'Content-Type': 'application/x-www-form-urlencoded' |
| 457 | } | 512 | } |
| 458 | } | 513 | } |
| 459 | this.$http.get('/tool2/smsCode222?'+this.$qs.stringify({ | 514 | this.$http.get('/tool2/setXiaocxSmsCode?'+this.$qs.stringify({ |
| 460 | phone: this.smsCode222.phone, | 515 | phone: this.smsCode.phone |
| 461 | code: this.smsCode222.code | ||
| 462 | }),config).then((res)=>{ | 516 | }),config).then((res)=>{ |
| 463 | console.log(res); | 517 | console.log(res); |
| 464 | if(res.data=='OK') { | 518 | if(res.data.toString().length == 4) { |
| 519 | this.myQueryPhoneCode = res.data, | ||
| 520 | this.dialogQueryPhoneCode = true | ||
| 521 | } else if(res.data=='phoneError') { | ||
| 465 | this.$message({ | 522 | this.$message({ |
| 466 | showClose: true, | 523 | showClose: true, |
| 467 | message: '设置短信验证码成功', | 524 | message: '手机号格式错误,必须是11位', |
| 468 | type: 'success' | 525 | type: 'error' |
| 526 | }); | ||
| 527 | } else { | ||
| 528 | this.$message({ | ||
| 529 | showClose: true, | ||
| 530 | message: '设置短信验证码失败', | ||
| 531 | type: 'error' | ||
| 469 | }); | 532 | }); |
| 533 | } | ||
| 534 | }).catch(error=>{ | ||
| 535 | console.log(error); | ||
| 536 | this.$message({ | ||
| 537 | showClose: true, | ||
| 538 | message: '服务器处理失败,请查看运营平台是否正常!', | ||
| 539 | type: 'error' | ||
| 540 | }); | ||
| 541 | }) | ||
| 542 | }, | ||
| 543 | smsCodeSubmityunjihuo() { | ||
| 544 | let config = { | ||
| 545 | headers: { | ||
| 546 | 'Content-Type': 'application/x-www-form-urlencoded' | ||
| 547 | } | ||
| 548 | } | ||
| 549 | this.$http.get('/tool2/setYunSmsCode?'+this.$qs.stringify({ | ||
| 550 | phone: this.smsCode.phone | ||
| 551 | }),config).then((res)=>{ | ||
| 552 | console.log(res); | ||
| 553 | if(res.data.toString().length == 4) { | ||
| 554 | this.myQueryPhoneCode = res.data, | ||
| 555 | this.dialogQueryPhoneCode = true | ||
| 470 | } else if(res.data=='phoneError') { | 556 | } else if(res.data=='phoneError') { |
| 471 | this.$message({ | 557 | this.$message({ |
| 472 | showClose: true, | 558 | showClose: true, |
| ... | @@ -484,12 +570,12 @@ | ... | @@ -484,12 +570,12 @@ |
| 484 | console.log(error); | 570 | console.log(error); |
| 485 | this.$message({ | 571 | this.$message({ |
| 486 | showClose: true, | 572 | showClose: true, |
| 487 | message: '服务器处理失败,请核对参数!', | 573 | message: '服务器处理失败,请查看运营平台是否正常!', |
| 488 | type: 'error' | 574 | type: 'error' |
| 489 | }); | 575 | }); |
| 490 | }) | 576 | }) |
| 491 | }, | 577 | }, |
| 492 | queryPhoneCodeSubmit222() { | 578 | queryPhoneCodeSubmitactadd() { |
| 493 | const loading = this.$loading({ | 579 | const loading = this.$loading({ |
| 494 | lock: true, | 580 | lock: true, |
| 495 | text: '加载中...', | 581 | text: '加载中...', |
| ... | @@ -501,9 +587,9 @@ | ... | @@ -501,9 +587,9 @@ |
| 501 | 'Content-Type': 'application/x-www-form-urlencoded' | 587 | 'Content-Type': 'application/x-www-form-urlencoded' |
| 502 | } | 588 | } |
| 503 | } | 589 | } |
| 504 | this.$http.get('/tool2/queryPhoneCode222?'+this.$qs.stringify({ | 590 | this.$http.get('/tool2/setActCode?'+this.$qs.stringify({ |
| 505 | phone: this.queryPhoneCode222.phone, | 591 | phone: this.queryPhoneCode222.phone, |
| 506 | type: this.queryPhoneCode222.huanjing.toString() | 592 | actid: this.queryPhoneCode222.actid.toString() |
| 507 | }),config).then((res)=>{ | 593 | }),config).then((res)=>{ |
| 508 | console.log(res); | 594 | console.log(res); |
| 509 | if(res.data=='codenull') { | 595 | if(res.data=='codenull') { |
| ... | @@ -512,10 +598,10 @@ | ... | @@ -512,10 +598,10 @@ |
| 512 | message: '该手机号验证码为空', | 598 | message: '该手机号验证码为空', |
| 513 | type: 'error' | 599 | type: 'error' |
| 514 | }); | 600 | }); |
| 515 | } else if(res.data=='typeError') { | 601 | } else if(res.data=='actidError') { |
| 516 | this.$message({ | 602 | this.$message({ |
| 517 | showClose: true, | 603 | showClose: true, |
| 518 | message: '执行环境参数错误', | 604 | message: '活动id不能为空', |
| 519 | type: 'error' | 605 | type: 'error' |
| 520 | }); | 606 | }); |
| 521 | } else { | 607 | } else { |
| ... | @@ -528,11 +614,53 @@ | ... | @@ -528,11 +614,53 @@ |
| 528 | loading.close(); | 614 | loading.close(); |
| 529 | this.$message({ | 615 | this.$message({ |
| 530 | showClose: true, | 616 | showClose: true, |
| 617 | message: '服务器处理失败,请查看运营平台是否正常!', | ||
| 618 | type: 'error' | ||
| 619 | }); | ||
| 620 | }) | ||
| 621 | }, | ||
| 622 | //-----------------------------------------------------------测试---------------------------------- | ||
| 623 | |||
| 624 | smsCodeSubmit222() { | ||
| 625 | let config = { | ||
| 626 | headers: { | ||
| 627 | 'Content-Type': 'application/x-www-form-urlencoded' | ||
| 628 | } | ||
| 629 | } | ||
| 630 | this.$http.get('/tool2/smsCode222?'+this.$qs.stringify({ | ||
| 631 | phone: this.smsCode222.phone, | ||
| 632 | code: this.smsCode222.code | ||
| 633 | }),config).then((res)=>{ | ||
| 634 | console.log(res); | ||
| 635 | if(res.data=='OK') { | ||
| 636 | this.$message({ | ||
| 637 | showClose: true, | ||
| 638 | message: '设置短信验证码成功', | ||
| 639 | type: 'success' | ||
| 640 | }); | ||
| 641 | } else if(res.data=='phoneError') { | ||
| 642 | this.$message({ | ||
| 643 | showClose: true, | ||
| 644 | message: '手机号格式错误,必须是11位', | ||
| 645 | type: 'error' | ||
| 646 | }); | ||
| 647 | } else { | ||
| 648 | this.$message({ | ||
| 649 | showClose: true, | ||
| 650 | message: '设置短信验证码失败', | ||
| 651 | type: 'error' | ||
| 652 | }); | ||
| 653 | } | ||
| 654 | }).catch(error=>{ | ||
| 655 | console.log(error); | ||
| 656 | this.$message({ | ||
| 657 | showClose: true, | ||
| 531 | message: '服务器处理失败,请核对参数!', | 658 | message: '服务器处理失败,请核对参数!', |
| 532 | type: 'error' | 659 | type: 'error' |
| 533 | }); | 660 | }); |
| 534 | }) | 661 | }) |
| 535 | }, | 662 | }, |
| 663 | |||
| 536 | //-----------------------------------------------------------测试---------------------------------- | 664 | //-----------------------------------------------------------测试---------------------------------- |
| 537 | baomingWeijihuoSubmit() { | 665 | baomingWeijihuoSubmit() { |
| 538 | const loading = this.$loading({ | 666 | const loading = this.$loading({ | ... | ... |
-
Please register or sign in to post a comment