优化流程
This commit is contained in:
parent
4b256a30a1
commit
c5cefb2b10
@ -9,7 +9,7 @@ VUE_APP_PASSPORT_LOGOUT_URI=https://tTB5eEedqDOHPHMI41sRDGmqAQwus9oE/
|
|||||||
VUE_APP_PASSPORT_CLIENT_ID=tTB5eEedqDOHPHMI41sRDGmqAQwus9oE
|
VUE_APP_PASSPORT_CLIENT_ID=tTB5eEedqDOHPHMI41sRDGmqAQwus9oE
|
||||||
VUE_APP_PASSPORT_MARKET_ADDRESS=0x7d117aA8BD6D31c4fa91722f246388f38ab1942c
|
VUE_APP_PASSPORT_MARKET_ADDRESS=0x7d117aA8BD6D31c4fa91722f246388f38ab1942c
|
||||||
VUE_APP_MKT_API='https://market-test.kingsome.cn'
|
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_MARKET_CURRENCY='0xFd42bfb03212dA7e1A4608a44d7658641D99CF34'
|
||||||
VUE_APP_MAKEFEE_ADDRESS='0x50A8e60041A206AcaA5F844a1104896224be6F39'
|
VUE_APP_MAKEFEE_ADDRESS='0x50A8e60041A206AcaA5F844a1104896224be6F39'
|
||||||
VUE_APP_LOCKER_ADDRESS='0x59e751c2037B710090035B6ea928e0cce80aC03f'
|
VUE_APP_LOCKER_ADDRESS='0x59e751c2037B710090035B6ea928e0cce80aC03f'
|
@ -47,8 +47,7 @@
|
|||||||
<li>Total : </li>
|
<li>Total : </li>
|
||||||
<li>
|
<li>
|
||||||
<div>
|
<div>
|
||||||
<span>{{ priceCalculated(buyDataArr[0].event.data.buy[0].amount) }}</span>
|
<span>{{ totalPrice }}</span>
|
||||||
<!-- <span>0.08</span> -->
|
|
||||||
<img src="@/assets/img/marketplace/ETHicon.png" alt />
|
<img src="@/assets/img/marketplace/ETHicon.png" alt />
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="money">$ 400</div> -->
|
<!-- <div class="money">$ 400</div> -->
|
||||||
@ -63,7 +62,7 @@
|
|||||||
import {ref, toRaw, defineEmits, computed} from "vue";
|
import {ref, toRaw, defineEmits, computed} from "vue";
|
||||||
import { priceCalculated } from "@/configs/priceCalculate"
|
import { priceCalculated } from "@/configs/priceCalculate"
|
||||||
import { BlockChain } from "@/components/chain/BlockChain"
|
import { BlockChain } from "@/components/chain/BlockChain"
|
||||||
// const passProd = ref(new PassportWallet())
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
buyDataArr: {
|
buyDataArr: {
|
||||||
type: Array,
|
type: Array,
|
||||||
@ -75,6 +74,13 @@ const props = defineProps({
|
|||||||
|
|
||||||
console.log(props.buyDataArr);
|
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 emit = defineEmits(["handleClose"]);
|
||||||
|
|
||||||
const handleOk = (e) => {
|
const handleOk = (e) => {
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, toRaw, onMounted, getCurrentInstance } from "vue"
|
import { ref, toRaw, onMounted, getCurrentInstance } from "vue"
|
||||||
import SellDialog from "@/components/Dialogs/sellDialog.vue"
|
import SellDialog from "@/components/Dialogs/sellDialog.vue"
|
||||||
import {PassportWallet} from "@/wallet/passPort.js"
|
|
||||||
import { useDetailStore } from "@/store/detail"
|
import { useDetailStore } from "@/store/detail"
|
||||||
import { apiGetPrice } from "@/utils/marketplace"
|
import { apiGetPrice } from "@/utils/marketplace"
|
||||||
import LazyLoadImg from "@/components/lazyloadimg"
|
import LazyLoadImg from "@/components/lazyloadimg"
|
||||||
|
@ -24,7 +24,7 @@ export class BlockChain {
|
|||||||
this.store = walletStore();
|
this.store = walletStore();
|
||||||
this.store.$hydrate({runHooks: false});
|
this.store.$hydrate({runHooks: false});
|
||||||
this.initWallet();
|
this.initWallet();
|
||||||
this.market = new ImtblMarket()
|
this.market = new ImtblMarket(this)
|
||||||
this.locker = new Locker(this)
|
this.locker = new Locker(this)
|
||||||
BlockChain.instance = this;
|
BlockChain.instance = this;
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { baseConfig } from './wallet/PassportWallet';
|
import { baseConfig } from './wallet/PassportWallet';
|
||||||
import { orderbook } from '@imtbl/sdk';
|
import { orderbook } from '@imtbl/sdk';
|
||||||
const marketAddress = import.meta.env.VUE_APP_PASSPORT_MARKET_ADDRESS
|
const makeFeeAddress = import.meta.env.VUE_APP_MAKEFEE_ADDRESS
|
||||||
|
|
||||||
const NATIVE = 'NATIVE'
|
const NATIVE = 'NATIVE'
|
||||||
const ERC20 = 'ERC20'
|
const ERC20 = 'ERC20'
|
||||||
|
|
||||||
@ -100,7 +99,7 @@ export class ImtblMarket {
|
|||||||
// Optional maker marketplace fee
|
// Optional maker marketplace fee
|
||||||
makerFees: [{
|
makerFees: [{
|
||||||
amount,
|
amount,
|
||||||
recipientAddress: marketAddress, // Replace address with your own marketplace address
|
recipientAddress: makeFeeAddress, // Replace address with your own marketplace address
|
||||||
}],
|
}],
|
||||||
});
|
});
|
||||||
console.log('order:', order);
|
console.log('order:', order);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user