Skip to content

Commit

Permalink
to: 调整api地址
Browse files Browse the repository at this point in the history
  • Loading branch information
journey-ad committed Jan 12, 2024
1 parent 6a5c43c commit 4ce90e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/api/http.js
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
4 changes: 2 additions & 2 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}),
Expand Down Expand Up @@ -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)
}
},
Expand Down
6 changes: 3 additions & 3 deletions src/views/Setting/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4ce90e5

Please sign in to comment.