Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
project-online-fi
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
project-online-fi
Commits
db6a1487
提交
db6a1487
authored
11月 28, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
报名弹窗关闭清除数据
上级
279262b4
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
31 行增加
和
19 行删除
+31
-19
ApplyForm.vue
src/components/layout/ApplyForm.vue
+1
-4
RightAside.vue
src/components/layout/RightAside.vue
+30
-15
没有找到文件。
src/components/layout/ApplyForm.vue
浏览文件 @
db6a1487
...
...
@@ -94,15 +94,12 @@ export default {
handleSubmit
()
{
const
params
=
{
...
this
.
ruleForm
}
api
.
postNes
(
params
).
then
((
response
)
=>
{
// this.$notify({ type: 'success', message: response.message })
// this.$dialog.alert({ message: response.message }).then(() => {
// this.$emit('success')
// })
this
.
$message
.
success
(
response
.
message
)
this
.
$emit
(
'success'
)
this
.
ruleForm
.
name
=
''
this
.
ruleForm
.
phone
=
''
this
.
phoneCode
=
''
this
.
codeButtonDisabled
=
false
})
},
// 校验短信验证码
...
...
src/components/layout/RightAside.vue
浏览文件 @
db6a1487
...
...
@@ -9,6 +9,8 @@ export default {
tabBtnTarget
:
''
,
sendCode
:
''
,
isBtnDisabled
:
false
,
disabledTime
:
60
,
timer
:
null
,
formInfo
:
{
name
:
''
,
phone
:
''
,
...
...
@@ -16,7 +18,11 @@ export default {
}
}
},
computed
:
{
buttonText
()
{
return
this
.
isBtnDisabled
?
`
${
this
.
disabledTime
}
s`
:
'获取验证码'
}
},
methods
:
{
handleMsOver
(
type
)
{
this
.
tabBtnActive
=
true
...
...
@@ -49,6 +55,11 @@ export default {
message
:
'报名成功'
,
duration
:
5000
})
this
.
formInfo
.
name
=
''
this
.
formInfo
.
phone
=
''
this
.
sendCode
=
''
this
.
isBtnDisabled
=
false
this
.
tabBtnActive
=
false
})
.
catch
((
err
)
=>
{
if
(
err
&&
err
.
type
===
'checkcode'
)
this
.
$message
.
error
(
err
.
msg
)
...
...
@@ -97,7 +108,9 @@ export default {
this
.
$message
.
success
(
'验证码已发送,请注意查收'
)
else
this
.
$message
.
error
(
'获取验证码失败,请稍后再试'
)
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
this
.
clearTimer
()
})
}
},
checkSendcode
()
{
...
...
@@ -126,19 +139,21 @@ export default {
},
btnDisabledTimer
()
{
this
.
isBtnDisabled
=
true
let
count
=
60
document
.
querySelector
(
'#checkedCode'
).
innerHTML
=
count
+
's'
const
timer
=
setInterval
(()
=>
{
count
--
if
(
count
<
1
)
{
clearInterval
(
timer
)
this
.
isBtnDisabled
=
false
document
.
querySelector
(
'#checkedCode'
).
innerHTML
=
'获取验证码'
}
else
{
document
.
querySelector
(
'#checkedCode'
).
innerHTML
=
count
+
's'
this
.
disabledTime
=
60
this
.
timer
=
setInterval
(()
=>
{
this
.
disabledTime
--
if
(
this
.
disabledTime
<
1
)
{
this
.
clearTimer
()
}
},
1000
)
},
clearTimer
()
{
this
.
isBtnDisabled
=
false
this
.
timer
&&
clearInterval
(
this
.
timer
)
}
},
destroyed
()
{
this
.
clearTimer
()
}
}
</
script
>
...
...
@@ -185,14 +200,14 @@ export default {
v-model=
"sendCode"
placeholder=
"请输入验证码"
size=
"small"
></el-input
>
<el-button
></el-input
>
<el-button
class=
"btn"
:disabled=
"isBtnDisabled"
id=
"checkedCode"
@
click=
"getSendCode"
>
获取验证码
{{
buttonText
}}
</el-button>
</div>
<div
class=
"p"
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论