diff --git a/components/common/user/login-records.vue b/components/common/user/login-records.vue index 6486e73..832ed36 100644 --- a/components/common/user/login-records.vue +++ b/components/common/user/login-records.vue @@ -5,7 +5,7 @@ + :total="records.total"> @@ -61,7 +61,7 @@ export default { let _ts = this; let search = { size: size, - page: _ts.records.pagination.currentPage + page: _ts.records.pageNum } _ts.$emit('currentChange', search); }, @@ -69,7 +69,7 @@ export default { let _ts = this; let search = { page: page, - size: _ts.records.pagination.pageSize + size: _ts.records.pageSize } _ts.$emit('currentChange', search); } diff --git a/pages/admin/articles.vue b/pages/admin/articles.vue index e4f9545..94fb424 100644 --- a/pages/admin/articles.vue +++ b/pages/admin/articles.vue @@ -139,7 +139,7 @@ export default { handleSizeChange(pageSize) { let _ts = this; _ts.$store.dispatch('admin/fetchArticles', { - page: _ts.pagination.currentPage, + page: _ts.articles.pageNum, rows: pageSize }) }, @@ -147,7 +147,7 @@ export default { let _ts = this; _ts.$store.dispatch('admin/fetchArticles', { page: page, - rows: _ts.pagination.pageSize + rows: _ts.articles.pageSize }) }, toggleStatus() {}, @@ -158,16 +158,14 @@ export default { articlePerfect: '1' }).then(function (res) { if (res) { - if (res.success) { - _ts.$store.commit('admin/updateArticlePreference', { - index: index, - idArticle: idArticle, - articlePerfect: '1' - }) - _ts.$message.success("设置成功!"); - } else { - _ts.$message.error(_ts.message); - } + _ts.$store.commit('admin/updateArticlePreference', { + index: index, + idArticle: idArticle, + articlePerfect: '1' + }) + _ts.$message.success("设置成功!"); + } else { + _ts.$message.error("设置失败!"); } }) }, @@ -178,16 +176,14 @@ export default { articlePerfect: '0' }).then(function (res) { if (res) { - if (res.success) { - _ts.$store.commit('admin/updateArticlePreference', { - index: index, - idArticle: idArticle, - articlePerfect: '0' - }) - _ts.$message.success("取消成功!"); - } else { - _ts.$message.error(_ts.message); - } + _ts.$store.commit('admin/updateArticlePreference', { + index: index, + idArticle: idArticle, + articlePerfect: '0' + }) + _ts.$message.success("取消成功!"); + } else { + _ts.$message.error("取消失败!"); } }) }, diff --git a/pages/admin/dashboard.vue b/pages/admin/dashboard.vue index ebdd346..2151b64 100644 --- a/pages/admin/dashboard.vue +++ b/pages/admin/dashboard.vue @@ -42,143 +42,91 @@

新增文章列表

- - + + - + - + - + - +

新增用户列表

- - + + - + - + - +
- +

新增账户列表

- - + + - + - + - +