|
@@ -96,6 +96,7 @@ let state = reactive({
|
|
|
|
|
|
let dom = {}
|
|
|
let nftAuthINfo = ref(null)
|
|
|
+let loadTime = (new Date).getTime()
|
|
|
|
|
|
let props = defineProps({
|
|
|
pre_view: {
|
|
@@ -153,12 +154,6 @@ onMounted(() => {
|
|
|
} else {
|
|
|
state.status = '加载'
|
|
|
getDetail()
|
|
|
- // report
|
|
|
- Report.reportLog({
|
|
|
- redPacketType: Report.redPacketType.postEditor,
|
|
|
- businessType: Report.businessType.pageView,
|
|
|
- pageSource: Report.pageSource.pe_loading_page,
|
|
|
- });
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -221,7 +216,17 @@ const getDetail = () => {
|
|
|
getNftInfoStatus()
|
|
|
}
|
|
|
})
|
|
|
+ } else {
|
|
|
+ reportSucc(false)
|
|
|
}
|
|
|
+ // report
|
|
|
+ Report.reportLog({
|
|
|
+ redPacketType: Report.redPacketType.postEditor,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ pageSource: Report.pageSource.pe_loading_page,
|
|
|
+ postId: state.postId || '',
|
|
|
+ postEditorUrl: state.detail.convertUrl
|
|
|
+ });
|
|
|
} else {
|
|
|
state.status = '网页错误'
|
|
|
}
|
|
@@ -241,12 +246,48 @@ const getNftInfoStatus = () => {
|
|
|
getChromeStorage('post_id_list', (list) => {
|
|
|
if (list && list.indexOf(state.postId) !== -1 && nftAuthINfo.value?.certStatus === 1) {
|
|
|
state.showMask = false;
|
|
|
+ // report
|
|
|
+ reportSucc()
|
|
|
+ } else {
|
|
|
+ // report
|
|
|
+ reportFail()
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+const reportSucc = (isEncrypted = true) => {
|
|
|
+ let params = {}
|
|
|
+ if (isEncrypted) {
|
|
|
+ params['nft-encrypted-status'] = 1;
|
|
|
+ }
|
|
|
+ // report
|
|
|
+ Report.reportLog({
|
|
|
+ redPacketType: Report.redPacketType.postEditor,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ pageSource: Report.pageSource.pe_display_page,
|
|
|
+ postId: state.postId || '',
|
|
|
+ postEditorUrl: state.detail.convertUrl,
|
|
|
+ ...params,
|
|
|
+ }, {
|
|
|
+ 'loading-time': (new Date).getTime() - loadTime,
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+const reportFail = () => {
|
|
|
+ Report.reportLog({
|
|
|
+ redPacketType: Report.redPacketType.postEditor,
|
|
|
+ businessType: Report.businessType.pageView,
|
|
|
+ pageSource: Report.pageSource.pe_display_page,
|
|
|
+ postId: state.postId || '',
|
|
|
+ postEditorUrl: state.detail.convertUrl,
|
|
|
+ 'nft-encrypted-status': 0,
|
|
|
+ }, {
|
|
|
+ 'loading-time': (new Date).getTime() - loadTime,
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
const confirmStatus = () => {
|
|
|
getChromeStorage('userInfo', (_userInfo) => {
|
|
|
if (!_userInfo) {
|
|
@@ -269,6 +310,25 @@ const confirmStatus = () => {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+ // report
|
|
|
+ let params = {}
|
|
|
+ if (nftAuthINfo.value?.certStatus === 1) {
|
|
|
+ if (state.showMask) {
|
|
|
+ params['nft-encrypted-status'] = 0
|
|
|
+ } else {
|
|
|
+ params['nft-encrypted-status'] = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Report.reportLog({
|
|
|
+ redPacketType: Report.redPacketType.postEditor,
|
|
|
+ businessType: Report.businessType.buttonClick,
|
|
|
+ pageSource: Report.pageSource.pe_display_page,
|
|
|
+ objectType: Report.objectType.encrypte_nft_button,
|
|
|
+ postId: state.postId || '',
|
|
|
+ postEditorUrl: state.detail.convertUrl,
|
|
|
+ ...params,
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
const succBack = () => {
|
|
@@ -318,6 +378,25 @@ const clickFixed = () => {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+ // report
|
|
|
+ let params = {}
|
|
|
+ if (nftAuthINfo.value?.certStatus === 1) {
|
|
|
+ if (state.showMask) {
|
|
|
+ params['nft-encrypted-status'] = 0
|
|
|
+ } else {
|
|
|
+ params['nft-encrypted-status'] = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Report.reportLog({
|
|
|
+ redPacketType: Report.redPacketType.postEditor,
|
|
|
+ businessType: Report.businessType.buttonClick,
|
|
|
+ pageSource: Report.pageSource.pe_display_page,
|
|
|
+ objectType: Report.objectType.top_right_button,
|
|
|
+ postId: state.postId || '',
|
|
|
+ postEditorUrl: state.detail.convertUrl,
|
|
|
+ ...params,
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
// 固定
|
|
@@ -386,6 +465,24 @@ const clickFull = () => {
|
|
|
state.show_alert = true
|
|
|
}
|
|
|
})
|
|
|
+ // report
|
|
|
+ let params = {}
|
|
|
+ if (nftAuthINfo.value?.certStatus === 1) {
|
|
|
+ if (state.showMask) {
|
|
|
+ params['nft-encrypted-status'] = 0
|
|
|
+ } else {
|
|
|
+ params['nft-encrypted-status'] = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Report.reportLog({
|
|
|
+ redPacketType: Report.redPacketType.postEditor,
|
|
|
+ businessType: Report.businessType.buttonClick,
|
|
|
+ pageSource: Report.pageSource.pe_display_page,
|
|
|
+ objectType: Report.objectType.fullscreen_button,
|
|
|
+ postId: state.postId || '',
|
|
|
+ postEditorUrl: state.detail.convertUrl,
|
|
|
+ ...params,
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
const msgListener = (req, sender, sendResponse) => {
|