From 07f8200053c268caf37b9e88c6f4127e829eea76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=8C=E8=90=8C=E5=93=92=E8=B5=AB=E8=90=9D?= Date: Tue, 25 Apr 2023 17:12:57 +0800 Subject: [PATCH] :bug: Fix(custom): fix api storage bug --- src/pages/SettingsPage.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/SettingsPage.vue b/src/pages/SettingsPage.vue index 68f2f83..631c416 100644 --- a/src/pages/SettingsPage.vue +++ b/src/pages/SettingsPage.vue @@ -377,6 +377,7 @@ function initData () { model.value = localStorage.getItem(localStorageKey.model) || 'gpt-3.5-turbo' replyLanguage.value = localStorage.getItem(localStorageKey.replyLanguage) || 'English' apiKey.value = localStorage.getItem(localStorageKey.apiKey) || '' + api.value = localStorage.getItem(localStorageKey.api) as 'official' | 'web-api' || 'web-api' accessToken.value = localStorage.getItem(localStorageKey.accessToken) || '' enableProxy.value = localStorage.getItem(localStorageKey.enableProxy) === 'true' proxyHost.value = JSON.parse(localStorage.getItem(localStorageKey.proxy) || '{}').host || '' @@ -409,6 +410,7 @@ function handleAccessTokenChange () { } function handleApiChange (val: string) { + console.log(val) localStorage.setItem(localStorageKey.api, val) }