Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张浩
/
br-client
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
3ec71734
...
3ec717341e52f7c502d5f681c144d6df05192f64
authored
2021-02-22 14:37:40 +0800
by
zhanghao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
242c8783
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
1 deletions
src/page/toolAime.vue
src/page/toolAime.vue
View file @
3ec7173
...
...
@@ -2,6 +2,27 @@
<div>
<el-row
style=
"margin-bottom: 15px; margin-top: 5px"
>
<el-col
:span=
"8"
>
<el-form
ref=
"smsCode"
:model=
"smsCode"
label-width=
"0px"
>
<el-card
class=
"darkred"
shadow=
"always"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
设置短信验证码
</span>
</div>
<div
class=
"text item"
>
<el-form-item>
<el-input
placeholder=
"请输入手机号"
v-model=
"smsCode.phone"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-input
placeholder=
"请输入验证码"
v-model=
"smsCode.code"
clearable
></el-input>
</el-form-item>
<div
style=
"margin: 15px 0;"
></div>
<el-form-item>
<el-button
round
@
click=
"smsCodeSubmit"
>
设置验证码
</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
</el-col>
<el-col
:span=
"8"
>
<el-form
ref=
"nlpTestCase"
:model=
"nlpTestCase"
label-width=
"0px"
>
<el-card
class=
"darkred"
shadow=
"always"
>
<div
slot=
"header"
class=
"clearfix"
>
...
...
@@ -86,7 +107,11 @@
},
{
value
:
'2'
,
label
:
'线上环境'
}]
}],
smsCode
:
{
phone
:
''
,
code
:
1111
}
}
},
mounted
()
{
...
...
@@ -109,6 +134,45 @@
const
{
href
}
=
this
.
$router
.
resolve
({
name
:
'nlp'
,
query
:
{
myplatform
:
this
.
nlpTestCase
.
myplatform
.
toString
(),
runtime
:
this
.
nlpTestCase
.
runtime
.
toString
()}})
window
.
open
(
href
,
'_blank'
)
},
smsCodeSubmit
()
{
let
config
=
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
this
.
$http
.
get
(
'/aimeTool/smsCode?'
+
this
.
$qs
.
stringify
({
phone
:
this
.
smsCode
.
phone
,
code
:
this
.
smsCode
.
code
}),
config
).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
data
==
'OK'
)
{
this
.
$message
({
showClose
:
true
,
message
:
'设置短信验证码成功'
,
type
:
'success'
});
}
else
if
(
res
.
data
==
'phoneError'
)
{
this
.
$message
({
showClose
:
true
,
message
:
'手机号格式错误,必须是11位'
,
type
:
'error'
});
}
else
{
this
.
$message
({
showClose
:
true
,
message
:
'设置短信验证码失败'
,
type
:
'error'
});
}
}).
catch
(
error
=>
{
console
.
log
(
error
);
this
.
$message
({
showClose
:
true
,
message
:
'服务器处理失败,请核对参数!'
,
type
:
'error'
});
})
}
}
}
...
...
Please
register
or
sign in
to post a comment