提交 c78c9ef6 authored 作者: lihuihui's avatar lihuihui
...@@ -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
......
...@@ -47,6 +47,9 @@ export default { ...@@ -47,6 +47,9 @@ export default {
return this.data.filter((item, index) => index < this.maxCount) return this.data.filter((item, index) => index < this.maxCount)
} }
return this.data return this.data
},
isWeapp() {
return this.$store.state.isWeapp
} }
}, },
methods: { methods: {
......
...@@ -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) {
...@@ -63,7 +65,7 @@ export default { ...@@ -63,7 +65,7 @@ export default {
.sendResetPasswordCode({ account: this.ruleForm.account }) .sendResetPasswordCode({ account: this.ruleForm.account })
.then(response => { .then(response => {
if (response.code === 0) { if (response.code === 0) {
this.$toast({ type: 'success', message: '验证码发送成功' }) this.$toast({ type: 'success', message: '验证码已发送' })
} else { } else {
// 停止计时 // 停止计时
this.$refs.countdown.stop() this.$refs.countdown.stop()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论