From 1e9dd9bb3e9e2bf1d89009320e21b1c10a48daec Mon Sep 17 00:00:00 2001 From: xingyy <64720302+Concur-max@users.noreply.github.com> Date: Fri, 7 Mar 2025 16:38:02 +0800 Subject: [PATCH] =?UTF-8?q?feat(i18n):=20=E4=BC=98=E5=8C=96=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E6=96=87=E6=A1=88=E5=B9=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=96=B0=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在英文、日文、简体中文和繁体中文的国际化文件中添加了新的文本项 - 优化了现有文本的表述,使其更加准确和自然 - 在多个组件中使用了新添加的国际化文本 --- app/components/itemDetail/index.vue | 70 ++++++++++++++++++++++++-- app/pages/artDetail/index.vue | 47 ++--------------- app/pages/liveRoom/index.client.vue | 2 +- app/pages/payment/result/index.vue | 2 +- app/pages/signature/panel/index.vue | 2 +- app/pages/signature/protocol/index.vue | 13 +++-- i18n/locales/en-US.json | 8 +-- i18n/locales/ja-JP.json | 8 +-- i18n/locales/zh-CN.json | 4 +- i18n/locales/zh-TW.json | 4 +- 10 files changed, 96 insertions(+), 64 deletions(-) diff --git a/app/components/itemDetail/index.vue b/app/components/itemDetail/index.vue index a7836ec..2dec729 100644 --- a/app/components/itemDetail/index.vue +++ b/app/components/itemDetail/index.vue @@ -1,6 +1,7 @@ diff --git a/app/pages/artDetail/index.vue b/app/pages/artDetail/index.vue index 23723d5..bb17799 100644 --- a/app/pages/artDetail/index.vue +++ b/app/pages/artDetail/index.vue @@ -3,7 +3,6 @@ import itemDetail from '@/components/itemDetail/index.vue' import {userArtwork} from "~/api/goods/index.js"; import {useRouter} from "#vue-router"; import {authStore} from "~/stores/auth/index.js"; - definePageMeta({ i18n: 'detail.text8' }) @@ -16,39 +15,12 @@ const initData = async () => { const res = await userArtwork({uuid}) if (res.status === 0) { detail.value = res.data + detail.value.auctionArtworkInfo.userId=detail.value.userID + console.log('detail.value',detail.value) } } const router = useRouter(); -const position = ref({x: window?.innerWidth - 120 || 0, y: 240}) -const startPosition = ref({x: 0, y: 0}) -const isDragging = ref(false) -const startDrag = (e) => { - isDragging.value = true - const clientX = e.touches ? e.touches[0].clientX : e.clientX - const clientY = e.touches ? e.touches[0].clientY : e.clientY - startPosition.value = { - x: clientX - position.value.x, - y: clientY - position.value.y - } -} - -const onDrag = (e) => { - if (isDragging.value) { - const clientX = e.touches ? e.touches[0].clientX : e.clientX - const clientY = e.touches ? e.touches[0].clientY : e.clientY - - const maxX = window.innerWidth - 108 - const maxY = window.innerHeight - 137 - - const x = Math.min(Math.max(0, clientX - startPosition.value.x), maxX) - const y = Math.min(Math.max(0, clientY - startPosition.value.y), maxY) - position.value = {x, y} - } -} -const stopDrag = () => { - isDragging.value = false -} const goPay=()=>{ payment.value.leftPrice=detail.value.leftPrice payment.value.leftCurrency=detail.value.leftCurrency @@ -61,18 +33,7 @@ const goPay=()=>{ } //router.push('/payment') } -onMounted(() => { - document.addEventListener('mousemove', onDrag) - document.addEventListener('mouseup', stopDrag) - document.addEventListener('touchmove', onDrag) - document.addEventListener('touchend', stopDrag) -}) -onUnmounted(() => { - document.removeEventListener('mousemove', onDrag) - document.removeEventListener('mouseup', stopDrag) - document.removeEventListener('touchmove', onDrag) - document.removeEventListener('touchend', stopDrag) -}) + function formatThousands(num) { return Number(num).toLocaleString(); @@ -88,7 +49,7 @@ initData() {{ $t('art_detail_page.button') }} {{detail.leftCurrency}}{{formatThousands(detail.leftPrice)}} - + diff --git a/app/pages/liveRoom/index.client.vue b/app/pages/liveRoom/index.client.vue index 535b012..5e59590 100644 --- a/app/pages/liveRoom/index.client.vue +++ b/app/pages/liveRoom/index.client.vue @@ -139,7 +139,7 @@ const tipOpen = () => {
- 直播加载中... + {{ t('liveRoom.loading') }}...
diff --git a/app/pages/payment/result/index.vue b/app/pages/payment/result/index.vue index db87be4..3440eb2 100644 --- a/app/pages/payment/result/index.vue +++ b/app/pages/payment/result/index.vue @@ -22,7 +22,7 @@ const queryOrder = async () => { } showLoadingToast({ - message: '加载中...', + message:t('common.loading'), forbidClick: true, }); diff --git a/app/pages/signature/panel/index.vue b/app/pages/signature/panel/index.vue index b833eb7..45db0ef 100644 --- a/app/pages/signature/panel/index.vue +++ b/app/pages/signature/panel/index.vue @@ -23,7 +23,7 @@ const submitSignature = () => { return; } toast.value=showLoadingToast({ - message: '加载中...', + message: $t('common.loading'), forbidClick: true, }); const { data } = signaturePad.value?.saveSignature(); // 返回 base64 格式的图片数据 diff --git a/app/pages/signature/protocol/index.vue b/app/pages/signature/protocol/index.vue index cbbb5a6..718c49a 100644 --- a/app/pages/signature/protocol/index.vue +++ b/app/pages/signature/protocol/index.vue @@ -47,7 +47,8 @@ const handleCollapseChange = (name) => { } const goSignature =useThrottleFn(async () => { - const res = await signOnline({ + if(userInfo.value.userExtend.isMainland===1){ + const res = await signOnline({ auctionArtworkUuid:payment.value.auctionArtworkUuid }) if (res.status===0){ @@ -60,10 +61,12 @@ const goSignature =useThrottleFn(async () => { } } - console.log('goSignature') - // router.push({ - // path: '/signature/panel' - // }) + }else if(userInfo.value.userExtend.isMainland===0){ + router.push({ + path: '/signature/panel' + }) + } + },2000) diff --git a/i18n/locales/en-US.json b/i18n/locales/en-US.json index f4f4173..c0ec6f9 100644 --- a/i18n/locales/en-US.json +++ b/i18n/locales/en-US.json @@ -173,7 +173,9 @@ "text5": "Artwork Introduction", "text6": "Starting Price", "text7": "Bid History", - "text8": "Lot Details" + "text8": "Lot Details", + "text10": "Call amount", + "text11": "Serial number" }, "art_detail_page": { "button": "Proceed to payment", @@ -184,7 +186,7 @@ "tab1": "Lots List", "tab2": "Auction Instructions", "lot_detail": "Lot Details", - "refresh_show": "Refresh successful", + "refresh_show": "Refresh successfully", "finished_text": "No more data", "start_price": "Starting Price", "close_price": "Hammer Price", @@ -314,7 +316,7 @@ } }, "liveRoom": { - "loading": "Live stream loading...", + "loading": "Live broadcast loading...", "error": { "player": "Player error:", "init": "Player initialization failed:", diff --git a/i18n/locales/ja-JP.json b/i18n/locales/ja-JP.json index 228837a..a316c82 100644 --- a/i18n/locales/ja-JP.json +++ b/i18n/locales/ja-JP.json @@ -173,7 +173,9 @@ "text5": "作品説明", "text6": "開始価格", "text7": "入札履歴", - "text8": "商品詳細" + "text8": "商品詳細", + "text10": "呼び出し金額", + "text11": "シリアルナンバー" }, "art_detail_page": { "button": "支払う", @@ -184,7 +186,7 @@ "tab1": "商品一覧", "tab2": "オークション説明", "lot_detail": "商品詳細", - "refresh_show": "更新成功", + "refresh_show": "正常にリフレッシュします", "finished_text": "これ以上ありません", "start_price": "開始価格", "close_price": "落札価格", @@ -314,7 +316,7 @@ } }, "liveRoom": { - "loading": "ライブストリーム読み込み中...", + "loading": "ライブブロードキャストの読み込み...", "error": { "player": "プレーヤーエラー:", "init": "プレーヤーの初期化に失敗しました:", diff --git a/i18n/locales/zh-CN.json b/i18n/locales/zh-CN.json index 6e9f690..376c725 100644 --- a/i18n/locales/zh-CN.json +++ b/i18n/locales/zh-CN.json @@ -174,7 +174,9 @@ "text6": "起拍价", "text7": "竞价表", "text8": "拍卖品详情", - "text9": "固定跳价" + "text9": "固定跳价", + "text10": "叫价金额", + "text11": "序号" }, "art_detail_page": { "button": "去支付", diff --git a/i18n/locales/zh-TW.json b/i18n/locales/zh-TW.json index bf34b19..5e9694f 100644 --- a/i18n/locales/zh-TW.json +++ b/i18n/locales/zh-TW.json @@ -224,7 +224,9 @@ "text5": "畫作簡介", "text6": "起拍價", "text7": "競價表", - "text8": "拍賣品詳情" + "text8": "拍賣品詳情", + "text10": "叫價金額", + "text11": "序號" }, "art_detail_page": { "button": "去支付",