|
|
@@ -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 })
|
|
|
|