Эх сурвалжийг харах

feat: 收益页面 多语言

liangan 1 долоо хоног өмнө
parent
commit
6ca2cc506e

+ 16 - 0
src/locale/bn.json

@@ -10,6 +10,22 @@
   "home.priceTab.500spot": "৫০০স্পট",
   "home.priceTab.1000spot": "১০০০স্পট",
   "home.priceTab.2000spot": "২০০০স্পট",
+  "income.title": "রাজস্ব কেন্দ্র",
+  "income.totalEarnings": "মোট আয়",
+  "income.accountBalance": "অ্যাকাউন্ট ব্যালেন্স",
+  "income.settledAmount": "নিষ্পত্তি করা অর্থ",
+  "income.pendingAmount": "অপেক্ষমান অর্থ",
+  "income.tdEarnings": "আজকের আয়",
+  "income.ydEarnings": "গতকালের আয়",
+  "income.mtdEarnings": "মাসের আয়",
+  "income.myGroupData": "আমার গ্রুপ ডেটা",
+  "income.withdrawNow": "এখনই উত্তোলন করুন",
+  "income.revenueRecord": "আয়ের রেকর্ড",
+  "income.filter.dt": "আজ",
+  "income.filter.yt": "গতকাল",
+  "income.filter.l7d": "গত ৭ দিন",
+  "income.filter.mtd": "এই মাস",
+  "income.filter.ytd": "এই বছর",
   "search.placeholder": "অনুসন্ধান",
   "search.filterPrice": "সব দাম",
   "search.filterCategory": "সব বিভাগ",

+ 17 - 1
src/locale/en.json

@@ -14,5 +14,21 @@
   "search.filterPrice": "All Price",
   "search.filterCategory": "Category",
   "search.filterSellers": "Best Sellers",
-  "app.name": "En Title"
+  "app.name": "En Title",
+  "income.title": "Revenue Center",
+  "income.totalEarnings": "Total Earnings",
+  "income.accountBalance": "Account Balance",
+  "income.settledAmount": "Settled Amount",
+  "income.pendingAmount": "Pending Amount",
+  "income.tdEarnings": "TD Earnings",
+  "income.ydEarnings": "YD Earnings",
+  "income.mtdEarnings": "MTD Earnings",
+  "income.myGroupData": "My Group Data",
+  "income.withdrawNow": "Withdraw Now",
+  "income.revenueRecord": "Revenue Record",
+  "income.filter.dt": "DT",
+  "income.filter.yt": "YT",
+  "income.filter.l7d": "L7D",
+  "income.filter.mtd": "MTD",
+  "income.filter.ytd": "YTD"
 }

+ 16 - 0
src/locale/zh-Hans.json

@@ -10,6 +10,22 @@
   "home.priceTab.500spot": "500积分",
   "home.priceTab.1000spot": "1000积分",
   "home.priceTab.2000spot": "2000积分",
+  "income.title": "收益中心",
+  "income.totalEarnings": "总收益",
+  "income.accountBalance": "账户余额",
+  "income.settledAmount": "已结算金额",
+  "income.pendingAmount": "待结算金额",
+  "income.tdEarnings": "今日收益",
+  "income.ydEarnings": "昨日收益",
+  "income.mtdEarnings": "本月收益",
+  "income.myGroupData": "我的团队数据",
+  "income.withdrawNow": "立即提现",
+  "income.revenueRecord": "收益记录",
+  "income.filter.dt": "今日",
+  "income.filter.yt": "昨日",
+  "income.filter.l7d": "近7天",
+  "income.filter.mtd": "本月",
+  "income.filter.ytd": "本年",
   "search.placeholder": "搜索",
   "search.filterPrice": "全部价格",
   "search.filterCategory": "全部分类",

+ 17 - 16
src/pages/income/income.vue

@@ -3,7 +3,7 @@
     layout: 'default',
     needLogin: true,
     style: {
-      navigationBarTitleText: 'Revenue Center',
+      navigationBarTitleText: '%income.title%',
       navigationBarBackgroundColor: '#fff',
     },
   }
@@ -16,6 +16,7 @@ import useZPaging from 'z-paging/components/z-paging/js/hooks/useZPaging.js'
 
 import { getEnum as _getEnum } from '@/api/common'
 import { getAccountInfo as _getAccountInfo, envelopeList } from '@/api/wallet'
+import { t } from '@/locale'
 import { formatNumber } from '@/utils'
 import { toPage } from '@/utils/page'
 
