From b62bc2537093f6fda13eb26589de71bee44a22fc Mon Sep 17 00:00:00 2001
From: qiukai <123456@qq.com>
Date: Wed, 27 Nov 2024 08:43:17 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E7=89=B9=E8=89=B2=E4=B8=93=E5=8C=BA?=
=?UTF-8?q?=E5=89=8D=E7=AB=AF=E5=9F=8B=E7=82=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/Information/Pages/help.jsx | 12 ++++
src/forge/Information/Pages/homepage/uos.jsx | 15 ++++-
src/forge/Information/Pages/main.jsx | 13 +++-
src/forge/Information/Pages/newsDetail.jsx | 12 ++++
src/forge/Information/Pages/projectSource.jsx | 13 +++-
src/forge/Information/Pages/source.jsx | 13 ++++
src/forge/Information/Pages/sourceDetail.jsx | 13 ++++
src/forge/Information/Pages/zoneVIP.jsx | 13 ++++
src/forge/Information/api.js | 8 +++
src/forge/Information/index.jsx | 6 +-
src/forge/Information/utils.js | 63 +++++++++++++++++++
11 files changed, 175 insertions(+), 6 deletions(-)
create mode 100644 src/forge/Information/utils.js
diff --git a/src/forge/Information/Pages/help.jsx b/src/forge/Information/Pages/help.jsx
index 62ebcefb..f1f2952c 100644
--- a/src/forge/Information/Pages/help.jsx
+++ b/src/forge/Information/Pages/help.jsx
@@ -9,6 +9,8 @@ import RenderHtml from '../../../components/render-html';
import { Base64 } from 'js-base64';
import { getTocContent } from '../../../common/marked';
import TreeByWikiSidebar from '../../Wiki/components/treeByWikiSidebar';
+import {getUniqueIdentifier,getUserName,getBrowserPlatform,getBrowserBrand} from '../utils';
+import {setZoneVisits} from '../api'
function ProjectSource(props) {
const [loading, setLoading] = useState(false);
@@ -102,7 +104,17 @@ function ProjectSource(props) {
})
}, [wikiDetail])
+
useEffect(() =>{
+ //浏览埋点
+ let uuid = getUniqueIdentifier()
+ let url = props.location.pathname
+ let platform = getBrowserPlatform()
+ let browser = getBrowserBrand()
+ let username = getUserName(props.current_user)
+ // if(!username) uuid = getUniqueIdentifier()
+ let remark = ` 操作系统:${platform};浏览器:${browser};`
+ setZoneVisits({url,username,uuid,remark})
// 点击事件
const handleClick = (event) => {
let target = event.target;
diff --git a/src/forge/Information/Pages/homepage/uos.jsx b/src/forge/Information/Pages/homepage/uos.jsx
index a83dc33c..b00f9abf 100644
--- a/src/forge/Information/Pages/homepage/uos.jsx
+++ b/src/forge/Information/Pages/homepage/uos.jsx
@@ -1,4 +1,4 @@
-import React,{ } from 'react';
+import React,{ useEffect , useState } from 'react';
import Introduction from './component/introduction';
import News from './component/news';
import Project from './component/project';
@@ -8,8 +8,21 @@ import Partner from './component/partner';
import SpecialProjects from './component/specialProjects';
import '../../indexZone1.scss'
import './index.scss'
+import {getUniqueIdentifier,getUserName,getBrowserPlatform,getBrowserBrand} from '../../utils'
+import {setZoneVisits} from '../../api'
+
function HeaderPageUos(props){
+ useEffect(()=>{
+ let uuid = getUniqueIdentifier()
+ let url = props.location.pathname
+ let platform = getBrowserPlatform()
+ let browser = getBrowserBrand()
+ let username = getUserName(props.current_user)
+ // if(!username) uuid = getUniqueIdentifier()
+ let remark = ` 操作系统:${platform};浏览器:${browser};`
+ setZoneVisits({url,username,uuid,remark})
+ },[])
const { data } = props;
return(
diff --git a/src/forge/Information/Pages/main.jsx b/src/forge/Information/Pages/main.jsx
index ff5659fc..35e7407f 100644
--- a/src/forge/Information/Pages/main.jsx
+++ b/src/forge/Information/Pages/main.jsx
@@ -13,6 +13,8 @@ import DefaultImg from '../Component/defaultImg';
import { getNewsAllList , getNewsHotList } from '../api';
import { tempConfig, tempEnum } from '../tempInfo';
import { httpUrl } from '../fetch';
+import {getUniqueIdentifier,getUserName,getBrowserPlatform,getBrowserBrand} from '../utils';
+import {setZoneVisits} from '../api'
function Main(props){
@@ -26,7 +28,16 @@ function Main(props){
const { deptId , cateId } = props.match.params;
const { id, temp, role, history, sectionCmsTitle } = props;
-
+ useEffect(()=>{
+ let uuid = getUniqueIdentifier()
+ let url = props.location.pathname
+ let platform = getBrowserPlatform()
+ let browser = getBrowserBrand()
+ let username = getUserName(props.current_user)
+ // if(!username) uuid = getUniqueIdentifier()
+ let remark = ` 操作系统:${platform};浏览器:${browser};`
+ setZoneVisits({url,username,uuid,remark})
+ },[])
const menu = (