增加小程序登录和活动报名测试环境验证码设置工具
Showing
1 changed file
with
133 additions
and
0 deletions
| ... | @@ -156,6 +156,60 @@ | ... | @@ -156,6 +156,60 @@ |
| 156 | </el-col> | 156 | </el-col> |
| 157 | </el-row> | 157 | </el-row> |
| 158 | 158 | ||
| 159 | |||
| 160 | <el-row style="margin-bottom: 15px; margin-top: 5px"> | ||
| 161 | <el-col :span="8"> | ||
| 162 | <el-form ref="smsCode" :model="smsCode" label-width="0px"> | ||
| 163 | <el-card class="darkred" shadow="always"> | ||
| 164 | <div slot="header" class="clearfix"> | ||
| 165 | <span>小程序登录(测试)</span> | ||
| 166 | </div> | ||
| 167 | <div class="text item"> | ||
| 168 | <el-form-item> | ||
| 169 | <el-input placeholder="请输入手机号" v-model="smsCode.phone" clearable></el-input> | ||
| 170 | </el-form-item> | ||
| 171 | <div style="margin: 15px 0;"></div> | ||
| 172 | <el-form-item> | ||
| 173 | <el-button round @click="smsCodeSubmitxiaochengxutest">设置验证码</el-button> | ||
| 174 | </el-form-item> | ||
| 175 | </div> | ||
| 176 | </el-card> | ||
| 177 | </el-form> | ||
| 178 | </el-col> | ||
| 179 | <el-col :span="8"> | ||
| 180 | <el-form ref="queryPhoneCode" :model="queryPhoneCode" label-width="0px"> | ||
| 181 | <el-card class="darkred" shadow="always"> | ||
| 182 | <div slot="header" class="clearfix"> | ||
| 183 | <span>活动报名(测试)</span> | ||
| 184 | </div> | ||
| 185 | <div class="text item"> | ||
| 186 | <el-form-item> | ||
| 187 | <el-input placeholder="请输入手机号" v-model="smsCode.phone" clearable></el-input> | ||
| 188 | </el-form-item> | ||
| 189 | <!-- | ||
| 190 | <el-form-item> | ||
| 191 | <el-input placeholder="请输入活动id" v-model="queryPhoneCode222.actid" clearable></el-input> | ||
| 192 | </el-form-item> | ||
| 193 | --> | ||
| 194 | <div style="margin: 15px 0;"></div> | ||
| 195 | <el-form-item> | ||
| 196 | <el-button round @click="queryPhoneCodeSubmitactaddtest">设置验证码</el-button> | ||
| 197 | </el-form-item> | ||
| 198 | </div> | ||
| 199 | </el-card> | ||
| 200 | </el-form> | ||
| 201 | <el-dialog | ||
| 202 | title="短信验证码:" | ||
| 203 | :visible.sync="dialogQueryPhoneCode" | ||
| 204 | width="30%"> | ||
| 205 | <span>{{myQueryPhoneCode}}</span> | ||
| 206 | <span slot="footer" class="dialog-footer"> | ||
| 207 | <el-button type="primary" v-clipboard:copy="JSON.stringify(myQueryPhoneCode)" v-clipboard:success="onCopy" @click="dialogQueryPhoneCode = false">点击复制</el-button> | ||
| 208 | </span> | ||
| 209 | </el-dialog> | ||
| 210 | </el-col> | ||
| 211 | </el-row> | ||
| 212 | |||
| 159 | <el-row style="margin-bottom: 15px;"> | 213 | <el-row style="margin-bottom: 15px;"> |
| 160 | <el-col :span="8"> | 214 | <el-col :span="8"> |
| 161 | <el-form ref="baomingWeijihuo" :model="baomingWeijihuo" label-width="0px"> | 215 | <el-form ref="baomingWeijihuo" :model="baomingWeijihuo" label-width="0px"> |
| ... | @@ -507,6 +561,41 @@ | ... | @@ -507,6 +561,41 @@ |
| 507 | }); | 561 | }); |
| 508 | }) | 562 | }) |
| 509 | }, | 563 | }, |
| 564 | smsCodeSubmitxiaochengxutest() { | ||
| 565 | let config = { | ||
| 566 | headers: { | ||
| 567 | 'Content-Type': 'application/x-www-form-urlencoded' | ||
| 568 | } | ||
| 569 | } | ||
| 570 | this.$http.get('/tool2/setXiaocxSmstestCode?'+this.$qs.stringify({ | ||
| 571 | phone: this.smsCode.phone | ||
| 572 | }),config).then((res)=>{ | ||
| 573 | console.log(res); | ||
| 574 | if(res.data.toString().length == 4) { | ||
| 575 | this.myQueryPhoneCode = res.data, | ||
| 576 | this.dialogQueryPhoneCode = true | ||
| 577 | } else if(res.data=='phoneError') { | ||
| 578 | this.$message({ | ||
| 579 | showClose: true, | ||
| 580 | message: '手机号格式错误,必须是11位', | ||
| 581 | type: 'error' | ||
| 582 | }); | ||
| 583 | } else { | ||
| 584 | this.$message({ | ||
| 585 | showClose: true, | ||
| 586 | message: '设置短信验证码失败', | ||
| 587 | type: 'error' | ||
| 588 | }); | ||
| 589 | } | ||
| 590 | }).catch(error=>{ | ||
| 591 | console.log(error); | ||
| 592 | this.$message({ | ||
| 593 | showClose: true, | ||
| 594 | message: '服务器处理失败,请查看运营平台是否正常!', | ||
| 595 | type: 'error' | ||
| 596 | }); | ||
| 597 | }) | ||
| 598 | }, | ||
| 510 | smsCodeSubmitxiaochengxu() { | 599 | smsCodeSubmitxiaochengxu() { |
| 511 | let config = { | 600 | let config = { |
| 512 | headers: { | 601 | headers: { |
| ... | @@ -577,6 +666,50 @@ | ... | @@ -577,6 +666,50 @@ |
| 577 | }); | 666 | }); |
| 578 | }) | 667 | }) |
| 579 | }, | 668 | }, |
| 669 | queryPhoneCodeSubmitactaddtest() { | ||
| 670 | const loading = this.$loading({ | ||
| 671 | lock: true, | ||
| 672 | text: '加载中...', | ||
| 673 | spinner: 'el-icon-loading', | ||
| 674 | background: 'rgba(0, 0, 0, 0.7)' | ||
| 675 | }); | ||
| 676 | let config = { | ||
| 677 | headers: { | ||
| 678 | 'Content-Type': 'application/x-www-form-urlencoded' | ||
| 679 | } | ||
| 680 | } | ||
| 681 | this.$http.get('/tool2/setActtestCode?'+this.$qs.stringify({ | ||
| 682 | phone: this.smsCode.phone, | ||
| 683 | actid: '1102'//this.queryPhoneCode222.actid.toString() | ||
| 684 | }),config).then((res)=>{ | ||
| 685 | console.log(res); | ||
| 686 | if(res.data=='codenull') { | ||
| 687 | this.$message({ | ||
| 688 | showClose: true, | ||
| 689 | message: '该手机号验证码为空', | ||
| 690 | type: 'error' | ||
| 691 | }); | ||
| 692 | } else if(res.data=='actidError') { | ||
| 693 | this.$message({ | ||
| 694 | showClose: true, | ||
| 695 | message: '活动id不能为空', | ||
| 696 | type: 'error' | ||
| 697 | }); | ||
| 698 | } else { | ||
| 699 | this.myQueryPhoneCode = res.data | ||
| 700 | this.dialogQueryPhoneCode = true | ||
| 701 | } | ||
| 702 | loading.close(); | ||
| 703 | }).catch(error=>{ | ||
| 704 | console.log(error); | ||
| 705 | loading.close(); | ||
| 706 | this.$message({ | ||
| 707 | showClose: true, | ||
| 708 | message: '服务器处理失败,请查看运营平台是否正常!', | ||
| 709 | type: 'error' | ||
| 710 | }); | ||
| 711 | }) | ||
| 712 | }, | ||
| 580 | queryPhoneCodeSubmitactadd() { | 713 | queryPhoneCodeSubmitactadd() { |
| 581 | const loading = this.$loading({ | 714 | const loading = this.$loading({ |
| 582 | lock: true, | 715 | lock: true, | ... | ... |
-
Please register or sign in to post a comment