From 26fec1bf407fde693ca1ee2248cf579e98982af5 Mon Sep 17 00:00:00 2001 From: Qing Date: Thu, 28 Dec 2023 22:48:08 +0800 Subject: [PATCH] update --- package-lock.json | 51 +++++++++++++ package.json | 2 + src/components/detail/HotRecomment.vue | 17 ++++- src/components/detail/NavDetail.vue | 61 +++++++++++++++- src/components/detail/NewRecomment.vue | 1 + src/components/home/NavList.vue | 35 ++++++++- .../setting/comment/CommentManage.vue | 23 ++++++ .../setting/home/PersonalHomePage.vue | 9 ++- .../setting/system/AppearanceSettings.vue | 13 ++-- .../setting/system/InformationSettings.vue | 60 ++++++++-------- src/main.js | 15 ++++ src/router/index.js | 6 ++ src/store/index.js | 72 +++++++++++-------- src/views/Index.vue | 53 +++++++------- src/views/Settings.vue | 27 +++++-- 15 files changed, 342 insertions(+), 103 deletions(-) create mode 100644 src/components/setting/comment/CommentManage.vue diff --git a/package-lock.json b/package-lock.json index e496ae6..845f3c3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,8 @@ "qs": "^6.11.2", "vue": "^2.6.14", "vue-iframe": "^0.0.0", + "vue-live2d": "^1.3.1", + "vue-meta": "^2.4.0", "vue-router": "^3.5.1", "vue2-element-dict": "^1.0.2", "vuex": "^3.6.2" @@ -16200,6 +16202,15 @@ "resolved": "https://registry.npmjs.org/vue-iframe/-/vue-iframe-0.0.0.tgz", "integrity": "sha512-gH791EBUqJrsa5SuGhxeujyK4NFngJnuvpSJN0p5W5VoHmYkW35ZekOLlCZTN658VsXUYNGCPHlk9bzLtRyd7Q==" }, + "node_modules/vue-live2d": { + "version": "1.3.1", + "resolved": "https://registry.npmmirror.com/vue-live2d/-/vue-live2d-1.3.1.tgz", + "integrity": "sha512-CWi495jWERVm9E/l9e7duLCuPsvJdPqKrY9XAStWpk7Uixrs5GwqA3qvfQGihfwrfRLthaRVoZDW3+ZZJ5O2RQ==", + "dependencies": { + "core-js": "^3.6.5", + "vue": "^2.6.11" + } + }, "node_modules/vue-loader": { "version": "17.3.1", "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-17.3.1.tgz", @@ -16286,6 +16297,22 @@ "node": ">=8" } }, + "node_modules/vue-meta": { + "version": "2.4.0", + "resolved": "https://registry.npmmirror.com/vue-meta/-/vue-meta-2.4.0.tgz", + "integrity": "sha512-XEeZUmlVeODclAjCNpWDnjgw+t3WA6gdzs6ENoIAgwO1J1d5p1tezDhtteLUFwcaQaTtayRrsx7GL6oXp/m2Jw==", + "dependencies": { + "deepmerge": "^4.2.2" + } + }, + "node_modules/vue-meta/node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/vue-router": { "version": "3.6.5", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.6.5.tgz", @@ -29729,6 +29756,15 @@ "resolved": "https://registry.npmjs.org/vue-iframe/-/vue-iframe-0.0.0.tgz", "integrity": "sha512-gH791EBUqJrsa5SuGhxeujyK4NFngJnuvpSJN0p5W5VoHmYkW35ZekOLlCZTN658VsXUYNGCPHlk9bzLtRyd7Q==" }, + "vue-live2d": { + "version": "1.3.1", + "resolved": "https://registry.npmmirror.com/vue-live2d/-/vue-live2d-1.3.1.tgz", + "integrity": "sha512-CWi495jWERVm9E/l9e7duLCuPsvJdPqKrY9XAStWpk7Uixrs5GwqA3qvfQGihfwrfRLthaRVoZDW3+ZZJ5O2RQ==", + "requires": { + "core-js": "^3.6.5", + "vue": "^2.6.11" + } + }, "vue-loader": { "version": "17.3.1", "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-17.3.1.tgz", @@ -29791,6 +29827,21 @@ } } }, + "vue-meta": { + "version": "2.4.0", + "resolved": "https://registry.npmmirror.com/vue-meta/-/vue-meta-2.4.0.tgz", + "integrity": "sha512-XEeZUmlVeODclAjCNpWDnjgw+t3WA6gdzs6ENoIAgwO1J1d5p1tezDhtteLUFwcaQaTtayRrsx7GL6oXp/m2Jw==", + "requires": { + "deepmerge": "^4.2.2" + }, + "dependencies": { + "deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==" + } + } + }, "vue-router": { "version": "3.6.5", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.6.5.tgz", diff --git a/package.json b/package.json index b3a1c5f..9851081 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,8 @@ "qs": "^6.11.2", "vue": "^2.6.14", "vue-iframe": "^0.0.0", + "vue-live2d": "^1.3.1", + "vue-meta": "^2.4.0", "vue-router": "^3.5.1", "vue2-element-dict": "^1.0.2", "vuex": "^3.6.2" diff --git a/src/components/detail/HotRecomment.vue b/src/components/detail/HotRecomment.vue index 1af2259..a3e2b7f 100644 --- a/src/components/detail/HotRecomment.vue +++ b/src/components/detail/HotRecomment.vue @@ -15,7 +15,7 @@ 图标 - {{item.name}} + {{item.name}} @@ -44,12 +44,27 @@ export default { }, methods: { + // toDetail(id){ + // if(id){ + // this.$router.push({ + // path: '/nav', + // query: { + // uid: id, + // refresh: true + // } + // }) + // } else { + // return false; + // } + // }, + toDetail(id){ if(id){ let pathInfo = this.$router.resolve({ path: '/nav', query: { uid: id, + refresh: true } }) window.open(pathInfo.href, '_self'); diff --git a/src/components/detail/NavDetail.vue b/src/components/detail/NavDetail.vue index c7dc713..8035b68 100644 --- a/src/components/detail/NavDetail.vue +++ b/src/components/detail/NavDetail.vue @@ -1,5 +1,5 @@ @@ -49,30 +53,29 @@ export default { data() { return { isLight: false, - folderTrue: [], - folderFalse: [], value:null, imageUrl:null, - + icp_info:null, } }, mounted() { - let nowDate = new Date() - let hour = nowDate.getHours() - //黑夜时 - if (hour > 18 && hour <= 24 || hour < 6) { - this.goDark() - } + }, + created() { + // let nowDate = new Date() + // let hour = nowDate.getHours() + // //黑夜时 + // if (hour > 18 && hour <= 24 || hour < 6) { + // this.goDark() + // } //根据本地存储状态哦按段 if (localStorage.getItem('theme') === 'dark') { this.goDark() }else{ this.goLight(); } - - }, - created() { this.getConfig('open_dark_light'); + this.getConfig('icp_info'); + }, computed: {}, @@ -93,13 +96,13 @@ export default { if (res.data.open_dark_light) { _this.value = res.data.open_dark_light.value; } - // if(res.data.dark_bg){ - // _this.dark_bg=res.data.dark_bg.value; - // } + if(res.data.icp_info){ + _this.icp_info=res.data.icp_info.value; + } // if(res.data.light_bg){ // _this.light_bg=res.data.light_bg.value; // } - // _this.loading=false; + } }).catch((error) => { @@ -140,16 +143,18 @@ export default { }, goDark() { - this.getImageByConfig('dark_bg_file'); + //黑夜的 document.body.classList.remove('light-mode') - this.setTheme({theme:'dark'}) + this.setTheme({theme:'dark'}); + this.getImageByConfig('dark_bg_file'); }, goLight() { - this.getImageByConfig('light_bg_file'); + //白天的 document.body.classList.add('light-mode') this.setTheme({theme:'light'}); + this.getImageByConfig('light_bg_file'); }, changeStyle() { this.isLight = !this.isLight diff --git a/src/views/Settings.vue b/src/views/Settings.vue index 47c8a26..8525bc5 100644 --- a/src/views/Settings.vue +++ b/src/views/Settings.vue @@ -24,6 +24,10 @@
+
+ 备案号: + {{icp_info}} +
@@ -43,13 +47,28 @@ export default { data() { return { value:null, - + isLight:false, + icp_info:null, } }, mounted() { + }, created() { this.getConfig('open_dark_light'); + this.getConfig('icp_info'); + // let nowDate = new Date() + // let hour = nowDate.getHours() + // //黑夜时 + // if (hour > 18 && hour <= 24 || hour < 6) { + // this.goDark() + // } + //根据本地存储状态哦按段 + if (localStorage.getItem('theme') === 'dark') { + this.goDark() + }else{ + this.goLight(); + } }, computed: {}, methods:{ @@ -68,9 +87,9 @@ export default { if (res.data.open_dark_light) { _this.value = res.data.open_dark_light.value; } - // if(res.data.dark_bg){ - // _this.dark_bg=res.data.dark_bg.value; - // } + if(res.data.icp_info){ + _this.icp_info=res.data.icp_info.value; + } // if(res.data.light_bg){ // _this.light_bg=res.data.light_bg.value; // }