fix
This commit is contained in:
parent
61b20d4243
commit
c0e9963c76
@ -117,6 +117,7 @@
|
||||
|
||||
<script>
|
||||
import { AppModule } from "@/store/modules/app";
|
||||
import { UserModule } from "@/store/modules/user";
|
||||
import { CONTRACT_ADDRESS } from "@/configs/config_chain";
|
||||
import ChainManager from "@/chain/ChainManager";
|
||||
import { formatPrice } from "@/utils/chain.util";
|
||||
@ -132,8 +133,16 @@ export default {
|
||||
loadingInstance: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
logined() {
|
||||
return !!UserModule.token && !!AppModule.step;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async haldBuy() {
|
||||
if (!this.logined) {
|
||||
await this.chainManager.login();
|
||||
}
|
||||
try {
|
||||
this.showLoading();
|
||||
const nftres = await this.chainManager.bc.beginApproveBuy(
|
||||
|
@ -59,6 +59,7 @@
|
||||
<script>
|
||||
import HeroBuyTop from "./HeroBuyTop.vue";
|
||||
import { AppModule } from "@/store/modules/app";
|
||||
import { UserModule } from "@/store/modules/user";
|
||||
import { CONTRACT_ADDRESS } from "@/configs/config_chain";
|
||||
import ChainManager from "@/chain/ChainManager";
|
||||
import { formatPrice } from "@/utils/chain.util";
|
||||
@ -76,9 +77,17 @@ export default {
|
||||
dialogVisible: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
logined() {
|
||||
return !!UserModule.token && !!AppModule.step;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async haldBuy() {
|
||||
|
||||
console.log(this.logined, "logined");
|
||||
if (!this.logined) {
|
||||
await this.chainManager.login();
|
||||
}
|
||||
try {
|
||||
this.showLoading();
|
||||
const nftres = await this.chainManager.bc.beginApproveBuy(
|
||||
@ -99,7 +108,6 @@ export default {
|
||||
}
|
||||
},
|
||||
async handBeginBuy() {
|
||||
|
||||
try {
|
||||
this.showLoading();
|
||||
const nftres = await this.chainManager.bc.beginBuy(
|
||||
@ -115,7 +123,7 @@ export default {
|
||||
this.$emit("on-close");
|
||||
setTimeout(() => {
|
||||
this.$emit("getMarketNftList");
|
||||
},1000)
|
||||
}, 1000);
|
||||
}, 1000);
|
||||
}
|
||||
} catch (err) {
|
||||
@ -138,7 +146,6 @@ export default {
|
||||
},
|
||||
closeTip() {
|
||||
this.$emit("handBuyHide");
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -199,6 +199,10 @@ export default {
|
||||
console.log("query order status error", err);
|
||||
}
|
||||
} else {
|
||||
if (!this.currencyTypeList || this.currencyTypeList.length === 0) {
|
||||
this.$emit("handMessage", 0);
|
||||
return;
|
||||
}
|
||||
switch (this.type) {
|
||||
case "hero":
|
||||
this.nft_Token = CONTRACT_ADDRESS[AppModule.chainId].hero;
|
||||
@ -233,7 +237,6 @@ export default {
|
||||
this.hideLoading();
|
||||
this.isApprove = false;
|
||||
this.$emit("handMessage", 0);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -261,7 +264,6 @@ export default {
|
||||
break;
|
||||
}
|
||||
try {
|
||||
|
||||
this.showLoading();
|
||||
const nftres = await this.chainManager.bc.beginNftSell(
|
||||
this.nft_Token,
|
||||
|
@ -91,6 +91,7 @@
|
||||
|
||||
<script>
|
||||
import { AppModule } from "@/store/modules/app";
|
||||
import { UserModule } from "@/store/modules/user";
|
||||
import { CONTRACT_ADDRESS } from "@/configs/config_chain";
|
||||
import { formatPrice } from "@/utils/chain.util";
|
||||
import ChainManager from "@/chain/ChainManager";
|
||||
@ -107,8 +108,16 @@ export default {
|
||||
dialogVisible: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
logined() {
|
||||
return !!UserModule.token && !!AppModule.step;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async haldBuy() {
|
||||
if (!this.logined) {
|
||||
await this.chainManager.login();
|
||||
}
|
||||
try {
|
||||
this.showLoading();
|
||||
const nftres = await this.chainManager.bc.beginApproveBuy(
|
||||
|
Loading…
x
Reference in New Issue
Block a user