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

View File

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

View File

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

View File

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