diff --git a/.env.production b/.env.production index 84565ff..727237f 100644 --- a/.env.production +++ b/.env.production @@ -1,7 +1,7 @@ VUE_APP_WALLET_INFURAID='e7743d46923911fa8850619b7a7f6d9d' -VUE_APP_CHAIN_ID=97 -VUE_APP_CHAIN_RPC='https://data-seed-prebsc-1-s1.binance.org:8545' -VUE_APP_BASE_API='https://game2006api.kingsome.cn' +VUE_APP_BASE_API='http://192.168.100.21:81' +VUE_APP_CHAIN_ID=1338 +VUE_APP_CHAIN_RPC='http://192.168.100.22:8545' VUE_APP_CHAIN_NAME='Smart Chain - Testnet' VUE_APP_CHAIN_EXPLORERURL = 'https://testnet.bscscan.com' VUE_APP_CHAIN_CURRENCY_NAME='name' diff --git a/src/components/main/CardScroller.vue b/src/components/main/CardScroller.vue index ce39ccd..b57054a 100644 --- a/src/components/main/CardScroller.vue +++ b/src/components/main/CardScroller.vue @@ -194,7 +194,7 @@ export default class extends Vue { .action-bar { display: flex; - width: 100vw; + width: 100%; justify-content: space-between; position: absolute; left: 0; @@ -205,14 +205,18 @@ export default class extends Vue { .page-ctrl { display: flex; align-items: center; + flex-grow: 1; + justify-content: center; + padding: 0 50px; } .page-icon { height: 45px/$scale; - width: 221px/$scale; + width: 121px/$scale; background-image: url('../../assets/main/p3/icon_deselect.png'); background-repeat: no-repeat; background-position: center; + margin: 0 20px; } .page-icon.selected { diff --git a/src/components/main/NftSection.vue b/src/components/main/NftSection.vue index d1213a6..205d3f6 100644 --- a/src/components/main/NftSection.vue +++ b/src/components/main/NftSection.vue @@ -128,12 +128,12 @@ export default class extends Vue { async getOrderStatus(orderId: string) { try { const res: any = await queryOrder({ account: this.accountId, order_id: orderId }) - if (res.status === 1) { + if (res.state === 1) { EventBus.$emit(PRESALE_SUCCESS, {}) - } else if (res.status === 3) { + } else if (res.state === 3) { EventBus.$emit(PRESALE_ERROR, {}) this.resetTmpOrderId() - } else if (res.status === 0) { + } else if (res.state === 0) { EventBus.$emit(PRESALE_ERROR, {}) this.resetTmpOrderId() } @@ -198,7 +198,7 @@ export default class extends Vue { id: data.box_id, skelName: `n_${data.name.toLowerCase()}`, directBuy: true, - stopBuy: this.buyed, + stopBuy: false, showBuy: true } if (data.currency_list && data.currency_list.length > 0) { diff --git a/src/components/market/NftItem.vue b/src/components/market/NftItem.vue index 1462c66..329359b 100644 --- a/src/components/market/NftItem.vue +++ b/src/components/market/NftItem.vue @@ -46,7 +46,14 @@ export default class extends Vue { return AppModule.walletConnected } + get accountId() { + return AppModule.accountId + } + async buyItem() { + if (!this.accountId) { + return await this.bc.connect() + } if (!AppModule.canBuy) { Message({ message: 'Can`t buy current time', @@ -62,9 +69,6 @@ export default class extends Vue { return } EventBus.$emit(PRESALE_BEGIN) - if (!this.walletCollected) { - await this.bc.connect() - } const account = AppModule.accountId try { const { nonce, signature } = await this.bc.signPresale({