|
@@ -46,11 +46,11 @@
|
|
|
Balance:{{currencyInfoData.balance}} {{currencyInfoData.tokenSymbol}}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="item" @click="achPay">
|
|
|
+ <div class="item" @click="achPay(true, Report.objectType.mastercardPayButton)">
|
|
|
<img src="../../static/payment/icon_master_card.png" />
|
|
|
<span>MasterCard</span>
|
|
|
</div>
|
|
|
- <div class="item" @click="achPay">
|
|
|
+ <div class="item" @click="achPay(true, Report.objectType.visaPayButton)">
|
|
|
<img src="../../static/payment/icon_visa.png" />
|
|
|
<span>VISA</span>
|
|
|
</div>
|
|
@@ -133,7 +133,7 @@
|
|
|
</div>
|
|
|
<div class="address">
|
|
|
<div class="title">Address</div>
|
|
|
- <QrCode :tokenChain="currencyInfoData.tokenChain" :rechargeAddress="rechargeAddress"></QrCode>
|
|
|
+ <QrCode :tokenChain="currencyInfoData.tokenChain" :rechargeAddress="rechargeAddress" @copy="copyErCode"></QrCode>
|
|
|
</div>
|
|
|
<div class="notice">
|
|
|
<div class="icon"><img src="../../static/img/icon_warning.svg" /></div>
|
|
@@ -195,7 +195,7 @@
|
|
|
<div class="l">Deposit Amount</div>
|
|
|
<div class="r fontDeposit">${{ usdAmountData.rechargeAmountValue }}</div>
|
|
|
</div>
|
|
|
- <div class="deposit" @click="achPay(false)">Deposit</div>
|
|
|
+ <div class="deposit" @click="achPay(false, '')">Deposit</div>
|
|
|
</div>
|
|
|
<div class="line"></div>
|
|
|
<div class="balance">
|
|
@@ -288,6 +288,7 @@ import { postRequest } from '../../http/index';
|
|
|
import { maskUrl } from '../../utils/help';
|
|
|
import { Dialog, Toast } from 'vant';
|
|
|
import Api from '../../http/api';
|
|
|
+import Report from '../../log-center/log';
|
|
|
|
|
|
export default {
|
|
|
name: 'payment',
|
|
@@ -309,6 +310,7 @@ export default {
|
|
|
achTimer: 0,
|
|
|
maskUrlLink: ``,
|
|
|
usdAmountData: {},
|
|
|
+ Report: Report,
|
|
|
}
|
|
|
},
|
|
|
head() {
|
|
@@ -322,6 +324,7 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.saleInfo()
|
|
|
+ this.reportView(Report.pageSource.nftPaymentPage)
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
clearTimeout(this.currencyTimer);
|
|
@@ -407,6 +410,9 @@ export default {
|
|
|
setTimeout(() => {
|
|
|
this.refreshRotate = false;
|
|
|
}, 1000)
|
|
|
+
|
|
|
+ // report
|
|
|
+ this.reportDepositCashPageClick(Report.objectType.refreshBalanceButton)
|
|
|
}
|
|
|
},
|
|
|
checkCurrencyInfo() {
|
|
@@ -416,6 +422,9 @@ export default {
|
|
|
setTimeout(() => {
|
|
|
this.refreshRotate = false;
|
|
|
}, 1000)
|
|
|
+
|
|
|
+ // report
|
|
|
+ this.reportDepositTokenPageClick(Report.objectType.refreshBalanceButton)
|
|
|
}
|
|
|
},
|
|
|
checkWaitInfo() {
|
|
@@ -437,6 +446,8 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.input.focus();
|
|
|
})
|
|
|
+ this.reportView(Report.pageSource.nftRedeemPage)
|
|
|
+ this.reportPaymentBtnClick(Report.objectType.redeemButton)
|
|
|
},
|
|
|
textInput(e) {
|
|
|
let len = 16
|
|
@@ -492,6 +503,8 @@ export default {
|
|
|
}).finally(() => {
|
|
|
this.redeemNext = true;
|
|
|
})
|
|
|
+
|
|
|
+ this.reportRedeemBtnClick()
|
|
|
},
|
|
|
getAddress() {
|
|
|
postRequest(Api.getTokenRechargeAddress, {
|
|
@@ -562,11 +575,13 @@ export default {
|
|
|
payUSD() {
|
|
|
if (Number(this.usdAmountData.rechargeAmountValue) <= 0) {
|
|
|
this.pay()
|
|
|
+ this.reportDepositCashPageClick(Report.objectType.purchaseNftButton)
|
|
|
}
|
|
|
},
|
|
|
payToken() {
|
|
|
if (Number(this.currencyInfoData.balance) >= Number(this.salePlans.price)) {
|
|
|
this.pay()
|
|
|
+ this.reportDepositTokenPageClick(Report.objectType.purchaseNftButton)
|
|
|
}
|
|
|
},
|
|
|
payError(code) {
|
|
@@ -606,21 +621,26 @@ export default {
|
|
|
deNetPay() {
|
|
|
if (!this.salePlans) return;
|
|
|
|
|
|
- let where;
|
|
|
+ let where, pageSource;
|
|
|
if (this.salePlans.currencyCode === 'USD') {
|
|
|
where = Number(this.usdAmountData.rechargeAmountValue) > 0
|
|
|
+ pageSource = Report.pageSource.nftDepositCashPage
|
|
|
} else {
|
|
|
where = Number(this.salePlans.price) > Number(this.currencyInfoData.balance)
|
|
|
+ pageSource = Report.pageSource.nftDepositTokenPage
|
|
|
}
|
|
|
|
|
|
if (where) {
|
|
|
// 余额不够
|
|
|
this.step = 3;
|
|
|
this.currencyInfoTimer();
|
|
|
+ // Report
|
|
|
+ this.reportView(pageSource);
|
|
|
} else {
|
|
|
// 余额足够
|
|
|
this.step = 2;
|
|
|
}
|
|
|
+ this.reportPaymentBtnClick(Report.objectType.denetPayButton)
|
|
|
},
|
|
|
maskPay() {
|
|
|
if (Number(this.salePlans.price) > Number(this.currencyInfoData.balance)) {
|
|
@@ -642,8 +662,10 @@ export default {
|
|
|
} else {
|
|
|
this.step = 2;
|
|
|
}
|
|
|
+
|
|
|
+ this.reportPaymentBtnClick(Report.objectType.metamaskPayButton)
|
|
|
},
|
|
|
- achPay(modifyStep = true) {
|
|
|
+ achPay(modifyStep = true, objectType = '') {
|
|
|
if (Number(this.usdAmountData.rechargeAmountValue) > 0) {
|
|
|
if (modifyStep) {
|
|
|
this.step = 2;
|
|
@@ -680,6 +702,85 @@ export default {
|
|
|
this.step = 2;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (objectType !== '') {
|
|
|
+ this.reportPaymentBtnClick(objectType)
|
|
|
+ } else {
|
|
|
+ this.reportDepositCashPageClick(Report.objectType.depositButtion)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ copyErCode() {
|
|
|
+ this.reportDepositTokenPageClick(Report.objectType.copyButtion)
|
|
|
+ },
|
|
|
+
|
|
|
+ reportView(pageSource) {
|
|
|
+ Report.log({
|
|
|
+ pageSource,
|
|
|
+ params: {
|
|
|
+ eventData: {
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ },
|
|
|
+ extParams: {
|
|
|
+ userAgent: window.navigator.userAgent,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ reportPaymentBtnClick(objectType) {
|
|
|
+ Report.log({
|
|
|
+ pageSource: Report.pageSource.nftPaymentPage,
|
|
|
+ params: {
|
|
|
+ eventData: {
|
|
|
+ objectType,
|
|
|
+ businessType: Report.businessType.buttonClick,
|
|
|
+ },
|
|
|
+ extParams: {
|
|
|
+ userAgent: window.navigator.userAgent,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ reportRedeemBtnClick() {
|
|
|
+ Report.log({
|
|
|
+ pageSource: Report.pageSource.nftRedeemPage,
|
|
|
+ params: {
|
|
|
+ eventData: {
|
|
|
+ objectType: Report.objectType.redeemButton,
|
|
|
+ businessType: Report.businessType.buttonClick,
|
|
|
+ },
|
|
|
+ extParams: {
|
|
|
+ userAgent: window.navigator.userAgent,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ reportDepositCashPageClick(objectType) {
|
|
|
+ Report.log({
|
|
|
+ pageSource: Report.pageSource.nftDepositCashPage,
|
|
|
+ params: {
|
|
|
+ eventData: {
|
|
|
+ objectType,
|
|
|
+ businessType: Report.businessType.buttonClick,
|
|
|
+ },
|
|
|
+ extParams: {
|
|
|
+ userAgent: window.navigator.userAgent,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ reportDepositTokenPageClick(objectType) {
|
|
|
+ Report.log({
|
|
|
+ pageSource: Report.pageSource.nftDepositTokenPage,
|
|
|
+ params: {
|
|
|
+ eventData: {
|
|
|
+ objectType,
|
|
|
+ businessType: Report.businessType.buttonClick,
|
|
|
+ },
|
|
|
+ extParams: {
|
|
|
+ userAgent: window.navigator.userAgent,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
}
|
|
|
}
|