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

chore: 移除空章节显示

上级 352da1a9
......@@ -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
......
......@@ -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) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论