zhb 2 weeks ago
parent
commit
41c54b8f03

+ 21 - 7
components/cwg-sidebar.vue

@@ -41,16 +41,21 @@
         </view>
 
         <view class="wallet-actions" v-if="mode === 'customer'">
-          <button class="action-btn btn btn-outline-danger waves-effect waves-light" @click.stop="goPages(1)" v-t="'wallet.item6'"></button>
-          <button class="action-btn btn btn-outline-danger waves-effect waves-light" @click.stop="goPages(2)" v-t="'wallet.item7'"></button>
+          <button class="action-btn btn btn-outline-danger waves-effect waves-light" @click.stop="goPages(1)"
+            v-t="'wallet.item6'"></button>
+          <button class="action-btn btn btn-outline-danger waves-effect waves-light" @click.stop="goPages(2)"
+            v-t="'wallet.item7'"></button>
         </view>
         <view class="wallet-actions" v-if="mode === 'ib'">
-          <button class="action-btn btn btn-outline-danger waves-effect waves-light" @click.stop="goIbPages(1)" v-t="'Custom.Index.Withdrawals'"></button>
-          <button class="action-btn btn btn-outline-danger waves-effect waves-light" @click.stop="goIbPages(2)" v-t="'Home.page_ib.item4'"></button>
+          <button class="action-btn btn btn-outline-danger waves-effect waves-light" @click.stop="goIbPages(1)"
+            v-t="'Custom.Index.Withdrawals'"></button>
+          <button class="action-btn btn btn-outline-danger waves-effect waves-light" @click.stop="goIbPages(2)"
+            v-t="'Home.page_ib.item4'"></button>
           <!--                  <button class="action-btn" @click.stop="goIbPages(3)" v-t="'Ib.Transfer.CommissionIssue'"></button>-->
         </view>
         <view class="wallet-actions" v-if="mode === 'follow'">
-          <button class="action-btn btn btn-outline-danger waves-effect waves-light" @click.stop="goFollow()" v-t="'Documentary.console.item17'"></button>
+          <button class="action-btn btn btn-outline-danger waves-effect waves-light" @click.stop="goFollow()"
+            v-t="'Documentary.console.item17'"></button>
         </view>
       </view>
     </view>
@@ -111,7 +116,7 @@ import { documentaryApi } from '@/service/documentary'
 import useGlobalStore from '@/stores/use-global-store'
 const globalStore = useGlobalStore()
 import { useFilters } from '@/composables/useFilters'
-const {  numberDecimal } = useFilters()
+const { numberDecimal } = useFilters()
 const isDark = computed(() => globalStore.theme === 'dark')
 
 const { t } = useI18n()
