|
@@ -23,7 +23,7 @@
|
|
|
<img :src="require('@/assets/gif/red-right.gif')" alt class="red-right"
|
|
|
v-show="!data.done.follow && data.done.follow_red" />
|
|
|
<img v-if="data.done.follow" :src="require('@/assets/svg/icon-true.svg')" alt />
|
|
|
- <div v-else class="btn" @click="clickFollowAll(item.relatedUsers)">Follow All</div>
|
|
|
+ <div v-else class="btn" @click="clickFollowAll(item.relatedUsers, 'all')">Follow All</div>
|
|
|
</div>
|
|
|
<div class="item-follow-area">
|
|
|
<template v-for="item2, i in item.relatedUsers" v-bind:key="i">
|
|
@@ -47,7 +47,7 @@
|
|
|
<img :src="require('@/assets/gif/red-right.gif')" alt class="red-right"
|
|
|
v-show="!data.done.like && data.done.like_red" />
|
|
|
<img v-if="data.done.like" :src="require('@/assets/svg/icon-true.svg')" alt />
|
|
|
- <div v-else class="btn" @click="clickLickBtn">Like</div>
|
|
|
+ <div v-else class="btn" @click="clickLikeBtn">Like</div>
|
|
|
</template>
|
|
|
<template v-if="item.type == 3">
|
|
|
<img :src="require('@/assets/svg/icon-retweet.svg')" alt />
|
|
@@ -246,6 +246,8 @@ import { getQueryString } from '@/uilts/help.js'
|
|
|
import { message } from 'ant-design-vue';
|
|
|
import FontAmount from '@/view/components/font-amount.vue'
|
|
|
import { getChromeStorage } from '@/uilts/chromeExtension.js'
|
|
|
+import Report from "@/logcenter/log"
|
|
|
+
|
|
|
var moment = require('moment');
|
|
|
|
|
|
let data = reactive({
|
|
@@ -269,7 +271,7 @@ let data = reactive({
|
|
|
function clickRetry() {
|
|
|
init()
|
|
|
}
|
|
|
-async function clickLickBtn() {
|
|
|
+async function clickLikeBtn() {
|
|
|
let _userInfo = await checkIsLogin()
|
|
|
if (!_userInfo) {
|
|
|
return
|
|
@@ -292,9 +294,21 @@ async function clickLickBtn() {
|
|
|
console.log(res)
|
|
|
}
|
|
|
})
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ objectType: Report.objectType.like,
|
|
|
+ pageSource: Report.pageSource.task_page,
|
|
|
+ businessType: Report.businessType.buttonClick
|
|
|
+ });
|
|
|
}
|
|
|
function clickDone() {
|
|
|
window.open(`${chrome.runtime.getURL('/iframe/home.html')}`)
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ objectType: Report.objectType.wallet_button,
|
|
|
+ pageSource: Report.pageSource.received_success_page,
|
|
|
+ businessType: Report.businessType.buttonClick
|
|
|
+ });
|
|
|
}
|
|
|
function handleScroll(e) {
|
|
|
if (data.luck_list_end) {
|
|
@@ -353,6 +367,12 @@ async function clickRetweetBtn() {
|
|
|
console.log(res)
|
|
|
}
|
|
|
})
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ objectType: Report.objectType.retweet,
|
|
|
+ pageSource: Report.pageSource.task_page,
|
|
|
+ businessType: Report.businessType.buttonClick
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
|
|
@@ -387,7 +407,7 @@ function getValidity() {
|
|
|
}, 1000)
|
|
|
}
|
|
|
|
|
|
-async function clickFollowAll(item) {
|
|
|
+async function clickFollowAll(item, is_all) {
|
|
|
let _userInfo = await checkIsLogin()
|
|
|
if (!_userInfo) {
|
|
|
return
|
|
@@ -423,6 +443,17 @@ async function clickFollowAll(item) {
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
+ let _log_obj = {
|
|
|
+ pageSource: Report.pageSource.task_page,
|
|
|
+ businessType: Report.businessType.buttonClick,
|
|
|
+ objectType: Report.objectType.follow
|
|
|
+ }
|
|
|
+ if (is_all) {
|
|
|
+ // 埋点
|
|
|
+ _log_obj.objectType = Report.objectType.follow_button
|
|
|
+ }
|
|
|
+ Report.reportLog(_log_obj);
|
|
|
+
|
|
|
}
|
|
|
// 我领取了的状态
|
|
|
function myReceivedState() {
|
|
@@ -437,6 +468,11 @@ function myReceivedState() {
|
|
|
if (data.detail.totalCount == data.detail.receiveCount) {
|
|
|
data.status = 'close'
|
|
|
data.close_text = ['All the rewards have', 'been taken out, come', 'earlier next time! ']
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.been_claimed_page,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
// 我领取未完成
|
|
@@ -446,14 +482,29 @@ function myReceivedState() {
|
|
|
data.detail.taskCondition = JSON.parse(data.detail.taskCondition)
|
|
|
data.detail.amountValue = showLastTwoPlace(data.detail.amountValue)
|
|
|
data.detail.receiveAmountValue = showLastTwoPlace(data.detail.receiveAmountValue)
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.task_page,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ });
|
|
|
|
|
|
// 大红包不能领取了 and 我的红包过期了
|
|
|
} else if (data.detail.receiveTimeExpired && data.detail.myReceived.taskFinishStatus == 2) {
|
|
|
data.status = 'close'
|
|
|
data.close_text = ['This Giveaways', `expired on ${moment(data.detail.endTimestamp).format('MM-DD')}`]
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.expired_page,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ });
|
|
|
// 我领取成功了
|
|
|
} else if (data.detail.myReceived.taskFinishStatus == 1) {
|
|
|
data.status = 'success'
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.received_success_page,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -481,7 +532,10 @@ function init() {
|
|
|
// 红包未开始
|
|
|
if (data.detail.status == 0) {
|
|
|
data.status = 'not-open'
|
|
|
-
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.pending_page,
|
|
|
+ businessType: Report.businessType.pageView
|
|
|
+ });
|
|
|
// 任务进行中
|
|
|
} else if (data.detail.status == 1) {
|
|
|
data.status = 'not-open'
|
|
@@ -489,15 +543,24 @@ function init() {
|
|
|
if (data.detail.myReceived) {
|
|
|
myReceivedState()
|
|
|
} else {
|
|
|
- // 大红包不可以领取了
|
|
|
- if (data.detail.receiveTimeExpired) {
|
|
|
- data.status = 'close'
|
|
|
- data.close_text = [`This Giveaways`, `expired on ${moment(data.detail.endTimestamp).format('MM-DD')}`]
|
|
|
- }
|
|
|
// 任务已经被领完了
|
|
|
if (data.detail.totalCount == data.detail.receiveCount) {
|
|
|
data.status = 'close'
|
|
|
data.close_text = ['All the rewards have', 'been taken out, come', 'earlier next time! ']
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.been_claimed_page,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ });
|
|
|
+ } else if (data.detail.receiveTimeExpired) {
|
|
|
+ // 大红包不可以领取了
|
|
|
+ data.status = 'close'
|
|
|
+ data.close_text = [`This Giveaways`, `expired on ${moment(data.detail.endTimestamp).format('MM-DD')}`]
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.expired_page,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -509,6 +572,10 @@ function init() {
|
|
|
} else {
|
|
|
data.status = 'close'
|
|
|
data.close_text = [`This Giveaways`, `expired on ${moment(data.detail.endTimestamp).format('MM-DD')}`]
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.expired_page,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
@@ -569,6 +636,10 @@ function handleRedPacket() {
|
|
|
if (res.code == 0) {
|
|
|
data.status = 'opened'
|
|
|
data.money = res.data.receiveAmount
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.task_page,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ });
|
|
|
init()
|
|
|
} else {
|
|
|
handleErrorCode(res)
|
|
@@ -612,6 +683,12 @@ async function clickGetGiveaways() {
|
|
|
let _userInfo = await checkIsLogin()
|
|
|
if (_userInfo) {
|
|
|
handleFinishRedPacket()
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.pending_page,
|
|
|
+ businessType: Report.businessType.buttonClick,
|
|
|
+ objectType: Report.objectType.open_button
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -627,6 +704,20 @@ function handleFinishRedPacket() {
|
|
|
if (res.data.finished) {
|
|
|
data.status = 'success'
|
|
|
data.receiveAmount = res.data.receiveAmount
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.task_page,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ objectType: Report.objectType.get_giveaway
|
|
|
+ }, {
|
|
|
+ get_giveaway_result: Report.extParams.success
|
|
|
+ });
|
|
|
+
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.received_success_page,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ });
|
|
|
init()
|
|
|
} else {
|
|
|
let _data = res.data.conditionResult
|
|
@@ -660,8 +751,24 @@ function handleFinishRedPacket() {
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.task_page,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ objectType: Report.objectType.get_giveaway
|
|
|
+ }, {
|
|
|
+ get_giveaway_result: Report.extParams.failure
|
|
|
+ });
|
|
|
}
|
|
|
} else {
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.task_page,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ objectType: Report.objectType.get_giveaway
|
|
|
+ }, {
|
|
|
+ get_giveaway_result: Report.extParams.failure
|
|
|
+ });
|
|
|
handleErrorCode(res)
|
|
|
}
|
|
|
})
|
|
@@ -718,12 +825,22 @@ function handleErrorCode(res) {
|
|
|
case '2007':
|
|
|
data.status = 'close'
|
|
|
data.close_text = ['All the rewards have', 'been taken out, come', 'earlier next time! ']
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.been_claimed_page,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ });
|
|
|
init()
|
|
|
break
|
|
|
// 红包个数已经被领取完了
|
|
|
case '2008':
|
|
|
data.status = 'close'
|
|
|
data.close_text = ['All the rewards have', 'been taken out, come', 'earlier next time! ']
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.been_claimed_page,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ });
|
|
|
init()
|
|
|
break
|
|
|
// 该用户不满足领取条件
|
|
@@ -731,6 +848,11 @@ function handleErrorCode(res) {
|
|
|
data.error_txt = [`oops, new accounts cannot participate in this event,`]
|
|
|
data.status = 'error'
|
|
|
data.retry = true
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.robot_detection_failed_page,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ });
|
|
|
break
|
|
|
// 无法校验用户Twitter信息
|
|
|
case '2010':
|
|
@@ -780,10 +902,26 @@ function handleErrorCode(res) {
|
|
|
|
|
|
function clickBack() {
|
|
|
data.status = 'opened'
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.task_page,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
function clickRoad() {
|
|
|
data.status = 'luck-peopel-list'
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.task_page,
|
|
|
+ businessType: Report.businessType.buttonClick,
|
|
|
+ objectType: Report.objectType.received_list
|
|
|
+ });
|
|
|
+ // 埋点
|
|
|
+ Report.reportLog({
|
|
|
+ pageSource: Report.pageSource.received_list_page,
|
|
|
+ businessType: Report.businessType.pageView
|
|
|
+ });
|
|
|
}
|
|
|
</script>
|
|
|
|