Browse Source

pagesource 修改

harry 1 năm trước cách đây
mục cha
commit
4940084740

+ 7 - 7
src/components/VideoSwiper/index.tsx

@@ -5,8 +5,8 @@ import {
     View, Image, Button
     View, Image, Button
 } from '@tarojs/components'
 } from '@tarojs/components'
 import Route from '@/class/Route'
 import Route from '@/class/Route'
-import { DETAIL_PAGESOURCE, CATEGORY_PAGESOURCE, VIEW_AUTO_TYPE } from '@/const'
-import { videoViewReport, videoPlayReport, videoActionReport, shareContactReport,shareReport, weixinFriend } from '@/logger'
+import { CATEGORY_PAGESOURCE, VIEW_AUTO_TYPE, USER_SHARE_PAGESOURCE } from '@/const'
+import { videoViewReport, videoPlayReport, videoActionReport, shareContactReport, shareReport, weixinFriend } from '@/logger'
 import { once, formatSecondsAsTime } from '@/utils'
 import { once, formatSecondsAsTime } from '@/utils'
 import { VideoInfo, PlayState } from '@/constants/commentTypes'
 import { VideoInfo, PlayState } from '@/constants/commentTypes'
 import { shareTimeline } from '@/shareHelper'
 import { shareTimeline } from '@/shareHelper'
