feat:国际化多语言适配

This commit is contained in:
2025-10-29 15:48:40 +08:00
parent 985d739324
commit 3d67dc928d
41 changed files with 2636 additions and 2801 deletions
+8 -22
View File
@@ -36,7 +36,7 @@
<view class="map-loading" v-if="isLoading">
<view class="loading-content">
<view class="loading-spinner"></view>
<text>地图加载中...</text>
<text>{{ $t('common.loadingMap') }}</text>
</view>
</view>
</view>
@@ -58,28 +58,13 @@
calculateDistanceSync
} from '../utils/mapUtils.js'
// 获取 i18n 实例
const instance = getCurrentInstance()
const $t = instance?.proxy?.$t || ((key) => key)
// 引用折叠面板组件的ref
const collapseRef = ref(null)
// 使用指南步骤
const guideSteps = ref([{
title: '扫码使用',
desc: '找到附近设备,扫描设备上的二维码'
},
{
title: '免押金支付',
desc: '无需支付押金,使用支付分免押即可完成租借'
},
{
title: '开始使用',
desc: '设备自动解锁,风扇弹出后取出即可开始使用'
},
{
title: '归还设备',
desc: '使用完毕后,按照设备规格要求将风扇还入即可结束订单'
}
])
// Props
const props = defineProps({
userLocation: {
@@ -436,8 +421,9 @@ const handleSearch = () => {
right: 0;
bottom: 0;
width: 94vw;
height: var(--map-height, 78vh);
height: calc(100% - 20rpx); /* 减少高度,避免覆盖底部按钮 */
margin: 20rpx;
margin-bottom: 0; /* 底部不需要边距 */
border-radius: 20rpx;
overflow: hidden;
@@ -520,7 +506,7 @@ const handleSearch = () => {
.map-side-controls {
position: absolute;
right: 20rpx;
bottom: 20rpx;
bottom: 160rpx; /* 向上移动,避免被底部按钮遮挡 */
display: flex;
flex-direction: column;
align-items: center;