Browse Source

feat: 多语言

ljc 1 week ago
parent
commit
7cdc00e202

+ 3 - 3
components/cwg-complex-search.vue

@@ -13,18 +13,18 @@
                             </template>
                             </template>
                             <template v-else-if="field.type === 'select'">
                             <template v-else-if="field.type === 'select'">
                                 <cwg-combox v-model:value="formData[field.key]" :options="field.options"
                                 <cwg-combox v-model:value="formData[field.key]" :options="field.options"
-                                    :placeholder="field.placeholder || '请选择'" :clearable="field.clearable || false"
+                                    :placeholder="field.placeholder || t('.placeholder.choose')" :clearable="field.clearable || false"
                                     @change="(e) => field.onChange?.(e) || handleSearch()" />
                                     @change="(e) => field.onChange?.(e) || handleSearch()" />
                             </template>
                             </template>
                             <template v-else-if="field.type === 'date'">
                             <template v-else-if="field.type === 'date'">
                                 <uni-datetime-picker :start="dateLimit.start" :end="dateLimit.end"
                                 <uni-datetime-picker :start="dateLimit.start" :end="dateLimit.end"
                                     v-model="formData[field.key]" type="date"
                                     v-model="formData[field.key]" type="date"
-                                    :placeholder="field.placeholder || '请选择日期'" @change="handleDateChange" />
+                                    :placeholder="field.placeholder || t('.placeholder.chooseDate')" @change="handleDateChange" />
                             </template>
                             </template>
                             <template v-else-if="field.type === 'daterange'">
                             <template v-else-if="field.type === 'daterange'">
                                 <uni-datetime-picker class="cursor-pointer" :start="dateLimit.start" :end="dateLimit.end"
                                 <uni-datetime-picker class="cursor-pointer" :start="dateLimit.start" :end="dateLimit.end"
                                     v-model="formData[field.key]" type="daterange"
                                     v-model="formData[field.key]" type="daterange"
-                                    :placeholder="field.placeholder || '请选择日期范围'" @change="handleDateChange" />
+                                    :placeholder="field.placeholder || '请选择日期范围'" :startPlaceholder="t('placeholder.Start')" :endPlaceholder="t('placeholder.End')" @change="handleDateChange" />
                             </template>
                             </template>
                             <template v-else-if="field.type === 'picker'">
                             <template v-else-if="field.type === 'picker'">
                                 <uni-data-picker class="cursor-pointer" style="min-width: 100px" v-model="formData[field.key]"
                                 <uni-data-picker class="cursor-pointer" style="min-width: 100px" v-model="formData[field.key]"

+ 4 - 2
locale/ar.json

@@ -780,7 +780,8 @@
     "item37": "قم بسحب مؤشر ببساطة وإسقاطه على الرسم البياني واحصل على تحليلات فعالة على الفور!",
     "item37": "قم بسحب مؤشر ببساطة وإسقاطه على الرسم البياني واحصل على تحليلات فعالة على الفور!",
     "item38": "CWG MT4 WebTrader",
     "item38": "CWG MT4 WebTrader",
     "item39": "CWG MT5 WebTrader",
     "item39": "CWG MT5 WebTrader",
