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
c03167ac
...
c03167acd64a4ecc0c7b9afe7ec3c6feeeb151a0
authored
2024-02-19 14:53:32 +0800
by
牛先锋
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加小程序登录和活动报名测试环境验证码设置工具
1 parent
3bcc31dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
133 additions
and
0 deletions
src/page/tool2.vue
src/page/tool2.vue
View file @
c03167a
...
...
@@ -156,6 +156,60 @@
</el-col>
</el-row>
<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>
<div
style=
"margin: 15px 0;"
></div>
<el-form-item>
<el-button
round
@
click=
"smsCodeSubmitxiaochengxutest"
>
设置验证码
</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=
"smsCode.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=
"queryPhoneCodeSubmitactaddtest"
>
设置验证码
</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>
<el-row
style=
"margin-bottom: 15px;"
>
<el-col
:span=
"8"
>
<el-form
ref=
"baomingWeijihuo"
:model=
"baomingWeijihuo"
label-width=
"0px"
>
...
...
@@ -507,6 +561,41 @@
});
})
},
smsCodeSubmitxiaochengxutest
()
{
let
config
=
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
this
.
$http
.
get
(
'/tool2/setXiaocxSmstestCode?'
+
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
,
message
:
'手机号格式错误,必须是11位'
,
type
:
'error'
});
}
else
{
this
.
$message
({
showClose
:
true
,
message
:
'设置短信验证码失败'
,
type
:
'error'
});
}
}).
catch
(
error
=>
{
console
.
log
(
error
);
this
.
$message
({
showClose
:
true
,
message
:
'服务器处理失败,请查看运营平台是否正常!'
,
type
:
'error'
});
})
},
smsCodeSubmitxiaochengxu
()
{
let
config
=
{
headers
:
{
...
...
@@ -577,6 +666,50 @@
});
})
},
queryPhoneCodeSubmitactaddtest
()
{
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'加载中...'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.7)'
});
let
config
=
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
this
.
$http
.
get
(
'/tool2/setActtestCode?'
+
this
.
$qs
.
stringify
({
phone
:
this
.
smsCode
.
phone
,
actid
:
'1102'
//this.queryPhoneCode222.actid.toString()
}),
config
).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
data
==
'codenull'
)
{
this
.
$message
({
showClose
:
true
,
message
:
'该手机号验证码为空'
,
type
:
'error'
});
}
else
if
(
res
.
data
==
'actidError'
)
{
this
.
$message
({
showClose
:
true
,
message
:
'活动id不能为空'
,
type
:
'error'
});
}
else
{
this
.
myQueryPhoneCode
=
res
.
data
this
.
dialogQueryPhoneCode
=
true
}
loading
.
close
();
}).
catch
(
error
=>
{
console
.
log
(
error
);
loading
.
close
();
this
.
$message
({
showClose
:
true
,
message
:
'服务器处理失败,请查看运营平台是否正常!'
,
type
:
'error'
});
})
},
queryPhoneCodeSubmitactadd
()
{
const
loading
=
this
.
$loading
({
lock
:
true
,
...
...
Please
register
or
sign in
to post a comment