Commit 643607c2 643607c2dcbc1869c6cf889fdb833cf87d515235 by zhanghao

commit

1 parent 9593ce69
...@@ -149,6 +149,45 @@ ...@@ -149,6 +149,45 @@
149 </el-dialog> 149 </el-dialog>
150 </el-col> 150 </el-col>
151 <el-col :span="8"> 151 <el-col :span="8">
152 <el-form ref="queryPhoneCode" :model="queryPhoneCode" label-width="0px">
153 <el-card class="darkred" shadow="always">
154 <div slot="header" class="clearfix">
155 <span>查询短信验证码</span>
156 </div>
157 <div class="text item">
158 <el-form-item>
159 <el-input placeholder="请输入手机号" v-model="queryPhoneCode.phone" clearable></el-input>
160 </el-form-item>
161 <el-form-item>
162 <el-select v-model="queryPhoneCode.huanjing" placeholder="请选择执行环境">
163 <el-option
164 v-for="item in queryPhoneCodeOptions"
165 :key="item.value"
166 :label="item.label"
167 :value="item.value">
168 </el-option>
169 </el-select>
170 </el-form-item>
171 <div style="margin: 15px 0;"></div>
172 <el-form-item>
173 <el-button round @click="queryPhoneCodeSubmit">查询验证码</el-button>
174 </el-form-item>
175 </div>
176 </el-card>
177 </el-form>
178 <el-dialog
179 title="短信验证码:"
180 :visible.sync="dialogQueryPhoneCode"
181 width="30%">
182 <span>{{myQueryPhoneCode}}</span>
183 <span slot="footer" class="dialog-footer">
184 <el-button type="primary" v-clipboard:copy="JSON.stringify(myQueryPhoneCode)" v-clipboard:success="onCopy" @click="dialogQueryPhoneCode = false">点击复制</el-button>
185 </span>
186 </el-dialog>
187 </el-col>
188 </el-row>
189 <el-row style="margin-bottom: 15px;">
190 <el-col :span="8">
152 <el-form ref="createAPI" :model="createAPI" label-width="0px"> 191 <el-form ref="createAPI" :model="createAPI" label-width="0px">
153 <el-card class="darkred" shadow="always"> 192 <el-card class="darkred" shadow="always">
154 <div slot="header" class="clearfix"> 193 <div slot="header" class="clearfix">
...@@ -194,8 +233,6 @@ ...@@ -194,8 +233,6 @@
194 </span> 233 </span>
195 </el-dialog> 234 </el-dialog>
196 </el-col> 235 </el-col>
197 </el-row>
198 <el-row style="margin-bottom: 15px;">
199 <el-col :span="8"> 236 <el-col :span="8">
200 <el-form ref="createCluesYoubaoe" :model="createCluesYoubaoe" label-width="0px"> 237 <el-form ref="createCluesYoubaoe" :model="createCluesYoubaoe" label-width="0px">
201 <el-card class="darkred" shadow="always"> 238 <el-card class="darkred" shadow="always">
...@@ -367,6 +404,19 @@ ...@@ -367,6 +404,19 @@
367 value: '1', 404 value: '1',
368 label: '线上环境' 405 label: '线上环境'
369 }], 406 }],
407 queryPhoneCode: {
408 phone: '',
409 huanjing: []
410 },
411 queryPhoneCodeOptions: [{
412 value: '0',
413 label: '测试环境'
414 }, {
415 value: '1',
416 label: '线上环境'
417 }],
418 dialogQueryPhoneCode: false,
419 myQueryPhoneCode: '',
370 createAPI: { 420 createAPI: {
371 method: '', 421 method: '',
372 biz_data: '', 422 biz_data: '',
...@@ -649,6 +699,49 @@ ...@@ -649,6 +699,49 @@
649 }); 699 });
650 }) 700 })
651 loading.close(); 701 loading.close();
702 },
703 queryPhoneCodeSubmit() {
704 const loading = this.$loading({
705 lock: true,
706 text: 'Loading',
707 spinner: 'el-icon-loading',
708 background: 'rgba(0, 0, 0, 0.7)'
709 });
710 let config = {
711 headers: {
712 'Content-Type': 'application/x-www-form-urlencoded'
713 }
714 }
715 this.$http.get('/tool/queryPhoneCode?'+this.$qs.stringify({
716 phone: this.queryPhoneCode.phone,
717 type: this.queryPhoneCode.huanjing.toString()
718 }),config).then((res)=>{
719 console.log(res);
720 if(res.data=='codenull') {
721 this.$message({
722 showClose: true,
723 message: '该手机号验证码为空',
724 type: 'error'
725 });
726 } else if(res.data=='typeError') {
727 this.$message({
728 showClose: true,
729 message: '执行环境参数错误',
730 type: 'error'
731 });
732 } else {
733 this.myQueryPhoneCode = res.data
734 this.dialogQueryPhoneCode = true
735 }
736 }).catch(error=>{
737 console.log(error);
738 this.$message({
739 showClose: true,
740 message: '服务器处理失败,请核对参数!',
741 type: 'error'
742 });
743 })
744 loading.close();
652 } 745 }
653 } 746 }
654 } 747 }
......