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
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
14 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({
...
@@ -39,6 +39,7 @@ App({
wx
.
$authStatus
=
res
.
code
!=
0
wx
.
$authStatus
=
res
.
code
!=
0
util
.
setSessionId
(
res
.
data
.
sessionId
)
util
.
setSessionId
(
res
.
data
.
sessionId
)
const
openId
=
res
.
data
.
openId
const
openId
=
res
.
data
.
openId
util
.
setStorageSync
(
'openId'
,
openId
)
ssoApi
.
getUserInfo
({
ssoApi
.
getUserInfo
({
openId
openId
}).
then
(
result
=>
{
}).
then
(
result
=>
{
...
@@ -53,19 +54,20 @@ App({
...
@@ -53,19 +54,20 @@ App({
resolve
(
result
)
resolve
(
result
)
}
}
})
})
}).
catch
(()
=>
{
wx
.
$authStatus
=
true
reject
()
})
if
(
wx
.
$trackData
.
scene
)
{
if
(
wx
.
$trackData
.
scene
)
{
_this
.
getScene
(
wx
.
$trackData
.
scene
).
then
(
res
=>
{
_this
.
getScene
(
wx
.
$trackData
.
scene
).
then
(
res
=>
{
wx
.
$trackData
.
merchant
=
res
.
merchantId
wx
.
$trackData
.
merchant
=
res
.
merchantId
wx
.
$trackData
.
cardId
=
res
.
cardId
wx
.
$trackData
.
cardId
=
res
.
cardId
const
systemInfo
=
JSON
.
parse
(
wx
.
getStorageSync
(
'aicard_system_info'
))
const
systemInfo
=
JSON
.
parse
(
wx
.
getStorageSync
(
'aicard_system_info'
))
wx
.
$trackData
.
type
=
systemInfo
.
environment
?
2
:
1
wx
.
$trackData
.
type
=
systemInfo
.
environment
?
2
:
1
wx
.
$Track
.
sendTrack
(
trackData
.
COMPANY
)
wx
.
$Track
.
sendTrack
(
trackData
.
COMPANY
,
openId
)
})
})
}
}
}).
catch
(()
=>
{
wx
.
$authStatus
=
true
reject
()
})
}
}
})
})
})
})
...
...
components/UserInfo/UserInfo.wxss
View file @
5ce12af
...
@@ -46,14 +46,14 @@
...
@@ -46,14 +46,14 @@
margin-top: 24rpx;
margin-top: 24rpx;
}
}
.user-name .name {
.user-name .name {
font-size: 4
8
rpx;
font-size: 4
4
rpx;
color: #111111;
color: #111111;
line-height: 72rpx;
line-height: 72rpx;
}
}
.user-name .position {
.user-name .position {
font-weight: 400;
font-weight: 400;
font-size: 2
8
rpx;
font-size: 2
6
rpx;
color: #6E6E7A;
color: #6E6E7A;
margin-left: 20rpx;
margin-left: 20rpx;
}
}
...
...
pages/tab/index/index.js
View file @
5ce12af
...
@@ -66,6 +66,10 @@ Page({
...
@@ -66,6 +66,10 @@ Page({
switch
(
curTabIndex
)
{
switch
(
curTabIndex
)
{
case
2
:
case
2
:
console
.
log
(
"跳转直播"
);
console
.
log
(
"跳转直播"
);
wx
.
openChannelsActivity
({
finderUserName
:
'sphPIdcy0NVpuao'
,
feedId
:
'export/UzFfAgtgekIEAQAAAAAAOQ8BJrsjzwAAAAstQy6ubaLX4KHWvLEZgBPEmIEUOQV4c62CzNPgMJqRnrGh3TfaajoIU4mGBiio'
})
wx
.
$Track
.
sendTrack
(
trackData
.
VIDEO
);
wx
.
$Track
.
sendTrack
(
trackData
.
VIDEO
);
break
;
break
;
default
:
default
:
...
@@ -97,9 +101,16 @@ Page({
...
@@ -97,9 +101,16 @@ Page({
.
login
()
.
login
()
.
then
(({
data
})
=>
{
.
then
(({
data
})
=>
{
wx
.
hideLoading
()
wx
.
hideLoading
()
if
(
data
&&
data
.
nickName
)
{
this
.
setData
({
this
.
setData
({
hasUserInfo
:
!!
data
,
hasUserInfo
:
true
,
});
});
}
else
{
this
.
setData
({
hasUserInfo
:
false
})
}
if
(
data
&&
data
.
phone
)
{
if
(
data
&&
data
.
phone
)
{
this
.
setData
({
this
.
setData
({
hasPhoneNumber
:
true
,
hasPhoneNumber
:
true
,
...
...
pages/tab/index/index.wxml
View file @
5ce12af
...
@@ -43,6 +43,6 @@
...
@@ -43,6 +43,6 @@
<view wx:if="{{!hasUserInfo}}" class="user-profile" bindtap="getUserProfile"></view>
<view wx:if="{{!hasUserInfo}}" class="user-profile" bindtap="getUserProfile"></view>
<!-- 服务咨询 -->
<!-- 服务咨询 -->
<view bindtap="goConsult">
<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>
</view>
</view>
\ No newline at end of file
\ No newline at end of file
pages/tab/index/index.wxss
View file @
5ce12af
...
@@ -88,7 +88,8 @@ page {
...
@@ -88,7 +88,8 @@ page {
}
}
.icon-consult {
.icon-consult {
width: 90rpx;
width: 128rpx;
height: 128rpx;
position: fixed;
position: fixed;
right: 6rpx;
right: 6rpx;
bottom: 90rpx;
bottom: 90rpx;
...
...
utils/Track.js
View file @
5ce12af
...
@@ -120,7 +120,7 @@ class TRACK {
...
@@ -120,7 +120,7 @@ class TRACK {
return
guest_no
return
guest_no
}
}
/**定时发送埋点数据 */
/**定时发送埋点数据 */
sendTrack
(
p
)
{
sendTrack
(
p
,
openId
)
{
console
.
log
(
wx
.
$trackData
)
console
.
log
(
wx
.
$trackData
)
let
params
=
{
let
params
=
{
method
:
'entmicro.api.business.card.cardRecord'
,
method
:
'entmicro.api.business.card.cardRecord'
,
...
@@ -128,14 +128,24 @@ class TRACK {
...
@@ -128,14 +128,24 @@ class TRACK {
merchant
:
wx
.
$trackData
.
merchant
,
merchant
:
wx
.
$trackData
.
merchant
,
type
:
wx
.
$trackData
.
type
type
:
wx
.
$trackData
.
type
}
}
// const userInfo =
let
userInfo
=
{
}
const
{
nickName
,
openId
,
unionId
,
phone
}
=
wx
.
$util
.
getUserInfo
()
||
{}
const
userInfo
=
{
if
(
wx
.
$util
.
getUserInfo
())
{
const
{
nickName
,
openId
,
unionId
,
phone
}
=
wx
.
$util
.
getUserInfo
()
||
{}
userInfo
=
{
nickName
,
nickName
,
openId
,
openId
,
unionId
,
unionId
,
phone
,
phone
,
}
}
}
else
{
if
(
openId
)
{
userInfo
.
openId
=
openId
}
else
{
userInfo
.
openId
=
wx
.
$util
.
getStorageSync
(
'openId'
)
}
}
params
=
Object
.
assign
(
params
,
userInfo
,
p
)
params
=
Object
.
assign
(
params
,
userInfo
,
p
)
console
.
log
(
params
)
console
.
log
(
params
)
api
.
reportTrack
(
params
).
then
(({
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