Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
ai-card
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5ce12af6
authored
Sep 13, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
83ff14ec
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
24 deletions
app.js
components/UserInfo/UserInfo.wxss
pages/tab/index/index.js
pages/tab/index/index.wxml
pages/tab/index/index.wxss
utils/Track.js
app.js
View file @
5ce12af
...
...
@@ -39,6 +39,7 @@ App({
wx
.
$authStatus
=
res
.
code
!=
0
util
.
setSessionId
(
res
.
data
.
sessionId
)
const
openId
=
res
.
data
.
openId
util
.
setStorageSync
(
'openId'
,
openId
)
ssoApi
.
getUserInfo
({
openId
}).
then
(
result
=>
{
...
...
@@ -53,19 +54,20 @@ App({
resolve
(
result
)
}
})
if
(
wx
.
$trackData
.
scene
)
{
_this
.
getScene
(
wx
.
$trackData
.
scene
).
then
(
res
=>
{
wx
.
$trackData
.
merchant
=
res
.
merchantId
wx
.
$trackData
.
cardId
=
res
.
cardId
const
systemInfo
=
JSON
.
parse
(
wx
.
getStorageSync
(
'aicard_system_info'
))
wx
.
$trackData
.
type
=
systemInfo
.
environment
?
2
:
1
wx
.
$Track
.
sendTrack
(
trackData
.
COMPANY
,
openId
)
})
}
}).
catch
(()
=>
{
wx
.
$authStatus
=
true
reject
()
})
if
(
wx
.
$trackData
.
scene
)
{
_this
.
getScene
(
wx
.
$trackData
.
scene
).
then
(
res
=>
{
wx
.
$trackData
.
merchant
=
res
.
merchantId
wx
.
$trackData
.
cardId
=
res
.
cardId
const
systemInfo
=
JSON
.
parse
(
wx
.
getStorageSync
(
'aicard_system_info'
))
wx
.
$trackData
.
type
=
systemInfo
.
environment
?
2
:
1
wx
.
$Track
.
sendTrack
(
trackData
.
COMPANY
)
})
}
}
})
})
...
...
components/UserInfo/UserInfo.wxss
View file @
5ce12af
...
...
@@ -46,14 +46,14 @@
margin-top: 24rpx;
}
.user-name .name {
font-size: 4
8
rpx;
font-size: 4
4
rpx;
color: #111111;
line-height: 72rpx;
}
.user-name .position {
font-weight: 400;
font-size: 2
8
rpx;
font-size: 2
6
rpx;
color: #6E6E7A;
margin-left: 20rpx;
}
...
...
pages/tab/index/index.js
View file @
5ce12af
...
...
@@ -66,6 +66,10 @@ Page({
switch
(
curTabIndex
)
{
case
2
:
console
.
log
(
"跳转直播"
);
wx
.
openChannelsActivity
({
finderUserName
:
'sphPIdcy0NVpuao'
,
feedId
:
'export/UzFfAgtgekIEAQAAAAAAOQ8BJrsjzwAAAAstQy6ubaLX4KHWvLEZgBPEmIEUOQV4c62CzNPgMJqRnrGh3TfaajoIU4mGBiio'
})
wx
.
$Track
.
sendTrack
(
trackData
.
VIDEO
);
break
;
default
:
...
...
@@ -97,9 +101,16 @@ Page({
.
login
()
.
then
(({
data
})
=>
{
wx
.
hideLoading
()
this
.
setData
({
hasUserInfo
:
!!
data
,
});
if
(
data
&&
data
.
nickName
)
{
this
.
setData
({
hasUserInfo
:
true
,
});
}
else
{
this
.
setData
({
hasUserInfo
:
false
})
}
if
(
data
&&
data
.
phone
)
{
this
.
setData
({
hasPhoneNumber
:
true
,
...
...
pages/tab/index/index.wxml
View file @
5ce12af
...
...
@@ -43,6 +43,6 @@
<view wx:if="{{!hasUserInfo}}" class="user-profile" bindtap="getUserProfile"></view>
<!-- 服务咨询 -->
<view bindtap="goConsult">
<image
mode="widthFix" class="icon-consult" webp
src="{{IMGURL}}home/custom.png"></image>
<image
class="icon-consult"
src="{{IMGURL}}home/custom.png"></image>
</view>
</view>
\ No newline at end of file
pages/tab/index/index.wxss
View file @
5ce12af
...
...
@@ -88,7 +88,8 @@ page {
}
.icon-consult {
width: 90rpx;
width: 128rpx;
height: 128rpx;
position: fixed;
right: 6rpx;
bottom: 90rpx;
...
...
utils/Track.js
View file @
5ce12af
...
...
@@ -120,7 +120,7 @@ class TRACK {
return
guest_no
}
/**定时发送埋点数据 */
sendTrack
(
p
)
{
sendTrack
(
p
,
openId
)
{
console
.
log
(
wx
.
$trackData
)
let
params
=
{
method
:
'entmicro.api.business.card.cardRecord'
,
...
...
@@ -128,14 +128,24 @@ class TRACK {
merchant
:
wx
.
$trackData
.
merchant
,
type
:
wx
.
$trackData
.
type
}
// const userInfo =
const
{
nickName
,
openId
,
unionId
,
phone
}
=
wx
.
$util
.
getUserInfo
()
||
{}
const
userInfo
=
{
nickName
,
openId
,
unionId
,
phone
,
let
userInfo
=
{
}
if
(
wx
.
$util
.
getUserInfo
())
{
const
{
nickName
,
openId
,
unionId
,
phone
}
=
wx
.
$util
.
getUserInfo
()
||
{}
userInfo
=
{
nickName
,
openId
,
unionId
,
phone
,
}
}
else
{
if
(
openId
)
{
userInfo
.
openId
=
openId
}
else
{
userInfo
.
openId
=
wx
.
$util
.
getStorageSync
(
'openId'
)
}
}
params
=
Object
.
assign
(
params
,
userInfo
,
p
)
console
.
log
(
params
)
api
.
reportTrack
(
params
).
then
(({
...
...
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