@@ -562,7 +562,7 @@ function logReportVideoView(video, current, index) {
         flowPool: video.flowPool || '',
         flowPool: video.flowPool || '',
         measureId: video.measure || '',
         measureId: video.measure || '',
         measureType: video.measureType || '',
         measureType: video.measureType || '',
-        pageSource: DETAIL_PAGESOURCE,
+        pageSource: video.pageSource || USER_SHARE_PAGESOURCE,
         recommendLogVO: video.recommendLogVO || '',
         recommendLogVO: video.recommendLogVO || '',
         recommendSource: video.recommendSource || '',
         recommendSource: video.recommendSource || '',
         rootPageSource: '', // TODO: 分享之后加上
         rootPageSource: '', // TODO: 分享之后加上
@@ -578,7 +578,7 @@ function logReportVideoPlay(video) {
 
 
     videoPlayReport({
     videoPlayReport({
         videoId: video.id,
         videoId: video.id,
-        pageSource: DETAIL_PAGESOURCE,
+        pageSource: video.pageSource || USER_SHARE_PAGESOURCE,
         rootPageSource: CATEGORY_PAGESOURCE,
         rootPageSource: CATEGORY_PAGESOURCE,
         shareDepth: '', // TODO: 分享之后
         shareDepth: '', // TODO: 分享之后
         rootPageTimestamp: '', // TODO: 分享之后
         rootPageTimestamp: '', // TODO: 分享之后
@@ -602,7 +602,7 @@ function logReportVideoPlaySuccess(video) {
     videoActionReport({
     videoActionReport({
         businessType: 'videoPlaySuccess',
         businessType: 'videoPlaySuccess',
         videoId: video.id,
         videoId: video.id,
-        pageSource: DETAIL_PAGESOURCE,
+        pageSource: video.pageSource || USER_SHARE_PAGESOURCE,
         rootPageSource: CATEGORY_PAGESOURCE,
         rootPageSource: CATEGORY_PAGESOURCE,
         shareDepth: '', // TODO: 分享之后
         shareDepth: '', // TODO: 分享之后
         rootPageTimestamp: '', // TODO: 分享之后
         rootPageTimestamp: '', // TODO: 分享之后
@@ -626,7 +626,7 @@ function logReportVideoRealPlay(video) {
     videoActionReport({
     videoActionReport({
         businessType: 'videoRealPlay',
         businessType: 'videoRealPlay',
         videoId: video.id,
         videoId: video.id,
-        pageSource: DETAIL_PAGESOURCE,
+        pageSource: video.pageSource || USER_SHARE_PAGESOURCE,
         rootPageSource: CATEGORY_PAGESOURCE,
         rootPageSource: CATEGORY_PAGESOURCE,
         shareDepth: '', // TODO: 分享之后
         shareDepth: '', // TODO: 分享之后
         rootPageTimestamp: '', // TODO: 分享之后
         rootPageTimestamp: '', // TODO: 分享之后
@@ -650,7 +650,7 @@ function logReportVideoPlayEnd(video) {
     videoActionReport({
     videoActionReport({
         businessType: 'videoPlayEnd',
         businessType: 'videoPlayEnd',
         videoId: video.id,
         videoId: video.id,
-        pageSource: DETAIL_PAGESOURCE,
+        pageSource: video.pageSource || USER_SHARE_PAGESOURCE,
         rootPageSource: CATEGORY_PAGESOURCE,
         rootPageSource: CATEGORY_PAGESOURCE,
         shareDepth: '', // TODO: 分享之后
         shareDepth: '', // TODO: 分享之后
         rootPageTimestamp: '', // TODO: 分享之后
         rootPageTimestamp: '', // TODO: 分享之后

+ 1 - 8
src/const/index.ts

@@ -4,16 +4,9 @@ export const CATEGORY_ID = 55
 
 
 export const CATEGORY_PAGESOURCE = 'immerse-pages/category'
 export const CATEGORY_PAGESOURCE = 'immerse-pages/category'
 
 
-export const DETAIL_PAGESOURCE = 'immerse-pages/user-videos-detail'
-export const DETAIL_RECOMMEND = 'immerse-pages/detail-recommend'
-
 export const USER_SHARE_PAGESOURCE = 'immerse-pages/user-videos-share'
 export const USER_SHARE_PAGESOURCE = 'immerse-pages/user-videos-share'
-export const RECOMMEND_PAGESOURCE = 'immerse-pages/user-videos-share-recommend-detail'
-
-
-export const DEFAULT_ICON = 'http://weapppiccdn.yishihui.com/wxicon/common/icon_share_collect_x.png'
+export const RECOMMEND_PAGESOURCE = 'immerse-pages/user-videos-share-recommend'
 
 
-export const LIKE_ICON = 'http://weapppiccdn.yishihui.com/wxicon/common/icon_share_collect_s.png'
 
 
 export const USER_SENCE = {
 export const USER_SENCE = {
     share: '0',
     share: '0',

+ 1 - 0
src/http/api/index.ts

@@ -3,6 +3,7 @@ import { BASE_DOMAIN, INVITE_API_DOMAIN, BASE_COMMON_DOMAIN } from './base'
 
 
 function env(BASE_DOMAIN) {
 function env(BASE_DOMAIN) {
     const envApi = Taro.getStorageSync('env')
     const envApi = Taro.getStorageSync('env')
+    // const envApi = 'staging'eih
     return BASE_DOMAIN[envApi || 'production']
     return BASE_DOMAIN[envApi || 'production']
 }
 }
 
 

+ 1 - 1
src/shareHelper/index.ts

@@ -1,7 +1,7 @@
 import Taro from '@tarojs/taro'
 import Taro from '@tarojs/taro'
 import { stringify, S4 } from '@/utils'
 import { stringify, S4 } from '@/utils'
 import useHotLaunch from '@/hooks/useHotLaunch'
 import useHotLaunch from '@/hooks/useHotLaunch'
-import { RECOMMEND_PAGESOURCE, USER_SHARE_PAGESOURCE, CATEGORY_PAGESOURCE, DETAIL_PAGESOURCE, DETAIL_RECOMMEND } from '@/const'
+import { RECOMMEND_PAGESOURCE, USER_SHARE_PAGESOURCE, CATEGORY_PAGESOURCE } from '@/const'
 import { shareReport, weixinFriend, shareClickReport } from '@/logger'
 import { shareReport, weixinFriend, shareClickReport } from '@/logger'
 import { APP_ID, APP_TYPE, VERSION_CODE } from '@/config'
 import { APP_ID, APP_TYPE, VERSION_CODE } from '@/config'