update:英文版代码备份

This commit is contained in:
2026-11-05 14:49:42 +08:00
parent 419cefd00e
commit 53ac4473f9
142 changed files with 1777 additions and 1604 deletions
+21 -21
View File
@@ -1,4 +1,6 @@
<script setup>
import { t } from "@/locales";
import { computed, ref } from "vue";
import { onLoad, onShow } from "@dcloudio/uni-app";
import Container from "@/components/Container.vue";
@@ -31,7 +33,7 @@ const createRoomLoading = ref(false);
const isSVip = computed(() => user.value.sVip === true);
const isVip = computed(() => user.value.vip === true && !isSVip.value);
const challengeLimitText = computed(() =>
getLimitCountText("约战", dailyCount.value.challenge)
getLimitCountText(t('challenge'), dailyCount.value.challenge)
);
const enterRoom = debounce(async (number) => {
@@ -42,7 +44,7 @@ const enterRoom = debounce(async (number) => {
return;
}
if (!number) {
warnning.value = "请输入房间号";
warnning.value = t('please_enter_a_room_number');
showModal.value = true;
return;
}
@@ -51,7 +53,7 @@ const enterRoom = debounce(async (number) => {
try {
const room = await getRoomAPI(number);
if (!room.number) {
warnning.value = room.started ? "该房间对战已开始,无法加入" : "查无此房";
warnning.value = room.started ? t('this_match_has_already_started_you_cannot_join') : t('room_not_found');
showModal.value = true;
return;
}
@@ -61,7 +63,7 @@ const enterRoom = debounce(async (number) => {
if (!alreadyIn) {
const result = await joinRoomAPI(number);
if (result.full) {
warnning.value = "房间已满员";
warnning.value = t('room_is_full');
showModal.value = true;
return;
}
@@ -147,12 +149,12 @@ onLoad(async (options) => {
</script>
<template>
<Container title="好友约战" :showBackToGame="true">
<Container :title="t('friend_challenge')" :showBackToGame="true">
<view :style="{ width: '100%', height: '100%' }">
<GuideTwo>
<view class="guide-tips">
<text class="guide-tips__main">约上朋友开几局,欢乐多,不寂寞</text>
<text class="guide-tips__sub">一起练升级更快,早日加入全国排位赛!</text>
<text class="guide-tips__main">{{ t('invite_friends_for_a_few_matches_and_have_fun_together') }}</text>
<text class="guide-tips__sub">{{ t('practice_together_level_up_faster_and_join_national_ranked_match') }}</text>
</view>
</GuideTwo>
<view class="my-data">
@@ -170,22 +172,22 @@ onLoad(async (options) => {
user.nickName
}}</text>
</view>
<text class="my-record-btn" @click="goMyRecord">我的战绩</text>
<text class="my-record-btn" @click="goMyRecord">{{ t('my_results') }}</text>
</view>
<view>
<view>
<view>
<text>{{ data.TotalBattle }}</text>
<text>局</text>
<text>{{ t('matches') }}</text>
</view>
<text>约战数量</text>
<text>{{ t('challenges') }}</text>
</view>
<view>
<view>
<text>{{ data.totalArrow }}</text>
<text>箭</text>
<text>{{ t('arrows') }}</text>
</view>
<text>射箭量</text>
<text>{{ t('arrows_shot') }}</text>
</view>
<view>
<view class="stars">
@@ -196,15 +198,15 @@ onLoad(async (options) => {
<image v-else src="https://static.shelingxingqiu.com/shootmini/static/star-empty.png" mode="widthFix" />
</block>
</view>
<text>挑战难度</text>
<text>{{ t('challenge_difficulty') }}</text>
</view>
</view>
</view>
<view class="founded-room">
<image src="https://static.shelingxingqiu.com/shootmini/static/founded-room.png" mode="widthFix" />
<view>
<input placeholder="输入房间号" v-model="roomNumber" placeholder-style="color: #ccc" />
<view @click="$clickSound(() => enterRoom(roomNumber))">进入房间</view>
<input :placeholder="t('enter_room_number')" v-model="roomNumber" placeholder-style="color: #ccc" />
<view @click="$clickSound(() => enterRoom(roomNumber))">{{ t('join_room') }}</view>
</view>
</view>
<view class="create-room">
@@ -226,9 +228,7 @@ onLoad(async (options) => {
:rounded="30"
:disabled="createRoomLoading"
:onClick="() => { $clickSound(); return onCreateRoom(); }"
>
创建约战房
</SButton>
>{{ t('create_challenge_room') }}</SButton>
</view>
</view>
<SModal :show="showModal" :onClose="() => (showModal = false)" height="716rpx">
@@ -243,9 +243,9 @@ onLoad(async (options) => {
</Container>
<ModalDialog
:show="showLimitModal"
:content="'今日约战次数已经用完\n开通会员可增加次数'"
cancelText="知道了"
confirmText="去开通"
:content="t('you_have_used_all_your_challenges_for_today_activate_membership_')"
:cancelText="t('got_it_335')"
:confirmText="t('activate')"
:onCancel="closeLimitModal"
:onConfirm="goVipPage"
/>