提交 9eed223b authored 作者: 王鹏飞's avatar 王鹏飞

chore: 移除空章节显示

上级 352da1a9
...@@ -50,7 +50,12 @@ export default { ...@@ -50,7 +50,12 @@ export default {
.then(response => { .then(response => {
this.loaded = true this.loaded = true
response.chapters = response.chapters.filter(item => { 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 return item.children.length
}) })
this.detail = response this.detail = response
......
...@@ -7,14 +7,15 @@ ...@@ -7,14 +7,15 @@
name="account" name="account"
label="手机号" label="手机号"
placeholder="请输入手机号" placeholder="请输入手机号"
:maxlength="11"
/> />
<van-field <van-field
v-model="ruleForm.password" v-model="ruleForm.password"
type="digit" type="digit"
:maxlength="4"
name="password" name="password"
label="验证码" label="验证码"
placeholder="请输入验证码" placeholder="请输入验证码"
:maxlength="4"
> >
<template slot="button"> <template slot="button">
<countdown-button @click.native="onSendCode" ref="countdown"></countdown-button> <countdown-button @click.native="onSendCode" ref="countdown"></countdown-button>
...@@ -38,7 +39,8 @@ export default { ...@@ -38,7 +39,8 @@ export default {
}, },
methods: { methods: {
submit() { submit() {
if (!this.ruleForm.account) { const phone = this.ruleForm.account
if (!phone || phone.length !== 11) {
this.$toast('请输入正确的手机号码') this.$toast('请输入正确的手机号码')
return false return false
} else if (!this.ruleForm.password) { } else if (!this.ruleForm.password) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论