@@ -81,7 +82,7 @@ onShow(() => {
         <view class="mb-50rpx flex items-center justify-around text-center">
           <view>
             <view class="text-22rpx">
-              Total Earnings
+              {{ t('income.totalEarnings') }}
             </view>
             <view class="text-40rpx font-bold">
               {{ formatNumber(walletInfo.totalEarnings) }}
@@ -89,7 +90,7 @@ onShow(() => {
           </view>
           <view @click="toPage('/pages/wallet/myWallet')">
             <view class="text-22rpx">
-              Account Balance
+              {{ t('income.accountBalance') }}
             </view>
             <view class="relative text-40rpx font-bold">
               <text>{{ formatNumber(walletInfo.balance) }}</text>
@@ -101,7 +102,7 @@ onShow(() => {
           <view>
             <view class="text-22rpx">
               <text class="mr-1px">
-                Settled Amount
+                {{ t('income.settledAmount') }}
               </text>
               <wd-icon name="help-circle" size="20rpx" />
             </view>
@@ -113,7 +114,7 @@ onShow(() => {
           <view>
             <view class="text-22rpx">
               <text class="mr-1px">
-                Pending Amount
+                {{ t('income.pendingAmount') }}
               </text>
               <wd-icon name="help-circle" size="20rpx" />
             </view>
@@ -127,7 +128,7 @@ onShow(() => {
         <view class="flex items-center justify-between">
           <view class="flex-[33.33%]">
             <view class="text-22rpx text-#5B5B5B">
-              TD Earnings
+              {{ t('income.tdEarnings') }}
             </view>
             <view class="text-26rpx font-bold">
               {{ formatNumber(walletInfo.tdeamings) }}
@@ -136,7 +137,7 @@ onShow(() => {
           <wd-divider dashed custom-class="h-40rpx!" color="#A4A4A4" vertical />
           <view class="flex-[33.33%]">
             <view class="text-22rpx text-#5B5B5B">
-              YD Earnings
+              {{ t('income.ydEarnings') }}
             </view>
             <view class="text-26rpx font-bold">
               {{ formatNumber(walletInfo.ydeamings) }}
@@ -145,7 +146,7 @@ onShow(() => {
           <wd-divider dashed custom-class="h-40rpx!" color="#A4A4A4" vertical />
           <view class="flex-[33.33%]">
             <view class="text-22rpx text-#5B5B5B">
-              MTD Earnings
+              {{ t('income.mtdEarnings') }}
             </view>
             <view class="text-26rpx font-bold">
               {{ formatNumber(walletInfo.mtdeamings) }}
@@ -156,37 +157,37 @@ onShow(() => {
       <view class="mb-20rpx flex items-center justify-between gap-22rpx text-center text-32rpx">
         <view class="flex-1 rounded-16rpx bg-[rgba(var(--wot-color-theme-rgb),0.5)] py-32rpx shadow-[4rpx_4rpx_8rpx_0rpx_rgba(0,0,0,0.5)]" @click="toPage('/pages/myOrders/myOrders')">
           <text class="pr-16rpx">
-            My Group Data
+            {{ t('income.myGroupData') }}
           </text>
           <wd-icon name="chevron-right-circle" size="32rpx" />
         </view>
         <view class="flex-1 rounded-16rpx bg-#FEE750/50 py-32rpx shadow-[4rpx_4rpx_8rpx_0rpx_rgba(0,0,0,0.5)]" @click="toPage('/pages/wallet/withdraw', { balance: walletInfo.balance, type: 2 })">
           <text class="pr-16rpx">
-            Withdraw Now
+            {{ t('income.withdrawNow') }}
           </text>
           <wd-icon name="chevron-right-circle" size="32rpx" />
         </view>
       </view>
       <view>
         <view class="mb-20rpx text-32rpx">
-          Revenue Record
+          {{ t('income.revenueRecord') }}
         </view>
         <view class="mb-20rpx">
           <wd-radio-group v-model="dayType" shape="button" @change="() => queryList(1, 20)">
             <wd-radio :value="1">
-              DT
+              {{ t('income.filter.dt') }}
             </wd-radio>
             <wd-radio :value="2">
-              YT
+              {{ t('income.filter.yt') }}
             </wd-radio>
             <wd-radio :value="3">
-              L7D
+              {{ t('income.filter.l7d') }}
             </wd-radio>
             <wd-radio :value="4">
-              MTD
+              {{ t('income.filter.mtd') }}
             </wd-radio>
             <wd-radio :value="5">
-              YTD
+              {{ t('income.filter.ytd') }}
             </wd-radio>
           </wd-radio-group>
         </view>