fix
This commit is contained in:
parent
942cd8610b
commit
fe14e64573
@ -167,11 +167,6 @@ export default {
|
||||
this.$emit("handBuyHide", false);
|
||||
},
|
||||
async handBeginBuy() {
|
||||
const data = {
|
||||
o_link: this.piece.o_link ? this.piece.o_link : this.data.o_link,
|
||||
marketDddress: CONTRACT_ADDRESS[AppModule.chainId].marketDddress,
|
||||
};
|
||||
console.log(data, "data");
|
||||
try {
|
||||
this.showLoading();
|
||||
const nftres = await this.chainManager.bc.beginBuy(
|
||||
@ -181,7 +176,6 @@ export default {
|
||||
if (nftres.status == true) {
|
||||
this.hideLoading();
|
||||
this.$emit("handMessage", 1);
|
||||
// this.closeTip()
|
||||
if(this.type == "chip"){
|
||||
setTimeout(() => {
|
||||
this.$emit("handMessageHide");
|
||||
@ -202,7 +196,6 @@ export default {
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
console.log(nftres, "beginBuy");
|
||||
} catch (err) {
|
||||
this.hideLoading();
|
||||
this.$emit("handMessage", 0);
|
||||
|
@ -194,17 +194,13 @@ export default {
|
||||
return getChipArrid(nameId);
|
||||
},
|
||||
async handRemove() {
|
||||
console.log(
|
||||
this.data.o_link,
|
||||
CONTRACT_ADDRESS[AppModule.chainId].marketDddress
|
||||
);
|
||||
|
||||
try {
|
||||
this.showLoading()
|
||||
const nftres = await this.chainManager.bc.beginCancelOrder(
|
||||
this.data.o_link,
|
||||
CONTRACT_ADDRESS[AppModule.chainId].marketDddress
|
||||
);
|
||||
console.log(nftres, "beginSell");
|
||||
if (nftres.status == true) {
|
||||
this.$emit("handMessage", 1);
|
||||
this.hideLoading();
|
||||
|
@ -78,11 +78,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async haldBuy() {
|
||||
const data = {
|
||||
currency: this.data.s_currency,
|
||||
price: this.data.s_price,
|
||||
marketDddress: CONTRACT_ADDRESS[AppModule.chainId].marketDddress,
|
||||
};
|
||||
|
||||
try {
|
||||
this.showLoading();
|
||||
const nftres = await this.chainManager.bc.beginApproveBuy(
|
||||
@ -103,18 +99,13 @@ export default {
|
||||
}
|
||||
},
|
||||
async handBeginBuy() {
|
||||
const data = {
|
||||
o_link: this.data.o_link,
|
||||
marketDddress: CONTRACT_ADDRESS[AppModule.chainId].marketDddress,
|
||||
};
|
||||
console.log(data, "data");
|
||||
|
||||
try {
|
||||
this.showLoading();
|
||||
const nftres = await this.chainManager.bc.beginBuy(
|
||||
this.data.o_link,
|
||||
CONTRACT_ADDRESS[AppModule.chainId].marketDddress
|
||||
);
|
||||
console.log(nftres, "beginSell");
|
||||
if (nftres.status == true) {
|
||||
this.hideLoading();
|
||||
this.$emit("handMessage", 1);
|
||||
@ -147,7 +138,7 @@ export default {
|
||||
},
|
||||
closeTip() {
|
||||
this.$emit("handBuyHide");
|
||||
console.log("closeTip");
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -103,12 +103,10 @@ export default {
|
||||
margin-top: 22px;
|
||||
position: relative;
|
||||
line-height: 63px;
|
||||
// text-align: center;
|
||||
background: url("../../assets/market/hero/price.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
.priece-number {
|
||||
position: absolute;
|
||||
// left: 55px;
|
||||
right: 7px;
|
||||
top: 2px;
|
||||
}
|
||||
|
@ -410,7 +410,6 @@ export default {
|
||||
this.hero.o_link,
|
||||
CONTRACT_ADDRESS[AppModule.chainId].marketDddress
|
||||
);
|
||||
console.log(nftres, "beginSell");
|
||||
if (nftres.status == true) {
|
||||
this.$emit("handMessage", 1);
|
||||
this.hideLoading();
|
||||
|
@ -8,7 +8,6 @@
|
||||
:class="{ active: selectIdx - 1 === i }"
|
||||
@click="onClickItem(i)"
|
||||
>
|
||||
<!-- {{ s }} -->
|
||||
<img :src="s.Image" alt="" width="182px" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -32,9 +32,15 @@
|
||||
<div class="count-content">
|
||||
<div class="amount">Amount</div>
|
||||
<div class="count">
|
||||
<div class="left" @click="handReduce"></div>
|
||||
<div
|
||||
:class="cunout == 1 ? 'left-active' : 'left'"
|
||||
@click="handReduce"
|
||||
></div>
|
||||
<div class="conunt-number">{{ cunout }}</div>
|
||||
<div class="right" @click="handPlus"></div>
|
||||
<div
|
||||
:class="data.balance == cunout ? 'right-active' : 'right'"
|
||||
@click="handPlus"
|
||||
></div>
|
||||
</div>
|
||||
<div class="max" @click="handMax">Max</div>
|
||||
</div>
|
||||
@ -72,9 +78,9 @@ export default {
|
||||
handPlus() {
|
||||
this.$emit("handPlus");
|
||||
},
|
||||
handMax(){
|
||||
handMax() {
|
||||
this.$emit("handMax");
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -166,10 +172,18 @@ export default {
|
||||
width: 30px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.left-active {
|
||||
width: 30px;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.right {
|
||||
width: 30px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.right-active {
|
||||
width: 30px;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.conunt-number {
|
||||
width: 56px;
|
||||
line-height: 27px;
|
||||
|
@ -163,7 +163,6 @@ export default {
|
||||
async handConfirm() {
|
||||
this.$refs.deptForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
console.log(this.piece.o_link, "o_link");
|
||||
if (
|
||||
this.type == "piece" ? this.piece.o_link > 0 : this.data.o_link > 0
|
||||
) {
|
||||
@ -174,7 +173,6 @@ export default {
|
||||
this.shell.price,
|
||||
CONTRACT_ADDRESS[AppModule.chainId].marketDddress
|
||||
);
|
||||
console.log(nftres, "beginSell");
|
||||
if (nftres.status == true) {
|
||||
this.hideLoading();
|
||||
this.$emit("handMessage", 1);
|
||||
@ -209,16 +207,7 @@ export default {
|
||||
this.nft_Token = CONTRACT_ADDRESS[AppModule.chainId].piece;
|
||||
break;
|
||||
}
|
||||
const data = {
|
||||
tokenId: this.piece
|
||||
? this.piece.detail.token_id
|
||||
: this.data.detail.token_id,
|
||||
nftToken: this.nft_Token,
|
||||
nftType:
|
||||
this.type == "hero" || this.type == "weapon" ? false : true,
|
||||
marketAddress: CONTRACT_ADDRESS[AppModule.chainId].marketDddress,
|
||||
};
|
||||
console.log(data, "dataap");
|
||||
|
||||
try {
|
||||
this.showLoading();
|
||||
const nftres = await this.chainManager.bc.beginApproveSell(
|
||||
@ -229,19 +218,16 @@ export default {
|
||||
this.type == "hero" || this.type == "weapon" ? false : true,
|
||||
CONTRACT_ADDRESS[AppModule.chainId].marketDddress
|
||||
);
|
||||
console.log(nftres, "beginApproveSell");
|
||||
if (nftres.status == true) {
|
||||
this.isApprove = true;
|
||||
this.hideLoading();
|
||||
// this.$emit("handMessage", 1);
|
||||
|
||||
this.handBeginNftSell();
|
||||
}
|
||||
} catch (err) {
|
||||
this.hideLoading();
|
||||
this.isApprove = false;
|
||||
this.$emit("handMessage", 0);
|
||||
console.log("query order status error", err);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -269,18 +255,8 @@ export default {
|
||||
break;
|
||||
}
|
||||
try {
|
||||
const shellData = {
|
||||
nftToken: this.nft_Token,
|
||||
currency: this.value,
|
||||
tokenId: this.piece
|
||||
? this.piece.detail.token_id
|
||||
: this.data.detail.token_id,
|
||||
amount: this.piece ? this.cunout : 1,
|
||||
price: this.shell.price,
|
||||
marketAddress: CONTRACT_ADDRESS[AppModule.chainId].marketDddress,
|
||||
};
|
||||
|
||||
this.showLoading();
|
||||
console.log(shellData, "shellData", "999999990000000000000000");
|
||||
const nftres = await this.chainManager.bc.beginNftSell(
|
||||
this.nft_Token,
|
||||
this.value,
|
||||
@ -306,7 +282,6 @@ export default {
|
||||
}, 1000);
|
||||
}, 1000);
|
||||
}
|
||||
console.log(nftres, "beginSell");
|
||||
} catch (err) {
|
||||
this.hideLoading();
|
||||
this.$emit("handMessage", 0);
|
||||
|
@ -109,12 +109,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async haldBuy() {
|
||||
const data = {
|
||||
currency: this.data.s_currency,
|
||||
price: this.data.s_price,
|
||||
marketDddress: CONTRACT_ADDRESS[AppModule.chainId].marketDddress,
|
||||
};
|
||||
console.log(data, "data");
|
||||
try {
|
||||
this.showLoading();
|
||||
const nftres = await this.chainManager.bc.beginApproveBuy(
|
||||
@ -122,7 +116,6 @@ export default {
|
||||
this.data.s_price,
|
||||
CONTRACT_ADDRESS[AppModule.chainId].marketDddress
|
||||
);
|
||||
console.log(nftres, "beginSell");
|
||||
if (nftres.status == true) {
|
||||
this.isApprove = true;
|
||||
this.hideLoading();
|
||||
@ -136,22 +129,15 @@ export default {
|
||||
}
|
||||
},
|
||||
async handBeginBuy() {
|
||||
const data = {
|
||||
o_link: this.data.o_link,
|
||||
marketDddress: CONTRACT_ADDRESS[AppModule.chainId].marketDddress,
|
||||
};
|
||||
console.log(data, "data");
|
||||
try {
|
||||
this.showLoading();
|
||||
const nftres = await this.chainManager.bc.beginBuy(
|
||||
this.data.o_link,
|
||||
CONTRACT_ADDRESS[AppModule.chainId].marketDddress
|
||||
);
|
||||
console.log(nftres, "beginSell");
|
||||
if (nftres.status == true) {
|
||||
this.hideLoading();
|
||||
this.$emit("handMessage", 1);
|
||||
// this.closeTip()
|
||||
setTimeout(() => {
|
||||
this.$emit("handMessageHide");
|
||||
this.closeTip();
|
||||
@ -182,9 +168,7 @@ export default {
|
||||
this.loadingInstance?.close();
|
||||
},
|
||||
closeTip() {
|
||||
// 分发自定义事件(事件名: closeTip)
|
||||
this.$emit("handBuyHide");
|
||||
console.log("closeTip");
|
||||
},
|
||||
},
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user