-    "item40": "يمكن الوصول إليها بدون تنزيل - الكمبيوتر وmacOS"
+    "item40": "يمكن الوصول إليها بدون تنزيل - الكمبيوتر وmacOS",
+    "item4-1": "تنزيل ويندوز المحمول"
   },
   },
   "Documentary": {
   "Documentary": {
     "title": "نسخ التداول",
     "title": "نسخ التداول",
@@ -1700,7 +1701,8 @@
       "Status": "الحالة",
       "Status": "الحالة",
       "Deposit": "الإيداع",
       "Deposit": "الإيداع",
       "Withdrawals": "السحب",
       "Withdrawals": "السحب",
-      "All": "الكل"
+      "All": "الكل",
+      "StatusPlaceholder": "اختر الحالة"
     },
     },
     "Recording": {
     "Recording": {
       "Platform": "منصة التداول",
       "Platform": "منصة التداول",

+ 2 - 1
locale/de.json

@@ -780,7 +780,8 @@
     "item37": "Ziehen Sie einfach einen Indikator auf das Diagramm und erhalten Sie sofort umsetzbare Erkenntnisse!",
     "item37": "Ziehen Sie einfach einen Indikator auf das Diagramm und erhalten Sie sofort umsetzbare Erkenntnisse!",
     "item38": "CWG MT4 WebTrader",
     "item38": "CWG MT4 WebTrader",
     "item39": "CWG MT5 WebTrader",
     "item39": "CWG MT5 WebTrader",
-    "item40": "Zugänglich ohne Download - PC und macOS"
+    "item40": "Zugänglich ohne Download - PC und macOS",
+    "item4-1": "Windows Portable Download"
   },
   },
   "Documentary": {
   "Documentary": {
     "title": "Kopieren von Handelsgeschäften",
     "title": "Kopieren von Handelsgeschäften",

+ 1 - 1
locale/en.json

@@ -782,7 +782,7 @@
     "item2": "CWG MetaTrader 4 for Desktop",
     "item2": "CWG MetaTrader 4 for Desktop",
     "item3": "You can trade almost all commodities in the foreign exchange, stock, and futures markets of the World Monetary Market in the world. It is suitable for all PC and mobile terminals, including PC, Ipad, and various versions of mobile phones. Download now, install, and begin trading!",
     "item3": "You can trade almost all commodities in the foreign exchange, stock, and futures markets of the World Monetary Market in the world. It is suitable for all PC and mobile terminals, including PC, Ipad, and various versions of mobile phones. Download now, install, and begin trading!",
     "item4": "Windows DOWNLOAD",
     "item4": "Windows DOWNLOAD",
-    "item4-1": "Windows Installation Free DOWNLOAD",
+    "item4-1": "Windows Portable Download",
     "item5": "Includes Free Demo Account",
     "item5": "Includes Free Demo Account",
     "item6": "Mac DOWNLOAD",
     "item6": "Mac DOWNLOAD",
     "item6-1": "DOWNLOAD",
     "item6-1": "DOWNLOAD",

+ 2 - 1
locale/es.json

@@ -780,7 +780,8 @@
     "item37": "Simplemente arrastra un indicador al gráfico y obtén información útil de inmediato!",
     "item37": "Simplemente arrastra un indicador al gráfico y obtén información útil de inmediato!",
     "item38": "CWG MT4 WebTrader",
     "item38": "CWG MT4 WebTrader",
     "item39": "CWG MT5 WebTrader",
     "item39": "CWG MT5 WebTrader",
-    "item40": "Accesible sin Descarga — PC y macOS"
+    "item40": "Accesible sin Descarga — PC y macOS",
+    "item4-1": "Descarga Portátil de Windows"
   },
   },
   "Documentary": {
   "Documentary": {
     "title": "Copy Trading",
     "title": "Copy Trading",

+ 2 - 1
locale/fa.json

@@ -780,7 +780,8 @@
     "item37": "فقط شاخصی را به نمودار بکشید و در کمترین زمان ممکن به دستورات عملی دست پیدا کنید!",
     "item37": "فقط شاخصی را به نمودار بکشید و در کمترین زمان ممکن به دستورات عملی دست پیدا کنید!",
     "item38": "CWG MT4 WebTrader",
     "item38": "CWG MT4 WebTrader",
     "item39": "CWG MT5 WebTrader",
     "item39": "CWG MT5 WebTrader",
-    "item40": "بدون دانلود قابل دسترسی - PC و macOS"
+    "item40": "بدون دانلود قابل دسترسی - PC و macOS",
+    "item4-1": "دانلود پورتатив ویندوز"
   },
   },
   "Documentary": {
   "Documentary": {
     "title": "تجارت کپی",
     "title": "تجارت کپی",

+ 2 - 1
locale/id.json

@@ -792,7 +792,8 @@
     "item37": "Cukup seret indikator ke grafik dan dapatkan wawasan yang dapat diambil secara langsung!",
     "item37": "Cukup seret indikator ke grafik dan dapatkan wawasan yang dapat diambil secara langsung!",
     "item38": "CWG MT4 WebTrader",
     "item38": "CWG MT4 WebTrader",
     "item39": "CWG MT5 WebTrader",
     "item39": "CWG MT5 WebTrader",
-    "item40": "Dapat Diakses Tanpa Unduhan - PC dan macOS"
+    "item40": "Dapat Diakses Tanpa Unduhan - PC dan macOS",
+    "item4-1": "Unduhan Portabel Windows"
   },
   },
   "Documentary": {
   "Documentary": {
     "title": "Copy Trading",
     "title": "Copy Trading",

+ 2 - 1
locale/ko.json

@@ -780,7 +780,8 @@
     "item37": "지표를 차트로 드래그하기만 하면 즉시 실행 가능한 통찰력을 얻을 수 있습니다.",
     "item37": "지표를 차트로 드래그하기만 하면 즉시 실행 가능한 통찰력을 얻을 수 있습니다.",
     "item38": "CWG MT4 WebTrader",
     "item38": "CWG MT4 WebTrader",
     "item39": "CWG MT5 WebTrader",
     "item39": "CWG MT5 WebTrader",
-    "item40": "다운로드 없이 액세스 가능 — PC 및 macOS"
+    "item40": "다운로드 없이 액세스 가능 — PC 및 macOS",
+    "item4-1": "Windows 휴대용 다운로드"
   },
   },
   "Documentary": {
   "Documentary": {
     "title": "카피 거래",
     "title": "카피 거래",

+ 2 - 1
locale/ms.json

@@ -780,7 +780,8 @@
     "item37": "Hanya seret penunjuk ke carta dan dapatkan pandangan yang boleh digunakan dengan segera!",
     "item37": "Hanya seret penunjuk ke carta dan dapatkan pandangan yang boleh digunakan dengan segera!",
     "item38": "CWG MT4 WebTrader",
     "item38": "CWG MT4 WebTrader",
     "item39": "CWG MT5 WebTrader",
     "item39": "CWG MT5 WebTrader",
-    "item40": "Boleh Diakses Tanpa Muat Turun — PC dan macOS"
+    "item40": "Boleh Diakses Tanpa Muat Turun — PC dan macOS",
+    "item4-1": "Muat Turun Mudah Alih Windows"
   },
   },
   "Documentary": {
   "Documentary": {
     "title": "Copy Trading",
     "title": "Copy Trading",

+ 2 - 1
locale/pt.json

@@ -780,7 +780,8 @@
     "item37": "Basta arrastar um indicador para o gráfico e obter insights acionáveis imediatamente!",
     "item37": "Basta arrastar um indicador para o gráfico e obter insights acionáveis imediatamente!",
     "item38": "CWG MT4 WebTrader",
     "item38": "CWG MT4 WebTrader",
     "item39": "CWG MT5 WebTrader",
     "item39": "CWG MT5 WebTrader",
-    "item40": "Acessível sem download — PC e macOS"
+    "item40": "Acessível sem download — PC e macOS",
+    "item4-1": "Download Portátil do Windows"
   },
   },
   "Documentary": {
   "Documentary": {
     "title": "Copy Trading",
     "title": "Copy Trading",

+ 2 - 1
locale/th.json

@@ -780,7 +780,8 @@
     "item37": "ลากตัวชี้วัดลงบนกราฟและรับข้อมูลและแนวทางการกระทำทันที!",
     "item37": "ลากตัวชี้วัดลงบนกราฟและรับข้อมูลและแนวทางการกระทำทันที!",
     "item38": "CWG MT4 WebTrader",
     "item38": "CWG MT4 WebTrader",
     "item39": "CWG MT5 WebTrader",
     "item39": "CWG MT5 WebTrader",
-    "item40": "เข้าถึงได้โดยไม่ต้องดาวน์โหลด - PC และ macOS"
+    "item40": "เข้าถึงได้โดยไม่ต้องดาวน์โหลด - PC และ macOS",
+    "item4-1": "ดาวน์โหลด Windows พกพา"
   },
   },
   "Documentary": {
   "Documentary": {
     "title": "การคัดลอกการซื้อขาย",
     "title": "การคัดลอกการซื้อขาย",

+ 1 - 0
locale/tr.json

@@ -744,6 +744,7 @@
     "item2": "CWG MetaTrader 4 Masaüstü İçin",
     "item2": "CWG MetaTrader 4 Masaüstü İçin",
     "item3": "Dünya Para Piyasası'nda neredeyse tüm emtialarda ticaret yapabilirsiniz. PC, Ipad ve çeşitli mobil telefonlar dahil olmak üzere tüm PC ve mobil terminalle uyumludur. Şimdi indirin, kurun ve ticarete başlayın!",
     "item3": "Dünya Para Piyasası'nda neredeyse tüm emtialarda ticaret yapabilirsiniz. PC, Ipad ve çeşitli mobil telefonlar dahil olmak üzere tüm PC ve mobil terminalle uyumludur. Şimdi indirin, kurun ve ticarete başlayın!",
     "item4": "Windows İNDİR",
     "item4": "Windows İNDİR",
+    "item4-1": "Windows Taşınabilir İndirme",
     "item5": "Ücretsiz Demo Hesap İçerir",
     "item5": "Ücretsiz Demo Hesap İçerir",
     "item6": "Mac İNDİR",
     "item6": "Mac İNDİR",
     "item6-1": "İNDİR",
     "item6-1": "İNDİR",

+ 1 - 1
locale/ug.json

@@ -797,7 +797,7 @@
     "item2": "CWG MetaTrader 4 ئۈستەل يۈزى نەشرى",
     "item2": "CWG MetaTrader 4 ئۈستەل يۈزى نەشرى",
     "item3": "ئۇ دۇنيا پۇل-مۇئامىلە بازىرىدا تاشقى پېرېۋوت، پاي چېكى ۋە فۇچېر بازىرىدىكى ئاساسەن بارلىق مەھسۇلاتلارنى سودا قىلىشقا بولىدۇ. ئۇ PC، Ipad ۋە ھەر خىل نۇسخىدىكى يانفونلارنى ئۆز ئىچىگە ئالغان بارلىق PC ۋە كۆچمە ئۈسكۈنىلەرگە ماس كېلىدۇ. پەقەت چۈشۈرۈپ، قاچىلاپ ۋە سودىنى باشلاڭ!",
     "item3": "ئۇ دۇنيا پۇل-مۇئامىلە بازىرىدا تاشقى پېرېۋوت، پاي چېكى ۋە فۇچېر بازىرىدىكى ئاساسەن بارلىق مەھسۇلاتلارنى سودا قىلىشقا بولىدۇ. ئۇ PC، Ipad ۋە ھەر خىل نۇسخىدىكى يانفونلارنى ئۆز ئىچىگە ئالغان بارلىق PC ۋە كۆچمە ئۈسكۈنىلەرگە ماس كېلىدۇ. پەقەت چۈشۈرۈپ، قاچىلاپ ۋە سودىنى باشلاڭ!",
     "item4": "Windows چۈشۈرۈش",
     "item4": "Windows چۈشۈرۈش",
-    "item4-1": "Windows قاچىلىماي چۈشۈرۈش",
+    "item4-1": "Windows پورتاتىپ ئەۋەت",
     "item5": "ھەقسىز سىناق ھېساباتىنى ئۆز ئىچىگە ئالىدۇ",
     "item5": "ھەقسىز سىناق ھېساباتىنى ئۆز ئىچىگە ئالىدۇ",
     "item6": "Mac چۈشۈرۈش",
     "item6": "Mac چۈشۈرۈش",
     "item6-1": "چۈشۈرۈش",
     "item6-1": "چۈشۈرۈش",

+ 2 - 1
locale/vn.json

@@ -780,7 +780,8 @@
     "item37": "Simply drag an indicator onto the chart and get actionable insights immediately!",
     "item37": "Simply drag an indicator onto the chart and get actionable insights immediately!",
     "item38": "CWG MT4 WebTrader",
     "item38": "CWG MT4 WebTrader",
     "item39": "CWG MT5 WebTrader",
     "item39": "CWG MT5 WebTrader",
-    "item40": "Accessible with No Download — PC and macOS"
+    "item40": "Accessible with No Download — PC and macOS",
+    "item4-1": "Tải Windows Di động"
   },
   },
   "Documentary": {
   "Documentary": {
     "title": "Copytrading",
     "title": "Copytrading",

+ 1 - 1
locale/zhHant.json

@@ -743,7 +743,7 @@
     "item2": "CWG MetaTrader 4 桌面版",
     "item2": "CWG MetaTrader 4 桌面版",
     "item3": "它可以在世界貨幣市場上交易外匯、股票和期貨市場幾乎所有的商品。它適用於所有PC和移動終端,包括PC、Ipad和各種版本的手機。只需下載、安裝並開始交易!",
     "item3": "它可以在世界貨幣市場上交易外匯、股票和期貨市場幾乎所有的商品。它適用於所有PC和移動終端,包括PC、Ipad和各種版本的手機。只需下載、安裝並開始交易!",
     "item4": "Windows 下載",
     "item4": "Windows 下載",
-    "item4-1": "Windows 免安装下载",
+    "item4-1": "Windows 免安裝下載",
     "item5": "包括免費模擬賬戶",
     "item5": "包括免費模擬賬戶",
     "item6": "Mac 下載",
     "item6": "Mac 下載",
     "item6-1": "下載",
     "item6-1": "下載",

+ 15 - 1
pages/customer/components/AccountCard.vue

@@ -174,8 +174,22 @@ const circleButtons = ref([
     { key: 'withdraw', label: 'Home.page_customer.item3', icon: 'crm-withdraw', action: 'withdraw', needDemo: isDemo.value, disabled: !closeFunctionOpen('2'), color: '#6c8595' },
     { key: 'withdraw', label: 'Home.page_customer.item3', icon: 'crm-withdraw', action: 'withdraw', needDemo: isDemo.value, disabled: !closeFunctionOpen('2'), color: '#6c8595' },
     { key: 'transfer', label: 'Custom.Index.Transfer', icon: 'crm-transfer', action: 'transfer', needDemo: isDemo.value, disabled: !(closeFunctionOpen('5') && closeFunctionOpen('6') && closeFunctionOpen('3')), color: '#6c8595' }
     { key: 'transfer', label: 'Custom.Index.Transfer', icon: 'crm-transfer', action: 'transfer', needDemo: isDemo.value, disabled: !(closeFunctionOpen('5') && closeFunctionOpen('6') && closeFunctionOpen('3')), color: '#6c8595' }
 ])
 ])
