Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjxcxServer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
zjxcxServer
Commits
343d2f72
Commit
343d2f72
authored
Jul 25, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打开首页埋点
parent
d2195869
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
5 deletions
+53
-5
point.ts
src/biz/point.ts
+2
-2
pointConfig.ts
src/config/pointConfig.ts
+2
-2
point.ts
src/routers/point.ts
+43
-0
router.ts
src/routers/router.ts
+6
-1
No files found.
src/biz/point.ts
View file @
343d2f72
...
...
@@ -25,7 +25,7 @@ export async function addPoint(pointType:number, uid:string, pointId:number, p1,
}
else
if
(
pointId
==
ENTERPRISENODEENUM
.
政策速递
)
{
pointInfo
.
p1
=
p1
;
post
(
url
,
{
pointInfo
,
pointId
},
{
sign
});
}
else
if
(
pointId
==
ENTERPRISENODEENUM
.
登录
)
{
}
else
if
(
pointId
==
ENTERPRISENODEENUM
.
进入首页
)
{
post
(
url
,
{
pointInfo
,
pointId
},
{
sign
});
}
else
{
/**数组类型 or 对象类型 */
...
...
@@ -54,7 +54,7 @@ export async function addPoint(pointType:number, uid:string, pointId:number, p1,
if
(
pointId
==
FUHUAQINODEENUM
.
政策速递
)
{
pointInfo
.
p1
=
p1
;
post
(
url
,
{
pointInfo
,
pointId
},
{
sign
});
}
else
if
(
pointId
==
FUHUAQINODEENUM
.
登录
)
{
}
else
if
(
pointId
==
FUHUAQINODEENUM
.
进入首页
)
{
post
(
url
,
{
pointInfo
,
pointId
},
{
sign
});
}
else
{
pointInfo
.
pid
=
pointId
;
...
...
src/config/pointConfig.ts
View file @
343d2f72
...
...
@@ -17,7 +17,7 @@ export enum FUHUAQINODEENUM {
我的企业
_
孵化状态
,
我的企业
_
占孵面积
,
我的企业
_
补录企业
=
15
,
登录
进入首页
}
...
...
@@ -40,7 +40,7 @@ export enum ENTERPRISENODEENUM {
经营数据补录
_
营业收入
,
经营数据补录
_
研发投入
,
经营数据补录
_
纳税
=
15
,
登录
进入首页
}
...
...
src/routers/point.ts
0 → 100644
View file @
343d2f72
/**
* 用作前端埋点的接口
* 埋点中的登录埋点为 模拟登录埋点 埋点的规则是 进入首页并且不是二级页面返回 (这里要前端判断用户行为)
*/
import
*
as
asyncHandler
from
'express-async-handler'
;
import
{
checkEnterpriseToken
,
checkFuHuaQiToken
}
from
'../middleware/user'
;
import
{
addPoint
}
from
'../biz/point'
;
import
{
FUHUAQINODEENUM
,
POINTTYPEENUM
}
from
'../config/pointConfig'
;
export
function
setRouter
(
httpServer
)
{
/** 孵化器端 */
httpServer
.
post
(
'/point/fuhuaqi/open'
,
checkFuHuaQiToken
,
asyncHandler
(
fuHuaQiLoginPoint
)
);
/**企业端 */
httpServer
.
post
(
'/point/enterprise/open'
,
checkEnterpriseToken
,
asyncHandler
(
enterpriseLoginPoint
)
);
}
/**
* 孵化器登录埋点
* @param req
* @param res
*/
async
function
fuHuaQiLoginPoint
(
req
,
res
)
{
const
Uscc
=
req
.
headers
.
uscc
;
addPoint
(
POINTTYPEENUM
.
孵化器
,
Uscc
,
FUHUAQINODEENUM
.
进入首页
,
null
);
res
.
success
({
isSuccess
:
true
});
}
/**
* 企业登录埋点
* @param req
* @param res
*/
async
function
enterpriseLoginPoint
(
req
,
res
)
{
const
Uscc
=
req
.
headers
.
uscc
;
addPoint
(
POINTTYPEENUM
.
孵化器
,
Uscc
,
FUHUAQINODEENUM
.
进入首页
,
null
);
res
.
success
({
isSuccess
:
true
});
}
src/routers/router.ts
View file @
343d2f72
...
...
@@ -31,7 +31,9 @@ import * as enterpriseMobileDatadeclarationRouters from './enterpriseMobileClien
import
*
as
enterpriseMobileUserRouters
from
'./enterpriseMobileClient/user'
;
import
*
as
enterpriseMobileFinancingRouters
from
'./enterpriseMobileClient/financing'
;
import
*
as
testABIRouters
from
"./mobileClient/testAbi"
import
*
as
testABIRouters
from
"./mobileClient/testAbi"
;
import
*
as
pointRouters
from
"./point"
;
export
function
setRouter
(
httpServer
){
...
...
@@ -69,4 +71,6 @@ export function setRouter(httpServer){
enterpriseMobileFinancingRouters
.
setRouter
(
httpServer
);
/**abi接口 */
testABIRouters
.
setRouter
(
httpServer
);
/**埋点接口 */
pointRouters
.
setRouter
(
httpServer
);
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment