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
0de5bf61
...
0de5bf61f80add5128d496333927ab98087a70f3
authored
2023-11-01 15:13:00 +0800
by
牛先锋
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
测试工具2增加设置验证码功能
1 parent
ab8c0fb8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
226 additions
and
98 deletions
src/page/tool2.vue
src/page/tool2.vue
View file @
0de5bf6
...
...
@@ -5,22 +5,115 @@
<el-form
ref=
"smsCode"
:model=
"smsCode"
label-width=
"0px"
>
<el-card
class=
"darkred"
shadow=
"always"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
设置短信验证码
</span>
<span>
APP登录
</span>
</div>
<div
class=
"text item"
>
<el-form-item>
<el-input
placeholder=
"请输入手机号"
v-model=
"smsCode.phone"
clearable
></el-input>
</el-form-item>
<div
style=
"margin: 15px 0;"
></div>
<el-form-item>
<el-input
placeholder=
"请输入验证码"
v-model=
"smsCode.code"
clearable
></el-input>
<el-button
round
@
click=
"smsCodeSubmit"
>
设置验证码
</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
</el-col>
<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>
<div
style=
"margin: 15px 0;"
></div>
<el-form-item>
<el-button
round
@
click=
"smsCodeSubmit"
>
设置验证码
</el-button>
<el-button
round
@
click=
"smsCodeSubmitdata"
>
设置验证码
</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
</el-col>
<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>
<div
style=
"margin: 15px 0;"
></div>
<el-form-item>
<el-button
round
@
click=
"smsCodeSubmitxiaochengxu"
>
设置验证码
</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
</el-col>
</el-row>
<el-row
style=
"margin-bottom: 15px; margin-top: 5px"
>
<el-col
:span=
"8"
>
<el-form
ref=
"queryPhoneCode"
:model=
"queryPhoneCode"
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>
<div
style=
"margin: 15px 0;"
></div>
<el-form-item>
<el-button
round
@
click=
"smsCodeSubmityunjihuo"
>
设置验证码
</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
<el-dialog
title=
"短信验证码:"
:visible
.
sync=
"dialogQueryPhoneCode"
width=
"30%"
>
<span>
{{
myQueryPhoneCode
}}
</span>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-clipboard:copy=
"JSON.stringify(myQueryPhoneCode)"
v-clipboard:success=
"onCopy"
@
click=
"dialogQueryPhoneCode = false"
>
点击复制
</el-button>
</span>
</el-dialog>
</el-col>
<el-col
:span=
"8"
>
<el-form
ref=
"queryPhoneCode"
:model=
"queryPhoneCode"
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=
"queryPhoneCode222.phone"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-input
placeholder=
"请输入活动id"
v-model=
"queryPhoneCode222.actid"
clearable
></el-input>
</el-form-item>
<div
style=
"margin: 15px 0;"
></div>
<el-form-item>
<el-button
round
@
click=
"queryPhoneCodeSubmitactadd"
>
设置验证码
</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
<el-dialog
title=
"短信验证码:"
:visible
.
sync=
"dialogQueryPhoneCode"
width=
"30%"
>
<span>
{{
myQueryPhoneCode
}}
</span>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-clipboard:copy=
"JSON.stringify(myQueryPhoneCode)"
v-clipboard:success=
"onCopy"
@
click=
"dialogQueryPhoneCode = false"
>
点击复制
</el-button>
</span>
</el-dialog>
</el-col>
<el-col
:span=
"8"
>
<el-form
ref=
"queryPhoneCode"
:model=
"queryPhoneCode"
label-width=
"0px"
>
...
...
@@ -33,7 +126,7 @@
<el-input
placeholder=
"请输入手机号"
v-model=
"queryPhoneCode.phone"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-select
v-model=
"queryPhoneCode.huanjing"
placeholder=
"请选择执行环境"
>
<el-select
v-model=
"queryPhoneCode.huanjing"
placeholder=
"请选择执行环境"
>
<el-option
v-for=
"item in queryPhoneCodeOptions"
:key=
"item.value"
...
...
@@ -59,6 +152,9 @@
</span>
</el-dialog>
</el-col>
</el-row>
<el-row
style=
"margin-bottom: 15px;"
>
<el-col
:span=
"8"
>
<el-form
ref=
"baomingWeijihuo"
:model=
"baomingWeijihuo"
label-width=
"0px"
>
<el-card
class=
"darkred"
shadow=
"always"
>
...
...
@@ -83,8 +179,6 @@
</el-card>
</el-form>
</el-col>
</el-row>
<el-row
style=
"margin-bottom: 15px;"
>
<el-col
:span=
"8"
>
<el-form
ref=
"apiTest"
:model=
"apiTest"
label-width=
"0px"
>
<el-card
class=
"darkred"
shadow=
"always"
>
...
...
@@ -166,67 +260,6 @@
</el-form>
</el-col>
</el-row>
<el-row
style=
"margin-bottom: 15px;"
>
<el-col
:span=
"8"
>
<el-form
ref=
"smsCode1"
:model=
"smsCode222"
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=
"smsCode222.phone"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-input
placeholder=
"请输入验证码"
v-model=
"smsCode222.code"
clearable
></el-input>
</el-form-item>
<div
style=
"margin: 15px 0;"
></div>
<el-form-item>
<el-button
round
@
click=
"smsCodeSubmit222"
>
测试设置验证码
</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
</el-col>
<el-col
:span=
"8"
>
<el-form
ref=
"queryPhoneCode"
:model=
"queryPhoneCode"
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=
"queryPhoneCode222.phone"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-select
v-model=
"queryPhoneCode222.huanjing"
placeholder=
"请选择执行环境"
>
<el-option
v-for=
"item in queryPhoneCode222Options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<div
style=
"margin: 15px 0;"
></div>
<el-form-item>
<el-button
round
@
click=
"queryPhoneCodeSubmit222"
>
查询验证码
</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
<el-dialog
title=
"短信验证码:"
:visible
.
sync=
"dialogQueryPhoneCode"
width=
"30%"
>
<span>
{{
myQueryPhoneCode
}}
</span>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-clipboard:copy=
"JSON.stringify(myQueryPhoneCode)"
v-clipboard:success=
"onCopy"
@
click=
"dialogQueryPhoneCode = false"
>
点击复制
</el-button>
</span>
</el-dialog>
</el-col>
</el-row>
</div>
</
template
>
...
...
@@ -316,16 +349,9 @@
huanjing
:
[]
},
queryPhoneCode222
:
{
phone
:
'
15910793402
'
,
huanjing
:
[]
phone
:
''
,
actid
:
''
},
queryPhoneCode222Options
:
[{
value
:
'0'
,
label
:
'测试环境'
},
{
value
:
'1'
,
label
:
'线上环境'
}],
queryPhoneCodeOptions
:
[{
value
:
'0'
,
label
:
'测试环境'
...
...
@@ -415,17 +441,48 @@
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
this
.
$http
.
get
(
'/tool2/smsCode?'
+
this
.
$qs
.
stringify
({
phone
:
this
.
smsCode
.
phone
,
code
:
this
.
smsCode
.
code
this
.
$http
.
get
(
'/tool2/setAppSmsCode?'
+
this
.
$qs
.
stringify
({
phone
:
this
.
smsCode
.
phone
}),
config
).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
data
==
'OK'
)
{
if
(
res
.
data
.
toString
().
length
==
4
)
{
this
.
myQueryPhoneCode
=
res
.
data
,
this
.
dialogQueryPhoneCode
=
true
}
else
if
(
res
.
data
==
'phoneError'
)
{
this
.
$message
({
showClose
:
true
,
message
:
'设置短信验证码成功'
,
type
:
'success'
message
:
'手机号格式错误,必须是11位'
,
type
:
'error'
});
}
else
{
this
.
$message
({
showClose
:
true
,
message
:
'设置短信验证码失败'
,
type
:
'error'
});
}
}).
catch
(
error
=>
{
console
.
log
(
error
);
this
.
$message
({
showClose
:
true
,
message
:
'服务器处理失败,请查看运营平台是否正常!'
,
type
:
'error'
});
})
},
smsCodeSubmitdata
()
{
let
config
=
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
this
.
$http
.
get
(
'/tool2/setDataSmsCode?'
+
this
.
$qs
.
stringify
({
phone
:
this
.
smsCode
.
phone
}),
config
).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
toString
().
length
==
4
)
{
this
.
myQueryPhoneCode
=
res
.
data
,
this
.
dialogQueryPhoneCode
=
true
}
else
if
(
res
.
data
==
'phoneError'
)
{
this
.
$message
({
showClose
:
true
,
...
...
@@ -443,30 +500,59 @@
console
.
log
(
error
);
this
.
$message
({
showClose
:
true
,
message
:
'服务器处理失败,请
核对参数
!'
,
message
:
'服务器处理失败,请
查看运营平台是否正常
!'
,
type
:
'error'
});
})
},
//-----------------------------------------------------------测试----------------------------------
smsCodeSubmit222
()
{
smsCodeSubmitxiaochengxu
()
{
let
config
=
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
this
.
$http
.
get
(
'/tool2/smsCode222?'
+
this
.
$qs
.
stringify
({
phone
:
this
.
smsCode222
.
phone
,
code
:
this
.
smsCode222
.
code
this
.
$http
.
get
(
'/tool2/setXiaocxSmsCode?'
+
this
.
$qs
.
stringify
({
phone
:
this
.
smsCode
.
phone
}),
config
).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
data
==
'OK'
)
{
if
(
res
.
data
.
toString
().
length
==
4
)
{
this
.
myQueryPhoneCode
=
res
.
data
,
this
.
dialogQueryPhoneCode
=
true
}
else
if
(
res
.
data
==
'phoneError'
)
{
this
.
$message
({
showClose
:
true
,
message
:
'设置短信验证码成功'
,
type
:
'success'
message
:
'手机号格式错误,必须是11位'
,
type
:
'error'
});
}
else
{
this
.
$message
({
showClose
:
true
,
message
:
'设置短信验证码失败'
,
type
:
'error'
});
}
}).
catch
(
error
=>
{
console
.
log
(
error
);
this
.
$message
({
showClose
:
true
,
message
:
'服务器处理失败,请查看运营平台是否正常!'
,
type
:
'error'
});
})
},
smsCodeSubmityunjihuo
()
{
let
config
=
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
this
.
$http
.
get
(
'/tool2/setYunSmsCode?'
+
this
.
$qs
.
stringify
({
phone
:
this
.
smsCode
.
phone
}),
config
).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
toString
().
length
==
4
)
{
this
.
myQueryPhoneCode
=
res
.
data
,
this
.
dialogQueryPhoneCode
=
true
}
else
if
(
res
.
data
==
'phoneError'
)
{
this
.
$message
({
showClose
:
true
,
...
...
@@ -484,12 +570,12 @@
console
.
log
(
error
);
this
.
$message
({
showClose
:
true
,
message
:
'服务器处理失败,请
核对参数
!'
,
message
:
'服务器处理失败,请
查看运营平台是否正常
!'
,
type
:
'error'
});
})
},
queryPhoneCodeSubmit
222
()
{
queryPhoneCodeSubmit
actadd
()
{
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'加载中...'
,
...
...
@@ -501,9 +587,9 @@
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
this
.
$http
.
get
(
'/tool2/
queryPhoneCode222
?'
+
this
.
$qs
.
stringify
({
this
.
$http
.
get
(
'/tool2/
setActCode
?'
+
this
.
$qs
.
stringify
({
phone
:
this
.
queryPhoneCode222
.
phone
,
type
:
this
.
queryPhoneCode222
.
huanjing
.
toString
()
actid
:
this
.
queryPhoneCode222
.
actid
.
toString
()
}),
config
).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
data
==
'codenull'
)
{
...
...
@@ -512,10 +598,10 @@
message
:
'该手机号验证码为空'
,
type
:
'error'
});
}
else
if
(
res
.
data
==
'
type
Error'
)
{
}
else
if
(
res
.
data
==
'
actid
Error'
)
{
this
.
$message
({
showClose
:
true
,
message
:
'
执行环境参数错误
'
,
message
:
'
活动id不能为空
'
,
type
:
'error'
});
}
else
{
...
...
@@ -528,11 +614,53 @@
loading
.
close
();
this
.
$message
({
showClose
:
true
,
message
:
'服务器处理失败,请查看运营平台是否正常!'
,
type
:
'error'
});
})
},
//-----------------------------------------------------------测试----------------------------------
smsCodeSubmit222
()
{
let
config
=
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
this
.
$http
.
get
(
'/tool2/smsCode222?'
+
this
.
$qs
.
stringify
({
phone
:
this
.
smsCode222
.
phone
,
code
:
this
.
smsCode222
.
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'
});
})
},
//-----------------------------------------------------------测试----------------------------------
baomingWeijihuoSubmit
()
{
const
loading
=
this
.
$loading
({
...
...
Please
register
or
sign in
to post a comment