mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-11 22:15:32 +08:00
bug(custom): 版权
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -12,3 +12,6 @@ dist/
|
||||
.swc
|
||||
.vscode
|
||||
.env.local
|
||||
.cursor/
|
||||
AGENTS.md
|
||||
openspec/
|
||||
|
||||
@@ -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 />}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ const initialState = {
|
||||
userInfo: null,
|
||||
isNewUser: false,
|
||||
cardInfo: {},
|
||||
lang: 'zhcn',
|
||||
lang: 'en',
|
||||
vipInfo: {
|
||||
isOpen: false,
|
||||
isVip: false,
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user