From 6e721ccc7e4c2c9329009612cb7c83b02bed45dc Mon Sep 17 00:00:00 2001
From: liangjian <1394459087@qq.com>
Date: Fri, 24 Jul 2026 13:43:41 +0800
Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=9B=BD=E9=99=85=E5=8C=96?=
=?UTF-8?q?=E6=96=87=E6=9C=AC=E8=BF=81=E7=A7=BB=E8=87=B3=E5=85=A8=E5=B1=80?=
=?UTF-8?q?=20locales/messages.js?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
将组件级 i18n 对象重构为统一由全局 locales/messages.js 管理,确保中英文语言切换时正确显示对应文本。
- 新增 utils/i18n.js 国际化工具函数
- 更新 store/$t.mixin.js 翻译混入逻辑
- 迁移 pkgService、pkgBooking、pkgAccount、pkgExplore、pages 等共 58 个组件的中英文文本至全局消息表
---
components/ContractSignDialog.vue | 75 +--
components/contract-alert/contract-alert.vue | 9 +-
locales/messages.js | 348 +++++++++++-
pages/index/component/MessageCenterTab.vue | 211 ++------
pages/index/component/MyApplicationTab.vue | 317 +++--------
pages/index/component/ProfileCenterTab.vue | 197 ++-----
pages/index/component/SelectRoomAreaPanel.vue | 39 +-
pages/index/component/SelectRoomHero.vue | 9 +-
pages/index/component/SelectRoomTab.vue | 73 +--
pages/index/component/StayServiceTab.vue | 335 +++---------
pages/index/index.vue | 67 +--
pkgAccount/auth_result/auth_result.vue | 147 ++----
pkgAccount/login/login.vue | 79 +--
pkgAccount/register/register.vue | 499 +++++-------------
.../registration_records.vue | 57 +-
pkgBooking/book/book.vue | 69 +--
pkgBooking/book_viewing/book_viewing.vue | 169 ++----
.../components/RoomTypeSelector.vue | 16 +-
pkgBooking/booking_detail/booking_detail.vue | 89 +---
pkgBooking/booking_list/booking_list.vue | 61 +--
pkgBooking/pay/pay.vue | 141 ++---
pkgExplore/download/download.vue | 27 +-
pkgExplore/filter/filter.vue | 55 +-
.../room_detail/components/RoomAssets.vue | 10 +-
.../room_detail/components/RoomHero.vue | 17 +-
.../room_detail/components/RoomInfo.vue | 9 +-
.../room_detail/components/RoomRules.vue | 8 +-
.../room_detail/components/RoomSummary.vue | 15 +-
pkgExplore/room_detail/room_detail.vue | 89 ++--
pkgExplore/sign/sign.vue | 83 +--
.../store_detail/components/FacilityList.vue | 8 +-
.../store_detail/components/RoomList.vue | 11 +-
.../store_detail/components/StoreInfo.vue | 13 +-
pkgExplore/store_detail/store_detail.vue | 37 +-
pkgExplore/vr_preview/vr_preview.vue | 39 +-
.../application_detail/application_detail.vue | 207 ++------
.../CurrentApplicationBillPanel.vue | 412 ++++-----------
.../contract_detail/contract_detail.vue | 55 +-
pkgService/contract_sign/contract_sign.vue | 89 +---
pkgService/device_control/device_control.vue | 115 +---
.../lost_found_publish/lost_found_publish.vue | 85 ++-
pkgService/message_detail/message_detail.vue | 119 ++---
pkgService/my_application/my_application.vue | 141 ++---
pkgService/my_contract/my_contract.vue | 131 ++---
.../room_inspection/room_inspection.vue | 130 +----
pkgService/service_stub/service_stub.vue | 143 ++---
pkgService/smart_control/smart_control.vue | 103 +---
.../components/BuildingSelector.vue | 15 +-
.../components/DateRangeSelector.vue | 31 +-
.../components/FloorSelector.vue | 15 +-
.../components/RoomTypeSelector.vue | 15 +-
.../submit_request/components/TagSelector.vue | 17 +-
pkgService/submit_request/submit_request.vue | 153 ++----
pkgService/ticket_center/ticket_center.vue | 25 +-
.../ticket_workbench/ticket_workbench.vue | 327 +++---------
.../utility_recharge/utility_recharge.vue | 13 +-
store/$t.mixin.js | 6 +-
utils/i18n.js | 100 ++++
58 files changed, 1810 insertions(+), 4065 deletions(-)
diff --git a/components/ContractSignDialog.vue b/components/ContractSignDialog.vue
index dd25676..ac816ca 100644
--- a/components/ContractSignDialog.vue
+++ b/components/ContractSignDialog.vue
@@ -57,24 +57,24 @@
- {{ t('undo') }}
+ {{ $tr('撤销') }}
- {{ t('rewrite') }}
+ {{ $tr('重写') }}
- {{ t('close') }}
+ {{ $tr('关闭') }}
- {{ t('confirmSignature') }}
+ {{ $tr('确认签名') }}
- {{ t('closeBoardTitle') }}
+ {{ $tr('关闭提示') }}
- {{ t('closeBoardDesc') }}
+ {{ $tr('您还未完成签名,确认要关闭吗?') }}
- {{ t('continueSigning') }}
- {{ t('continueClosing') }}
+ {{ $tr('继续签名') }}
+ {{ $tr('确认关闭') }}
@@ -116,46 +116,6 @@ export default {
default: ''
}
},
- i18n: {
- zh: {
- undo: '撤销',
- rewrite: '重写',
- close: '关闭',
- confirmSignature: '确认签名',
- footerTip: '签名前请确认您已完整阅读合同内容',
- closeBoardTitle: '关闭提示',
- closeBoardDesc: '您还未完成签名,确认要关闭吗?',
- continueSigning: '继续签名',
- continueClosing: '确认关闭',
- missingSignerName: '签名人缺失',
- writingHintZh: '请在此处手写中文正楷签名',
- writingHintEn: 'Please write your signature here',
- signerNameMissingToast: '签名人信息缺失',
- signatureRequiredToast: '请先完成签名',
- boundsFailedToast: '获取签名范围失败',
- signatureTooSmallToast: '签名范围太小,请重新签名',
- exportFailedToast: '导出签名失败,请重试'
- },
- en: {
- undo: 'Undo',
- rewrite: 'Rewrite',
- close: 'Close',
- confirmSignature: 'Confirm',
- footerTip: 'Please confirm that you have fully read the contract before signing',
- closeBoardTitle: 'Notice',
- closeBoardDesc: 'You have not finished signing. Are you sure to close?',
- continueSigning: 'Continue Signing',
- continueClosing: 'Close',
- missingSignerName: 'Missing Signer',
- writingHintZh: 'Please write your Chinese signature here',
- writingHintEn: 'Please write your signature here',
- signerNameMissingToast: 'Missing signer name',
- signatureRequiredToast: 'Please sign first',
- boundsFailedToast: 'Failed to get signature bounds',
- signatureTooSmallToast: 'Signature is too small, please try again',
- exportFailedToast: 'Failed to export signature, please try again'
- }
- },
data() {
return {
canvasId: 'contract-sign-canvas',
@@ -179,7 +139,7 @@ export default {
},
displaySignerName() {
const name = String(this.signerName || '').trim()
- return name || this.t('missingSignerName')
+ return name || this.$tr('签名人缺失')
},
hasSignerName() {
return !!String(this.signerName || '').trim()
@@ -199,7 +159,7 @@ export default {
return this.strokes.length > 0
},
writingHint() {
- return this.isChineseName ? this.t('writingHintZh') : this.t('writingHintEn')
+ return this.isChineseName ? this.$tr('请在此处手写中文正楷签名') : this.$tr('Please write your signature here')
},
guideFontSize() {
const length = this.displaySignerName.length
@@ -281,9 +241,6 @@ export default {
this.ctx = null
},
methods: {
- t(key) {
- return this.$translate(this.$options.i18n, key)
- },
clearSignatureContent() {
this.strokes = []
this.currentStroke = []
@@ -561,14 +518,14 @@ export default {
handleSave() {
if (!this.hasSignerName) {
uni.showToast({
- title: this.t('signerNameMissingToast'),
+ title: this.$tr('签名人信息缺失'),
icon: 'none'
})
return
}
if (!this.hasSignature) {
uni.showToast({
- title: this.t('signatureRequiredToast'),
+ title: this.$tr('请先完成签名'),
icon: 'none'
})
return
@@ -576,14 +533,14 @@ export default {
const cropRect = this.getSignatureBounds()
if (!cropRect) {
uni.showToast({
- title: this.t('boundsFailedToast'),
+ title: this.$tr('获取签名范围失败'),
icon: 'none'
})
return
}
if (!this.isSignatureQualified(cropRect)) {
uni.showToast({
- title: this.t('signatureTooSmallToast'),
+ title: this.$tr('签名范围太小,请重新签名'),
icon: 'none'
})
return
@@ -601,7 +558,7 @@ export default {
.catch(error => {
console.error('导出签名图片失败', error)
uni.showToast({
- title: this.t('exportFailedToast'),
+ title: this.$tr('导出签名失败,请重试'),
icon: 'none'
})
})
diff --git a/components/contract-alert/contract-alert.vue b/components/contract-alert/contract-alert.vue
index 94540da..87d86ba 100644
--- a/components/contract-alert/contract-alert.vue
+++ b/components/contract-alert/contract-alert.vue
@@ -36,9 +36,9 @@ export default {
return null
}
return {
- title: this.t('pendingTitle'),
- desc: this.t('pendingDesc', { count: this.pendingContracts.length }),
- actionText: this.t('actionText')
+ title: this.$tr('待签合同提醒'),
+ desc: this.$tr('您有 {count} 份合同待签署', { count: this.pendingContracts.length }),
+ actionText: this.$tr('去签署')
}
}
},
@@ -59,9 +59,6 @@ export default {
this.clearCollapseTimer()
},
methods: {
- t(key, params) {
- return this.$translate(this.i18n, key, params)
- },
clearCollapseTimer() {
if (this.collapseTimer) {
clearTimeout(this.collapseTimer)
diff --git a/locales/messages.js b/locales/messages.js
index 43e6e02..7fced2a 100644
--- a/locales/messages.js
+++ b/locales/messages.js
@@ -945,7 +945,22 @@ const messages = {
resultLabel: "Result",
totalChargeLabel: "Total Charge",
wechatCodeFailed: "Failed to get Wechat login code",
- wechatPayButton: "Wechat Pay"
+ wechatPayButton: "Wechat Pay",
+ cancelOrderButton: "Cancel Order",
+ cancelOrderContent: "This will close the current unpaid order. Continue?",
+ cancelOrderFailed: "Failed to cancel order",
+ cancelOrderLoading: "Canceling...",
+ cancelOrderSuccess: "Order canceled",
+ cancelOrderTitle: "Cancel Order",
+ paymentNoticeAmountLabel: "Amount",
+ paymentNoticeBillLabel: "Bill No.",
+ paymentNoticeCancel: "Later",
+ paymentNoticeConfirm: "Continue",
+ paymentNoticeItemLabel: "Charge Item",
+ paymentNoticeLine1: "Please confirm the bill and payment amount before continuing.",
+ paymentNoticeLine2: "After payment, the bill status may take a few seconds to sync. Please do not pay repeatedly.",
+ paymentNoticeLine3: "If the payment is interrupted or the page is closed, return to the bill page later to check the latest result.",
+ paymentNoticeTitle: "Payment Notice"
}
},
contract_detail: {
@@ -1257,6 +1272,14 @@ const messages = {
popupTitle: "Select Floor",
selectFloor: "Select floor"
},
+ RoomTypeSelector: {
+ emptyRoomTypes: "No room types available",
+ loadFailed: "Failed to load room types",
+ loadingRoomTypes: "Loading room types...",
+ popupTitle: "Select Room Type",
+ priceUnit: "/month",
+ selectRoomType: "Select preferred room type"
+ },
TagSelector: {
emptyText: "No tags available",
loadingText: "Loading tags..."
@@ -1309,6 +1332,155 @@ const messages = {
utility_recharge: {
navTitle: "Bill Management"
}
+ },
+ ticket_center: {
+ ticket_center: {
+ navTitle: "Work Orders",
+ heroBadge: "SERVICE",
+ heroTitle: "In-stay Ticket Services",
+ heroDesc: "Repair, renewal, checkout, room change, water delivery, cleaning, and suggestions are all handled here."
+ }
+ },
+ ticket_workbench: {
+ ticket_workbench: {
+ areaLabel: "Area",
+ assigneeLabel: "Assignee",
+ attachmentsLabel: "Attachments",
+ cancelProcess: "Cancel Action",
+ cancelSupplement: "Cancel Supplement",
+ changeRoomTypeLabel: "Preferred Room Type",
+ cleaningTimeLabel: "Cleaning Time",
+ contentLabel: "Content",
+ currentFlowTag: "Current",
+ currentStayInfo: "Current Stay",
+ currentStayOrder: "Current Stay Order",
+ emptyHistoryDesc: "No tickets of this type yet.",
+ emptyHistoryTitle: "No Ticket Records",
+ flowActionTitle: "Available Actions",
+ historyTab: "History",
+ leaseLabel: "Lease",
+ loadMore: "Load More",
+ loadingMore: "Loading...",
+ loadOrderFailed: "Failed to load stay context",
+ noFlowContent: "No handling content",
+ noMore: "No more records",
+ refresh: "Refresh",
+ refreshing: "Refreshing...",
+ remarkLabel: "Notes",
+ remarkPlaceholder: "Enter notes to help the staff handle this ticket",
+ roomLabel: "Room",
+ roomTypeLabel: "Room Type",
+ searchPlaceholder: "Search title or content",
+ selectAssignee: "Select assignee",
+ selectDate: "Select date",
+ selectTime: "Select time",
+ submitSectionDefaultDesc: "The form below will be submitted through the ticket APIs.",
+ submitTab: "Submit",
+ submitTicket: "Submit Ticket",
+ submitting: "Submitting...",
+ supplementAction: "Supplement",
+ supplementLabel: "Supplementary Fields",
+ supplementPlaceholder: "Please enter {label}",
+ ticketKicker: "WORK ORDER",
+ uploadImage: "Upload Image",
+ uploadImageCountExceeded: "Up to 6 images",
+ uploadImageFailed: "Failed to upload image",
+ uploadImageOversize: "Image must be less than 5MB",
+ uploadTip: "Upload JPG or PNG images, up to 6 images and 5MB each.",
+ uploadTipRepair: "Upload JPG or PNG images, up to 6 images and 5MB each. Repair requires at least 1 image.",
+ checkoutTimeLabel: "Checkout Time",
+ renewalTimeLabel: "Renew Until",
+ submittedAtLabel: "Submitted At",
+ submitSuccess: "Ticket submitted",
+ submitFailed: "Failed to submit ticket",
+ confirmSubmitTitle: "Confirm",
+ confirmSubmitContent: "Confirm submitting this ticket?",
+ missingStayContext: "Missing current stay order or room information",
+ repairAttachmentRequired: "Please upload repair images",
+ changeAreaRequired: "Please select a room type",
+ checkoutTimeRequired: "Please select checkout time",
+ checkoutReasonRequired: "Please fill in the checkout reason",
+ loadHistoryFailed: "Failed to load ticket history",
+ loadFlowsFailed: "Failed to load ticket flows",
+ loadActionsFailed: "Failed to load ticket actions",
+ continueProcess: "Continue",
+ loadAssigneeFailed: "Failed to load assignees",
+ submitSectionActionDesc: "The ticket is in progress and will continue after submission.",
+ submitSectionSupplementDesc: "The ticket is on hold and will continue after supplementing the information.",
+ currentStatusPending: "Pending",
+ currentStatusProcessing: "Processing",
+ currentStatusResolved: "Resolved",
+ currentStatusClosed: "Closed",
+ allStatus: "All",
+ pendingStatus: "Pending",
+ processingStatus: "Processing",
+ resolvedStatus: "Resolved",
+ closedStatus: "Closed"
+ }
+ },
+ room_inspection: {
+ room_inspection: {
+ pageTitle: "Inspection",
+ pageDesc: "Review and submit inspection results for the current order",
+ inspectionListTitle: "Inspection Records",
+ roomNoLabel: "Room No.",
+ inspectionTypeLabel: "Inspection Type",
+ inspectionStatusLabel: "Status",
+ inspectionTimeLabel: "Created At",
+ inspectionRemarksLabel: "Remarks",
+ inspectionRemarksPlaceholder: "Add notes for this inspection",
+ inspectionItemsTitle: "Inspection Items",
+ inspectionItemsDesc: "Check each item according to the on-site condition",
+ deviceFallback: "Unnamed Device",
+ requiredTag: "Required",
+ expectedQuantityLabel: "Expected Qty",
+ inspectionResultLabel: "Result",
+ checkedQuantityLabel: "Checked Qty",
+ checkedQuantityPlaceholder: "Enter quantity",
+ problemDetailLabel: "Problem Detail",
+ problemDetailPlaceholder: "Describe any abnormal, missing, or damaged condition",
+ photosLabel: "Photos",
+ addPhoto: "Add",
+ submitAction: "Submit",
+ loadingDesc: "Syncing inspection data...",
+ emptyTitle: "No inspections",
+ emptyDesc: "No inspection record is available for the current order.",
+ emptyItemsTitle: "No items",
+ emptyItemsDesc: "No inspection item is available for this inspection.",
+ submitSuccess: "Inspection submitted",
+ submitFailed: "Failed to submit",
+ submitting: "Submitting...",
+ missingInspectionNo: "Missing inspection record",
+ uploadFailed: "Failed to upload image",
+ chooseImageFailed: "Failed to choose image",
+ resultRequired: "Please complete the result selection for all items first"
+ }
+ }
+ },
+ components: {
+ ContractSignDialog: {
+ undo: "Undo",
+ rewrite: "Rewrite",
+ close: "Close",
+ confirmSignature: "Confirm",
+ footerTip: "Please confirm that you have fully read the contract before signing",
+ closeBoardTitle: "Notice",
+ closeBoardDesc: "You have not finished signing. Are you sure to close?",
+ continueSigning: "Continue Signing",
+ continueClosing: "Close",
+ missingSignerName: "Missing Signer",
+ writingHintZh: "Please write your Chinese signature here",
+ writingHintEn: "Please write your signature here",
+ signerNameMissingToast: "Missing signer name",
+ signatureRequiredToast: "Please sign first",
+ boundsFailedToast: "Failed to get signature bounds",
+ signatureTooSmallToast: "Signature is too small, please try again",
+ exportFailedToast: "Failed to export signature, please try again"
+ },
+ ContractAlert: {
+ actionText: "Sign Now",
+ pendingDesc: "You have {count} contract(s) pending signature",
+ pendingTitle: "Contract Pending Signature"
}
}
},
@@ -2258,7 +2430,22 @@ const messages = {
resultLabel: "处理结果",
totalChargeLabel: "应收合计",
wechatCodeFailed: "获取微信登录凭证失败",
- wechatPayButton: "微信支付"
+ wechatPayButton: "微信支付",
+ cancelOrderButton: "取消订单",
+ cancelOrderContent: "取消后将关闭当前未支付订单,是否继续?",
+ cancelOrderFailed: "取消订单失败",
+ cancelOrderLoading: "取消中...",
+ cancelOrderSuccess: "订单已取消",
+ cancelOrderTitle: "取消订单",
+ paymentNoticeAmountLabel: "支付金额",
+ paymentNoticeBillLabel: "账单号",
+ paymentNoticeCancel: "稍后再付",
+ paymentNoticeConfirm: "继续支付",
+ paymentNoticeItemLabel: "费用项目",
+ paymentNoticeLine1: "请确认本次支付账单和金额无误后再继续付款。",
+ paymentNoticeLine2: "支付完成后,账单状态可能需要几秒同步,请勿重复支付。",
+ paymentNoticeLine3: "若支付中断或页面关闭,可稍后返回账单页查看最新结果。",
+ paymentNoticeTitle: "用户须知"
}
},
contract_detail: {
@@ -2570,6 +2757,14 @@ const messages = {
popupTitle: "选择意向楼层",
selectFloor: "请选择楼层"
},
+ RoomTypeSelector: {
+ emptyRoomTypes: "暂无可选房型",
+ loadFailed: "房型列表加载失败",
+ loadingRoomTypes: "房型加载中...",
+ popupTitle: "选择意向房型",
+ priceUnit: "/月",
+ selectRoomType: "请选择意向房型"
+ },
TagSelector: {
emptyText: "暂无标签",
loadingText: "标签加载中..."
@@ -2622,6 +2817,155 @@ const messages = {
utility_recharge: {
navTitle: "账单管理"
}
+ },
+ ticket_center: {
+ ticket_center: {
+ navTitle: "工单中心",
+ heroBadge: "SERVICE",
+ heroTitle: "住中工单服务",
+ heroDesc: "报修、续住、退宿、调宿、送水、清洁和意见建议都统一从这里进入,提交后可继续查看流转记录。"
+ }
+ },
+ ticket_workbench: {
+ ticket_workbench: {
+ areaLabel: "所属区域",
+ assigneeLabel: "处理目标",
+ attachmentsLabel: "附件图片",
+ cancelProcess: "退出处理",
+ cancelSupplement: "取消补充",
+ changeRoomTypeLabel: "意向房型",
+ cleaningTimeLabel: "预约清洁时间",
+ contentLabel: "申请内容",
+ currentFlowTag: "当前节点",
+ currentStayInfo: "当前入住信息",
+ currentStayOrder: "当前入住订单",
+ emptyHistoryDesc: "当前类型还没有工单记录。",
+ emptyHistoryTitle: "暂无工单记录",
+ flowActionTitle: "可执行操作",
+ historyTab: "记录查询",
+ leaseLabel: "租期",
+ loadMore: "加载更多",
+ loadingMore: "加载中...",
+ loadOrderFailed: "入住信息加载失败",
+ noFlowContent: "暂无处理内容",
+ noMore: "没有更多了",
+ refresh: "刷新",
+ refreshing: "刷新中...",
+ remarkLabel: "补充说明",
+ remarkPlaceholder: "请输入补充说明,帮助工作人员更快处理",
+ roomLabel: "当前房间",
+ roomTypeLabel: "当前房型",
+ searchPlaceholder: "搜索工单标题或内容",
+ selectAssignee: "请选择处理目标",
+ selectDate: "请选择日期",
+ selectTime: "请选择时间",
+ submitSectionDefaultDesc: "以下内容将通过工单接口提交并进入后续流转。",
+ submitTab: "提交申请",
+ submitTicket: "提交工单",
+ submitting: "提交中...",
+ supplementAction: "补充信息",
+ supplementLabel: "补充业务信息",
+ supplementPlaceholder: "请输入{label}",
+ ticketKicker: "WORK ORDER",
+ uploadImage: "上传图片",
+ uploadImageCountExceeded: "最多上传 6 张图片",
+ uploadImageFailed: "图片上传失败,请重试",
+ uploadImageOversize: "图片不能超过 5MB",
+ uploadTip: "支持上传 JPG、PNG 等图片,单张不超过 5MB,最多 6 张。",
+ uploadTipRepair: "支持上传 JPG、PNG 等图片,单张不超过 5MB,最多 6 张。报修至少上传 1 张图片。",
+ checkoutTimeLabel: "预计退宿时间",
+ renewalTimeLabel: "续住至",
+ submittedAtLabel: "提交时间",
+ submitSuccess: "工单提交成功",
+ submitFailed: "工单提交失败",
+ confirmSubmitTitle: "确认提交",
+ confirmSubmitContent: "确认提交当前工单吗?",
+ missingStayContext: "当前缺少入住订单或房间信息,暂无法提交工单",
+ repairAttachmentRequired: "请上传报修附件图片",
+ changeAreaRequired: "请选择意向房型",
+ checkoutTimeRequired: "请选择退宿时间",
+ checkoutReasonRequired: "请填写退宿原因",
+ loadHistoryFailed: "工单记录加载失败",
+ loadFlowsFailed: "工单流转加载失败",
+ loadActionsFailed: "工单操作项加载失败",
+ continueProcess: "继续处理",
+ loadAssigneeFailed: "处理目标加载失败",
+ submitSectionActionDesc: "当前工单正在处理中,提交后会继续流转。",
+ submitSectionSupplementDesc: "当前工单处于挂起状态,补充信息后会继续流转。",
+ currentStatusPending: "待处理",
+ currentStatusProcessing: "处理中",
+ currentStatusResolved: "已解决",
+ currentStatusClosed: "已结束",
+ allStatus: "全部",
+ pendingStatus: "待处理",
+ processingStatus: "处理中",
+ resolvedStatus: "已解决",
+ closedStatus: "已结束"
+ }
+ },
+ room_inspection: {
+ room_inspection: {
+ pageTitle: "验房",
+ pageDesc: "按当前订单查看并提交验房结果",
+ inspectionListTitle: "验房记录",
+ roomNoLabel: "房间号",
+ inspectionTypeLabel: "验房类型",
+ inspectionStatusLabel: "当前状态",
+ inspectionTimeLabel: "发起时间",
+ inspectionRemarksLabel: "备注",
+ inspectionRemarksPlaceholder: "可填写本次验房的补充说明",
+ inspectionItemsTitle: "检查项",
+ inspectionItemsDesc: "请根据现场情况逐项核对",
+ deviceFallback: "未命名设备",
+ requiredTag: "必查",
+ expectedQuantityLabel: "应有数量",
+ inspectionResultLabel: "检查结果",
+ checkedQuantityLabel: "实测数量",
+ checkedQuantityPlaceholder: "请输入数量",
+ problemDetailLabel: "问题说明",
+ problemDetailPlaceholder: "请描述异常、缺失或损坏情况",
+ photosLabel: "现场照片",
+ addPhoto: "添加",
+ submitAction: "提交验房",
+ loadingDesc: "正在同步验房数据...",
+ emptyTitle: "暂无验房单",
+ emptyDesc: "当前订单还没有可查看的验房记录。",
+ emptyItemsTitle: "暂无检查项",
+ emptyItemsDesc: "当前验房单还没有检查项明细。",
+ submitSuccess: "验房单已提交",
+ submitFailed: "提交失败",
+ submitting: "提交中...",
+ missingInspectionNo: "未获取到验房单",
+ uploadFailed: "图片上传失败",
+ chooseImageFailed: "选择图片失败",
+ resultRequired: "请先完成所有检查项结果选择"
+ }
+ }
+ },
+ components: {
+ ContractSignDialog: {
+ undo: "撤销",
+ rewrite: "重写",
+ close: "关闭",
+ confirmSignature: "确认签名",
+ footerTip: "签名前请确认您已完整阅读合同内容",
+ closeBoardTitle: "关闭提示",
+ closeBoardDesc: "您还未完成签名,确认要关闭吗?",
+ continueSigning: "继续签名",
+ continueClosing: "确认关闭",
+ missingSignerName: "签名人缺失",
+ writingHintZh: "请在此处手写中文正楷签名",
+ writingHintEn: "Please write your signature here",
+ signerNameMissingToast: "签名人信息缺失",
+ signatureRequiredToast: "请先完成签名",
+ boundsFailedToast: "获取签名范围失败",
+ signatureTooSmallToast: "签名范围太小,请重新签名",
+ exportFailedToast: "导出签名失败,请重试"
+ },
+ ContractAlert: {
+ actionText: "去签署",
+ pendingDesc: "您有 {count} 份合同待签署",
+ pendingTitle: "待签合同提醒"
}
}
}
diff --git a/pages/index/component/MessageCenterTab.vue b/pages/index/component/MessageCenterTab.vue
index 67ea38e..2335b1c 100644
--- a/pages/index/component/MessageCenterTab.vue
+++ b/pages/index/component/MessageCenterTab.vue
@@ -1,12 +1,12 @@
- {{ t('title') }}
+ {{ $tr('消息中心') }}
@@ -16,31 +16,31 @@
{{ stats.systemUnread }}
- {{ t('system') }}
+ {{ $tr('系统通知') }}
{{ stats.paymentUnread }}
- {{ t('payment') }}
+ {{ $tr('缴费账单') }}
{{ stats.butlerUnread }}
- {{ t('butler') }}
+ {{ $tr('管家消息') }}
- {{ t('inspectionTitle') }}
- {{ t('inspectionDesc') }}
+ {{ $tr('巡查提醒') }}
+ {{ $tr('根据当前入住订单自动汇总巡查提醒记录') }}
- {{ inspectionReminderCount }} {{ t('inspectionCountUnit') }}
+ {{ inspectionReminderCount }} {{ $tr('条提醒') }}
{{ record.typeText }}
- {{ record.roomCode || t('unassignedRoom') }} · {{ record.timeText }}
+ {{ record.roomCode || $tr('未关联房间') }} · {{ record.timeText }}
@@ -66,23 +66,23 @@
{{ record.summaryText }}
- {{ t('recentMessages') }}
+ {{ $tr('近期消息') }}
- {{ t('markNotificationRead') }}
+ {{ $tr('通知已读') }}
- {{ t('loadingTitle') }}
- {{ t('loadingDesc') }}
+ {{ $tr('消息加载中') }}
+ {{ $tr('正在同步系统通知和巡查提醒,请稍候。') }}
- {{ t('emptyTitle') }}
- {{ t('emptyDesc') }}
+ {{ $tr('暂无消息') }}
+ {{ $tr('系统通知和巡查提醒会在这里显示。') }}
@@ -117,7 +117,7 @@
- {{ t('pullUpMore') }}
- {{ t('noMore') }}
+ {{ $tr('上拉加载更多') }}
+ {{ $tr('没有更多申请了') }}
-
- {{ t('emptyDesc') }}
+
+ {{ $tr('您还没有提交任何申请,去选房后可发起入住申请或预约看房。') }}
- {{ t('goSelectRoom') }}
+ {{ $tr('去选房') }}
- {{ t('loadingDesc') }}
+ {{ $tr('正在同步您的入住申请记录,请稍候。') }}
@@ -408,156 +408,6 @@ function padCountdownUnit(value) {
}
export default {
- i18n: {
- zh: {
- pageTitle: '我的申请',
- pageDesc: '您的入住和预约看房申请记录',
- toolbarSummary: '共 {total} 条申请',
- refreshing: '刷新中...',
- refresh: '刷新状态',
- apartmentLabel: '所属公寓',
- occupantLabel: '入住人',
- viewingTimeLabel: '预约时间',
- leaseTermLabel: '预计租期',
- submittedAtLabel: '提交时间',
- remarkLabel: '补充说明',
- payDeposit: '支付定金',
- continuePay: '继续支付',
- pendingPaymentTitle: '未完成支付订单',
- pendingPaymentOrderNoLabel: '支付单号',
- pendingPaymentAmountLabel: '订单金额',
- pendingPaymentDescLabel: '支付说明',
- pendingPaymentExpireLabel: '剩余支付时间',
- pendingPaymentExpired: '已失效',
- noMore: '没有更多申请了',
- pullUpMore: '上拉加载更多',
- emptyTitle: '暂无申请记录',
- emptyDesc: '您还没有提交任何申请,去选房后可发起入住申请或预约看房。',
- goSelectRoom: '去选房',
- loadingDesc: '正在同步您的入住申请记录,请稍候。',
- statusPending: '待审核',
- statusApproved: '已通过',
- statusRejected: '已拒绝',
- statusFinished: '已结束',
- statusProcessing: '处理中',
- statusPendingPayment: '请支付定金',
- statusWaitingRoomAssign: '等待预订中心分配房间',
- statusReminderTitle: '当前进度提醒',
- refreshEmptySuccess: '未查到申请单,已同步预订单',
- refreshSuccess: '申请状态已刷新',
- loadError: '申请记录加载失败',
- cancelOrder: '取消订单',
- cancelOrderLoading: '取消中...',
- cancelOrderTitle: '取消订单',
- cancelOrderContent: '取消后将关闭当前未支付的定金订单,是否继续?',
- cancelOrderSuccess: '订单已取消',
- cancelOrderFailed: '取消订单失败',
- viewingApplicationTitle: '预约看房申请',
- stayApplicationTitle: '入住申请',
- missingBillCode: '申请单编号缺失',
- missingContractNo: '合同编号缺失',
- missingApplicationCode: '申请编号缺失',
- dateRangeJoiner: ' 至 ',
- depositNoticeTitle: '租房定金须知',
- agreeAndPay: '同意并支付',
- scrollToRead: '请滑动阅读至底部',
- fetchPaymentParamsFailed: '获取支付参数失败',
- fetchWechatLoginCodeFailed: '获取微信登录凭证失败',
- loadingBill: '正在获取账单...',
- noPendingDepositBill: '暂无待支付定金账单',
- loadingPayment: '正在拉起支付...',
- depositPaymentDesc: '支付定金',
- paymentSuccess: '支付成功',
- paymentCanceled: '已取消支付',
- paymentFailed: '支付失败',
- reservationFlowTitle: '预定流程',
- reservationFlowDesc: '当前预定单的流程进度',
- reservationOrderFallback: '预定单',
- reservationOrderNoLabel: '预定单号',
- roomNoLabel: '房间号',
- reservationRoomLabel: '房型',
- reservationStatusLabel: '订单状态',
- currentStepTag: '当前',
- contractPendingReviewHint: '合同已签,等待宿管审核',
- checkinPendingHint: '宿管正在办理入住,请耐心等待',
- refreshAction: '刷新',
- refreshFlowAction: '刷新流程'
- },
- en: {
- pageTitle: 'My Applications',
- pageDesc: 'Your stay and viewing application records',
- toolbarSummary: '{total} applications',
- refreshing: 'Refreshing...',
- refresh: 'Refresh Status',
- apartmentLabel: 'Apartment',
- occupantLabel: 'Resident',
- viewingTimeLabel: 'Viewing Time',
- leaseTermLabel: 'Lease Term',
- submittedAtLabel: 'Submitted At',
- remarkLabel: 'Remarks',
- payDeposit: 'Pay Deposit',
- continuePay: 'Continue Pay',
- pendingPaymentTitle: 'Unfinished Payment',
- pendingPaymentOrderNoLabel: 'Payment Order No.',
- pendingPaymentAmountLabel: 'Order Amount',
- pendingPaymentDescLabel: 'Description',
- pendingPaymentExpireLabel: 'Time Left',
- pendingPaymentExpired: 'Expired',
- noMore: 'No more applications',
- pullUpMore: 'Pull up to load more',
- emptyTitle: 'No applications yet',
- emptyDesc: 'You have not submitted any application yet. Go select a room to start a stay or viewing application.',
- goSelectRoom: 'Select Room',
- loadingDesc: 'Syncing your application records. Please wait.',
- statusPending: 'Pending',
- statusApproved: 'Approved',
- statusRejected: 'Rejected',
- statusFinished: 'Closed',
- statusProcessing: 'Processing',
- statusPendingPayment: 'Please Pay Deposit',
- statusWaitingRoomAssign: 'Waiting for Room Assignment',
- statusReminderTitle: 'Current Progress',
- refreshEmptySuccess: 'No application found. Reservation records synced.',
- refreshSuccess: 'Application status refreshed',
- loadError: 'Failed to load applications',
- cancelOrder: 'Cancel Order',
- cancelOrderLoading: 'Canceling...',
- cancelOrderTitle: 'Cancel Order',
- cancelOrderContent: 'This will close the current unpaid deposit order. Continue?',
- cancelOrderSuccess: 'Order canceled',
- cancelOrderFailed: 'Failed to cancel order',
- viewingApplicationTitle: 'Viewing Request',
- stayApplicationTitle: 'Stay Application',
- missingBillCode: 'Missing application bill number',
- missingContractNo: 'Missing contract number',
- missingApplicationCode: 'Missing application number',
- dateRangeJoiner: ' to ',
- depositNoticeTitle: 'Rental Deposit Notice',
- agreeAndPay: 'Agree and Pay',
- scrollToRead: 'Scroll to bottom',
- fetchPaymentParamsFailed: 'Failed to get payment parameters',
- fetchWechatLoginCodeFailed: 'Failed to get WeChat login code',
- loadingBill: 'Loading bill...',
- noPendingDepositBill: 'No pending deposit bill available',
- loadingPayment: 'Opening payment...',
- depositPaymentDesc: 'Deposit Payment',
- paymentSuccess: 'Payment succeeded',
- paymentCanceled: 'Payment canceled',
- paymentFailed: 'Payment failed',
- reservationFlowTitle: 'Reservation Flow',
- reservationFlowDesc: 'Progress of the current reservation order',
- reservationOrderFallback: 'Reservation',
- reservationOrderNoLabel: 'Order No.',
- roomNoLabel: 'Room No.',
- reservationRoomLabel: 'Room Type',
- reservationStatusLabel: 'Order Status',
- currentStepTag: 'Current',
- contractPendingReviewHint: 'Contract signed, waiting for review',
- checkinPendingHint: 'Move-in is being processed, please wait',
- refreshAction: 'Refresh',
- refreshFlowAction: 'Refresh Flow'
- }
- },
data() {
return {
currentIndex: 0,
@@ -616,9 +466,6 @@ export default {
this.clearCountdownTimer()
},
methods: {
- t(key, params) {
- return this.$tm('pages.index.component.MyApplicationTab', key, params)
- },
load(force = false) {
return this.reloadList(force)
},
@@ -637,12 +484,12 @@ export default {
},
getStatusText(status) {
const map = {
- 0: this.t('statusPending'),
- 10: this.t('statusApproved'),
- 20: this.t('statusRejected'),
- 99: this.t('statusFinished')
+ 0: this.$tr('待审核'),
+ 10: this.$tr('已通过'),
+ 20: this.$tr('已拒绝'),
+ 99: this.$tr('已结束')
}
- return map[status] || this.t('statusProcessing')
+ return map[status] || this.$tr('处理中')
},
getDisplayStatusText(item = {}) {
if (this.$getLanguage() !== 'en' && item.statusDesc) {
@@ -685,17 +532,17 @@ export default {
return contractDetail.queryStatusDesc || contractDetail.approvalStatusDesc || contractDetail.statusDesc || getReservationCurrentStepText(item, this.language)
}
if (this.isReservationInspectionPendingReview(item)) {
- return this.t('inspectionPendingReviewHint')
+ return this.$tr('验房已完成,等待宿管审核')
}
const reservationStepText = getReservationCurrentStepText(item, this.language)
if (reservationStepText) {
return reservationStepText
}
if (this.shouldPayDeposit(item)) {
- return this.t('statusPendingPayment')
+ return this.$tr('请支付定金')
}
if (this.isWaitingRoomAssignment(item)) {
- return this.t('statusWaitingRoomAssign')
+ return this.$tr('等待预订中心分配房间')
}
return ''
},
@@ -720,10 +567,10 @@ export default {
const startText = this.formatDateTime(start)
const endText = this.formatDateTime(end)
if (String(start).includes('T') || String(end).includes('T')) {
- return `${startText}${this.t('dateRangeJoiner')}${endText}`
+ return `${startText}${this.$tr(' 至 ')}${endText}`
}
}
- return `${this.formatDate(start)}${this.t('dateRangeJoiner')}${this.formatDate(end)}`
+ return `${this.formatDate(start)}${this.$tr(' 至 ')}${this.formatDate(end)}`
},
formatMoney(value) {
const amount = Number(value || 0)
@@ -826,7 +673,7 @@ export default {
requestWechatPayment(paymentInfo) {
const payOptions = this.normalizeWechatPayOptions(paymentInfo)
if (!payOptions.timeStamp || !payOptions.nonceStr || !payOptions.package || !payOptions.paySign) {
- return Promise.reject(new Error(this.t('fetchPaymentParamsFailed')))
+ return Promise.reject(new Error(this.$tr('获取支付参数失败')))
}
return new Promise((resolve, reject) => {
uni.requestPayment({
@@ -842,7 +689,7 @@ export default {
provider: 'weixin',
success: (res) => {
if (!res || !res.code) {
- reject(new Error(this.t('fetchWechatLoginCodeFailed')))
+ reject(new Error(this.$tr('获取微信登录凭证失败')))
return
}
resolve(res.code)
@@ -992,12 +839,12 @@ export default {
return ''
}
if (expireTimestamp <= this.countdownNow) {
- return this.t('pendingPaymentExpired')
+ return this.$tr('已失效')
}
return this.formatPendingPaymentCountdown(this.getPendingPaymentRemainingSeconds(order))
},
getPendingPaymentActionText(item = {}) {
- return this.isApplicationPendingPaymentExpired(item) ? this.t('payDeposit') : this.t('continuePay')
+ return this.isApplicationPendingPaymentExpired(item) ? this.$tr('支付定金') : this.$tr('继续支付')
},
getReservationOrderNoFromItem(item = {}) {
return getReservationOrderNo(item)
@@ -1077,14 +924,14 @@ export default {
},
getReservationCurrentStepHint(order = {}) {
if (this.isReservationInspectionPendingReview(order)) {
- return this.t('inspectionPendingReviewHint')
+ return this.$tr('验房已完成,等待宿管审核')
}
if (this.isReservationContractAwaitingReview(order)) {
const detail = this.getReservationContractDetail(order) || {}
- return String(detail.queryStatusDesc || detail.approvalStatusDesc || '').trim() || this.t('contractPendingReviewHint')
+ return String(detail.queryStatusDesc || detail.approvalStatusDesc || '').trim() || this.$tr('合同已签,等待宿管审核')
}
if (this.isReservationCheckinProcessing(order)) {
- return this.t('checkinPendingHint')
+ return this.$tr('宿管正在办理入住,请耐心等待')
}
return ''
},
@@ -1127,7 +974,7 @@ export default {
|| bill.referenceTypeDesc
|| bill.billName
|| bill.name
- || this.t('depositPaymentDesc')
+ || this.$tr('支付定金')
).trim()
},
getReservationBillDisplayAmount(bill = {}) {
@@ -1411,14 +1258,14 @@ export default {
if (this.total === 0 && !this.reservationOrders.length) {
this.$emit('refresh-shell-state')
uni.showToast({
- title: this.t('refreshEmptySuccess'),
+ title: this.$tr('未查到申请单,已同步预订单'),
icon: 'none'
})
return
}
if (this.list.length || this.reservationOrders.length) {
uni.showToast({
- title: this.t('refreshSuccess'),
+ title: this.$tr('申请状态已刷新'),
icon: 'none'
})
}
@@ -1507,7 +1354,7 @@ export default {
this.pageIndex = Math.max(1, this.pageIndex - 1)
}
uni.showToast({
- title: (error && (error.message || error.msg)) || this.t('loadError'),
+ title: (error && (error.message || error.msg)) || this.$tr('申请记录加载失败'),
icon: 'none'
})
})
@@ -1531,9 +1378,9 @@ export default {
},
getApplicationTitle(item = {}) {
if (item.isViewingApplication) {
- return this.t('viewingApplicationTitle')
+ return this.$tr('预约看房申请')
}
- return item.intendedRoomTypeName || this.t('stayApplicationTitle')
+ return item.intendedRoomTypeName || this.$tr('入住申请')
},
resolveReferenceTypeNo(item = {}) {
return item.detailCode || ''
@@ -1549,14 +1396,14 @@ export default {
},
getCancelButtonText(item = {}) {
return this.cancelingReferenceTypeNo === this.resolveReferenceTypeNo(item)
- ? this.t('cancelOrderLoading')
- : this.t('cancelOrder')
+ ? this.$tr('取消中...')
+ : this.$tr('取消订单')
},
confirmCancelOrder() {
return new Promise((resolve) => {
uni.showModal({
- title: this.t('cancelOrderTitle'),
- content: this.t('cancelOrderContent'),
+ title: this.$tr('取消订单'),
+ content: this.$tr('取消后将关闭当前未支付的定金订单,是否继续?'),
confirmColor: '#ef4444',
success: (res) => resolve(!!(res && res.confirm)),
fail: () => resolve(false)
@@ -1575,7 +1422,7 @@ export default {
return {
...item,
status: 99,
- statusDesc: this.t('statusFinished'),
+ statusDesc: this.$tr('已结束'),
pendingDepositBill: null,
pendingPaymentOrder: null
}
@@ -1611,14 +1458,14 @@ export default {
await this.reloadList(true)
this.$emit('refresh-shell-state')
uni.showToast({
- title: this.t('cancelOrderSuccess'),
+ title: this.$tr('订单已取消'),
icon: 'success'
})
})
})
.catch((error) => {
uni.showToast({
- title: (error && (error.message || error.msg)) || this.t('cancelOrderFailed'),
+ title: (error && (error.message || error.msg)) || this.$tr('取消订单失败'),
icon: 'none'
})
})
@@ -1633,7 +1480,7 @@ export default {
: ''
if (!referenceTypeNo) {
uni.showToast({
- title: this.t('missingBillCode'),
+ title: this.$tr('申请单编号缺失'),
icon: 'none'
})
return
@@ -1659,7 +1506,7 @@ export default {
: ''
if (!referenceTypeNo) {
uni.showToast({
- title: this.t('missingBillCode'),
+ title: this.$tr('申请单编号缺失'),
icon: 'none'
})
return
@@ -1732,7 +1579,7 @@ export default {
referenceTypeNo: pickFirst(candidateReferenceTypeNos),
billNo: pickFirst(candidateBillNos),
paymentNo: pickFirst(candidatePaymentNos),
- description: String(currentNode.stepDesc || fallbackContext.description || '').trim() || this.t('depositPaymentDesc')
+ description: String(currentNode.stepDesc || fallbackContext.description || '').trim() || this.$tr('支付定金')
}
},
resolvePendingPaymentContextByPaymentNo(paymentNo = '') {
@@ -1788,11 +1635,11 @@ export default {
let referenceTypeNo = String(context.referenceTypeNo || '').trim()
let billNo = String(context.billNo || '').trim()
const paymentNo = String(context.paymentNo || '').trim()
- const description = String(context.description || '').trim() || this.t('depositPaymentDesc')
+ const description = String(context.description || '').trim() || this.$tr('支付定金')
if (!referenceTypeNo && !billNo && !paymentNo) {
uni.showToast({
- title: this.t('missingBillCode'),
+ title: this.$tr('申请单编号缺失'),
icon: 'none'
})
return
@@ -1802,7 +1649,7 @@ export default {
saveActiveApplicationCode(referenceTypeNo)
}
- uni.showLoading({ title: this.t('loadingBill') })
+ uni.showLoading({ title: this.$tr('正在获取账单...') })
try {
let bill = null
let pendingPaymentOrder = billNo ? await this.getPendingPaymentOrder(billNo).catch(() => null) : null
@@ -1850,7 +1697,7 @@ export default {
billName: description
}
} else {
- uni.showToast({ title: this.t('noPendingDepositBill'), icon: 'none' })
+ uni.showToast({ title: this.$tr('暂无待支付定金账单'), icon: 'none' })
return
}
} else {
@@ -1872,11 +1719,11 @@ export default {
}
if (!billNo) {
- uni.showToast({ title: this.t('noPendingDepositBill'), icon: 'none' })
+ uni.showToast({ title: this.$tr('暂无待支付定金账单'), icon: 'none' })
return
}
- uni.showLoading({ title: this.t('loadingPayment') })
+ uni.showLoading({ title: this.$tr('正在拉起支付...') })
const reusablePendingPaymentOrder = pendingPaymentOrder && !this.isApplicationPendingPaymentExpired({
pendingPaymentOrder
@@ -1888,7 +1735,7 @@ export default {
await this.requestWechatPayment(reusablePendingPaymentOrder.cashier.paymentInfo)
} else {
if (!referenceTypeNo || !bill) {
- throw new Error(this.t('fetchPaymentParamsFailed'))
+ throw new Error(this.$tr('获取支付参数失败'))
}
const wechatCode = await this.getWechatLoginCode()
const payRes = await paymentBillPay({
@@ -1905,11 +1752,11 @@ export default {
await this.requestWechatPayment(cashier.paymentInfo)
}
- uni.showToast({ title: this.t('paymentSuccess'), icon: 'success' })
+ uni.showToast({ title: this.$tr('支付成功'), icon: 'success' })
} catch (error) {
- const errMsg = error && (error.errMsg || error.message || error.msg) ? (error.errMsg || error.message || error.msg) : this.t('paymentFailed')
+ const errMsg = error && (error.errMsg || error.message || error.msg) ? (error.errMsg || error.message || error.msg) : this.$tr('支付失败')
if (/cancel/i.test(errMsg)) {
- uni.showToast({ title: this.t('paymentCanceled'), icon: 'none' })
+ uni.showToast({ title: this.$tr('已取消支付'), icon: 'none' })
} else {
uni.showToast({ title: errMsg, icon: 'none' })
}
@@ -1946,7 +1793,7 @@ export default {
if (step === RESERVATION_FLOW_STEP.BILL) {
if (!referenceTypeNo) {
uni.showToast({
- title: this.t('missingBillCode'),
+ title: this.$tr('申请单编号缺失'),
icon: 'none'
})
return
@@ -1964,7 +1811,7 @@ export default {
}
if (!contractNo) {
uni.showToast({
- title: this.t('missingContractNo'),
+ title: this.$tr('合同编号缺失'),
icon: 'none'
})
return
@@ -2010,7 +1857,7 @@ export default {
const contractNo = String(order && order.reservationCurrentNode && order.reservationCurrentNode.refNo || '').trim()
if (!contractNo) {
uni.showToast({
- title: this.t('missingContractNo'),
+ title: this.$tr('合同编号缺失'),
icon: 'none'
})
return
diff --git a/pages/index/component/ProfileCenterTab.vue b/pages/index/component/ProfileCenterTab.vue
index 21ea41e..df9aa79 100644
--- a/pages/index/component/ProfileCenterTab.vue
+++ b/pages/index/component/ProfileCenterTab.vue
@@ -1,4 +1,4 @@
-
+
@@ -43,7 +43,7 @@
- {{ t('guest') }}
+ {{ $tr('游客') }}
{{ guestHeaderDesc }}
@@ -62,17 +62,17 @@
{{ getStayDaysText() }}
- {{ t('daysIn') }}
+ {{ $tr('入住天数') }}
{{ getActivityCountText() }}
- {{ t('activities') }}
+ {{ $tr('参与活动') }}
{{ getPointsText() }}
- {{ t('points') }}
+ {{ $tr('积分') }}
@@ -84,40 +84,40 @@
- {{ t('registrationRecordTitle') }}
+ {{ $tr('注册记录') }}
- {{ registrationApplication ? t('registrationRecordSubmittedDesc') : t('registrationRecordGuestDesc') }}
+ {{ registrationApplication ? $tr('当前微信账号已提交注册申请,可查看历史记录与审批状态。') : $tr('未登录也可查看当前微信账号提交的注册申请记录。') }}
- {{ t('viewNow') }}
+ {{ $tr('立即查看') }}
- {{ t('contractStatusTitle') }}
+ {{ $tr('合同状态') }}
- {{ t('contractPendingTag') + ' ' + pendingContractCount }}
+ {{ $tr('待签约') + ' ' + pendingContractCount }}
- {{ t('contractPendingDesc') }}
+ {{ $tr('您当前有待签署合同,请尽快查看并完成签约。') }}
- {{ t('pendingCountText') + ':' + pendingContractCount }}
+ {{ $tr('待签合同') + ':' + pendingContractCount }}
- {{ t('viewDetail') }}
+ {{ $tr('查看详情') }}
- {{ t('coreServices') }}
+ {{ $tr('我的服务') }}
- {{ t(item.i18nKey) }}
+ {{ $tr(item.i18nKey) }}
@@ -146,16 +146,16 @@
{{ getMenuLabel(item) }}
-
+
@@ -163,7 +163,7 @@
- {{ t('logout') }}
+ {{ $tr('退出登录') }}
@@ -192,7 +192,7 @@ export default {
return typeof this.vuex_custom_bar_height === 'number' ? this.vuex_custom_bar_height : 0
},
displayUserName() {
- return this.userInfo.name || this.userInfo.account || this.userInfo.username || this.userInfo.mobile || this.t('userFallback')
+ return this.userInfo.name || this.userInfo.account || this.userInfo.username || this.userInfo.mobile || this.$tr('用户')
},
displayUserInitial() {
const firstChar = this.userInfo.firstChar
@@ -217,21 +217,21 @@ export default {
},
guestHeaderDesc() {
return this.registrationApplication
- ? `${this.t('registrationStatusTitle')}:${this.getRegistrationStatusText(this.registrationStatus)}`
- : this.t('clickToLogin')
+ ? `${this.$tr('注册申请进度')}:${this.getRegistrationStatusText(this.registrationStatus)}`
+ : this.$tr('点击登录')
},
registrationStatusDesc() {
- if (!this.registrationApplication) return this.t('clickToLogin')
+ if (!this.registrationApplication) return this.$tr('点击登录')
if (this.registrationStatus === 'pending') {
- return this.t('registrationPendingDesc')
+ return this.$tr('注册申请审核中,审批通过后才可登录')
}
if (this.registrationStatus === 'approved') {
- return this.t('registrationApprovedDesc')
+ return this.$tr('注册申请已通过,可前往登录')
}
if (this.registrationStatus === 'rejected') {
- return this.registrationApplication.approveReason || this.t('registrationRejectedDesc')
+ return this.registrationApplication.approveReason || this.$tr('注册申请已驳回,请查看原因后重新提交')
}
- return this.t('registrationEmptyDesc')
+ return this.$tr('暂未提交注册申请')
},
currentBookingCard() {
if (!this.isLogin) {
@@ -272,119 +272,11 @@ export default {
{ key: 'butler', label: '联系管家', labelEn: 'Contact Butler', icon: 'tn-icon-service-fill', title: '联系管家', titleEn: 'Contact Butler', desc: '联系专属管家,沟通入住和住中服务事项。', descEn: 'Contact your butler about move-in and in-stay services.', available: true }
],
coreServices: [
- { key: 'application', i18nKey: 'application', icon: 'tn-icon-edit-form' },
- { key: 'bookingList', i18nKey: 'bookingList', icon: 'tn-icon-order-fill' },
- { key: 'contract', i18nKey: 'contract', icon: 'tn-icon-copy' },
- { key: 'bill', i18nKey: 'bill', icon: 'tn-icon-money' }
+ { key: 'application', i18nKey: '入住申请', icon: 'tn-icon-edit-form' },
+ { key: 'bookingList', i18nKey: '预订记录', icon: 'tn-icon-order-fill' },
+ { key: 'contract', i18nKey: '我的合同', icon: 'tn-icon-copy' },
+ { key: 'bill', i18nKey: '账单', icon: 'tn-icon-money' }
],
- i18n: {
- zh: {
- edit: '编辑资料',
- guest: '游客',
- clickToLogin: '点击登录',
- daysIn: '入住天数',
- activities: '参与活动',
- points: '积分',
- applicationStatus: '申请进度',
- registrationStatusTitle: '注册申请进度',
- notSubmittedYet: '暂未提交注册申请',
- registrationPendingDesc: '注册申请审核中,审批通过后才可登录',
- registrationApprovedDesc: '注册申请已通过,可前往登录',
- registrationRejectedDesc: '注册申请已驳回,请查看原因后重新提交',
- registrationEmptyDesc: '暂未提交注册申请',
- registrationRecordTitle: '注册记录',
- registrationRecordSubmittedDesc: '当前微信账号已提交注册申请,可查看历史记录与审批状态。',
- registrationRecordGuestDesc: '未登录也可查看当前微信账号提交的注册申请记录。',
- viewNow: '立即查看',
- statusPending: '审核中',
- statusApproved: '已通过',
- statusRejected: '已拒绝',
- remind: '催一下',
- done: '已完成',
- viewDetail: '查看详情',
- exclusiveButler: '专属管家',
- onlineService: '24小时在线服务',
- contact: '联系',
- application: '入住申请',
- bookingList: '预订记录',
- bookingStatusTitle: '预订审核进度',
- contractStatusTitle: '合同状态',
- bookingNo: '预定单号',
- bookingPlaceholder: '支付后生成的预定单会显示在这里',
- bookingProgressDesc: '支付完成后会进入审核,审核通过后分配管家并等待分房号。',
- contractPendingTag: '待签约',
- contractPendingDesc: '您当前有待签署合同,请尽快查看并完成签约。',
- pendingCountText: '待签合同',
- contract: '我的合同',
- bill: '账单',
- coreServices: '我的服务',
- comingSoon: '建设中',
- settings: '偏好设置',
- languageSwitch: '语言切换',
- languageToggleLabel: 'EN',
- logout: '退出登录',
- logoutConfirmTitle: '提示',
- logoutConfirmContent: '确定要退出登录吗?',
- logoutSuccess: '已退出',
- userFallback: '用户',
- submitRequest: '提交申请',
- completeFormBeforeSubmit: '请完善表单信息后提交。',
- comingSoonDesc: '{title} 功能正在建设中,后续开放后会在这里提供正式入口和数据。'
- },
- en: {
- edit: 'Edit',
- guest: 'Guest',
- clickToLogin: 'Click to Sign In',
- daysIn: 'Days Stayed',
- activities: 'Activities',
- points: 'Points',
- applicationStatus: 'Application Status',
- registrationStatusTitle: 'Registration Status',
- notSubmittedYet: 'No registration submitted',
- registrationPendingDesc: 'Registration is under review',
- registrationApprovedDesc: 'Registration approved, ready to sign in',
- registrationRejectedDesc: 'Registration rejected, please review the reason',
- registrationEmptyDesc: 'No registration submitted',
- registrationRecordTitle: 'Registration Records',
- registrationRecordSubmittedDesc: 'A registration has been submitted with this Wechat account. You can review its history and approval status.',
- registrationRecordGuestDesc: 'You can still review registration records submitted with this Wechat account before signing in.',
- viewNow: 'View Now',
- statusPending: 'Under Review',
- statusApproved: 'Approved',
- statusRejected: 'Rejected',
- remind: 'Remind',
- done: 'Done',
- viewDetail: 'Details',
- exclusiveButler: 'Exclusive Butler',
- onlineService: '24/7 Online Service',
- contact: 'Contact',
- application: 'Applications',
- bookingList: 'Bookings',
- bookingStatusTitle: 'Booking Progress',
- contractStatusTitle: 'Contract Status',
- bookingNo: 'Booking No.',
- bookingPlaceholder: 'Your booking will appear here after payment',
- bookingProgressDesc: 'Booking will be reviewed after payment. Butler will be assigned upon approval.',
- contractPendingTag: 'Pending',
- contractPendingDesc: 'You have contracts waiting for signature. Please review them soon.',
- pendingCountText: 'Pending Contracts',
- contract: 'My Contract',
- bill: 'Billing',
- coreServices: 'My Services',
- comingSoon: 'Soon',
- settings: 'Preferences',
- languageSwitch: 'Language',
- languageToggleLabel: '中文',
- logout: 'Log Out',
- logoutConfirmTitle: 'Notice',
- logoutConfirmContent: 'Are you sure to log out?',
- logoutSuccess: 'Logged out',
- userFallback: 'User',
- submitRequest: 'Submit Request',
- completeFormBeforeSubmit: 'Please complete the form before submitting.',
- comingSoonDesc: '{title} is under development. The formal entry and data will be available here later.'
- }
- }
}
},
async mounted() {
@@ -398,9 +290,6 @@ export default {
else if (key === 'contract') this.goToContractList();
else if (key === 'bill') this.goToUtilityRecharge();
},
- t(key, params) {
- return this.$tm('pages.index.component.ProfileCenterTab', key, params)
- },
getMenuLabel(item = {}) {
return this.language === 'en'
? (item.labelEnShort || item.labelEn || item.label || '')
@@ -511,14 +400,14 @@ export default {
},
handleLogout() {
uni.showModal({
- title: this.t('logoutConfirmTitle'),
- content: this.t('logoutConfirmContent'),
+ title: this.$tr('提示'),
+ content: this.$tr('确定要退出登录吗?'),
success: (res) => {
if (res.confirm) {
clearLoginSession()
this.checkLoginStatus();
this.$parent.changeTabbar && this.$parent.changeTabbar(0, 'select-room');
- uni.showToast({ title: this.t('logoutSuccess'), icon: 'success' });
+ uni.showToast({ title: this.$tr('已退出'), icon: 'success' });
}
}
});
@@ -531,13 +420,13 @@ export default {
},
getRegistrationStatusText(status) {
if (this.registrationApplication && typeof this.registrationApplication.approvalStatus === 'number') {
- return getApprovalStatusLabel(this.registrationApplication.approvalStatus, this.t('notSubmittedYet'))
+ return getApprovalStatusLabel(this.registrationApplication.approvalStatus, this.$tr('暂未提交注册申请'))
}
const map = {
- unsubmitted: this.t('notSubmittedYet'),
- pending: this.t('statusPending'),
- approved: this.t('statusApproved'),
- rejected: this.t('statusRejected')
+ unsubmitted: this.$tr('暂未提交注册申请'),
+ pending: this.$tr('审核中'),
+ approved: this.$tr('已通过'),
+ rejected: this.$tr('已拒绝')
}
return map[status] || map.unsubmitted
},
@@ -581,7 +470,7 @@ export default {
},
goToSubmitRequest(title, desc, payload = {}, titleZh = '', titleEn = '', descZh = '', descEn = '') {
uni.navigateTo({
- url: `/pkgService/submit_request/submit_request?title=${encodeURIComponent(title || this.t('submitRequest'))}&titleZh=${encodeURIComponent(titleZh || title || this.t('submitRequest'))}&titleEn=${encodeURIComponent(titleEn || title || this.t('submitRequest'))}&desc=${encodeURIComponent(desc || this.t('completeFormBeforeSubmit'))}&descZh=${encodeURIComponent(descZh || desc || this.t('completeFormBeforeSubmit'))}&descEn=${encodeURIComponent(descEn || desc || this.t('completeFormBeforeSubmit'))}&payload=${encodeURIComponent(JSON.stringify(payload || {}))}`
+ url: `/pkgService/submit_request/submit_request?title=${encodeURIComponent(title || this.$tr('提交申请'))}&titleZh=${encodeURIComponent(titleZh || title || this.$tr('提交申请'))}&titleEn=${encodeURIComponent(titleEn || title || this.$tr('提交申请'))}&desc=${encodeURIComponent(desc || this.$tr('请完善表单信息后提交。'))}&descZh=${encodeURIComponent(descZh || desc || this.$tr('请完善表单信息后提交。'))}&descEn=${encodeURIComponent(descEn || desc || this.$tr('请完善表单信息后提交。'))}&payload=${encodeURIComponent(JSON.stringify(payload || {}))}`
})
},
handleApplicationEntry() {
@@ -627,9 +516,9 @@ export default {
}, itemTitleZh, itemTitleEn, itemDescZh, itemDescEn)
return
}
- const comingSoonDesc = this.t('comingSoonDesc', { title: itemTitle })
- const comingSoonDescZh = this.$tm('pages.index.component.ProfileCenterTab', 'comingSoonDesc', { title: itemTitleZh || itemTitle })
- const comingSoonDescEn = this.$tm('pages.index.component.ProfileCenterTab', 'comingSoonDesc', { title: itemTitleEn || itemTitle })
+ const comingSoonDesc = this.$tr('{title} 功能正在建设中,后续开放后会在这里提供正式入口和数据。', { title: itemTitle })
+ const comingSoonDescZh = this.$tr('{title} 功能正在建设中,后续开放后会在这里提供正式入口和数据。', { title: itemTitleZh || itemTitle })
+ const comingSoonDescEn = this.$tr('{title} 功能正在建设中,后续开放后会在这里提供正式入口和数据。', { title: itemTitleEn || itemTitle })
uni.navigateTo({
url: `/pkgService/service_stub/service_stub?title=${encodeURIComponent(itemTitle)}&titleZh=${encodeURIComponent(itemTitleZh || itemTitle)}&titleEn=${encodeURIComponent(itemTitleEn || itemTitle)}&desc=${encodeURIComponent(comingSoonDesc)}&descZh=${encodeURIComponent(comingSoonDescZh)}&descEn=${encodeURIComponent(comingSoonDescEn)}&key=${item.key}`
});
diff --git a/pages/index/component/SelectRoomAreaPanel.vue b/pages/index/component/SelectRoomAreaPanel.vue
index 0996c00..c41d17d 100644
--- a/pages/index/component/SelectRoomAreaPanel.vue
+++ b/pages/index/component/SelectRoomAreaPanel.vue
@@ -28,7 +28,7 @@
- {{ t('searchApartment') }}
+ {{ $tr('搜索区域、公寓或房型') }}
- {{ t('tagFilter') }}
+ {{ $tr('标签筛选') }}
{{ displayTag(currentTagLabel) }}
@@ -57,7 +57,7 @@
:class="{ 'quick-tag--active': !selectedTag }"
@click="$emit('select-tag', '')"
>
- {{ t('all') }}
+ {{ $tr('全部') }}
- {{ isAreaLoading ? t('loadingAreaStatus') : t('areaStatus') }}
+ {{ isAreaLoading ? $tr('区域加载中') : $tr('区域状态') }}
- {{ roomLoadError || areaLoadError || t('areaStatusDesc') }}
+ {{ roomLoadError || areaLoadError || $tr('暂无符合筛选条件的区域') }}
- {{ bannerList.length ? t('emptyAreaTitle') : t('emptyBannerTitle') }}
+ {{ bannerList.length ? $tr('暂无匹配房源') : $tr('暂无轮播图') }}
- {{ bannerList.length ? t('emptyAreaDesc') : t('emptyBannerDesc') }}
+ {{ bannerList.length ? $tr('当前筛选条件下暂无可用房源') : $tr('暂无可展示的轮播图') }}
@@ -102,7 +102,7 @@
{{ getAreaName(area) }}
- {{ t('viewCommunity') }}
+ {{ $tr('查看详情') }}
@@ -118,7 +118,7 @@
{{ getAreaAddress(area) || defaultAreaAddress(getAreaName(area)) }}
- {{ t('distancePlaceholder') }}
+ {{ $tr('附近') }}
@@ -145,8 +145,8 @@
¥
- {{ formatDisplayPrice(roomType.price) || t('pricePending') }}
- {{ t('priceUnit') }}
+ {{ formatDisplayPrice(roomType.price) || $tr('待定') }}
+ {{ $tr('元/月起') }}
@@ -272,9 +272,6 @@ export default {
}
return localizeHousingTag(text, this.language)
},
- t(key) {
- return this.$tm('pages.index.component.SelectRoomTab', key)
- },
formatRoomTypeName(name) {
const normalizedName = String(name || '')
return normalizedName.replace(/^[^·]+·/, '')
@@ -321,7 +318,7 @@ export default {
return [...new Set(roomTypeTags)].slice(0, 4)
},
showTagActionSheet() {
- const tagOptions = [this.t('allTags'), ...this.availableFilterTags]
+ const tagOptions = [this.$tr('全部标签'), ...this.availableFilterTags]
if (!tagOptions.length) {
return
}
@@ -335,10 +332,10 @@ export default {
},
showSortActionSheet() {
const sortOptions = [
- { label: this.t('sortDefault'), value: 'default' },
- { label: this.t('sortPriceAsc'), value: 'price-asc' },
- { label: this.t('sortPriceDesc'), value: 'price-desc' },
- { label: this.t('sortNameAsc'), value: 'name-asc' }
+ { label: this.$tr('默认排序'), value: 'default' },
+ { label: this.$tr('价格从低到高'), value: 'price-asc' },
+ { label: this.$tr('价格从高到低'), value: 'price-desc' },
+ { label: this.$tr('名称排序'), value: 'name-asc' }
]
uni.showActionSheet({
itemList: sortOptions.map((item) => item.label),
@@ -360,9 +357,9 @@ export default {
},
defaultAreaAddress(areaName = '') {
if (this.language === 'en') {
- return `${this.t('defaultAreaAddressPrefix')}${areaName} CBD`
+ return `${this.$tr('位于')}${areaName} CBD`
}
- return `${this.t('defaultAreaAddressPrefix')}${areaName}核心商圈`
+ return `${this.$tr('位于')}${areaName}核心商圈`
}
}
}
diff --git a/pages/index/component/SelectRoomHero.vue b/pages/index/component/SelectRoomHero.vue
index 289a47f..ac2ee10 100644
--- a/pages/index/component/SelectRoomHero.vue
+++ b/pages/index/component/SelectRoomHero.vue
@@ -57,12 +57,12 @@
- {{ t('apartmentDetail') }}
- {{ t('bookViewing') }}
+ {{ $tr('公寓详情') }}
+ {{ $tr('预约看房') }}
- {{ t('learnMore') }}
+ {{ $tr('了解更多') }}
@@ -136,9 +136,6 @@ export default {
displayTabSubtitle(item = {}) {
return this.getBannerDisplayText(item, 'tab')
},
- t(key) {
- return this.$tm('pages.index.component.SelectRoomTab', key)
- },
formatTabTitle(title) {
const normalizedTitle = String(title || '')
return normalizedTitle
diff --git a/pages/index/component/SelectRoomTab.vue b/pages/index/component/SelectRoomTab.vue
index e380ef0..49ccca4 100644
--- a/pages/index/component/SelectRoomTab.vue
+++ b/pages/index/component/SelectRoomTab.vue
@@ -114,64 +114,6 @@ export default {
SelectRoomHero,
SelectRoomAreaPanel
},
- i18n: {
- zh: {
- shareTitle: '绿居公寓 - 国际化青年社区',
- all: '全部',
- allAreas: '全部区域',
- allTags: '全部标签',
- apartmentDetail: '公寓详情',
- areaStatus: '区域状态',
- areaStatusDesc: '暂无符合筛选条件的区域',
- areaUnavailableTitle: '该区域暂未开放',
- bookViewing: '预约看房',
- defaultAreaAddressPrefix: '位于',
- distancePlaceholder: '附近',
- emptyAreaDesc: '当前筛选条件下暂无可用房源',
- emptyAreaTitle: "暂无匹配房源",
- emptyBannerDesc: "暂无可展示的轮播图",
- emptyBannerTitle: "暂无轮播图",
- learnMore: "了解更多",
- loadingAreaStatus: "区域加载中",
- pricePending: "待定",
- priceUnit: "元/月起",
- searchApartment: "搜索区域、公寓或房型",
- sortDefault: "默认排序",
- sortNameAsc: "名称排序",
- sortPriceAsc: "价格从低到高",
- sortPriceDesc: "价格从高到低",
- tagFilter: "标签筛选",
- viewCommunity: "查看详情"
- },
- en: {
- shareTitle: 'Luju Apartments - International Youth Community',
- all: "All",
- allAreas: "All Areas",
- allTags: "All Tags",
- apartmentDetail: "Apartment Detail",
- areaStatus: "Area Status",
- areaStatusDesc: "No areas matched the current filter.",
- areaUnavailableTitle: "Area information unavailable",
- bookViewing: "Book Viewing",
- defaultAreaAddressPrefix: "Located at ",
- distancePlaceholder: "Nearby",
- emptyAreaDesc: "No rooms available under the current filters.",
- emptyAreaTitle: "No matched rooms",
- emptyBannerDesc: "No active banners available.",
- emptyBannerTitle: "No banners",
- learnMore: "Learn More",
- loadingAreaStatus: "Loading areas",
- pricePending: "TBD",
- priceUnit: "/month",
- searchApartment: "Search by area, apartment or room type",
- sortDefault: "Default",
- sortNameAsc: "Name",
- sortPriceAsc: "Price: Low to High",
- sortPriceDesc: "Price: High to Low",
- tagFilter: "Tags",
- viewCommunity: "View Details"
- }
- },
data() {
return {
isLogin: false,
@@ -213,12 +155,12 @@ export default {
return this.getLocalizedAreaText(matchedArea)
}
if (this.currentLang === 'en') {
- return this.currentBanner.areaLabelEnDisplay || this.currentBanner.areaLabelEn || this.currentBanner.areaLabel || this.t('allAreas')
+ return this.currentBanner.areaLabelEnDisplay || this.currentBanner.areaLabelEn || this.currentBanner.areaLabel || this.$tr('全部区域')
}
- return this.currentBanner.areaLabel || this.t('allAreas')
+ return this.currentBanner.areaLabel || this.$tr('全部区域')
},
currentTagLabel() {
- return this.selectedTag || this.t('allTags')
+ return this.selectedTag || this.$tr('全部标签')
},
availableFilterTags() {
const preferredOrder = ['押一付一', '生活便利', '独立厨卫', '商圈环绕', '民水民电', '拎包入住', '近地铁', '智能家居']
@@ -262,9 +204,6 @@ export default {
await Promise.all([this.loadBannerList(), this.loadAreaList()])
},
methods: {
- t(key) {
- return this.$tm('pages.index.component.SelectRoomTab', key)
- },
getLocalizedBannerText(banner = {}, field = '') {
const key = String(field || '').trim()
if (!key) {
@@ -512,7 +451,7 @@ export default {
} else {
// 容错处理
uni.showToast({
- title: this.t('areaUnavailableTitle'),
+ title: this.$tr('该区域暂未开放'),
icon: 'none'
})
}
@@ -547,13 +486,13 @@ export default {
,
onShareAppMessage() {
return {
- title: this.t('shareTitle'),
+ title: this.$tr('绿居公寓 - 国际化青年社区'),
path: '/pages/index/index'
}
},
onShareTimeline() {
return {
- title: this.t('shareTitle')
+ title: this.$tr('绿居公寓 - 国际化青年社区')
}
}
}
diff --git a/pages/index/component/StayServiceTab.vue b/pages/index/component/StayServiceTab.vue
index 7eee045..836a506 100644
--- a/pages/index/component/StayServiceTab.vue
+++ b/pages/index/component/StayServiceTab.vue
@@ -1,7 +1,7 @@
- {{ t('title') }}
+ {{ $tr('我的入住') }}
@@ -13,12 +13,12 @@
- {{ t('notCheckedInTitle') }}
+ {{ $tr('您还没有在租房间') }}
- {{ t('notCheckedInDesc') }}
+ {{ $tr('长租公寓为海外青年提供高端社区服务\n请先前往选房大厅挑选心仪套间') }}
- {{ t('goSelectRoom') }}
+ {{ $tr('去选房') }}
@@ -49,7 +49,7 @@
@@ -73,7 +73,7 @@
- {{ t('submitBookingStep') }}
+ {{ $tr('提交预定') }}
@@ -82,7 +82,7 @@
- {{ t('reviewStep') }}
+ {{ $tr('管家审核') }}
@@ -91,12 +91,12 @@
- {{ t('contractStep') }}
+ {{ $tr('签订合同') }}
- {{ t('checkinStep') }}
+ {{ $tr('办理入住') }}
@@ -127,11 +127,11 @@
{{ roomDisplayText }}
- {{ t('activeStatus') }}
+ {{ $tr('使用中') }}
{{ roomTitleText }}
- {{ t('leaseTerm') }}:{{ leaseTermText }}
+ {{ $tr('租期') }}:{{ leaseTermText }}
@@ -139,7 +139,7 @@
{{ smartSummaryText }}
- {{ t('smartControl') }}
+ {{ $tr('全屋智能') }}
@@ -158,7 +158,7 @@
- {{ t('addSmartDevice') }}
+ {{ $tr('添加智能设备') }}
@@ -166,7 +166,7 @@
- {{ t('stayService') }}
+ {{ $tr('住中申请') }}
@@ -193,8 +193,8 @@
- {{ t('publicService') }}
- {{ t('viewAll') }}
+ {{ $tr('公寓精选服务') }}
+ {{ $tr('全部') }}
@@ -222,28 +222,28 @@
- {{ t('myBill') }}
- {{ unpaidBillCount ? t('unpaid') : t('paidOff') }}
+ {{ $tr('本月账单') }}
+ {{ unpaidBillCount ? $tr('待支付') : $tr('已结清') }}
¥{{ formatMoney(unpaidBillTotal) }}
- {{ unpaidBillCount ? t('payBill') : t('viewBill') }}
+ {{ unpaidBillCount ? $tr('去支付') : $tr('查看账单') }}
- {{ t('billType') }}
+ {{ $tr('账单类型') }}
{{ unpaidBillPrimaryType }}
- {{ t('billCount') }}
- {{ unpaidBillCount }} {{ t('billUnit') }}
+ {{ $tr('账单数量') }}
+ {{ unpaidBillCount }} {{ $tr('笔') }}
- {{ t('lastCreateTime') }}
+ {{ $tr('最近生成') }}
{{ latestBillTimeText }}
@@ -251,7 +251,7 @@
- {{ t('managementContacts') }}
+ {{ $tr('宿管与管理员') }}
{{ getManagerName(contact) }}
- {{ contact.contactType === 'counselor' ? t('counselorTag') : t('dormitoryManagerTag') }}
+ {{ contact.contactType === 'counselor' ? $tr('管理员') : $tr('宿管') }}
- {{ getManagerPhone(contact) || t('noContactPhone') }}
+ {{ getManagerPhone(contact) || $tr('暂无联系电话') }}
- {{ t('managementContacts') }}
- {{ isManagementContactsLoading ? t('loadingButlerInfo') : t('noManagerContacts') }}
+ {{ $tr('宿管与管理员') }}
+ {{ isManagementContactsLoading ? $tr('正在同步管家信息...') : $tr('暂无管理联系人') }}
@@ -562,176 +562,6 @@ export default {
descEn: 'Submit lost or found item details so the community can help.'
}
],
- i18n: {
- zh: {
- title: '我的入住',
- bookingInfo: '预定信息',
- submitBookingStep: '提交预定',
- reviewStep: '管家审核',
- contractStep: '签订合同',
- checkinStep: '办理入住',
- notCheckedInTitle: '您还没有在租房间',
- notCheckedInDesc: '长租公寓为海外青年提供高端社区服务\n请先前往选房大厅挑选心仪套间',
- bookingPendingTitle: '您的预订正在审核中',
- bookingPendingDesc: '定金已支付,预定单正在审批流中。审批通过后将分配管家并等待分房号。',
- goSelectRoom: '去选房',
- stayService: '住中申请',
- butler: '专属社区管家',
- online: '当前在线 · 响应时间 < 5分钟',
- callNow: '拨打',
- publicService: '公寓精选服务',
- viewAll: '全部',
- leaseTerm: '租期',
- activeStatus: '使用中',
- myBill: '本月账单',
- unpaid: '待支付',
- paidOff: '已结清',
- payBill: '去支付',
- viewBill: '查看账单',
- smartControl: '全屋智能',
- addSmartDevice: '添加智能设备',
- smartAvailableAfterCheckin: '入住后可使用智能设备',
- syncingSmartDevices: '正在同步智能设备...',
- smartDeviceConnected: '已接入 {count} 台智能设备',
- smartDeviceSyncFailed: '智能设备同步失败',
- smartDeviceEmpty: '当前房间暂无智能设备',
- roomDeviceUnconfigured: '房间智能设备未配置',
- smartDeviceLoadFailed: '智能设备加载失败',
- primaryButlerTag: '主责',
- noContactPhone: '暂无联系电话',
- loadingButlerInfo: '正在同步管家信息...',
- noButlerInfo: '暂未获取到管家信息',
- managementContacts: '宿管与管理员',
- dormitoryManagerTag: '宿管',
- counselorTag: '管理员',
- noManagerContacts: '暂无管理联系人',
- managerContactSummary: '当前区域共有 {count} 位管家可联系',
- contactPhonePrefix: '联系电话 ',
- loadingShort: '同步中',
- onlineSingle: '1人在线',
- pendingSync: '待同步',
- billEmpty: '暂无待支付账单',
- billRecordFallback: '账单记录',
- pendingContractFound: '发现待签合同',
- statusUpdated: '状态已刷新',
- refreshFailed: '刷新失败,请稍后重试',
- managerWechatCopied: '管家微信已复制',
- noManagerWechat: '暂无管家微信',
- loadingManagerInfo: '正在加载管家信息',
- managerInitialFallback: '管',
- billCount: '账单数量',
- billUnit: '笔',
- billType: '账单类型',
- lastCreateTime: '最近生成',
- communityEvent: '近期活动',
- joinEvent: '立即报名',
- signContractNow: '请尽快签订合同',
- signContractDesc: '系统已生成待签合同,当前流程已进入签订合同阶段,完成签约后即可继续后续入住流程。',
- contractSignedTitle: '合同已签署,等待办理入住',
- contractSignedDesc: '您的住宿合同已经完成签署,管家会尽快为您安排办理入住流程。',
- contractPendingNote: '检测到待签合同后,流程将停留在签订合同节点,请先完成签名。',
- contractSignedNote: '合同签署完成,请等待管家通知办理入住。',
- bookingPendingNote: '订单已提交,管家审核通过后会同步更多入住信息。',
- contractRoom: '合同房型',
- bookedRoomType: '预定房型',
- refreshing: '刷新中...',
- signContract: '去签约',
- refreshStatus: '刷新状态',
- pendingAssignment: '待审核分配',
- currentStay: '当前入住房间',
- controllable: '可控制',
- deviceFallback: '设备 {index}',
- bedPrefix: '床位 {label}',
- multiButlerName: '{name} 等{count}位管家',
- onDutyCount: '{count}人值班',
- submitRequest: '提交申请',
- completeFormBeforeSubmit: '请完善表单信息后提交。'
- },
- en: {
- title: 'My Stay',
- bookingInfo: 'Booking Info',
- submitBookingStep: 'Submit',
- reviewStep: 'Review',
- contractStep: 'Contract',
- checkinStep: 'Check-in',
- notCheckedInTitle: 'No Leased Room Yet',
- notCheckedInDesc: 'We provide premium co-living services.\nPlease explore and find your suite first.',
- bookingPendingTitle: 'Your booking is under review',
- bookingPendingDesc: 'Deposit has been paid. The booking is waiting for approval and butler assignment.',
- goSelectRoom: 'Explore Rooms',
- stayService: 'Service Request',
- butler: 'Community Butler',
- online: 'Online · Response < 5 mins',
- callNow: 'Call',
- publicService: 'Premium Services',
- viewAll: 'View All',
- leaseTerm: 'Lease',
- activeStatus: 'Active',
- myBill: 'Monthly Bill',
- unpaid: 'Unpaid',
- paidOff: 'Paid Off',
- payBill: 'Pay Now',
- viewBill: 'View Bills',
- smartControl: 'Smart Control',
- addSmartDevice: 'Add Smart Device',
- smartAvailableAfterCheckin: 'Smart devices are available after check-in',
- syncingSmartDevices: 'Syncing smart devices...',
- smartDeviceConnected: '{count} smart devices connected',
- smartDeviceSyncFailed: 'Smart device sync failed',
- smartDeviceEmpty: 'No smart devices in this room',
- roomDeviceUnconfigured: 'Smart devices are not configured for this room',
- smartDeviceLoadFailed: 'Failed to load smart devices',
- primaryButlerTag: 'Lead',
- noContactPhone: 'No contact number',
- loadingButlerInfo: 'Syncing butler info...',
- noButlerInfo: 'No butler information yet',
- managementContacts: 'Dorm Managers & Admins',
- dormitoryManagerTag: 'Dorm Mgr',
- counselorTag: 'Admin',
- noManagerContacts: 'No management contacts',
- managerContactSummary: '{count} butlers are available in this area',
- contactPhonePrefix: 'Phone ',
- loadingShort: 'Syncing',
- onlineSingle: '1 online',
- pendingSync: 'Pending',
- billEmpty: 'No unpaid bills',
- billRecordFallback: 'Bill',
- pendingContractFound: 'Pending contract found',
- statusUpdated: 'Status updated',
- refreshFailed: 'Refresh failed, please try again later',
- managerWechatCopied: 'Butler Wechat copied',
- noManagerWechat: 'No butler Wechat',
- loadingManagerInfo: 'Loading butler info',
- managerInitialFallback: 'B',
- billCount: 'Bills',
- billUnit: '',
- billType: 'Type',
- lastCreateTime: 'Latest',
- communityEvent: 'Community Events',
- joinEvent: 'Join Now',
- signContractNow: 'Please sign your contract',
- signContractDesc: 'A contract is ready for signature. You are now at the contract signing step.',
- contractSignedTitle: 'Contract Signed',
- contractSignedDesc: 'Your stay contract has been signed. The butler will arrange check-in for you shortly.',
- contractPendingNote: 'The flow stays at the contract step until the contract is signed.',
- contractSignedNote: 'Contract signed successfully. Awaiting check-in arrangement.',
- bookingPendingNote: 'Your booking has been submitted. More stay details will appear after review.',
- contractRoom: 'Contract Room',
- bookedRoomType: 'Room Type',
- refreshing: 'Refreshing...',
- signContract: 'Sign Contract',
- refreshStatus: 'Refresh Status',
- pendingAssignment: 'Pending assignment',
- currentStay: 'Current Stay',
- controllable: 'Controllable',
- deviceFallback: 'Device {index}',
- bedPrefix: 'Bed {label}',
- multiButlerName: '{name} +{count}',
- onDutyCount: '{count} on duty',
- submitRequest: 'Submit Request',
- completeFormBeforeSubmit: 'Please complete the form before submitting.'
- }
- }
}
},
computed: {
@@ -780,42 +610,42 @@ export default {
},
pendingStageTitle() {
if (this.hasSignedContract) {
- return this.t('contractSignedTitle')
+ return this.$tr('合同已签署,等待办理入住')
}
if (this.isContractSigningStep) {
- return this.t('signContractNow')
+ return this.$tr('请尽快签订合同')
}
- return this.t('bookingPendingTitle')
+ return this.$tr('您的预订正在审核中')
},
pendingStageDesc() {
if (this.hasSignedContract) {
- return this.t('contractSignedDesc')
+ return this.$tr('您的住宿合同已经完成签署,管家会尽快为您安排办理入住流程。')
}
if (this.isContractSigningStep) {
- return this.t('signContractDesc')
+ return this.$tr('系统已生成待签合同,当前流程已进入签订合同阶段,完成签约后即可继续后续入住流程。')
}
- return this.t('bookingPendingDesc')
+ return this.$tr('定金已支付,预定单正在审批流中。审批通过后将分配管家并等待分房号。')
},
pendingInfoLabel() {
- return this.hasSignedContract || this.isContractSigningStep ? this.t('contractRoom') : this.t('bookedRoomType')
+ return this.hasSignedContract || this.isContractSigningStep ? this.$tr('合同房型') : this.$tr('预定房型')
},
pendingStageNote() {
if (this.hasSignedContract) {
- return this.t('contractSignedNote')
+ return this.$tr('合同签署完成,请等待管家通知办理入住。')
}
if (this.isContractSigningStep) {
- return this.t('contractPendingNote')
+ return this.$tr('检测到待签合同后,流程将停留在签订合同节点,请先完成签名。')
}
- return this.t('bookingPendingNote')
+ return this.$tr('订单已提交,管家审核通过后会同步更多入住信息。')
},
pendingPrimaryActionText() {
if (this.isPendingStatusRefreshing) {
- return this.t('refreshing')
+ return this.$tr('刷新中...')
}
if (this.isContractSigningStep && !this.hasSignedContract) {
- return this.t('signContract')
+ return this.$tr('去签约')
}
- return this.t('refreshStatus')
+ return this.$tr('刷新状态')
},
bookingRoomText() {
if (!this.currentBooking) {
@@ -824,18 +654,18 @@ export default {
return this.currentBooking.roomName
|| this.currentBooking.roomTypeName
|| this.currentBooking.roomTypeNameEn
- || this.t('pendingAssignment')
+ || this.$tr('待审核分配')
},
roomCardCover() {
return this.myRoomData && this.myRoomData.image ? this.myRoomData.image : ''
},
roomTitleText() {
if (!this.myRoomData) {
- return this.t('currentStay')
+ return this.$tr('当前入住房间')
}
return this.language === 'zh'
- ? (pickReadableValue(this.myRoomData.titleZh, this.myRoomData.roomTypeName, this.myRoomData.roomName, this.myRoomData.titleEn) || this.t('currentStay'))
- : (pickReadableValue(this.myRoomData.titleEn, this.myRoomData.roomTypeNameEn, this.myRoomData.roomTypeName, this.myRoomData.titleZh) || this.t('currentStay'))
+ ? (pickReadableValue(this.myRoomData.titleZh, this.myRoomData.roomTypeName, this.myRoomData.roomName, this.myRoomData.titleEn) || this.$tr('当前入住房间'))
+ : (pickReadableValue(this.myRoomData.titleEn, this.myRoomData.roomTypeNameEn, this.myRoomData.roomTypeName, this.myRoomData.titleZh) || this.$tr('当前入住房间'))
},
roomDisplayText() {
if (!this.myRoomData) {
@@ -866,10 +696,10 @@ export default {
},
unpaidBillPrimaryType() {
if (!this.unpaidBillList.length) {
- return this.t('billEmpty')
+ return this.$tr('暂无待支付账单')
}
const firstBill = this.unpaidBillList[0] || {}
- return firstBill.referenceTypeDesc || getAccountReferenceTypeLabel(firstBill.referenceType, this.t('billRecordFallback'))
+ return firstBill.referenceTypeDesc || getAccountReferenceTypeLabel(firstBill.referenceType, this.$tr('账单记录'))
},
latestBillTimeText() {
if (!this.unpaidBillList.length || !this.unpaidBillList[0].createTime) {
@@ -879,25 +709,25 @@ export default {
},
smartSummaryText() {
if (!this.hasCheckedIn) {
- return this.t('smartAvailableAfterCheckin')
+ return this.$tr('入住后可使用智能设备')
}
if (this.isSmartDevicesLoading) {
- return this.t('syncingSmartDevices')
+ return this.$tr('正在同步智能设备...')
}
if (this.smartDevices.length) {
- return this.t('smartDeviceConnected').replace('{count}', this.smartDevices.length)
+ return this.$tr('已接入 {count} 台智能设备').replace('{count}', this.smartDevices.length)
}
if (this.smartDeviceError) {
- return this.t('smartDeviceSyncFailed')
+ return this.$tr('智能设备同步失败')
}
- return this.t('smartDeviceEmpty')
+ return this.$tr('当前房间暂无智能设备')
},
smartQuickDeviceCards() {
return this.smartDevices.map((device, index) => ({
...device,
key: device.renderKey || device.deviceId || device.deviceNo || `smart-device-${index}`,
- name: device.deviceName || this.t('deviceFallback').replace('{index}', index + 1),
- stateText: device.stateText || this.t('controllable')
+ name: device.deviceName || this.$tr('设备 {index}').replace('{index}', index + 1),
+ stateText: device.stateText || this.$tr('可控制')
}))
},
stayLocationText() {
@@ -910,7 +740,7 @@ export default {
this.myRoomData.buildingName || '',
this.myRoomData.buildingSectionName || '',
this.myRoomData.floorName || this.myRoomData.floor || '',
- bedLabel ? this.t('bedPrefix').replace('{label}', bedLabel) : ''
+ bedLabel ? this.$tr('床位 {label}').replace('{label}', bedLabel) : ''
].filter(Boolean).join(' · ')
},
butlerAvatar() {
@@ -930,10 +760,10 @@ export default {
const manager = this.primaryAreaManager || {}
const managerName = manager.displayName || manager.name || manager.userName || manager.nickname || manager.userCode || ''
if (!managerName) {
- return this.t('butler')
+ return this.$tr('专属社区管家')
}
if (this.areaManagers.length > 1) {
- return this.t('multiButlerName')
+ return this.$tr('{name} 等{count}位管家')
.replace('{name}', managerName)
.replace('{count}', this.language === 'zh' ? this.areaManagers.length : this.areaManagers.length - 1)
}
@@ -941,29 +771,29 @@ export default {
},
butlerSubtitle() {
if (this.isAreaManagerLoading) {
- return this.t('loadingButlerInfo')
+ return this.$tr('正在同步管家信息...')
}
if (this.areaManagers.length > 1) {
- return this.t('managerContactSummary').replace('{count}', this.areaManagers.length)
+ return this.$tr('当前区域共有 {count} 位管家可联系').replace('{count}', this.areaManagers.length)
}
const manager = this.primaryAreaManager || {}
const phone = this.getManagerPhone(manager)
if (phone) {
- return `${this.t('contactPhonePrefix')}${phone}`
+ return `${this.$tr('联系电话 ')}${phone}`
}
- return this.t('online')
+ return this.$tr('当前在线 · 响应时间 < 5分钟')
},
butlerCountText() {
if (this.isAreaManagerLoading) {
- return this.t('loadingShort')
+ return this.$tr('同步中')
}
if (this.areaManagers.length > 1) {
- return this.t('onDutyCount').replace('{count}', this.areaManagers.length)
+ return this.$tr('{count}人值班').replace('{count}', this.areaManagers.length)
}
if (this.areaManagers.length === 1) {
- return this.t('onlineSingle')
+ return this.$tr('1人在线')
}
- return this.t('pendingSync')
+ return this.$tr('待同步')
},
butlerPhoneNumber() {
const manager = this.primaryAreaManager || {}
@@ -995,9 +825,6 @@ export default {
this.loadUnpaidBills()
},
methods: {
- t(key, params) {
- return this.$tm('pages.index.component.StayServiceTab', key, params)
- },
pickItemText(item = {}, zhField, enField, fallback = '') {
if (this.language === 'en') {
const shortField = `${enField}Short`
@@ -1139,7 +966,7 @@ export default {
const roomCode = this.getCurrentSmartRoomCode()
if (!brandId || !roomCode) {
this.resetSmartDevicesState()
- this.smartDeviceError = this.t('roomDeviceUnconfigured')
+ this.smartDeviceError = this.$tr('房间智能设备未配置')
return Promise.resolve()
}
@@ -1162,7 +989,7 @@ export default {
.catch((error) => {
console.error('load stay smart devices failed', error)
this.smartDevices = []
- this.smartDeviceError = (error && (error.message || error.msg)) || this.t('smartDeviceLoadFailed')
+ this.smartDeviceError = (error && (error.message || error.msg)) || this.$tr('智能设备加载失败')
})
.finally(() => {
this.isSmartDevicesLoading = false
@@ -1397,15 +1224,15 @@ export default {
})
uni.showToast({
title: pendingContracts.length
- ? this.t('pendingContractFound')
- : this.t('statusUpdated'),
+ ? this.$tr('发现待签合同')
+ : this.$tr('状态已刷新'),
icon: 'success'
})
})
.catch((error) => {
console.error('refresh pending status failed', error)
uni.showToast({
- title: this.t('refreshFailed'),
+ title: this.$tr('刷新失败,请稍后重试'),
icon: 'none'
})
})
@@ -1430,10 +1257,10 @@ export default {
},
buildServiceSubmitUrl(item = {}) {
const roomData = this.myRoomData || {}
- const titleZh = item.title || item.titleEn || item.nameZh || item.nameEn || this.t('submitRequest')
- const titleEn = item.titleEnShort || item.titleEn || item.title || item.nameEn || item.nameZh || this.t('submitRequest')
- const descZh = item.desc || item.descEn || this.t('completeFormBeforeSubmit')
- const descEn = compactEnglishText(item.descEn || item.desc || '', 68) || item.descEn || item.desc || this.t('completeFormBeforeSubmit')
+ const titleZh = item.title || item.titleEn || item.nameZh || item.nameEn || this.$tr('提交申请')
+ const titleEn = item.titleEnShort || item.titleEn || item.title || item.nameEn || item.nameZh || this.$tr('提交申请')
+ const descZh = item.desc || item.descEn || this.$tr('请完善表单信息后提交。')
+ const descEn = compactEnglishText(item.descEn || item.desc || '', 68) || item.descEn || item.desc || this.$tr('请完善表单信息后提交。')
const title = this.language === 'en'
? titleEn
: titleZh
@@ -1451,7 +1278,7 @@ export default {
roomTypeName: item.key === 'change-room' ? (roomData.roomTypeName || roomData.titleZh || '') : '',
roomName: roomData.roomLabel || ''
}
- return `/pkgService/submit_request/submit_request?title=${encodeURIComponent(title || this.t('submitRequest'))}&titleZh=${encodeURIComponent(titleZh)}&titleEn=${encodeURIComponent(titleEn)}&desc=${encodeURIComponent(desc || this.t('completeFormBeforeSubmit'))}&descZh=${encodeURIComponent(descZh)}&descEn=${encodeURIComponent(descEn)}&payload=${encodeURIComponent(JSON.stringify(payload))}`
+ return `/pkgService/submit_request/submit_request?title=${encodeURIComponent(title || this.$tr('提交申请'))}&titleZh=${encodeURIComponent(titleZh)}&titleEn=${encodeURIComponent(titleEn)}&desc=${encodeURIComponent(desc || this.$tr('请完善表单信息后提交。'))}&descZh=${encodeURIComponent(descZh)}&descEn=${encodeURIComponent(descEn)}&payload=${encodeURIComponent(JSON.stringify(payload))}`
},
buildTicketWorkbenchUrl(item = {}) {
const serviceTypeMap = {
@@ -1506,7 +1333,7 @@ export default {
fail: (error) => {
console.error('跳转送餐小程序失败', error)
uni.showToast({
- title: this.t('mealDeliveryJumpFailed'),
+ title: this.$tr('跳转送餐小程序失败'),
icon: 'none'
})
}
@@ -1523,7 +1350,7 @@ export default {
},
getManagerInitial(manager = {}) {
const name = this.getManagerName(manager)
- return String(name).trim().slice(0, 1) || this.t('managerInitialFallback')
+ return String(name).trim().slice(0, 1) || this.$tr('管')
},
handleButlerWechat() {
const manager = this.primaryAreaManager || {}
@@ -1533,7 +1360,7 @@ export default {
data: String(wechat),
success: () => {
uni.showToast({
- title: this.t('managerWechatCopied'),
+ title: this.$tr('管家微信已复制'),
icon: 'success'
})
}
@@ -1541,7 +1368,7 @@ export default {
return
}
uni.showToast({
- title: this.t('noManagerWechat'),
+ title: this.$tr('暂无管家微信'),
icon: 'none'
})
},
@@ -1549,7 +1376,7 @@ export default {
const phone = this.getManagerPhone(manager)
if (!phone) {
uni.showToast({
- title: this.t('noContactPhone'),
+ title: this.$tr('暂无联系电话'),
icon: 'none'
})
return
@@ -1561,7 +1388,7 @@ export default {
handleButlerCall() {
if (!this.butlerPhoneNumber) {
uni.showToast({
- title: this.isAreaManagerLoading ? this.t('loadingManagerInfo') : this.t('noContactPhone'),
+ title: this.isAreaManagerLoading ? this.$tr('正在加载管家信息') : this.$tr('暂无联系电话'),
icon: 'none'
})
return
diff --git a/pages/index/index.vue b/pages/index/index.vue
index e5a7fdb..fb34f58 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -6,7 +6,7 @@
- {{ t('loadingBrand') }}
+ {{ $tr('绿居公寓') }}
@@ -15,21 +15,21 @@
- {{ t('privacyTitle') }}
+ {{ $tr('隐私授权提示') }}
- {{ t('privacyContentPrefix') }}
- {{ t('privacyContractName') }}
- {{ t('privacyContentSuffix') }}
+ {{ $tr('进入小程序前,请先阅读并同意') }}
+ {{ $tr('《用户隐私保护指引》') }}
+ {{ $tr(',同意后才能继续使用相关功能。') }}
- {{ t('privacyDisagree') }}
+ {{ $tr('暂不授权') }}
@@ -156,50 +156,18 @@
pendingContracts: []
},
tabDefinitions: [
- { id: 'select-room', labelKey: 'tabSelectRoom', icon: 'tn-icon-home-fill', image: '/static/tabbar/tn-tabbar0.png', component: 'SelectRoomTab', ref: 'selectRoomTab', refreshMethod: 'checkLoginStatus' },
- { id: 'stay-service', labelKey: 'tabStayService', icon: 'tn-icon-safe', image: '/static/tabbar/tn-tabbar1.png', component: 'StayServiceTab', ref: 'stayServiceTab', refreshMethod: 'checkLocalStatus' },
- { id: 'my-application', labelKey: 'tabMyApplication', icon: 'tn-icon-order', image: '/static/tabbar/tn-tabbar2.png', component: 'MyApplicationTab', ref: 'myApplicationTab', refreshMethod: 'load' },
- { id: 'message-center', labelKey: 'tabMessageCenter', icon: 'tn-icon-message', image: '/static/tabbar/tn-tabbar3.png', component: 'MessageCenterTab', ref: 'messageCenterTab', refreshMethod: 'load' },
- { id: 'profile-center', labelKey: 'tabProfileCenter', icon: 'tn-icon-my-fill', image: '/static/tabbar/tn-tabbar3.png', component: 'ProfileCenterTab', ref: 'profileCenterTab', refreshMethod: 'checkLoginStatus' }
+ { id: 'select-room', labelKey: '选 房', icon: 'tn-icon-home-fill', image: '/static/tabbar/tn-tabbar0.png', component: 'SelectRoomTab', ref: 'selectRoomTab', refreshMethod: 'checkLoginStatus' },
+ { id: 'stay-service', labelKey: '入 住', icon: 'tn-icon-safe', image: '/static/tabbar/tn-tabbar1.png', component: 'StayServiceTab', ref: 'stayServiceTab', refreshMethod: 'checkLocalStatus' },
+ { id: 'my-application', labelKey: '申请单', icon: 'tn-icon-order', image: '/static/tabbar/tn-tabbar2.png', component: 'MyApplicationTab', ref: 'myApplicationTab', refreshMethod: 'load' },
+ { id: 'message-center', labelKey: '消 息', icon: 'tn-icon-message', image: '/static/tabbar/tn-tabbar3.png', component: 'MessageCenterTab', ref: 'messageCenterTab', refreshMethod: 'load' },
+ { id: 'profile-center', labelKey: '我 的', icon: 'tn-icon-my-fill', image: '/static/tabbar/tn-tabbar3.png', component: 'ProfileCenterTab', ref: 'profileCenterTab', refreshMethod: 'checkLoginStatus' }
],
loadedPages: ['select-room'],
isAppInitLoading: true,
isTabSwitching: false,
showPrivacyPopup: false,
resolvePrivacyAuthorization: null,
- isCheckingPrivacyAuthorization: false,
- i18n: {
- zh: {
- loadingBrand: '绿居公寓',
- shareTitle: '绿居公寓 - 国际化青年社区',
- tabSelectRoom: '选 房',
- tabStayService: '入 住',
- tabMyApplication: '申请单',
- tabMessageCenter: '消 息',
- tabProfileCenter: '我 的',
- privacyTitle: '隐私授权提示',
- privacyContentPrefix: '进入小程序前,请先阅读并同意',
- privacyContractName: '《用户隐私保护指引》',
- privacyContentSuffix: ',同意后才能继续使用相关功能。',
- privacyAgree: '同意并继续',
- privacyDisagree: '暂不授权'
- },
- en: {
- loadingBrand: 'Luju Apartments',
- shareTitle: 'Luju Apartments - International Youth Community',
- tabSelectRoom: 'Explore',
- tabStayService: 'Stay',
- tabMyApplication: 'Applications',
- tabMessageCenter: 'Messages',
- tabProfileCenter: 'Profile',
- privacyTitle: 'Privacy Authorization',
- privacyContentPrefix: 'Before entering the mini program, please read and agree to the ',
- privacyContractName: 'Privacy Protection Guide',
- privacyContentSuffix: ' to continue using related features.',
- privacyAgree: 'Agree and Continue',
- privacyDisagree: 'Not Now'
- }
- }
+ isCheckingPrivacyAuthorization: false
}
},
computed: {
@@ -231,7 +199,7 @@
.filter(item => this.visibleTabIds.includes(item.id))
.map(item => ({
...item,
- name: this.t(item.labelKey)
+ name: this.$tr(item.labelKey)
}))
},
currentTabbarIndex() {
@@ -262,9 +230,6 @@
})
},
methods: {
- t(key) {
- return this.$tm('pages.index.index', key)
- },
initPrivacyAuthorization() {
// #ifdef MP-WEIXIN
if (typeof wx === 'undefined' || !wx.onNeedPrivacyAuthorization) {
@@ -782,14 +747,14 @@
// 分享到朋友
onShareAppMessage() {
return {
- title: this.t('shareTitle'),
+ title: this.$tr('绿居公寓 - 国际化青年社区'),
path: '/pages/index/index'
}
},
// 分享到朋友圈
onShareTimeline() {
return {
- title: this.t('shareTitle')
+ title: this.$tr('绿居公寓 - 国际化青年社区')
}
}
}
diff --git a/pkgAccount/auth_result/auth_result.vue b/pkgAccount/auth_result/auth_result.vue
index 817e74d..16704c4 100644
--- a/pkgAccount/auth_result/auth_result.vue
+++ b/pkgAccount/auth_result/auth_result.vue
@@ -1,7 +1,7 @@
- {{ t('navTitle') }}
+ {{ $tr('注册申请结果') }}
@@ -33,7 +33,7 @@
- {{ t('submittedInfoTitle') }}
+ {{ $tr('已提交信息') }}
{{ item.label }}
{{ item.value }}
@@ -44,19 +44,19 @@
- {{ t('goLogin') }}
+ {{ $tr('去登录') }}
- {{ t('resubmitRegister') }}
+ {{ $tr('重新提交注册申请') }}
- {{ loading ? t('refreshing') : t('refreshStatus') }}
+ {{ loading ? $tr('刷新中...') : $tr('刷新审批状态') }}
- {{ t('viewRegistrationRecords') }}
+ {{ $tr('查看注册记录') }}
@@ -80,81 +80,7 @@ export default {
loading: false,
applicationInfo: null,
targetCode: '',
- sourceType: '',
- i18n: {
- zh: {
- navTitle: '注册申请结果',
- submittedInfoTitle: '已提交信息',
- goLogin: '去登录',
- resubmitRegister: '重新提交注册申请',
- refreshing: '刷新中...',
- refreshStatus: '刷新审批状态',
- viewRegistrationRecords: '查看注册记录',
- unsubmitted: '未提交',
- titleUnsubmitted: '您还未提交注册申请',
- titlePending: '注册申请已提交',
- titleApproved: '注册审批已通过',
- titleRejected: '注册审批未通过',
- descUnsubmitted: '请先提交注册申请单,审批通过后才算注册成功。',
- descPendingRecords: '当前展示的是该申请单的审批状态,可下拉或点击按钮刷新最新结果。',
- descPendingDefault: '当前申请正在审批中,审批通过前无法登录。',
- descApproved: '您的注册申请已审批通过,现在可以前往登录。',
- descRejectedRecords: '当前展示的是该申请单的审批结果,请根据驳回原因修改信息后重新提交注册申请。',
- descRejectedDefault: '请根据驳回原因修改信息后重新提交注册申请。',
- remarkApproved: '通过备注',
- remarkRejected: '驳回原因',
- remarkPending: '审批备注',
- roleForeign: '外籍人员',
- roleDomestic: '中国籍',
- labelIdentityType: '人员类型',
- labelName: '姓名',
- labelAccount: '注册账号',
- labelCertificateNo: '证件号',
- fallbackNone: '-',
- latestDetailMissing: '未查到最新详情,已展示列表记录',
- approvedPleaseLogin: '审批已通过,请登录',
- fetchStatusFailed: '获取审批状态失败',
- statusPending: '审核中',
- statusApproved: '已通过',
- statusRejected: '已驳回'
- },
- en: {
- navTitle: 'Registration Result',
- submittedInfoTitle: 'Submitted Information',
- goLogin: 'Sign In',
- resubmitRegister: 'Submit Registration Again',
- refreshing: 'Refreshing...',
- refreshStatus: 'Refresh Status',
- viewRegistrationRecords: 'View Registration Records',
- unsubmitted: 'Not Submitted',
- titleUnsubmitted: 'No registration application submitted yet',
- titlePending: 'Registration submitted',
- titleApproved: 'Registration approved',
- titleRejected: 'Registration was not approved',
- descUnsubmitted: 'Please submit a registration application first. Registration is completed only after approval.',
- descPendingRecords: 'This page shows the approval status of the selected application. Pull down or tap the button to refresh.',
- descPendingDefault: 'Your application is under review and sign-in is unavailable before approval.',
- descApproved: 'Your registration is approved and you can sign in now.',
- descRejectedRecords: 'This page shows the approval result of the selected application. Please update the information and resubmit based on the rejection reason.',
- descRejectedDefault: 'Please update the information and resubmit based on the rejection reason.',
- remarkApproved: 'Approval Note',
- remarkRejected: 'Rejection Reason',
- remarkPending: 'Approval Note',
- roleForeign: 'Foreign',
- roleDomestic: 'Chinese',
- labelIdentityType: 'Identity Type',
- labelName: 'Name',
- labelAccount: 'Account',
- labelCertificateNo: 'Certificate No.',
- fallbackNone: '-',
- latestDetailMissing: 'Latest details are unavailable. Showing the list record instead.',
- approvedPleaseLogin: 'Approved. Please sign in.',
- fetchStatusFailed: 'Failed to fetch approval status',
- statusPending: 'Under Review',
- statusApproved: 'Approved',
- statusRejected: 'Rejected'
- }
- }
+ sourceType: ''
}
},
computed: {
@@ -173,36 +99,36 @@ export default {
if (typeof status === 'number') {
return this.getApprovalStatusLabelLocal(status)
}
- return this.t('unsubmitted')
+ return this.$tr('未提交')
},
titleText() {
const map = {
- unsubmitted: this.t('titleUnsubmitted'),
- pending: this.t('titlePending'),
- approved: this.t('titleApproved'),
- rejected: this.t('titleRejected')
+ unsubmitted: this.$tr('您还未提交注册申请'),
+ pending: this.$tr('注册申请已提交'),
+ approved: this.$tr('注册审批已通过'),
+ rejected: this.$tr('注册审批未通过')
}
return map[this.authStatus] || map.unsubmitted
},
descText() {
const map = {
- unsubmitted: this.t('descUnsubmitted'),
+ unsubmitted: this.$tr('请先提交注册申请单,审批通过后才算注册成功。'),
pending: this.sourceType === 'registration-records'
- ? this.t('descPendingRecords')
- : this.t('descPendingDefault'),
- approved: this.t('descApproved'),
+ ? this.$tr('当前展示的是该申请单的审批状态,可下拉或点击按钮刷新最新结果。')
+ : this.$tr('当前申请正在审批中,审批通过前无法登录。'),
+ approved: this.$tr('您的注册申请已审批通过,现在可以前往登录。'),
rejected: this.sourceType === 'registration-records'
- ? this.t('descRejectedRecords')
- : this.t('descRejectedDefault')
+ ? this.$tr('当前展示的是该申请单的审批结果,请根据驳回原因修改信息后重新提交注册申请。')
+ : this.$tr('请根据驳回原因修改信息后重新提交注册申请。')
}
return map[this.authStatus] || map.unsubmitted
},
approvalRemarkTitle() {
const map = {
- approved: this.t('remarkApproved'),
- rejected: this.t('remarkRejected'),
- pending: this.t('remarkPending'),
- unsubmitted: this.t('remarkPending')
+ approved: this.$tr('通过备注'),
+ rejected: this.$tr('驳回原因'),
+ pending: this.$tr('审批备注'),
+ unsubmitted: this.$tr('审批备注')
}
return map[this.authStatus] || map.pending
},
@@ -223,13 +149,13 @@ export default {
profileSummary() {
const profile = this.applicationInfo || {}
const identityType = profile.passportNumber ? 'foreign' : 'domestic'
- const roleText = identityType === 'foreign' ? this.t('roleForeign') : identityType === 'domestic' ? this.t('roleDomestic') : this.t('fallbackNone')
- const certificateNo = profile.passportNumber || profile.idCard || this.t('fallbackNone')
+ const roleText = identityType === 'foreign' ? this.$tr('外籍人员') : identityType === 'domestic' ? this.$tr('中国籍') : this.$tr('-')
+ const certificateNo = profile.passportNumber || profile.idCard || this.$tr('-')
return [
- { label: this.t('labelIdentityType'), value: roleText },
- { label: this.t('labelName'), value: profile.name || this.t('fallbackNone') },
- { label: this.t('labelAccount'), value: profile.account || this.t('fallbackNone') },
- { label: this.t('labelCertificateNo'), value: certificateNo },
+ { label: this.$tr('人员类型'), value: roleText },
+ { label: this.$tr('姓名'), value: profile.name || this.$tr('-') },
+ { label: this.$tr('注册账号'), value: profile.account || this.$tr('-') },
+ { label: this.$tr('证件号'), value: certificateNo },
// { label: '国籍', value: profile.country || profile.nationality || '-' },
// { label: '工作单位', value: profile.workUnit || '-' },
// { label: '兴趣爱好', value: hobbyText }
@@ -267,9 +193,6 @@ export default {
this.refreshStatus()
},
methods: {
- t(key) {
- return this.$tm('pkgAccount.auth_result.auth_result', key)
- },
getWechatCode() {
return new Promise((resolve) => {
// #ifdef MP-WEIXIN
@@ -324,7 +247,7 @@ export default {
if (!target || typeof target !== 'object' || !Object.keys(target).length) {
if (this.applicationInfo && this.applicationCode) {
uni.showToast({
- title: this.t('latestDetailMissing'),
+ title: this.$tr('未查到最新详情,已展示列表记录'),
icon: 'none'
})
return
@@ -334,7 +257,7 @@ export default {
approvalStatus: 1
}
uni.showToast({
- title: this.t('approvedPleaseLogin'),
+ title: this.$tr('审批已通过,请登录'),
icon: 'success'
})
setTimeout(() => {
@@ -354,7 +277,7 @@ export default {
} catch (error) {
console.error('refresh registration status failed', error)
uni.showToast({
- title: this.t('fetchStatusFailed'),
+ title: this.$tr('获取审批状态失败'),
icon: 'none'
})
} finally {
@@ -365,12 +288,12 @@ export default {
return getApprovalStatusLabel(
status,
this.authStatus === 'pending'
- ? this.t('statusPending')
+ ? this.$tr('审核中')
: this.authStatus === 'approved'
- ? this.t('statusApproved')
+ ? this.$tr('已通过')
: this.authStatus === 'rejected'
- ? this.t('statusRejected')
- : this.t('unsubmitted'),
+ ? this.$tr('已驳回')
+ : this.$tr('未提交'),
this.language
)
},
diff --git a/pkgAccount/login/login.vue b/pkgAccount/login/login.vue
index 45b8efb..f86242a 100644
--- a/pkgAccount/login/login.vue
+++ b/pkgAccount/login/login.vue
@@ -8,20 +8,20 @@
- {{ t('accountLabel') }}
+ {{ $tr('账号 / 邮箱') }}
-
- {{ t('passwordLabel') }}
+ {{ $tr('密码') }}
- {{ isSubmitting ? t('submitting') : t('submitLogin') }}
+ {{ isSubmitting ? $tr('登录中...') : $tr('立即登录') }}
- {{ t('viewRegistrationRecords') }}
- {{ t('viewRegistrationRecordsDesc') }}
+ {{ $tr('查看注册记录') }}
+ {{ $tr('未登录也可查看当前微信账号提交的注册申请记录') }}
- {{ t('noAccount') }}
- {{ t('goRegister') }}
+ {{ $tr('还没有账号?') }}
+ {{ $tr('去注册') }}
@@ -96,44 +96,6 @@ export default {
form: {
account: '',
password: ''
- },
- i18n: {
- zh: {
- pageTitle: '欢迎回来',
- pageDesc: '登录绿居公寓,探索您的国际化青年社区',
- accountLabel: '账号 / 邮箱',
- accountPlaceholder: '请输入账号或邮箱',
- passwordLabel: '密码',
- passwordPlaceholder: '请输入密码',
- submitting: '登录中...',
- submitLogin: '立即登录',
- viewRegistrationRecords: '查看注册记录',
- viewRegistrationRecordsDesc: '未登录也可查看当前微信账号提交的注册申请记录',
- noAccount: '还没有账号?',
- goRegister: '去注册',
- loading: '加载中...',
- validateRequired: '请输入账号和密码',
- loginSuccess: '登录成功',
- loginFailed: '登录失败,请稍后重试'
- },
- en: {
- pageTitle: 'Welcome Back',
- pageDesc: 'Sign in to Luju Apartments and explore your international youth community.',
- accountLabel: 'Account / Email',
- accountPlaceholder: 'Enter account or email',
- passwordLabel: 'Password',
- passwordPlaceholder: 'Enter password',
- submitting: 'Signing In...',
- submitLogin: 'Sign In',
- viewRegistrationRecords: 'View Registration Records',
- viewRegistrationRecordsDesc: 'You can review registration records submitted by this Wechat account even without signing in.',
- noAccount: 'No account yet?',
- goRegister: 'Register',
- loading: 'Loading...',
- validateRequired: 'Please enter both account and password',
- loginSuccess: 'Signed in successfully',
- loginFailed: 'Sign-in failed, please try again later'
- }
}
}
},
@@ -143,9 +105,6 @@ export default {
await this.checkPendingRegistration(bypass)
},
methods: {
- t(key) {
- return this.$tm('pkgAccount.login.login', key)
- },
normalizeRedirectUrl(value = '') {
if (!value) {
return ''
@@ -192,7 +151,7 @@ export default {
})
},
async checkPendingRegistration(bypassRedirect = false) {
- uni.showLoading({ title: this.t('loading') })
+ uni.showLoading({ title: this.$tr('加载中...') })
try {
const providerValue = await this.getWechatCode()
if (!providerValue) {
@@ -229,7 +188,7 @@ export default {
}
uni.showToast({
- title: this.t('validateRequired'),
+ title: this.$tr('请输入账号和密码'),
icon: 'none'
})
return false
@@ -361,7 +320,7 @@ export default {
uni.hideLoading()
uni.showToast({
- title: this.t('loginSuccess'),
+ title: this.$tr('登录成功'),
icon: 'success'
})
setTimeout(() => {
@@ -375,7 +334,7 @@ export default {
}
this.isSubmitting = true
- uni.showLoading({ title: this.t('submitting') })
+ uni.showLoading({ title: this.$tr('登录中...') })
return this.resolveLoginState()
.then(loginState => {
@@ -390,7 +349,7 @@ export default {
uni.hideLoading()
this.isSubmitting = false
uni.showToast({
- title: this.t('loginFailed'),
+ title: this.$tr('登录失败,请稍后重试'),
icon: 'none'
})
})
diff --git a/pkgAccount/register/register.vue b/pkgAccount/register/register.vue
index c8204c5..33c860d 100644
--- a/pkgAccount/register/register.vue
+++ b/pkgAccount/register/register.vue
@@ -1,14 +1,14 @@
- {{ t('navTitle') }}
+ {{ $tr('注册账号') }}