|
@@ -110,6 +110,7 @@ import { ElMessage } from 'element-plus'
|
|
|
import { onMounted, reactive, inject, ref, nextTick, watchEffect } from "vue";
|
|
|
import { getNftMysteryBoxSaleInfo, redeemNft } from "@/http/nft";
|
|
|
import BtnLoading from '../components/btn-loading.vue'
|
|
|
+import Report from "@/log-center/log"
|
|
|
import { getQueryString } from "@/uilts/help";
|
|
|
import { sendChromeTabMessage } from '@/uilts/chromeExtension.js';
|
|
|
let pay_info = inject('pay_info');
|
|
@@ -185,6 +186,15 @@ const redeemPost = () => {
|
|
|
pay_info.buy_items = data
|
|
|
sendChromeTabMessage({ actionType: "FINISH_GROUP_BANNNER" }, () => { })
|
|
|
router.push({ path: '/open_box' });
|
|
|
+ // report
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.nftShopPage,
|
|
|
+ businessType: Report.businessType.buttonClick,
|
|
|
+ objectType: Report.objectType.redeem_button,
|
|
|
+ nftProjectId: projectId.value,
|
|
|
+ }, {
|
|
|
+ result: 'success'
|
|
|
+ })
|
|
|
} else {
|
|
|
let msg = ''
|
|
|
switch (res.code.toString()) {
|
|
@@ -203,6 +213,11 @@ const redeemPost = () => {
|
|
|
case '5103':
|
|
|
msg = 'Purchase limit reached'
|
|
|
break
|
|
|
+ case '5104':
|
|
|
+ case '5105':
|
|
|
+ case '5106':
|
|
|
+ msg = 'Invalid redemption code'
|
|
|
+ break;
|
|
|
default:
|
|
|
msg = 'Invalid redemption code, please try again'
|
|
|
console.log(res.msg)
|
|
@@ -212,6 +227,15 @@ const redeemPost = () => {
|
|
|
type: 'warning'
|
|
|
})
|
|
|
redeemNext.value = true;
|
|
|
+ // report
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.nftShopPage,
|
|
|
+ businessType: Report.businessType.buttonClick,
|
|
|
+ objectType: Report.objectType.redeem_button,
|
|
|
+ nftProjectId: projectId.value,
|
|
|
+ }, {
|
|
|
+ result: 'fail'
|
|
|
+ })
|
|
|
}
|
|
|
}).catch(() => {
|
|
|
ElMessage({
|
|
@@ -227,6 +251,13 @@ const showRedeemLayer = () => {
|
|
|
nextTick(() => {
|
|
|
refInput.value.focus()
|
|
|
})
|
|
|
+ // report
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.nftShopPage,
|
|
|
+ businessType: Report.businessType.buttonClick,
|
|
|
+ objectType: Report.objectType.redeem_button,
|
|
|
+ nftProjectId: projectId.value,
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const hideRedeemLayer = () => {
|
|
@@ -279,6 +310,13 @@ onMounted(() => {
|
|
|
}).catch(() => {
|
|
|
|
|
|
})
|
|
|
+
|
|
|
+ // report
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.nftShopPage,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ nftProjectId: nft_project_Id
|
|
|
+ })
|
|
|
})
|
|
|
</script>
|
|
|
|