提交 c78c9ef6 authored 作者: lihuihui's avatar lihuihui
......@@ -50,7 +50,12 @@ export default {
.then(response => {
this.loaded = true
response.chapters = response.chapters.filter(item => {
item.children = item.children.filter(child => child.type === 2)
item.children = item.children.filter(
child =>
child.type === 2 &&
child.resource_id &&
child.resource_id !== '6684350363920760832'
)
return item.children.length
})
this.detail = response
......
......@@ -47,6 +47,9 @@ export default {
return this.data.filter((item, index) => index < this.maxCount)
}
return this.data
},
isWeapp() {
return this.$store.state.isWeapp
}
},
methods: {
......
......@@ -7,14 +7,15 @@
name="account"
label="手机号"
placeholder="请输入手机号"
:maxlength="11"
/>
<van-field
v-model="ruleForm.password"
type="digit"
:maxlength="4"
name="password"
label="验证码"
placeholder="请输入验证码"
:maxlength="4"
>
<template slot="button">
<countdown-button @click.native="onSendCode" ref="countdown"></countdown-button>
......@@ -38,7 +39,8 @@ export default {
},
methods: {
submit() {
if (!this.ruleForm.account) {
const phone = this.ruleForm.account
if (!phone || phone.length !== 11) {
this.$toast('请输入正确的手机号码')
return false
} else if (!this.ruleForm.password) {
......@@ -63,7 +65,7 @@ export default {
.sendResetPasswordCode({ account: this.ruleForm.account })
.then(response => {
if (response.code === 0) {
this.$toast({ type: 'success', message: '验证码发送成功' })
this.$toast({ type: 'success', message: '验证码已发送' })
} else {
// 停止计时
this.$refs.countdown.stop()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论