Handy_Cao пре 1 месец
родитељ
комит
4f2e06c7bd
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/packages/digital/views/contract/goods/detail/index.vue

+ 2 - 2
src/packages/digital/views/contract/goods/detail/index.vue

@@ -294,12 +294,12 @@ const calculations = computed(() => {
     const estimatedAmount = price * amount
 
     const accountStore = useAccountStore()
-    const account = computed(() => accountStore.filterAccountsByCurrencyId(currencyid, goodscurrencyid)).value[0] ?? {}
+    const { avaiableBalance = 0 } = computed(() => accountStore.filterAccountsByCurrencyId(currencyid, goodscurrencyid)).value[0]
 
     const openAmount = price*OrderQty*agreeunit
 
     // 可用余额
-    const maxBalance =  account.avaiableBalance
+    const maxBalance = avaiableBalance
     // 预估手续费 1 比率 2 固定 预估手续费(小数位根据币种小数位格式化):
     // 手续费设置(固定) 时:预估手续费 = 数量 * 合约乘数 * 固定值
     // 手续费设置(比率) 时:预估手续费 = 价格 * 数量 * 合约乘数 * 比率值