This commit is contained in:
huangjinming 2023-01-05 19:32:42 +08:00
parent bc9185d0d2
commit a9556ea345
4 changed files with 12 additions and 8 deletions

View File

@ -102,7 +102,7 @@ export default {
data() {
return {
piece: "",
orderId: 0,
orderId: 1,
chainManager: new ChainManager(),
dialogVisible: false,
};
@ -111,8 +111,10 @@ export default {
async haldBuy() {
try {
const nftres = await this.chainManager.bc.beginBuy(
this.orderId,
CONTRACT_ADDRESS["1338"].address
this.piece.orderId ? this.piece.orderId : this.data.orderId,
this.piece.s_price ? this.piece.s_price : this.data.s_price,
this.piece.currency ? this.piece.currency : this.data.currency,
CONTRACT_ADDRESS[AppModule.chainId].marketDddress
);
console.log(nftres, "beginSell");
} catch (err) {
@ -125,7 +127,6 @@ export default {
},
init(data) {
this.piece = data;
},
},
};

View File

@ -70,7 +70,7 @@ export default {
async haldBuy(){
try {
const nftres = await this.chainManager.bc.beginBuy(
this.orderId,
this.data.orderId,
this.data.s_price,
this.data.currency,
CONTRACT_ADDRESS[AppModule.chainId].marketDddress

View File

@ -106,6 +106,7 @@ export default {
nft_Token: "",
chainManager: new ChainManager(),
cunout: 1,
orderId:1,
dialogVisible: false,
isWeapon: false,
options: [],

View File

@ -97,11 +97,13 @@ export default {
};
},
methods: {
async haldBuy() {
async haldBuy(){
try {
const nftres = await this.chainManager.bc.beginBuy(
this.orderId,
CONTRACT_ADDRESS["1338"].address
this.data.orderId,
this.data.s_price,
this.data.currency,
CONTRACT_ADDRESS[AppModule.chainId].marketDddress
);
console.log(nftres, "beginSell");
} catch (err) {