|  | @@ -22,31 +22,67 @@
 | 
											
												
													
														|  |              </div>
 |  |              </div>
 | 
											
												
													
														|  |              <div class="right">
 |  |              <div class="right">
 | 
											
												
													
														|  |                  <div class="card-content">
 |  |                  <div class="card-content">
 | 
											
												
													
														|  | -                    <div class="card-title">
 |  | 
 | 
											
												
													
														|  | -                        <img class="img" :src="require('@/assets/subject/top-01.svg')" />
 |  | 
 | 
											
												
													
														|  | -                        <div class="font">Deposit to Send Giveaway</div>
 |  | 
 | 
											
												
													
														|  | -                    </div>
 |  | 
 | 
											
												
													
														|  | -                    <top-up2 v-if="tempCurrentCurrencyInfo.currencyCode" :asyncIng="asyncIng"
 |  | 
 | 
											
												
													
														|  | -                        :currentCurrencyInfo="tempCurrentCurrencyInfo" @topUpDone="topUpDone">
 |  | 
 | 
											
												
													
														|  | -                    </top-up2>
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -                    <div class="card-title">
 |  | 
 | 
											
												
													
														|  | -                        <img class="img" :src="require('@/assets/subject/top-02.svg')" />
 |  | 
 | 
											
												
													
														|  | -                        <div class="font">Wait for the amount to arrive</div>
 |  | 
 | 
											
												
													
														|  | -                    </div>
 |  | 
 | 
											
												
													
														|  | -                    <preview-balance v-if="tempCurrentCurrencyInfo.currencyCode"
 |  | 
 | 
											
												
													
														|  | -                        :currencyCode="tempCurrentCurrencyInfo.currencyCode"></preview-balance>
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    <template v-if="tempCurrentCurrencyInfo.currencyCode">
 | 
											
												
													
														|  | 
 |  | +                        <div class="card-title">
 | 
											
												
													
														|  | 
 |  | +                            <img class="img" :src="require('@/assets/subject/top-01.svg')" />
 | 
											
												
													
														|  | 
 |  | +                            <div class="font">Deposit to Send Giveaway</div>
 | 
											
												
													
														|  | 
 |  | +                        </div>
 | 
											
												
													
														|  | 
 |  | +                        <top-up2 v-if="tempCurrentCurrencyInfo.currencyCode" :asyncIng="asyncIng"
 | 
											
												
													
														|  | 
 |  | +                            :currentCurrencyInfo="tempCurrentCurrencyInfo" @topUpDone="topUpDone">
 | 
											
												
													
														|  | 
 |  | +                        </top-up2>
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +                        <div class="card-title">
 | 
											
												
													
														|  | 
 |  | +                            <img class="img" :src="require('@/assets/subject/top-02.svg')" />
 | 
											
												
													
														|  | 
 |  | +                            <div class="font">Wait for the amount to arrive</div>
 | 
											
												
													
														|  | 
 |  | +                        </div>
 | 
											
												
													
														|  | 
 |  | +                        <preview-balance v-if="tempCurrentCurrencyInfo.currencyCode"
 | 
											
												
													
														|  | 
 |  | +                            :currencyCode="tempCurrentCurrencyInfo.currencyCode" @updateData="updateData">
 | 
											
												
													
														|  | 
 |  | +                        </preview-balance>
 | 
											
												
													
														|  | 
 |  | +                    </template>
 | 
											
												
													
														|  |                  </div>
 |  |                  </div>
 | 
											
												
													
														|  |              </div>
 |  |              </div>
 | 
											
												
													
														|  |          </div>
 |  |          </div>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          <!-- 底部 -->
 |  |          <!-- 底部 -->
 | 
											
												
													
														|  |          <div class="footer">
 |  |          <div class="footer">
 | 
											
												
													
														|  | -            <div class="pay" v-show="state.loading.show">
 |  | 
 | 
											
												
													
														|  | 
 |  | +            <div class="buy1" v-show="state.loading.show && state.is_btn_grey == false">
 | 
											
												
													
														|  |                  <btn-loading :color="'while'"></btn-loading>
 |  |                  <btn-loading :color="'while'"></btn-loading>
 | 
											
												
													
														|  |              </div>
 |  |              </div>
 | 
											
												
													
														|  | -            <div class="pay" v-show="!state.loading.show" @click="clickPlay">Pay {{ pay_info.home.sale_plan.price }}
 |  | 
 | 
											
												
													
														|  | -                {{ pay_info.home.sale_plan.currencyCode }}</div>
 |  | 
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +            <div class="buy1" @click="clickPlay" v-if="!state.loading.show && state.is_btn_grey == false">
 | 
											
												
													
														|  | 
 |  | +                <template
 | 
											
												
													
														|  | 
 |  | +                    v-if="(pay_info.home.sale_plan.price.length + pay_info.home.sale_plan.currencyCode.length) > 30">
 | 
											
												
													
														|  | 
 |  | +                    <div class="left">Pay</div>
 | 
											
												
													
														|  | 
 |  | +                    <div class="right">
 | 
											
												
													
														|  | 
 |  | +                        <p>{{ pay_info.home.sale_plan.price }}</p>
 | 
											
												
													
														|  | 
 |  | +                        <p>{{ pay_info.home.sale_plan.currencyCode }}</p>
 | 
											
												
													
														|  | 
 |  | +                    </div>
 | 
											
												
													
														|  | 
 |  | +                </template>
 | 
											
												
													
														|  | 
 |  | +                <template v-else>
 | 
											
												
													
														|  | 
 |  | +                    <div class="left">Pay</div>
 | 
											
												
													
														|  | 
 |  | +                    <div class="right">
 | 
											
												
													
														|  | 
 |  | +                        {{ pay_info.home.sale_plan.price }}
 | 
											
												
													
														|  | 
 |  | +                        {{ pay_info.home.sale_plan.currencyCode }}
 | 
											
												
													
														|  | 
 |  | +                    </div>
 | 
											
												
													
														|  | 
 |  | +                </template>
 | 
											
												
													
														|  | 
 |  | +            </div>
 | 
											
												
													
														|  | 
 |  | +            <div class="buy1 grey" v-else>
 | 
											
												
													
														|  | 
 |  | +                <template
 | 
											
												
													
														|  | 
 |  | +                    v-if="(pay_info.home.sale_plan.price.length + pay_info.home.sale_plan.currencyCode.length) > 30">
 | 
											
												
													
														|  | 
 |  | +                    <div class="left">Pay</div>
 | 
											
												
													
														|  | 
 |  | +                    <div class="right">
 | 
											
												
													
														|  | 
 |  | +                        <p>{{ pay_info.home.sale_plan.price }}</p>
 | 
											
												
													
														|  | 
 |  | +                        <p>{{ pay_info.home.sale_plan.currencyCode }}</p>
 | 
											
												
													
														|  | 
 |  | +                    </div>
 | 
											
												
													
														|  | 
 |  | +                </template>
 | 
											
												
													
														|  | 
 |  | +                <template v-else>
 | 
											
												
													
														|  | 
 |  | +                    <div class="left">Pay</div>
 | 
											
												
													
														|  | 
 |  | +                    <div class="right">
 | 
											
												
													
														|  | 
 |  | +                        {{ pay_info.home.sale_plan.price }}
 | 
											
												
													
														|  | 
 |  | +                        {{ pay_info.home.sale_plan.currencyCode }}
 | 
											
												
													
														|  | 
 |  | +                    </div>
 | 
											
												
													
														|  | 
 |  | +                </template>
 | 
											
												
													
														|  | 
 |  | +            </div>
 | 
											
												
													
														|  |          </div>
 |  |          </div>
 | 
											
												
													
														|  |      </div>
 |  |      </div>
 | 
											
												
													
														|  |  </template>
 |  |  </template>
 | 
											
										
											
												
													
														|  | @@ -59,11 +95,13 @@ import PreviewBalance from "@/view/components/preview-balance.vue";
 | 
											
												
													
														|  |  import BtnLoading from '../components/btn-loading.vue'
 |  |  import BtnLoading from '../components/btn-loading.vue'
 | 
											
												
													
														|  |  import { payNftMysteryBoxWithBalance } from "@/http/pay";
 |  |  import { payNftMysteryBoxWithBalance } from "@/http/pay";
 | 
											
												
													
														|  |  import { getChromeStorage } from "@/uilts/chromeExtension"
 |  |  import { getChromeStorage } from "@/uilts/chromeExtension"
 | 
											
												
													
														|  | 
 |  | +import { number } from "mathjs";
 | 
											
												
													
														|  |  let pay_info = inject('pay_info');
 |  |  let pay_info = inject('pay_info');
 | 
											
												
													
														|  |  let state = reactive({
 |  |  let state = reactive({
 | 
											
												
													
														|  |      loading: {
 |  |      loading: {
 | 
											
												
													
														|  |          show: false
 |  |          show: false
 | 
											
												
													
														|  | -    }
 |  | 
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  | 
 |  | +    is_btn_grey: true
 | 
											
												
													
														|  |  })
 |  |  })
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  let currentCurrencyInfo = reactive({
 |  |  let currentCurrencyInfo = reactive({
 | 
											
										
											
												
													
														|  | @@ -72,6 +110,12 @@ let currentCurrencyInfo = reactive({
 | 
											
												
													
														|  |      balance: "",
 |  |      balance: "",
 | 
											
												
													
														|  |  });
 |  |  });
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +const updateData = (obj_data) => {
 | 
											
												
													
														|  | 
 |  | +    if (Number(obj_data.balance) >= Number(pay_info.home.sale_plan.price)) {
 | 
											
												
													
														|  | 
 |  | +        state.is_btn_grey = false
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +}
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  const clickBack = () => {
 |  |  const clickBack = () => {
 | 
											
												
													
														|  |      router.back()
 |  |      router.back()
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
										
											
												
													
														|  | @@ -92,21 +136,18 @@ const clickPlay = () => {
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |      }).catch(() => {
 |  |      }).catch(() => {
 | 
											
												
													
														|  |          state.loading.show = false
 |  |          state.loading.show = false
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |      })
 |  |      })
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  // 余额是否同步中
 |  |  // 余额是否同步中
 | 
											
												
													
														|  |  let asyncIng = ref(false);
 |  |  let asyncIng = ref(false);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -// 刷新按钮旋转
 |  | 
 | 
											
												
													
														|  | -let refreshRotate = ref(false);
 |  | 
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  //临时货币信息
 |  |  //临时货币信息
 | 
											
												
													
														|  |  let tempCurrentCurrencyInfo = ref({});
 |  |  let tempCurrentCurrencyInfo = ref({});
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  const getLocalCurrencyInfoByCode = () => {
 |  |  const getLocalCurrencyInfoByCode = () => {
 | 
											
												
													
														|  | -    if (!currentCurrencyInfo.currencyCode) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    if (currentCurrencyInfo.currencyCode) {
 | 
											
												
													
														|  |          getCurrencyInfo();
 |  |          getCurrencyInfo();
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
										
											
												
													
														|  | @@ -123,15 +164,12 @@ const getCurrencyInfo = async () => {
 | 
											
												
													
														|  |                  tempCurrentCurrencyInfo.value = res.data;
 |  |                  tempCurrentCurrencyInfo.value = res.data;
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |          });
 |  |          });
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |  onMounted(() => {
 |  |  onMounted(() => {
 | 
											
												
													
														|  |      currentCurrencyInfo.currencyCode = pay_info.home.sale_plan.currencyCode
 |  |      currentCurrencyInfo.currencyCode = pay_info.home.sale_plan.currencyCode
 | 
											
												
													
														|  | -    console.log(pay_info.home)
 |  | 
 | 
											
												
													
														|  | -    getCurrencyInfo()
 |  | 
 | 
											
												
													
														|  | 
 |  | +    getLocalCurrencyInfoByCode()
 | 
											
												
													
														|  |  })
 |  |  })
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -172,7 +210,7 @@ onMounted(() => {
 | 
											
												
													
														|  |      .area-content {
 |  |      .area-content {
 | 
											
												
													
														|  |          display: flex;
 |  |          display: flex;
 | 
											
												
													
														|  |          overflow-y: auto;
 |  |          overflow-y: auto;
 | 
											
												
													
														|  | -        flex:1;
 |  | 
 | 
											
												
													
														|  | 
 |  | +        flex: 1;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          .left {
 |  |          .left {
 | 
											
												
													
														|  |              width: 400px;
 |  |              width: 400px;
 | 
											
										
											
												
													
														|  | @@ -184,9 +222,10 @@ onMounted(() => {
 | 
											
												
													
														|  |                  width: 100%;
 |  |                  width: 100%;
 | 
											
												
													
														|  |                  height: auto;
 |  |                  height: auto;
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  | -            p{
 |  | 
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +            p {
 | 
											
												
													
														|  |                  margin: 0;
 |  |                  margin: 0;
 | 
											
												
													
														|  | -                padding:0;
 |  | 
 | 
											
												
													
														|  | 
 |  | +                padding: 0;
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              .tip {
 |  |              .tip {
 | 
											
										
											
												
													
														|  | @@ -207,19 +246,22 @@ onMounted(() => {
 | 
											
												
													
														|  |              .card-content {
 |  |              .card-content {
 | 
											
												
													
														|  |                  float: right;
 |  |                  float: right;
 | 
											
												
													
														|  |                  width: 430px;
 |  |                  width: 430px;
 | 
											
												
													
														|  | 
 |  | +                padding-bottom: 22px;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |                  .card-title {
 |  |                  .card-title {
 | 
											
												
													
														|  | -                    height: 32px;
 |  | 
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +                    margin-bottom: 12px;
 | 
											
												
													
														|  | 
 |  | +                    display: flex;
 | 
											
												
													
														|  | 
 |  | +                    align-items: center;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |                      .img {
 |  |                      .img {
 | 
											
												
													
														|  | -                        float: left;
 |  | 
 | 
											
												
													
														|  |                          width: 20px;
 |  |                          width: 20px;
 | 
											
												
													
														|  |                          height: 20px;
 |  |                          height: 20px;
 | 
											
												
													
														|  |                          margin-right: 8px;
 |  |                          margin-right: 8px;
 | 
											
												
													
														|  |                      }
 |  |                      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |                      .font {
 |  |                      .font {
 | 
											
												
													
														|  | -                        float: left;
 |  | 
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |                          font-size: 17px;
 |  |                          font-size: 17px;
 | 
											
												
													
														|  |                          font-weight: 500;
 |  |                          font-weight: 500;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -262,10 +304,11 @@ onMounted(() => {
 | 
											
												
													
														|  |          text-align: center;
 |  |          text-align: center;
 | 
											
												
													
														|  |          line-height: 50px;
 |  |          line-height: 50px;
 | 
											
												
													
														|  |          cursor: pointer;
 |  |          cursor: pointer;
 | 
											
												
													
														|  | -        p{
 |  | 
 | 
											
												
													
														|  | -                margin: 0;
 |  | 
 | 
											
												
													
														|  | -                padding:0;
 |  | 
 | 
											
												
													
														|  | -            }
 |  | 
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        p {
 | 
											
												
													
														|  | 
 |  | +            margin: 0;
 | 
											
												
													
														|  | 
 |  | +            padding: 0;
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      .footer {
 |  |      .footer {
 | 
											
										
											
												
													
														|  | @@ -324,15 +367,35 @@ onMounted(() => {
 | 
											
												
													
														|  |              background: #1D9BF0;
 |  |              background: #1D9BF0;
 | 
											
												
													
														|  |              color: #fff;
 |  |              color: #fff;
 | 
											
												
													
														|  |              border-radius: 100px;
 |  |              border-radius: 100px;
 | 
											
												
													
														|  | -            width: 217px;
 |  | 
 | 
											
												
													
														|  | -            height: 50px;
 |  | 
 | 
											
												
													
														|  | 
 |  | +            min-width: 217px;
 | 
											
												
													
														|  | 
 |  | +            min-height: 50px;
 | 
											
												
													
														|  |              display: flex;
 |  |              display: flex;
 | 
											
												
													
														|  |              align-items: center;
 |  |              align-items: center;
 | 
											
												
													
														|  | -            font-size: 18px;
 |  | 
 | 
											
												
													
														|  | 
 |  | +            font-size: 14px;
 | 
											
												
													
														|  |              font-weight: 700;
 |  |              font-weight: 700;
 | 
											
												
													
														|  |              justify-content: space-between;
 |  |              justify-content: space-between;
 | 
											
												
													
														|  |              padding: 0 15px 0 20px;
 |  |              padding: 0 15px 0 20px;
 | 
											
												
													
														|  |              margin-right: 25px;
 |  |              margin-right: 25px;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +            .left {
 | 
											
												
													
														|  | 
 |  | +                margin-right: 20px;
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +            .right {
 | 
											
												
													
														|  | 
 |  | +                text-align: right;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +                p {
 | 
											
												
													
														|  | 
 |  | +                    margin: 0;
 | 
											
												
													
														|  | 
 |  | +                    padding: 0;
 | 
											
												
													
														|  | 
 |  | +                    line-height: 17px;
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        .grey {
 | 
											
												
													
														|  | 
 |  | +            background: #CDCDCD;
 | 
											
												
													
														|  | 
 |  | +            cursor: not-allowed;
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  }
 |  |  }
 |