nieyuge 2 years ago
parent
commit
74b4733ad1
2 changed files with 7 additions and 1 deletions
  1. 1 1
      components/MobileBuyNft.vue
  2. 6 0
      pages/payment/index.vue

+ 1 - 1
components/MobileBuyNft.vue

@@ -49,7 +49,7 @@
                     <img src="../static/img/icon_nft_random.png" />
                     <span>Randomly Get Different Styles of NFTs</span>
                 </div>
-                <template v-if="data.salePlans">
+                <template v-if="data.salePlans.length">
                     <div v-for="(item, index) in data.salePlans" :key="index">
                         <template v-if="item.itemCount == 1">
                             <template v-if="purchaseStatus !== 0">

+ 6 - 0
pages/payment/index.vue

@@ -362,6 +362,9 @@ export default {
             })
         },
         getCurrencyInfoByCode() {
+            let where = this.salePlans && this.salePlans.currencyCode;
+            if (!where) return;
+
             postRequest(Api.getCurrencyInfoByCode, {
                 params: {
                     currencyCode: this.salePlans.currencyCode
@@ -520,6 +523,9 @@ export default {
             this.reportRedeemBtnClick()
         },
         getAddress() {
+            let where = this.salePlans && this.salePlans.currencyInfo && this.salePlans.currencyInfo.tokenChain;
+            if (!where) return;
+
             postRequest(Api.getTokenRechargeAddress, {
                 params: {
                     tokenChain: this.salePlans.currencyInfo?.tokenChain