commit
Showing
1 changed file
with
54 additions
and
7 deletions
| ... | @@ -51,15 +51,25 @@ | ... | @@ -51,15 +51,25 @@ |
| 51 | </el-dialog> | 51 | </el-dialog> |
| 52 | </el-col> | 52 | </el-col> |
| 53 | <el-col :span="8"> | 53 | <el-col :span="8"> |
| 54 | <el-form ref="form" :model="smsCode" label-width="0px"> | ||
| 54 | <el-card class="blue" shadow="always"> | 55 | <el-card class="blue" shadow="always"> |
| 55 | <div slot="header" class="clearfix"> | 56 | <div slot="header" class="clearfix"> |
| 56 | <span>正在开发中</span> | 57 | <span>设置短信验证码</span> |
| 57 | <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button> | ||
| 58 | </div> | 58 | </div> |
| 59 | <div v-for="o in 4" :key="o" class="text item"> | 59 | <div class="text item"> |
| 60 | {{'正在开发中 ' + o }} | 60 | <el-form-item> |
| 61 | <el-input placeholder="请输入手机号" v-model="smsCode.phone" clearable></el-input> | ||
| 62 | </el-form-item> | ||
| 63 | <el-form-item> | ||
| 64 | <el-input placeholder="请输入验证码" v-model="smsCode.code" clearable></el-input> | ||
| 65 | </el-form-item> | ||
| 66 | <div style="margin: 15px 0;"></div> | ||
| 67 | <el-form-item> | ||
| 68 | <el-button round @click="smsCodeSubmit">设置验证码</el-button> | ||
| 69 | </el-form-item> | ||
| 61 | </div> | 70 | </div> |
| 62 | </el-card> | 71 | </el-card> |
| 72 | </el-form> | ||
| 63 | </el-col> | 73 | </el-col> |
| 64 | </el-row> | 74 | </el-row> |
| 65 | <el-row> | 75 | <el-row> |
| ... | @@ -132,7 +142,11 @@ | ... | @@ -132,7 +142,11 @@ |
| 132 | myData: '' | 142 | myData: '' |
| 133 | }, | 143 | }, |
| 134 | dialogVisible: false, | 144 | dialogVisible: false, |
| 135 | mybizdata: '' | 145 | mybizdata: '', |
| 146 | smsCode: { | ||
| 147 | phone: '', | ||
| 148 | code: '' | ||
| 149 | } | ||
| 136 | } | 150 | } |
| 137 | }, | 151 | }, |
| 138 | methods: { | 152 | methods: { |
| ... | @@ -164,7 +178,7 @@ | ... | @@ -164,7 +178,7 @@ |
| 164 | console.log(error); | 178 | console.log(error); |
| 165 | this.$message({ | 179 | this.$message({ |
| 166 | showClose: true, | 180 | showClose: true, |
| 167 | message: '服务器抛出异常', | 181 | message: '服务器处理失败,请核对参数!', |
| 168 | type: 'error' | 182 | type: 'error' |
| 169 | }); | 183 | }); |
| 170 | }) | 184 | }) |
| ... | @@ -185,7 +199,40 @@ | ... | @@ -185,7 +199,40 @@ |
| 185 | console.log(error); | 199 | console.log(error); |
| 186 | this.$message({ | 200 | this.$message({ |
| 187 | showClose: true, | 201 | showClose: true, |
| 188 | message: '服务器抛出异常', | 202 | message: '服务器处理失败,请核对参数!', |
| 203 | type: 'error' | ||
| 204 | }); | ||
| 205 | }) | ||
| 206 | }, | ||
| 207 | smsCodeSubmit() { | ||
| 208 | let config = { | ||
| 209 | headers: { | ||
| 210 | 'Content-Type': 'application/x-www-form-urlencoded' | ||
| 211 | } | ||
| 212 | } | ||
| 213 | this.$http.get('/tool/smsCode?'+this.$qs.stringify({ | ||
| 214 | phone: this.smsCode.phone, | ||
| 215 | code: this.smsCode.code | ||
| 216 | }),config).then((res)=>{ | ||
| 217 | console.log(res); | ||
| 218 | if(res.data=='success') { | ||
| 219 | this.$message({ | ||
| 220 | showClose: true, | ||
| 221 | message: '设置短信验证码成功', | ||
| 222 | type: 'success' | ||
| 223 | }); | ||
| 224 | } else { | ||
| 225 | this.$message({ | ||
| 226 | showClose: true, | ||
| 227 | message: '设置短信验证码失败', | ||
| 228 | type: 'error' | ||
| 229 | }); | ||
| 230 | } | ||
| 231 | }).catch(error=>{ | ||
| 232 | console.log(error); | ||
| 233 | this.$message({ | ||
| 234 | showClose: true, | ||
| 235 | message: '服务器处理失败,请核对参数!', | ||
| 189 | type: 'error' | 236 | type: 'error' |
| 190 | }); | 237 | }); |
| 191 | }) | 238 | }) | ... | ... |
-
Please register or sign in to post a comment