+const isAfterJuly28 = () => {
+  const now = new Date();
+  const july28 = new Date(2025, 6, 28, 0, 0, 0); // 月份从0开始,所以7月是6
+  return now >= july28;
+}
+const typeMap = computed(() => ({
+  1: t('AccountType.ClassicAccount'),
+  2: t('AccountType.SeniorAccount'),
+  3: !isAfterJuly28() ? t('AccountType.AgencyAccount') : '',
+  5: t('AccountType.SpeedAccount'),
+  6: t('AccountType.SpeedAccount'),
+  7: t('AccountType.StandardAccount'),
+  8: t('AccountType.CentAccount')
+}));
 const fieldList = computed(() => ([
 const fieldList = computed(() => ([
-    { label: t('Custom.PaymentHistory.AccountType'), key: 'nickname', copyable: false },
+    { label: t('Custom.PaymentHistory.AccountType'), key: 'type', copyable: false,isEnum:true,enums:typeMap.value },
     { label: t('Label.Leverage'), key: 'actualLeverage', copyable: false },
     { label: t('Label.Leverage'), key: 'actualLeverage', copyable: false },
     { label: t('Label.FloatingPL'), key: 'floatingPL', copyable: false },
     { label: t('Label.FloatingPL'), key: 'floatingPL', copyable: false },
     { label: t('Label.Balance'), key: 'balanceWithSymbol', copyable: false },
     { label: t('Label.Balance'), key: 'balanceWithSymbol', copyable: false },

+ 8 - 3
pages/customer/components/TerminalInfoDialog.vue

@@ -11,7 +11,7 @@
 
 
             <!-- 动态字段列表 -->
             <!-- 动态字段列表 -->
             <view v-for="(field, index) in fieldList" :key="index" class="field-row">
             <view v-for="(field, index) in fieldList" :key="index" class="field-row">
-                <cwg-label-line-value :label="field.label" :value="getFieldValue(field.key)">
+                <cwg-label-line-value :label="field.label" :value="getFieldValue(field)">
                     <template #operation v-if="field.copyable">
                     <template #operation v-if="field.copyable">
                         <view class="copy-btn" @click="copyValue(getFieldValue(field.key))">
                         <view class="copy-btn" @click="copyValue(getFieldValue(field.key))">
                             <cwg-icon name="copy" :size="20" color="#999" />
                             <cwg-icon name="copy" :size="20" color="#999" />
@@ -69,8 +69,13 @@ const displayTitle = computed(() => props.title || t('Documentary.tradingCenter.
 const displayAccountLabel = computed(() => props.accountLabel || `${t('Documentary.tradingCenter.item29')}:`)
 const displayAccountLabel = computed(() => props.accountLabel || `${t('Documentary.tradingCenter.item29')}:`)
 
 
 // 获取字段值
 // 获取字段值
-const getFieldValue = (key) => {
-    return props.form?.[key] ?? ''
+const getFieldValue = (field) => {
+  console.log(field)
+  const { key,isEnum=false,enums={} } = field
+  const value = props.form?.[key]
+  console.log(value)
+  console.log(enums[value])
+    return isEnum?enums[value]:value ?? ''
 }
 }
 
 
 // 复制文本到剪贴板
 // 复制文本到剪贴板

+ 5 - 1
pages/login/index.vue

@@ -693,7 +693,7 @@ const form = ref({
   loginName: '',
   loginName: '',
   password: '',
   password: '',
 })
 })
-
+const loginLoading = ref(false)
 function submit() {
 function submit() {
   if (!form.value.loginName) {
   if (!form.value.loginName) {
     uni.$u.toast(t('signin.form.email'))
     uni.$u.toast(t('signin.form.email'))
@@ -703,6 +703,8 @@ function submit() {
     uni.$u.toast(t('signin.form.password'))
     uni.$u.toast(t('signin.form.password'))
     return
     return
   }
   }
+  if (loginLoading.value) return
+  loginLoading.value = true
 
 
   handleLogin()
   handleLogin()
 }
 }
@@ -755,6 +757,7 @@ async function handleLogin() {
       //  console.log(12112);
       //  console.log(12112);
     }
     }
   } catch (error) {
   } catch (error) {
+    loginLoading.value =false
     // console.log(error)
     // console.log(error)
     // uni.showToast({ title: error.msg, icon: 'error' })
     // uni.showToast({ title: error.msg, icon: 'error' })
     toast(error.msg)
     toast(error.msg)
@@ -769,6 +772,7 @@ async function getCustomLoginInfo() {
     uni.removeStorageSync('systemListCache')
     uni.removeStorageSync('systemListCache')
     // 登录更新金额
     // 登录更新金额
     uni.$emit('updatePayment')
     uni.$emit('updatePayment')
+    loginLoading.value =false
     // uni.$emit('updateSystemList', 'login')
     // uni.$emit('updateSystemList', 'login')
     if (res.code === 200) {
     if (res.code === 200) {
       switch (modeStore.value) {
       switch (modeStore.value) {