refactor: 优化多语言结构并新增远端语言包加载能力

1. 扁平化多语言文件层级,移除嵌套的命名空间
2. 更新组件内多语言调用路径,适配新的语言包结构
3. 重构HTTP请求错误处理逻辑
4. 新增remote-only模式的远端语言包加载器
5. 新增多语言数据源remote-only配置项
This commit is contained in:
2026-06-30 10:03:25 +08:00
parent 32db276e68
commit e6d47a3d78
13 changed files with 477 additions and 117 deletions

View File

@@ -7,17 +7,17 @@
<block v-if="globalStoreInfo && globalStoreInfo.store_id">
<text class="title">{{ globalStoreInfo.store_name }}</text>
<text>
<text class="change margin-left">{{ $lang('components-diy.diyStore.switchStore') }}</text>
<text class="change margin-left">{{ $lang('components-diy.diy-store.switchStore') }}</text>
<text class="iconfont icon-right"></text>
</text>
</block>
<text class="title" v-else>{{ $lang('components-diy.diyStore.locating') }}</text>
<text class="title" v-else>{{ $lang('components-diy.diy-store.locating') }}</text>
</view>
<view class="address-wrap" :style="{ color: value.textColor }">
<text class="iconfont icon-dizhi"></text>
<text v-if="globalStoreInfo && globalStoreInfo.store_id" @tap.stop="mapRoute" class="address">{{
globalStoreInfo.show_address }}</text>
<text v-else>{{ $lang('components-diy.diyStore.gettingLocation') }}</text>
<text v-else>{{ $lang('components-diy.diy-store.gettingLocation') }}</text>
</view>
</view>
<view class="store-image" @tap.stop="selectStore()">
@@ -40,11 +40,11 @@
<block v-if="globalStoreInfo && globalStoreInfo.store_id">
<text class="title">{{ globalStoreInfo.store_name }}</text>
<text>
<text class="change margin-left">{{ $lang('components-diy.diyStore.switchStore') }}</text>
<text class="change margin-left">{{ $lang('components-diy.diy-store.switchStore') }}</text>
<text class="iconfont icon-right"></text>
</text>
</block>
<text class="title" v-else>{{ $lang('components-diy.diyStore.locating') }}</text>
<text class="title" v-else>{{ $lang('components-diy.diy-store.locating') }}</text>
</view>
</view>
<view class="store-icon" @tap.stop="search()"><text class="iconfont icon-sousuo3"
@@ -60,10 +60,10 @@
<text class="title" :style="{ color: value.textColor }">{{ globalStoreInfo.store_name }}</text>
<text class="iconfont icon-unfold" :style="{ color: value.textColor }"></text>
</block>
<text class="title" v-else>{{ $lang('components-diy.diyStore.locating') }}</text>
<text class="title" v-else>{{ $lang('components-diy.diy-store.locating') }}</text>
</view>
<view class="store-right-search">
<input type="text" class="uni-input font-size-tag" disabled :placeholder="$lang('components-diy.diyStore.searchPlaceholder')"
<input type="text" class="uni-input font-size-tag" disabled :placeholder="$lang('components-diy.diy-store.searchPlaceholder')"
@tap.stop="search()" />
<text class="iconfont icon-sousuo3" @tap.stop="search()"></text>
</view>