|
@@ -66,8 +66,11 @@
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div class="buy5" v-if="item.itemCount == 5 && (state.data.perUserBuyLimit - state.data.userBuyCount) >= 5 &&
|
|
|
|
- (state.data.itemTotalCount - state.data.itemSoldCount) >= 5" @click="clickJump(item)">
|
|
|
|
|
|
+ <div
|
|
|
|
+ class="buy5"
|
|
|
|
+ :class="{ grey: payNext }"
|
|
|
|
+ @click="clickJump(item)"
|
|
|
|
+ v-if="item.itemCount == 5 && (state.data.perUserBuyLimit - state.data.userBuyCount) >= 5 && (state.data.itemTotalCount - state.data.itemSoldCount) >= 5">
|
|
<div class="left">Buy {{ item.itemCount }}</div>
|
|
<div class="left">Buy {{ item.itemCount }}</div>
|
|
|
|
|
|
<div class="right" v-if="(item.price.length + item.currencyInfo.tokenSymbol.length) > 30">
|
|
<div class="right" v-if="(item.price.length + item.currencyInfo.tokenSymbol.length) > 30">
|
|
@@ -162,21 +165,21 @@ const clickClose = () => {
|
|
const clickJump = (item) => {
|
|
const clickJump = (item) => {
|
|
pay_info.home.sale_plan = item
|
|
pay_info.home.sale_plan = item
|
|
payNext.value = true;
|
|
payNext.value = true;
|
|
- if (item.currencyCode === 'USD') {
|
|
|
|
- const p1 = calcRechargePayAmount({
|
|
|
|
- params: {
|
|
|
|
- currencyCode: item.currencyCode,
|
|
|
|
- orderAmountValue: item.price,
|
|
|
|
- payChannel: 'ach'
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ // post
|
|
|
|
+ const p1 = calcRechargePayAmount({
|
|
|
|
+ params: {
|
|
|
|
+ currencyCode: item.currencyCode,
|
|
|
|
+ orderAmountValue: item.price,
|
|
|
|
+ payChannel: 'ach'
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ const p2 = getCurrencyInfoByCode({
|
|
|
|
+ params: {
|
|
|
|
+ currencyCode: item.currencyCode,
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
|
|
- const p2 = getCurrencyInfoByCode({
|
|
|
|
- params: {
|
|
|
|
- currencyCode: item.currencyCode,
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
|
|
+ if (item.currencyCode === 'USD') {
|
|
Promise.all([p1, p2]).then(([res1, res2]) => {
|
|
Promise.all([p1, p2]).then(([res1, res2]) => {
|
|
if (res1.code == 0 && res2.code == 0) {
|
|
if (res1.code == 0 && res2.code == 0) {
|
|
router.push({
|
|
router.push({
|
|
@@ -193,8 +196,20 @@ const clickJump = (item) => {
|
|
payNext.value = false;
|
|
payNext.value = false;
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
- router.push({ path: '/pay' });
|
|
|
|
- payNext.value = false;
|
|
|
|
|
|
+ Promise.all([p2]).then(([res2]) => {
|
|
|
|
+ if (res2.code == 0) {
|
|
|
|
+ router.push({
|
|
|
|
+ path: '/pay',
|
|
|
|
+ query: {
|
|
|
|
+ currentCurrencyInfo: JSON.stringify(res2.data),
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ router.push({ path: '/pay' });
|
|
|
|
+ }
|
|
|
|
+ }).finally(() => {
|
|
|
|
+ payNext.value = false;
|
|
|
|
+ })
|
|
}
|
|
}
|
|
// report
|
|
// report
|
|
Report.reportLog({
|
|
Report.reportLog({
|
|
@@ -536,6 +551,11 @@ onMounted(() => {
|
|
.grey {
|
|
.grey {
|
|
background: #CDCDCD;
|
|
background: #CDCDCD;
|
|
cursor: not-allowed;
|
|
cursor: not-allowed;
|
|
|
|
+ border: unset;
|
|
|
|
+ color: #FFFFFF;
|
|
|
|
+ .usdt {
|
|
|
|
+ color: #FFFFFF!important;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
.redeem {
|
|
.redeem {
|