diff --git a/components/layouts/pc/header.vue b/components/layouts/pc/header.vue
index 5a1bc39..84e4cf5 100644
--- a/components/layouts/pc/header.vue
+++ b/components/layouts/pc/header.vue
@@ -90,7 +90,8 @@
个人中心
- 每日一题
+ 每日一题
+ 每日一题(开通钱包账号激活)
我的草稿
我的钱包
设置
@@ -184,42 +185,39 @@ export default {
},
handleSelectMenu(item) {
let _ts = this;
- let activeMenu = _ts.$store.state.activeMenu;
- if (activeMenu !== item) {
- switch (item) {
- case 'topic':
- _ts.$router.push({
- path: '/topic/news?page=1'
- })
- break;
- case 'portfolios':
- _ts.$router.push({
- path: '/portfolios?page=1'
- })
- break;
- case 'products':
- _ts.$router.push({
- path: '/products?page=1'
- })
- break;
- case 'github':
- window.open("https://github.com/rymcu");
- break;
- case 'taobao':
- window.open("https://rymcu.taobao.com?utm_source=rymcu.com");
- break;
- case 'open-data':
- _ts.$router.push({
- path: '/open-data'
- })
- break;
- default:
- _ts.$router.push(
- {
- path: '/'
- }
- )
- }
+ switch (item) {
+ case 'topic':
+ _ts.$router.push({
+ path: '/topic/news?page=1'
+ })
+ break;
+ case 'portfolios':
+ _ts.$router.push({
+ path: '/portfolios?page=1'
+ })
+ break;
+ case 'products':
+ _ts.$router.push({
+ path: '/products?page=1'
+ })
+ break;
+ case 'github':
+ window.open("https://github.com/rymcu");
+ break;
+ case 'taobao':
+ window.open("https://rymcu.taobao.com?utm_source=rymcu.com");
+ break;
+ case 'open-data':
+ _ts.$router.push({
+ path: '/open-data'
+ })
+ break;
+ default:
+ _ts.$router.push(
+ {
+ path: '/'
+ }
+ )
}
},
handleCommand(item) {
diff --git a/components/layouts/pc/main.vue b/components/layouts/pc/main.vue
index 15b4d23..38ba69f 100644
--- a/components/layouts/pc/main.vue
+++ b/components/layouts/pc/main.vue
@@ -4,7 +4,7 @@
-
+
diff --git a/pages/admin.vue b/pages/admin.vue
index e968c88..e06a58a 100644
--- a/pages/admin.vue
+++ b/pages/admin.vue
@@ -3,7 +3,7 @@
-
+
-
+
@@ -42,6 +42,7 @@
diff --git a/pages/admin/articles.vue b/pages/admin/articles.vue
index 2c56d0c..94fb424 100644
--- a/pages/admin/articles.vue
+++ b/pages/admin/articles.vue
@@ -200,9 +200,6 @@ export default {
openLink(link) {
window.open(link);
}
- },
- mounted() {
- this.$store.commit("setActiveMenu", "admin-articles");
}
}
diff --git a/pages/admin/bank-accounts.vue b/pages/admin/bank-accounts.vue
index 0059f7b..6362a3c 100644
--- a/pages/admin/bank-accounts.vue
+++ b/pages/admin/bank-accounts.vue
@@ -147,9 +147,6 @@ export default {
endDate: endDate
})
}
- },
- mounted() {
- this.$store.commit("setActiveMenu", "admin-bank-accounts");
}
}
diff --git a/pages/admin/banks.vue b/pages/admin/banks.vue
index ce2f04a..48612f2 100644
--- a/pages/admin/banks.vue
+++ b/pages/admin/banks.vue
@@ -157,9 +157,6 @@ export default {
}
})
}
- },
- mounted() {
- this.$store.commit("setActiveMenu", "admin-banks");
}
}
diff --git a/pages/admin/comments.vue b/pages/admin/comments.vue
index 8a50fec..65d18f2 100644
--- a/pages/admin/comments.vue
+++ b/pages/admin/comments.vue
@@ -150,9 +150,6 @@ export default {
})
},
toggleStatus() {}
- },
- mounted() {
- this.$store.commit("setActiveMenu", "admin-comments");
}
}
diff --git a/pages/admin/currency-rules.vue b/pages/admin/currency-rules.vue
index 63e0e45..6c64a9a 100644
--- a/pages/admin/currency-rules.vue
+++ b/pages/admin/currency-rules.vue
@@ -151,9 +151,6 @@ export default {
}
})
}
- },
- mounted() {
- this.$store.commit("setActiveMenu", "admin-currency-rules");
}
}
diff --git a/pages/admin/dashboard.vue b/pages/admin/dashboard.vue
index 3c37755..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/admin/products.vue b/pages/admin/products.vue
index 8469984..9cf9fa6 100644
--- a/pages/admin/products.vue
+++ b/pages/admin/products.vue
@@ -156,9 +156,6 @@ export default {
})
},
handleEdit(index ,row) {}
- },
- mounted() {
- this.$store.commit("setActiveMenu", "admin-products");
}
}
diff --git a/pages/admin/tag/post/_tag_id.vue b/pages/admin/tag/post/_tag_id.vue
index 1da85b2..f2e2209 100644
--- a/pages/admin/tag/post/_tag_id.vue
+++ b/pages/admin/tag/post/_tag_id.vue
@@ -346,7 +346,6 @@ export default {
}).then(() => {
next();
}).catch(() => {
- _ts.$store.commit("setActiveMenu", "admin-tag-post");
return false
});
} else {
@@ -369,7 +368,6 @@ export default {
return '关闭提示';
});
let _ts = this;
- _ts.$store.commit('setActiveMenu', 'admin-tag-post');
_ts.$axios.$get('/api/upload/simple/token').then(function (res) {
if (res) {
_ts.$store.commit('setUploadHeaders', res.uploadToken);
diff --git a/pages/admin/tags.vue b/pages/admin/tags.vue
index 4e5ee15..8b340b9 100644
--- a/pages/admin/tags.vue
+++ b/pages/admin/tags.vue
@@ -104,9 +104,6 @@
path: '/admin/tag/post/' + id
})
}
- },
- mounted() {
- this.$store.commit("setActiveMenu", "admin-tags");
}
}
diff --git a/pages/admin/topic/post/_topic_id.vue b/pages/admin/topic/post/_topic_id.vue
index e3f186e..8404dfc 100644
--- a/pages/admin/topic/post/_topic_id.vue
+++ b/pages/admin/topic/post/_topic_id.vue
@@ -351,7 +351,6 @@ export default {
}).then(() => {
next();
}).catch(() => {
- _ts.$store.commit("setActiveMenu", "admin-topic-post");
return false
});
} else {
@@ -374,7 +373,6 @@ export default {
return '关闭提示';
});
let _ts = this;
- _ts.$store.commit("setActiveMenu", "admin-topic-post");
_ts.$axios.$get('/api/upload/simple/token').then(function (res) {
if (res) {
_ts.$store.commit('setUploadHeaders', res.uploadToken);
diff --git a/pages/admin/topics.vue b/pages/admin/topics.vue
index 2b864b4..c9a6b70 100644
--- a/pages/admin/topics.vue
+++ b/pages/admin/topics.vue
@@ -65,9 +65,6 @@
path: '/admin/topic/post'
})
}
- },
- mounted() {
- this.$store.commit("setActiveMenu", "admin-topics");
}
}
diff --git a/pages/admin/users.vue b/pages/admin/users.vue
index e740506..49b45e3 100644
--- a/pages/admin/users.vue
+++ b/pages/admin/users.vue
@@ -227,9 +227,6 @@ export default {
getUserPath(nickname) {
return `/user/${nickname}`
}
- },
- mounted() {
- this.$store.commit("setActiveMenu", "admin-users");
}
}
diff --git a/pages/answer.vue b/pages/answer.vue
index 6dec761..514a94e 100644
--- a/pages/answer.vue
+++ b/pages/answer.vue
@@ -63,7 +63,8 @@ import {mapState} from 'vuex';
export default {
name: "answer",
middleware: 'auth',
- fetch({store, params, error}) {
+ fetch() {
+ let {store, params, error} = this.$nuxt.context
return Promise.all([
store
.dispatch('answer/fetchDetail', params)
diff --git a/pages/article/_article_id.vue b/pages/article/_article_id.vue
index 1a99618..b5f2aae 100644
--- a/pages/article/_article_id.vue
+++ b/pages/article/_article_id.vue
@@ -95,7 +95,7 @@
{{ article.articleThumbsUpCount }}
-
+