From 4fec3aabacc223a162b5cbaa38ed5b14992f67ee Mon Sep 17 00:00:00 2001
From: pan <1029559041@qq.com>
Date: Sat, 1 Aug 2020 03:32:38 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E8=8D=90=E5=90=8E=E5=8F=B0=E5=AF=B9?=
=?UTF-8?q?=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/center/security.vue | 2 ++
components/lang.vue | 2 ++
layouts/mainmenu.vue | 2 +-
nuxt.config.js | 10 ++++++----
pages/index/document.vue | 33 ++++++++++++++++++++++++---------
store/read.js | 5 +++++
6 files changed, 40 insertions(+), 14 deletions(-)
diff --git a/components/center/security.vue b/components/center/security.vue
index cd904f9..3766173 100644
--- a/components/center/security.vue
+++ b/components/center/security.vue
@@ -101,6 +101,8 @@
if(res.code==='200'){
that.$message.info(that.$t('center.security.tip.ok').toString())
that.$cookies.remove(that.GLOBAL.user_key)
+ that.$store.commit('read/reset')
+ that.$store.commit('menus/none')
that.$router.push(that.localePath('/account'))
}else if(res.msg!==null){
that.$message.error(res.msg)
diff --git a/components/lang.vue b/components/lang.vue
index 1f5ad4e..f856057 100644
--- a/components/lang.vue
+++ b/components/lang.vue
@@ -32,6 +32,8 @@
methods:{
logout:function() {
this.$cookies.remove(this.GLOBAL.user_key)
+ this.$store.commit('read/reset')
+ this.$store.commit('menus/none')
this.$router.push(this.localePath('/account'))
}
}
diff --git a/layouts/mainmenu.vue b/layouts/mainmenu.vue
index 9b79264..c95ee23 100644
--- a/layouts/mainmenu.vue
+++ b/layouts/mainmenu.vue
@@ -7,7 +7,7 @@
-
+
{{$t('menus.'+item)}}
diff --git a/nuxt.config.js b/nuxt.config.js
index 46b6121..14aba45 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -165,7 +165,8 @@ export default {
"tutor": "导师"
},
"tip": {
- "empty": "没有匹配到一篇论文"
+ "doc_empty": "没有匹配到一篇论文",
+ "recommend_empty": "暂无论文推荐"
}
},
"en": "英文",
@@ -184,6 +185,7 @@ export default {
"upload": "本地上传论文"
},
"more_query": "更多查询",
+ "new_recommend": "最新推荐",
"note": {
"table": {
"original_text": "注释原文",
@@ -233,7 +235,6 @@ export default {
"reset": "重置",
"select_please": "请选择{keyword}",
"tip": "提示",
- "today_recommend": "今日推荐",
"unknown_error": "未知错误",
"upload": {
"form": {
@@ -338,7 +339,8 @@ export default {
"tutor": ""
},
"tip": {
- "empty": ""
+ "doc_empty": "",
+ "recommend_empty": ""
}
},
"en": "english",
@@ -357,6 +359,7 @@ export default {
"upload": ""
},
"more_query": "",
+ "new_recommend": "",
"note": {
"table": {
"original_text": "",
@@ -406,7 +409,6 @@ export default {
"reset": "",
"select_please": "",
"tip": "",
- "today_recommend": "",
"unknown_error": "",
"upload": {
"form": {
diff --git a/pages/index/document.vue b/pages/index/document.vue
index 9a852a1..af08330 100644
--- a/pages/index/document.vue
+++ b/pages/index/document.vue
@@ -47,7 +47,7 @@
@@ -82,15 +82,20 @@
- {{$t('today_recommend')}}
+ {{$t('new_recommend')}}
-
-
-
- {{item.title}}
- {{item.summary}}
-
+
+
+
@@ -174,4 +185,8 @@
.recommend-list {
overflow-y: scroll;
}
+
+ a{
+ cursor: pointer;
+ }
diff --git a/store/read.js b/store/read.js
index 78deaf2..5eafe87 100644
--- a/store/read.js
+++ b/store/read.js
@@ -45,5 +45,10 @@ export const mutations = {
//更新收藏状态
updateCollect(state,key){
state.read[key].hasCollect=!state.read[key].hasCollect
+ },
+ //重置
+ reset(state){
+ state.read={ }
+ state.activeName=''
}
}