File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ export default {
205
205
},
206
206
// 推荐文章
207
207
getRecommendEntryByTagIds (){
208
- let last = this .recommendArticles .slice (- 1 )
208
+ let last = this .recommendArticles .slice (- 1 )[ 0 ]
209
209
let before = last ? last .rankIndex : ' '
210
210
this .$api .getRecommendEntryByTagIds ({
211
211
tagIds: this .tagIds .join (' |' ),
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ router.get('/recommendEntryByTagIds', validator({
181
181
tagIds : { type : 'string' , required : true } ,
182
182
before : {
183
183
type : 'string' ,
184
- validator : ( rule , value ) => Number ( value ) ,
184
+ validator : ( rule , value ) => Number ( value ) > 0 || value === '' ,
185
185
message : 'before 为number类型'
186
186
}
187
187
} ) , async ( ctx , next ) => {
You can’t perform that action at this time.
0 commit comments