zhb 1 月之前
父节点
当前提交
19a55fadb9

+ 11 - 11
components/cwg-page-wrapper.vue

@@ -2,7 +2,7 @@
   <view :class="['page-wrapper', { dark: isDark }]">
     <cwg-match-media :max-width="991" v-if="!isLoginPage">
       <cwg-pc-header @open-right-drawer="openRightDrawer" @open-left-drawer="openLeftDrawer"
-        :sidebarVisible="sidebarVisible" />
+        :sidebarVisible="sidebarVisible" v-if="type != 'webview'" />
       <view class="sidebar-mask mask-visible" v-if="sidebarVisible" @click="openLeftDrawer">
       </view>
       <view class="fixed" v-if=pageTitle></view>
@@ -143,7 +143,7 @@ const reasons = ref<any>({})
 const initWebSocket = () => {
   let token = userToken.value || uni.getStorageSync('token')
   if (!token) return
-  
+
   token = tool.tokenReplace(token);
 
   const wsUrl = `${Config.HostWs}/webSocket?Access-Token=${token}`
@@ -199,15 +199,15 @@ const pushRes = (data: any) => {
 
   let part1 = ''
   if (data.pushMessageId && pushManager.value[data.pushMessageId]) {
-    part1 = isCn 
-      ? pushManager.value[data.pushMessageId].content 
+    part1 = isCn
+      ? pushManager.value[data.pushMessageId].content
       : pushManager.value[data.pushMessageId].enContent
   }
 
   let part2 = ''
   if (data.approveDesc && reasons.value[data.approveDesc]) {
-    part2 = isCn 
-      ? reasons.value[data.approveDesc].content 
+    part2 = isCn
+      ? reasons.value[data.approveDesc].content
       : reasons.value[data.approveDesc].enContent
   }
 
@@ -227,7 +227,7 @@ const pushRes = (data: any) => {
 }
 
 //获取推送列表
-const  searchPush = async()=> {
+const searchPush = async () => {
   let res = await customApi.PushMessageList({ type: null });
   if (res.code == 200) {
     if (res.data == null) {
@@ -236,11 +236,11 @@ const  searchPush = async()=> {
       pushManager.value = res.data;
     }
   } else {
-    uni.showToast({title:res.msg,icon:'none'});
+    uni.showToast({ title: res.msg, icon: 'none' });
   }
 }
 //获取原因列表
-const  searchReasons = async()=> {
+const searchReasons = async () => {
   let res = await customApi.reasonsRefusalList({ type: null });
   if (res.code == 200) {
     if (res.data == null) {
@@ -249,7 +249,7 @@ const  searchReasons = async()=> {
       reasons.value = res.data;
     }
   } else {
-    uni.showToast({title:res.msg,icon:'none'});
+    uni.showToast({ title: res.msg, icon: 'none' });
   }
 }
 
@@ -456,7 +456,7 @@ onShow(() => {
   background-color: var(--color-white);
   padding: 0 px2rpx(15);
   position: fixed;
-  top: calc(56px + var(--status-bar-height));
+  top: calc(var(--status-bar-height));
   left: 0;
 }
 

+ 1 - 1
components/cwg-tabs.vue

@@ -1,6 +1,6 @@
 <template>
     <view class="tabs-box">
-        <view class="tab-title " v-for="(row, index) in tabs" :key="index" @click="handleTabClick(index)"
+        <view class="tab-title cwg-cursor" v-for="(row, index) in tabs" :key="index" @click="handleTabClick(index)"
             :class="{ active: props.cativeIndex == index }">
             <cwg-icon v-if="row.icon" :name="row.icon" :size="16"
                 :color="props.cativeIndex == index ? '#fff' : '#333'" />

+ 5 - 1
locale/ar.json

@@ -11,7 +11,11 @@
     "item9": "أدنى إيداع",
     "item10": "أدنى حجم صفقة",
     "item11": "أقصى نسبة رافعة",
-    "item12": "أدنى تباين"
+    "item12": "أدنى تباين",
+    "item13": "المزيد من طرق الفتح",
+    "item14": "حساب السحب الحالي هو (حساب السنت)",
+    "item15": "وحدة الرصيد هي سنت (1 دولار أمريكي = 100 سنت)",
+    "item16": "يرجى التأكد من أن مبلغ التحويل الذي أدخلته بوحدة صحيحة لتجنب فشل التحويل بسبب اختلاف الوحدة."
   },
   "common": {
     "confirm": "تأكيد",

+ 4 - 1
locale/cn.json

@@ -12,7 +12,10 @@
     "item10": "最小手数",
     "item11": "最大杠杆",
     "item12": "最小点差",
-    "item13": "更多打开方式"
+    "item13": "更多打开方式",
+    "item14": "当前转出账户为 ( 美分账户 Cent) ",
+    "item15": "余额单位为 Cent(1 USD = 100 Cent)。",
+    "item16": "请确认您输入的转账金额单位是否正确,以避免因单位差异导致转账失败。"
   },
   "common": {
     "confirm": "确认",

+ 5 - 1
locale/de.json

@@ -11,7 +11,11 @@
     "item9": "Mindesteinlage",
     "item10": "Minimalvolumen",
     "item11": "Maximalhebel",
-    "item12": "Minimalspread"
+    "item12": "Minimalspread",
+    "item13": "Mehr Öffnungsweisen",
+    "item14": "Das aktuelle Auszahlungskonto ist ein (Cent-Konto).",
+    "item15": "Die Kontoeinheit ist Cent (1 USD = 100 Cent).",
+    "item16": "Bitte bestätigen Sie, dass der von Ihnen eingegebene Überweisungsbetrag in der richtigen Einheit vorliegt, um Überweisungsfehler aufgrund von Einheitenabweichungen zu vermeiden."
   },
   "common": {
     "confirm": "Bestätigen",

+ 5 - 1
locale/en.json

@@ -11,7 +11,11 @@
     "item9": "Minimum Deposit",
     "item10": "Minimum Lot Size",
     "item11": "Maximum Leverage",
-    "item12": "Minimum Spread"
+    "item12": "Minimum Spread",
+    "item13": "More opening methods",
+    "item14": "The current withdrawal account is a (Cent Account).",
+    "item15": "The balance unit is Cent (1 USD = 100 Cent).",
+    "item16": "Please confirm that the transfer amount you entered is in the correct unit to avoid transfer failures caused by unit discrepancies."
   },
   "common": {
     "confirm": "Confirm",

+ 5 - 1
locale/es.json

@@ -11,7 +11,11 @@
     "item9": "Depósito Mínimo",
     "item10": "Tamaño Mínimo de Lote",
     "item11": "Leverage Máximo",
-    "item12": "Spread Mínimo"
+    "item12": "Spread Mínimo",
+    "item13": "Más formas de abrir",
+    "item14": "La cuenta de retiro actual es (Cuenta Cent).",
+    "item15": "La unidad del saldo es Cent (1 USD = 100 Cent).",
+    "item16": "Confirme que el monto de la transferencia ingresado esté en la unidad correcta para evitar fallos en la transferencia debido a diferencias de unidad."
   },
   "common": {
     "confirm": "Confirmar",

+ 5 - 1
locale/fa.json

@@ -11,7 +11,11 @@
     "item9": "کمینه واریز",
     "item10": "حجم کمترین لات",
     "item11": "حداکثر لورج",
-    "item12": "کمینه اسپرد"
+    "item12": "کمینه اسپرد",
+    "item13": "راههای بازکردن بیشتر",
+    "item14": "حساب برداشت فعلی (حساب سنت) است.",
+    "item15": "واحد موجودی سنت است (1 دلار آمریکا = 100 سنت).",
+    "item16": "لطفاً تأیید کنید که مبلغ انتقالی وارد شده با واحد صحیح باشد تا از خرابی انتقال به دلیل مغایرت واحد جلوگیری شود."
   },
   "common": {
     "confirm": "تأیید",

+ 5 - 1
locale/id.json

@@ -11,7 +11,11 @@
     "item9": "Setoran Minimum",
     "item10": "Ukuran Lot Minimum",
     "item11": "Leverage Maksimum",
-    "item12": "Spread Minimum"
+    "item12": "Spread Minimum",
+    "item13": "Lebih banyak metode pembukaan",
+    "item14": "Akun penarikan saat ini adalah (Akun Cent).",
+    "item15": "Satuan saldo adalah Cent (1 USD = 100 Cent).",
+    "item16": "Harap konfirmasikan bahwa jumlah transfer yang Anda masukkan dalam satuan yang benar untuk menghindari kegagalan transfer akibat perbedaan satuan."
   },
   "common": {
     "confirm": "Konfirmasi",

+ 5 - 1
locale/ko.json

@@ -11,7 +11,11 @@
     "item9": "최소 입금",
     "item10": "최소 로트 크기",
     "item11": "최대 레버리지",
-    "item12": "최소 스프레드"
+    "item12": "최소 스프레드",
+    "item13": "더 많은 열기 방법",
+    "item14": "현재 출금 계좌는 (센트 계좌)입니다.",
+    "item15": "잔액 단위는 센트(1 USD = 100 Cent)입니다.",
+    "item16": "단위 차이로 인한 이체 실패를 방지하려면 입력하신 이체 금액의 단위가 올바른지 확인하시기 바랍니다."
   },
   "common": {
     "confirm": "확인",

+ 5 - 1
locale/ms.json

@@ -11,7 +11,11 @@
     "item9": "Deposit Minimum",
     "item10": "Saiz Lot Minimum",
     "item11": "Leverage Maksimum",
-    "item12": "Spread Minimum"
+    "item12": "Spread Minimum",
+    "item13": "Lebih banyak cara pembukaan",
+    "item14": "Akaun pengeluaran semasa ialah (Akaun Cent).",
+    "item15": "Unit baki ialah Cent (1 USD = 100 Cent).",
+    "item16": "Sila sahkan bahawa amaun pindahan yang anda masukkan adalah dalam unit yang betul untuk mengelakkan kegagalan pindahan akibat perbezaan unit."
   },
   "common": {
     "confirm": "Sahkan",

+ 5 - 1
locale/pt.json

@@ -11,7 +11,11 @@
     "item9": "Depósito Mínimo",
     "item10": "Tamanho Mínimo de Lote",
     "item11": "Leverage Máximo",
-    "item12": "Spread Mínimo"
+    "item12": "Spread Mínimo",
+    "item13": "Mais formas de abrir",
+    "item14": "A conta de saque atual é (Conta Cent).",
+    "item15": "A unidade do saldo é Cent (1 USD = 100 Cent).",
+    "item16": "Confirme se o valor da transferência inserido está na unidade correta para evitar falhas na transferência devido a discrepâncias de unidade."
   },
   "common": {
     "confirm": "Confirmar",

+ 5 - 1
locale/th.json

@@ -11,7 +11,11 @@
     "item9": "ฝากขั้นต่ำ",
     "item10": "ขนาดล็อตขั้นต่ำ",
     "item11": "การใช้งานเลเวอร์ชั้นสูงสุด",
-    "item12": "สเปรดขั้นต่ำ"
+    "item12": "สเปรดขั้นต่ำ",
+    "item13": "วิธีการเปิดเพิ่มเติม",
+    "item14": "บัญชีที่ใช้ถอนปัจจุบันคือ (บัญชี Cent)",
+    "item15": "หน่วยของยอดคงเหลือคือ Cent (1 USD = 100 Cent)",
+    "item16": "กรุณายืนยันว่าจำนวนเงินที่คุณป้อนสำหรับการโอนนั้นถูกต้องตามหน่วย เพื่อหลีกเลี่ยงความล้มเหลวในการโอนอันเนื่องมาจากความไม่ถูกต้องของหน่วย"
   },
   "common": {
     "confirm": "ยืนยัน",

+ 5 - 1
locale/tr.json

@@ -11,7 +11,11 @@
     "item9": "Minimum Miktar",
     "item10": "Minimum Lot Boyutu",
     "item11": "Maksimum Kaldıraç",
-    "item12": "Minimum Spread"
+    "item12": "Minimum Spread",
+    "item13": "Daha fazla açma yöntemi",
+    "item14": "Mevcut çekim hesabı (Cent Hesabı)'dır.",
+    "item15": "Bakiye birimi Cent'tir (1 USD = 100 Cent).",
+    "item16": "Lütfen girdiğiniz transfer tutarının doğru birimde olduğunu onaylayın, böylece birim farklılıklarından kaynaklanan transfer hatalarını önleyebilirsiniz."
   },
   "common": {
     "confirm": "Onayla",

+ 5 - 1
locale/vn.json

@@ -11,7 +11,11 @@
     "item9": "Tối thiểu nạp tiền",
     "item10": "Kích thước lô tối thiểu",
     "item11": "Leverage tối đa",
-    "item12": "Spread tối thiểu"
+    "item12": "Spread tối thiểu",
+    "item13": "Nhiều cách mở hơn",
+    "item14": "Tài khoản rút hiện tại là (Tài khoản Cent).",
+    "item15": "Đơn vị số dư là Cent (1 USD = 100 Cent).",
+    "item16": "Vui lòng xác nhận rằng số tiền chuyển bạn nhập đã đúng đơn vị để tránh lỗi giao dịch do sai đơn vị."
   },
   "common": {
     "confirm": "Xác nhận",

+ 5 - 1
locale/zhHant.json

@@ -11,7 +11,11 @@
     "item9": "最低入金",
     "item10": "最小手數",
     "item11": "最大槓桿",
-    "item12": "最小點差"
+    "item12": "最小點差",
+    "item13": "更多打開方式",
+    "item14": "當前轉出帳戶為 (美分帳戶 Cent)",
+    "item15": "餘額單位為 Cent(1 美元 = 100 Cent)。",
+    "item16": "請確認您輸入的轉帳金額單位是否正確,以避免因單位差異導致轉帳失敗。"
   },
   "common": {
     "confirm": "確認",

+ 2 - 2
pages/common/webview.vue

@@ -1,5 +1,5 @@
 <template>
-  <cwg-page-wrapper class="webview-page" :pageTitle="pageTitle">
+  <cwg-page-wrapper class="webview-page" :pageTitle="pageTitle" type="webview">
     <view class="page-container">
       <!-- WebView 内容区(自动占满剩余空间,不遮挡导航栏) -->
       <view class="web-view-container">
@@ -33,7 +33,7 @@ const webviewStyles = computed(() => ({
   progress: {
     color: '#ea002a'
   },
-  top: statusBarHeight.value + 105 + 'px',
+  top: statusBarHeight.value +  + 'px',
   bounce: 'none',
   scrollIndicator: 'none'
 }))

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

@@ -512,6 +512,13 @@ const checkPlatform = (pla) => {
 };
 watch(() => formData.platform, (newVal) => {
     if (newVal) {
+        optionsLev.value = [];
+        optionsCur.value = [];
+        formData.currency = ''
+        formData.leverage = ''
+        formData.balance = ''
+        formData.password = ''
+        
         checkPlatform(newVal === 'MT4' ? 'mt4s' : 'mt5s');
     }
 });

+ 27 - 9
pages/customer/trade-history.vue

@@ -27,7 +27,7 @@
 </template>
 
 <script setup lang="ts">
-import { computed, ref, nextTick, reactive } from 'vue';
+import { computed, ref, nextTick, reactive, watch } from 'vue';
 import { useI18n } from 'vue-i18n';
 import { onLoad } from '@dcloudio/uni-app'
 const { t, locale } = useI18n();
@@ -127,17 +127,16 @@ const mobilePrimaryFields = computed(() => [
 
 // 动态传入筛选字段配置
 const filterFields = computed(() => [
-    isLoaded.value && isSuccess.value && { key: 'login', type: 'select', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), options: loginOptions || [], defaultValue: search?.login || undefined, clearable: true },
+    isLoaded.value && isSuccess.value && { key: 'login', type: 'select', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), options: loginOptions || [], defaultValue: undefined },
     { key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
 ])
 const searchParams = ref({})
 const tableRef = ref(null)
 const handleSearch = (params) => {
     Object.assign(search, params)
-
-    // search.login = params.login && Number(params.login)
-    // console.log(params.login, 12);
+    search.login = params.login && Number(params.login)
     search.platform = loginOptions.find(item => item.value == params.login)?.platform || ''
+    if (!search.platform) return
     nextTick(() => {
         tableRef.value.refreshTable()
     })
@@ -146,6 +145,7 @@ const handleSearch = (params) => {
 const handleReset = (params) => {
     Object.assign(search, params)
     search.platform = loginOptions.find(item => item.value == params.login)?.platform || ''
+    if (!search.platform) return
     nextTick(() => {
         tableRef.value.refreshTable()
     })
@@ -182,12 +182,30 @@ const getProfitColorClass = (profit: any) => {
     return n > 0 ? 'is-profit' : 'is-loss'
 }
 
-onLoad((e) => {
-    console.log(e, 'e')
+onLoad(async (e) => {
+    let targetLogin: number | null = null
+    // 接收跳转参数
     if (e.login) {
-        // ✅ 必须转数字!你的 value 是数字类型
-        search.login = Number(e.login)
+        targetLogin = Number(e.login)
+        console.log('onLoad 拿到跳转login:', targetLogin)
     }
+
+    // 等待账号列表请求完成
+    await new Promise<void>(resolve => {
+        const stopWatch = watch([isLoaded, isSuccess], ([loaded, success]) => {
+            if (loaded && success) {
+                stopWatch()
+                resolve()
+            }
+        })
+    })
+
+    // 此时 loginOptions 一定有值了
+    nextTick(() => {
+        // 优先跳转传参,没有就默认第一个
+        searchParams.value.login = targetLogin ?? loginOptions.value[0]?.value ?? null
+        handleSearch(searchParams.value)
+    })
 })
 </script>
 

+ 24 - 10
pages/customer/trade-position.vue

@@ -9,10 +9,10 @@
                 <template #symbol="{ row }">
                     <view class="symbol-cell">
                         <view class="pair">{{ getSymbolParts(row.symbol)[0] }}/{{ getSymbolParts(row.symbol)[1]
-                            }}</view>
+                        }}</view>
                         <view class="desc">{{ row.openPrice }}
                             <text :class="getCmdColorClass(row.cmdName)">{{ formatCmdName(row.cmdName) }}{{ row.volume
-                                }}{{ t('Label.Lot') }}</text>
+                            }}{{ t('Label.Lot') }}</text>
                         </view>
                     </view>
                 </template>
@@ -27,7 +27,7 @@
 </template>
 
 <script setup lang="ts">
-import { computed, ref, nextTick, reactive } from 'vue';
+import { computed, ref, nextTick, reactive, watch } from 'vue';
 import { useI18n } from 'vue-i18n';
 const { t, locale } = useI18n();
 import { onLoad } from '@dcloudio/uni-app'
@@ -133,16 +133,16 @@ const mobilePrimaryFields = computed(() => [
 
 // 动态传入筛选字段配置
 const filterFields = computed(() => [
-    isLoaded.value && isSuccess.value && { key: 'login', type: 'select', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), options: loginOptions || [], defaultValue: search.login || undefined, clearable: true },
+    isLoaded.value && isSuccess.value && { key: 'login', type: 'select', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), options: loginOptions || [], defaultValue: undefined },
     { key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
 ])
 const searchParams = ref({})
 const tableRef = ref(null)
 const handleSearch = (params) => {
     Object.assign(search, params)
-    // search.login = params.login && Number(params.login)
-    // console.log(params.login, 12);
-    search.platform = loginOptions.find(item => item.value === params.login)?.platform || ''
+    search.login = params.login && Number(params.login)
+    search.platform = loginOptions.find(item => item.value == params.login)?.platform || ''
+    if (!search.platform) return
     nextTick(() => {
         tableRef.value.refreshTable()
     })
@@ -150,7 +150,8 @@ const handleSearch = (params) => {
 
 const handleReset = (params) => {
     Object.assign(search, params)
-    search.platform = loginOptions.find(item => item.value === params.login)?.platform || ''
+    search.platform = loginOptions.find(item => item.value == params.login)?.platform || ''
+    if (!search.platform) return
     nextTick(() => {
         tableRef.value.refreshTable()
     })
@@ -188,10 +189,23 @@ const getProfitColorClass = (profit: any) => {
     return n > 0 ? 'is-profit' : 'is-loss'
 }
 
-onLoad((e) => {
+onLoad(async (e) => {
+    let targetLogin: number | null = null
     if (e.login) {
-        search.login = Number(e.login)
+        targetLogin = Number(e.login)
     }
+    await new Promise<void>(resolve => {
+        const stopWatch = watch([isLoaded, isSuccess], ([loaded, success]) => {
+            if (loaded && success) {
+                stopWatch()
+                resolve()
+            }
+        })
+    })
+    nextTick(() => {
+        searchParams.value.login = targetLogin ?? loginOptions.value[0]?.value ?? null
+        handleSearch(searchParams.value)
+    })
 })
 </script>