@@ -375,6 +380,7 @@ onUnmounted(() => {
           align-items: center;
           gap: px2rpx(4);
           color: var(--cwg-placeholder-color);
+
           .wallet-id {
             font-size: 12px;
 
@@ -499,7 +505,15 @@ onUnmounted(() => {
     gap: px2rpx(8);
 
     .menu-label {
-      // flex: none;
+      flex: none;
+      max-width: px2rpx(150);
+      white-space: normal;
+      word-wrap: break-word;
+      word-break: break-all;
+      text-align: center;
+      display: flex;
+      align-items: center;
+      justify-content: center;
     }
   }
 }

+ 5 - 0
pages/customer/create-account.vue

@@ -364,6 +364,11 @@ const rules = computed(() => ({
     },
 
 }));
+watch(locale, () => {
+    formRef.value?.clearValidate()
+})
+
+
 
 // 平台选项
 const platformColumns = computed(() => {

+ 5 - 1
pages/customer/deposit.vue

@@ -793,7 +793,11 @@ const rules = computed(() => ({
             },
         ],
     },
-}))
+}));
+watch(locale, () => {
+    formRef.value?.clearValidate()
+    setTipsAmount()
+})
 const amountErrorMessage = ref('')
 const setTipsAmount = () => {
     const min = Number(mAmount.minAmount);

+ 13 - 6
pages/customer/transfer.vue

@@ -93,7 +93,7 @@ import Config from '@/config/index'
 import { useConfirm } from '@/hooks/useConfirm'
 const confirm = useConfirm()
 const { Code } = Config
-const { t } = useI18n()
+const { t, locale } = useI18n()
 
 // 获取全局实例(用于访问 Session、$pigeon 等)
 const { proxy } = getCurrentInstance()
@@ -133,7 +133,7 @@ const dialogCheck = ref(false)
 const dialogVisible = ref(false)
 const dialogCheckWait = ref(false)
 const pageQuery = ref({})
-const rules = {
+const rules = computed(() => ({
     withdrawLogin: {
         rules: [
             {
@@ -182,7 +182,12 @@ const rules = {
             },
         ],
     }
-}
+}));
+// 语言切换时 → 清除旧的校验提示(必须加!)
+watch(locale, () => {
+    formRef.value?.clearValidate()
+    amountErrorMessage.value = ''
+})
 function validateAmount() {
     const value = Number(form.amount)
     if (!value) {
@@ -533,10 +538,12 @@ watch(transferType, (newVal) => {
 </script>
 <style lang="scss" scoped>
 @import "@/uni.scss";
-.card-body{
-  color: var(--bs-emphasis-color);
+
+.card-body {
+    color: var(--bs-emphasis-color);
 }
-.text-color{
+
+.text-color {
     font-size: px2rpx(15);
     line-height: 1.5;
 }

+ 7 - 3
pages/customer/wallet-transfer.vue

@@ -64,7 +64,7 @@ import { customApi } from '@/service/custom'
 import { drawApi } from '@/service/draw'
 import Config from '@/config/index'
 const { Code } = Config
-const { t } = useI18n()
+const { t, locale } = useI18n()
 
 const loading = ref(false)
 const flag = ref(false)
@@ -111,7 +111,7 @@ const dialogCheckWait = ref(false)
 const dialogSuccess = computed(() => dialogCheck.value && dialogVisible.value)
 const dialogError = computed(() => dialogCheck.value && !dialogVisible.value)
 
-const rules = {
+const rules = computed(() => ({
     login: {
         rules: [{ required: true, errorMessage: t('vaildate.select.empty') }]
     },
@@ -133,7 +133,11 @@ const rules = {
             }
         ]
     }
-}
+}));
+watch(locale, () => {
+    formRef.value?.clearValidate()
+    amountErrorMessage.value = ''
+})
 const amountErrorMessage = ref('')
 const setAllAmount = () => {
     form.amount = Number(walletbalance.value)

+ 4 - 0
pages/customer/withdrawal.vue

@@ -1009,6 +1009,10 @@ const rules = computed(() => ({
     ],
   },
 }));
+watch(locale, () => {
+    formRef.value?.clearValidate()
+    validateAmount()
+})
 // 验证金额
 const amountErrorMessage = ref('')
 const validateAmount = () => {

+ 6 - 2
pages/follow/components/applySignalDialog.vue

@@ -247,7 +247,7 @@ const groupCurrency = (type) => {
   }
 }
 
-const rules = {
+const rules = computed(() => ({
   password: {
     rules: [
       {
@@ -469,7 +469,11 @@ const rules = {
       }
     ]
   }
-}
+}));
+
+watch(locale, () => {
+    formRef.value?.clearValidate()
+})
 
 const filterChineseEnglishOnly = (field, value) => {
   if (!value) return

+ 5 - 2
pages/follow/subscribe-list.vue

@@ -427,7 +427,7 @@ const followTypeMap = {
     2: 'Documentary.tradingCenter.item117',
     3: 'Documentary.tradingCenter.item118'
 }
-const rules = {
+const rules = computed(() => ({
     password: {
         rules: [
             {
@@ -649,7 +649,10 @@ const rules = {
             }
         ]
     }
-}
+}));
+watch(locale, () => {
+    formRef.value?.clearValidate()
+})
 const SubscribeDownData = ref([])
 //获取客户跟单账户的下拉列表
 const isSubscribeLoading = ref(false)

+ 6 - 2
pages/follow/trading-center.vue

@@ -452,7 +452,7 @@ const dialogFllowData = ref({
 
 const formRef = ref<any>(null)
 
-const rules = {
+const rules = computed(() => ({
   protectAmount: { rules: [{ required: true, errorMessage: t('vaildate.input.empty') }] },
   protectRatio: { rules: [{ required: true, errorMessage: t('vaildate.input.empty') }] },
   volume: { rules: [{ required: true, errorMessage: t('vaildate.input.empty') },{
@@ -471,7 +471,11 @@ const rules = {
   followLogin: { rules: [{ required: true, errorMessage: t('vaildate.select.empty') }] },
   followType: { rules: [{ required: true, errorMessage: t('vaildate.select.empty') }] },
   agree: { rules: [{ required: true, errorMessage: t('vaildate.agree.empty') }] },
-}
+}));
+
+watch(locale, () => {
+    formRef.value?.clearValidate()
+})
 
 const followLoginOptions = computed(() => {
   return dialogFllowLoginData.value.map(item => ({

+ 6 - 2
pages/follow/trading-management.vue

@@ -542,7 +542,7 @@ const { optObj, optList1 } = useFollowEnum()
 const isZh = computed(() => ['cn', 'zh', 'zhHant'].includes(locale.value));
 
 const formRef = ref(null)
-const rules = {
+const rules = computed(() => ({
     password: {
         rules: [
             {
@@ -764,7 +764,11 @@ const rules = {
             }
         ]
     }
-}
+}));
+
+watch(locale, () => {
+    formRef.value?.clearValidate()
+})
 
 const filterChineseEnglishOnlyForApply = (field, value, type) => {
     // 只保留中文、英文和空格

+ 11 - 5
pages/follow/transfer.vue

@@ -59,7 +59,7 @@ import { documentaryApi } from '@/service/documentary'
 import Config from '@/config/index'
 
 const { Code } = Config
-const { t } = useI18n()
+const { t, locale } = useI18n()
 
 const loading = ref(false)
 const flag = ref(false)
@@ -106,7 +106,7 @@ const dialogCheckWait = ref(false)
 const dialogSuccess = computed(() => dialogCheck.value && dialogVisible.value)
 const dialogError = computed(() => dialogCheck.value && !dialogVisible.value)
 
-const rules = {
+const rules = computed(() => ({
     login: {
         rules: [{ required: true, errorMessage: t('vaildate.select.empty') }]
     },
@@ -128,7 +128,10 @@ const rules = {
             }
         ]
     }
-}
+}));
+watch(locale, () => {
+    formRef.value?.clearValidate()
+})
 const amountErrorMessage = ref('')
 const setAllAmount = () => {
     form.amount = walletbalance.value.toFixed(2)
@@ -236,9 +239,11 @@ onMounted(() => {
 
 <style scoped lang="scss">
 @import "@/uni.scss";
-.container{
-  padding: 0;
+
+.container {
+    padding: 0;
 }
+
 .amount-box {
     display: flex;
     align-items: center;
@@ -252,6 +257,7 @@ onMounted(() => {
         margin-bottom: px2rpx(22);
     }
 }
+
 .transfer-page {
     width: 100%;
     padding-bottom: px2rpx(20);

+ 6 - 2
pages/ib/agent-transfer.vue

@@ -216,7 +216,7 @@ const submitting = ref(false)
 const amountErrorMessage = ref('')
 
 // 表单验证规则
-const rules = {
+const rules = computed(() => ({
     withdrawLogin: {
         rules: [
             {
@@ -280,7 +280,11 @@ const rules = {
             },
         ],
     }
-}
+}));
+watch(locale, () => {
+    formRef.value?.clearValidate()
+    amountErrorMessage.value = ''
+})
 
 function validateAmount() {
     const amount = Number(form.amount)

+ 6 - 2
pages/ib/transfer.vue

@@ -278,7 +278,7 @@ const depositLogin1ErrorMessage = ref('')
 const amountErrorMessage = ref('')
 
 // 表单验证规则
-const rules = {
+const rules = computed(() => ({
     withdrawLogin: {
         rules: [
             {
@@ -341,7 +341,11 @@ const rules = {
             },
         ],
     },
-}
+}));
+watch(locale, () => {
+    formRef.value?.clearValidate()
+    amountErrorMessage.value = ''
+})
 const onAgree5Change = (e) => {
     form.agree5 = e.detail.value.length > 0
 }

+ 4 - 0
pages/ib/withdraw.vue

@@ -1136,6 +1136,10 @@ const rules = computed(() => ({
         ],
     },
 }));
+watch(locale, () => {
+    formRef.value?.clearValidate()
+    setTipsAmount()
+})
 const amountErrorMessage = ref('')
 const setTipsAmount = () => {
     const min = Number(mAmount.minAmount);

+ 9 - 1
windows/left-window.vue

@@ -122,7 +122,7 @@ const ibStatus = computed(() => {
 
   .menu-item {
     width: 100%;
-    height: px2rpx(40);
+    min-height: px2rpx(40);
     cursor: pointer;
     display: flex;
     align-items: center;
@@ -171,6 +171,14 @@ const ibStatus = computed(() => {
 
     .menu-label {
       flex: none;
+      max-width: px2rpx(150);
+      white-space: normal;
+      word-wrap: break-word;
+      word-break: break-all;
+      text-align: center;
+      display: flex;
+      align-items: center;
+      justify-content: center;
     }
   }