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 @@
新增文章列表
-
-
+
+
-
+
- {{ scope.row.articleTitle }}
+ {{ scope.row.articleTitle }}
+
-
+
-
# {{ tag.tagTitle }}
-
+
- 取消优选
- 设为优选
- 编辑标签
+ 取消优选
+ 设为优选
+
+ 编辑标签
下架
+ @click="toggleStatus(scope.$index, scope.row)" plain>下架
- 上架
+ 上架
-
+
新增用户列表
-
-
+
+
-
+
-
+
{{ scope.row.nickname }}
-
+
-
+
新增账户列表
-
-
+
+
-
+
-
+
-
+
@@ -188,15 +136,10 @@
-
+
@@ -229,10 +172,7 @@
-
+
@@ -241,7 +181,7 @@
diff --git a/pages/article/_article_id.vue b/pages/article/_article_id.vue
index 2f53a9d..1a99618 100644
--- a/pages/article/_article_id.vue
+++ b/pages/article/_article_id.vue
@@ -335,19 +335,17 @@ export default {
_ts.gotoLogin();
}
},
- setPreference() {
+ setPreference() {
let _ts = this;
_ts.$axios.$patch("/api/admin/article/update-perfect", {
idArticle: _ts.article.idArticle,
articlePerfect: '1',
}).then(function (res) {
if (res) {
- if (res.success) {
- _ts.$set(_ts, 'isPerfect', false);
- _ts.$message.success("设置成功!");
- } else {
- _ts.$message.error(_ts.message);
- }
+ _ts.$set(_ts, 'isPerfect', true);
+ _ts.$message.success("设置成功!");
+ } else {
+ _ts.$message.error("设置失败!");
}
})
},
@@ -358,12 +356,10 @@ export default {
articlePerfect: '0',
}).then(function (res) {
if (res) {
- if (res.success) {
- _ts.$set(_ts, 'isPerfect', true);
- _ts.$message.success("取消成功!");
- } else {
- _ts.$message.error(_ts.message);
- }
+ _ts.$set(_ts, 'isPerfect', false);
+ _ts.$message.success("取消成功!");
+ } else {
+ _ts.$message.error("设置失败!");
}
})
},
diff --git a/pages/open-data.vue b/pages/open-data.vue
index 458fb0f..d789300 100644
--- a/pages/open-data.vue
+++ b/pages/open-data.vue
@@ -47,7 +47,7 @@