From 4ce90e5049b65acb6f76993c5ba59e4111292afb Mon Sep 17 00:00:00 2001 From: journey-ad Date: Fri, 12 Jan 2024 15:37:34 +0800 Subject: [PATCH] =?UTF-8?q?to:=20=E8=B0=83=E6=95=B4api=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/http.js | 2 +- src/store/index.js | 4 ++-- src/views/Setting/index.vue | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/api/http.js b/src/api/http.js index e67f0d82..d1532369 100644 --- a/src/api/http.js +++ b/src/api/http.js @@ -1,7 +1,7 @@ import axios from 'axios' import store from '@/store' -const baseURL = 'https://hibiapi.journeyad.repl.co/api/' +const baseURL = 'https://hibiapi.getloli.com/api/' axios.defaults.timeout = 10000 axios.defaults.headers.post['Content-Type'] = 'application/json' diff --git a/src/store/index.js b/src/store/index.js index 4544bbdf..1c48fa08 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -12,7 +12,7 @@ export default new Vuex.Store({ $swiper: null, searchHistory: LocalStorage.get('__PIXIV_searchHistory', []), SETTING: LocalStorage.get('__PIXIV_SETTING', { - api: "https://hibiapi.journeyad.repl.co/api/", + api: "https://hibiapi.getloli.com/api/", r18: false, r18g: false }), @@ -54,7 +54,7 @@ export default new Vuex.Store({ } }, saveSETTING(state, obj) { - state.SETTING = obj + Vue.set(state, 'SETTING', Object.assign({}, state.SETTING, obj)) LocalStorage.set('__PIXIV_SETTING', state.SETTING) } }, diff --git a/src/views/Setting/index.vue b/src/views/Setting/index.vue index 4f93341f..f7a9e6e3 100644 --- a/src/views/Setting/index.vue +++ b/src/views/Setting/index.vue @@ -51,7 +51,7 @@ export default { return { buildDate: dateFormat(__BUILD_TIMESTAMP__, "yyyy-MM-dd"), currentSETTING: { - api: "https://hibiapi.journeyad.repl.co/api/", + api: "https://hibiapi.getloli.com/api/", r18: false, r18g: false, }, @@ -132,11 +132,11 @@ export default { }, }, mounted() { - this.currentSETTING = JSON.parse(JSON.stringify(this.SETTING)); + this.currentSETTING = Object.assign({}, this.currentSETTING, this.SETTING); this.calcCacheSize(); }, updated() { - this.saveSETTING(JSON.parse(JSON.stringify(this.currentSETTING))); + this.saveSETTING(this.currentSETTING); }, components: { [Cell.name]: Cell,