From c5cefb2b108e9b457989112a21fe798d109eacf3 Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Wed, 26 Jun 2024 17:43:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 2 +- src/components/Dialogs/buyDialog.vue | 12 +++++++++--- src/components/assets/card.vue | 1 - src/components/chain/BlockChain.js | 2 +- src/components/chain/Market.js | 5 ++--- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.env.production b/.env.production index 0fb0876..0ee76a8 100644 --- a/.env.production +++ b/.env.production @@ -9,7 +9,7 @@ VUE_APP_PASSPORT_LOGOUT_URI=https://tTB5eEedqDOHPHMI41sRDGmqAQwus9oE/ VUE_APP_PASSPORT_CLIENT_ID=tTB5eEedqDOHPHMI41sRDGmqAQwus9oE VUE_APP_PASSPORT_MARKET_ADDRESS=0x7d117aA8BD6D31c4fa91722f246388f38ab1942c VUE_APP_MKT_API='https://market-test.kingsome.cn' -VUE_APP_NET_ID='13473' +VUE_APP_NET_ID='13471' VUE_APP_MARKET_CURRENCY='0xFd42bfb03212dA7e1A4608a44d7658641D99CF34' VUE_APP_MAKEFEE_ADDRESS='0x50A8e60041A206AcaA5F844a1104896224be6F39' VUE_APP_LOCKER_ADDRESS='0x59e751c2037B710090035B6ea928e0cce80aC03f' \ No newline at end of file diff --git a/src/components/Dialogs/buyDialog.vue b/src/components/Dialogs/buyDialog.vue index 73f397b..3f9c9a2 100644 --- a/src/components/Dialogs/buyDialog.vue +++ b/src/components/Dialogs/buyDialog.vue @@ -47,8 +47,7 @@
  • Total : 
  • - {{ priceCalculated(buyDataArr[0].event.data.buy[0].amount) }} - + {{ totalPrice }}
    @@ -63,7 +62,7 @@ import {ref, toRaw, defineEmits, computed} from "vue"; import { priceCalculated } from "@/configs/priceCalculate" import { BlockChain } from "@/components/chain/BlockChain" -// const passProd = ref(new PassportWallet()) + const props = defineProps({ buyDataArr: { type: Array, @@ -75,6 +74,13 @@ const props = defineProps({ console.log(props.buyDataArr); +const totalPrice = computed(() => { + let total = 0n; + props.buyDataArr.forEach((item) => { + total += BigInt(item.event.data.buy[0].amount); + }); + return priceCalculated(total); +}); const emit = defineEmits(["handleClose"]); const handleOk = (e) => { diff --git a/src/components/assets/card.vue b/src/components/assets/card.vue index cc31232..527411b 100644 --- a/src/components/assets/card.vue +++ b/src/components/assets/card.vue @@ -32,7 +32,6 @@