bug(custom): 版权

This commit is contained in:
zhangjing1
2025-10-30 15:27:30 +08:00
parent e0a425ff72
commit 9f40e80ef7
6 changed files with 17 additions and 10 deletions

3
.gitignore vendored
View File

@@ -12,3 +12,6 @@ dist/
.swc
.vscode
.env.local
.cursor/
AGENTS.md
openspec/

View File

@@ -470,9 +470,9 @@ const SpPage = memo(
>
<context.Provider value={{}}>{props.children}</context.Provider>
<View className='sp-page__powered-by text-center'>
Powered by <SpImage src='powered-logo.png' width={100} height={20} />
</View>
{!props.loading && <View className='sp-page__powered-by flex items-center justify-center text-center'>
<Text>Powered by</Text><SpImage src='powered-logo.png' width={120} />
</View>}
</View>
)}
{props.loading && <SpLoading />}

View File

@@ -43,8 +43,12 @@
.sp-page__powered-by {
color: #B3B3B3;
font-size: 20px;
margin-bottom: 20px;
font-size: 24px;
display:flex;
align-items: center;
justify-content: center;
gap: 10px;
height: 80px;
}
.float-container {

View File

@@ -131,18 +131,18 @@ class Lang {
// 从本地存储中获取通用语言,如果不存在则使用空字符串
const commonLang = withStorageCommonLang ? globalThis._localStorage.getItem('') : ''
// 从本地存储中获取当前语言,如果不存在则使用源语言
const baseLang = withStorageLang ? globalThis._localStorage.getItem('lang') : 'zhcn'
const baseLang = withStorageLang ? globalThis._localStorage.getItem('lang') : 'en'
const lang = commonLang ? commonLang : baseLang
// 如果本地存储中没有语言设置,则使用环境变量中的默认语言
if (!globalThis._localStorage.getItem('lang')) {
try {
const defaultLang = process.env.APP_I18N_ORIGIN_LANG
? process.env.APP_I18N_ORIGIN_LANG
: 'zhcn'
: 'en'
// 设置默认语言
globalThis._localStorage.setItem('lang', defaultLang)
} catch (error) {
globalThis._localStorage.setItem('lang', 'zhcn')
globalThis._localStorage.setItem('lang', 'en')
console.error('setLanguagePackage error', error)
}
}

View File

@@ -25,7 +25,7 @@ const initialState = {
userInfo: null,
isNewUser: false,
cardInfo: {},
lang: 'zhcn',
lang: 'en',
vipInfo: {
isOpen: false,
isVip: false,

View File

@@ -112,7 +112,7 @@ const withStorageCommonLang =
// 从本地存储中获取通用语言,如果不存在则使用空字符串
const commonLang = withStorageCommonLang ? globalThis.localStorage.getItem('') : ''
// 从本地存储中获取当前语言,如果不存在则使用源语言
const baseLang = withStorageLang ? globalThis.localStorage.getItem('lang') : 'zhcn'
const baseLang = withStorageLang ? globalThis.localStorage.getItem('lang') : 'en'
const lang = commonLang ? commonLang : baseLang
// 根据当前语言设置翻译函数的语言包
globalThis.$t.locale(globalThis.langMap[lang], 'lang')