ljc před 1 měsícem
rodič
revize
024d79142a

+ 21 - 2
components/cwg-sidebar.vue

@@ -5,7 +5,7 @@
             @click="isWalletOpen = !isWalletOpen">
         <view v-if="mode=='follow'" class="wallet-header-left">
           <cwg-icon name="crm-payment" :size="16" color="#141d22" />
-          <text>{{ t('Documentary.console.item15') }}</text>
+          <text>{{ t('Documentary.console.item14') }}</text>
           <text class="wallet-header-text">{{ followBalance }} USD</text>
         </view>
         <view v-else class="wallet-header-left">
@@ -102,6 +102,7 @@
   import { userToken } from '@/composables/config'
   import useRouter from '@/hooks/useRouter'
   import { useI18n } from 'vue-i18n'
+  import { documentaryApi } from '@/service/documentary'
 
   const { t } = useI18n()
   const router = useRouter()
@@ -125,6 +126,7 @@
   const walletbalance = ref(0)
   const pendingWithdrawAmount = ref(0)
   const ibData = ref({} as any)
+  const walletData = ref({} as any)
 
   const NumberDecimal = (value: any) => {
     let realVal = ''
@@ -167,8 +169,9 @@
     const value = NumberDecimal(ibData.value?.all || 0)
     return isShow.value ? value : NumberDesensitization(value)
   })
+  // 跟单分润
   const followBalance = computed(() => {
-    const value = NumberDecimal(ibData.value?.all || 0)
+    const value = NumberDecimal(walletData.value?.walletAmount || 0)
     return isShow.value ? value : NumberDesensitization(value)
   })
   const getWalletList = async () => {
@@ -205,6 +208,20 @@
       uni.showToast({ title: res.msg, icon: 'none' })
     }
   }
+  //跟单金额
+  const getMoneyList = async () => {
+    let res = await documentaryApi.followWalletSingle({})
+    if (res.code == 200) {
+      if (res.data != null) {
+        walletData.value = res.data
+      }
+    } else {
+      uni.showToast({
+        title: res.msg,
+        icon: 'none',
+      })
+    }
+  }
 
   watch(() => mode.value, (newMode) => {
     if (!userToken.value) return
@@ -213,6 +230,8 @@
       getPendingWithdrawAmount()
     } else if (newMode == 'ib') {
       getIbData()
+    }else if (newMode == 'follow') {
+      getMoneyList()
     }
   }, { immediate: true })
 

+ 1 - 1
pages/follow/report.vue

@@ -4,7 +4,7 @@
         <view class="info-card">
             <cwg-complex-search :fields="filterFields" v-model="searchParams" @search="handleSearch"
                 @reset="handleReset" />
-            <cwg-tabel ref="tableRef" :columns="currentColumns" :immediate="true" :queryParams="queryParams" :api="listApi"
+            <cwg-tabel ref="tableRef" :columns="currentColumns" :immediate="false" :queryParams="queryParams" :api="listApi"
                 :show-operation="false" :showSummary="true" :summaryMethod="getSummaries">
                 <template #equity="{ row }">
                     <view class="equity-cell">

+ 0 - 3
pages/follow/trading-center-single.vue

@@ -184,7 +184,6 @@ onLoad((options: any) => {
 
 // --- Time fetching ---
 const time = ref('');
-let timer: any = null;
 
 const getLocalTime = () => {
     let timezone = 2; 
@@ -224,11 +223,9 @@ const toReload = () => {
 };
 
 onMounted(() => {
-    timer = setInterval(getDate, 60000);
 });
 
 onUnmounted(() => {
-    if (timer) clearInterval(timer);
 });
 
 // --- Tabs ---

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

@@ -219,11 +219,9 @@
 
   onMounted(() => {
     getDate()
-    timer = setInterval(getDate, 60000) // refresh time
   })
 
   onUnmounted(() => {
-    if (timer) clearInterval(timer)
   })
 
   // --- Table Config ---