Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e5f75fa9
authored
May 23, 2024
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat 埋点登录添加
1 parent
c2100d63
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
0 deletions
api/api.js
app.js
pages/wxLogin/wxLogin.js
api/api.js
View file @
e5f75fa
...
...
@@ -267,4 +267,14 @@ module.exports = {
data
);
},
/**
* 员工登录日志记录保存
*/
loginRecordSave
(
data
)
{
return
api
.
post
(
"dj.api.smartcarlife.staff.login.record.save"
,
data
);
},
};
app.js
View file @
e5f75fa
...
...
@@ -103,6 +103,9 @@ App({
// wx.reLaunch({url: '/pages/accountItems/accountItems'})
util
.
setSessionId
(
data
?.
sessionId
)
wx
.
reLaunch
({
url
:
'/pages/loading/loading'
})
// let { uuid } = wx.$util.getUserInfo()
let
now
=
new
Date
()
api
.
loginRecordSave
({
staffUuid
:
data
.
noSignInUuid
,
loginTime
:
now
.
format
(
'yyyy-MM-dd hh:mm:ss'
)
})
return
}
else
{
util
.
removeStorage
()
...
...
pages/wxLogin/wxLogin.js
View file @
e5f75fa
...
...
@@ -449,6 +449,10 @@ Page({
if
(
num
==
0
)
wx
.
$router
.
reLaunch
(
pageUrl
[
num
])
else
wx
.
$router
.
go
(
pageUrl
[
num
])
this
.
setData
({
jumpPageFlag
:
false
})
// console.log(wx.$util.getUserInfo(), 'wx.$util.getUserInfo()');
let
{
uuid
}
=
wx
.
$util
.
getUserInfo
()
let
now
=
new
Date
()
api
.
loginRecordSave
({
staffUuid
:
uuid
,
loginTime
:
now
.
format
(
'yyyy-MM-dd hh:mm:ss'
)
})
}
},
...
...
@@ -466,6 +470,9 @@ Page({
})
wx
.
$router
.
go
(
'pages.sceneIndex'
)
this
.
setData
({
jumpPageFlag
:
false
})
let
{
uuid
}
=
wx
.
$util
.
getUserInfo
()
let
now
=
new
Date
()
api
.
loginRecordSave
({
staffUuid
:
uuid
,
loginTime
:
now
.
format
(
'yyyy-MM-dd hh:mm:ss'
)
})
return
}
// 仅一家4s店
...
...
@@ -490,12 +497,18 @@ Page({
})
wx
.
$router
.
go
(
'pages.sceneIndex'
)
this
.
setData
({
jumpPageFlag
:
false
})
let
{
uuid
}
=
wx
.
$util
.
getUserInfo
()
let
now
=
new
Date
()
api
.
loginRecordSave
({
staffUuid
:
uuid
,
loginTime
:
now
.
format
(
'yyyy-MM-dd hh:mm:ss'
)
})
}
else
if
(
!
result
?.
length
)
{
this
.
setData
({
jumpPageFlag
:
false
})
return
wx
.
$util
.
showToast
(
'园区店关联的4s店商户账号无效,请联系总部管理员'
)
}
else
{
wx
.
$router
.
go
(
pageUrl
)
this
.
setData
({
jumpPageFlag
:
false
})
let
{
uuid
}
=
wx
.
$util
.
getUserInfo
()
let
now
=
new
Date
()
api
.
loginRecordSave
({
staffUuid
:
uuid
,
loginTime
:
now
.
format
(
'yyyy-MM-dd hh:mm:ss'
)
})
}
})
},
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment