Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
zhwy
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 56306100
authored
Oct 09, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
数据上报
1 parent
8222152a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
4 deletions
api/module/common.js
packageEquity/pages/freecard/freecard.js
packageEquity/pages/freecard/freecard.scss
packageEquity/pages/freecard/freecard.wxml
pages/crowdfunding/blank/blank.js
api/module/common.js
View file @
5630610
...
...
@@ -35,4 +35,11 @@ module.exports = {
getImgVersion
()
{
return
http
.
getMock
();
},
// 埋点/数据上报
trackHttp
(
data
)
{
return
http
.
post
({
method
:
"entmicro.api.customercollect.reportCustomer"
,
...
data
,
});
},
};
packageEquity/pages/freecard/freecard.js
View file @
5630610
...
...
@@ -58,12 +58,25 @@ Page({
wx
.
$LoginStatus
=
false
wx
.
p
.
storage
.
set
(
'userInfo'
,
data
)
wx
.
p
.
storage
.
set
(
'sessionId'
,
data
.
sessionId
)
let
{
nickName
,
headImgUrl
}
=
data
let
{
nickName
,
headImgUrl
,
phone
}
=
data
this
.
setData
({
userInfo
:
data
,
authStatus
:
false
})
console
.
log
(
data
,
'data--'
)
let
item
=
{
add_way
:
'104'
,
customer_phone
:
phone
}
if
(
nickName
)
{
item
.
customer_name
=
nickName
}
if
(
headImgUrl
)
{
item
.
avatar
=
headImgUrl
}
let
json
=
JSON
.
stringify
(
item
)
// 数据上报
wx
.
p
.
api
.
common
.
trackHttp
({
json
}).
then
(
response
=>
{
})
if
(
nickName
||
headImgUrl
)
{
this
.
setData
({
hasUserInfo
:
true
...
...
packageEquity/pages/freecard/freecard.scss
View file @
5630610
...
...
@@ -43,7 +43,7 @@
position
:
relative
;
box-sizing
:
border-box
;
width
:
100vw
;
padding
:
20rpx
32rpx
;
padding
:
20rpx
32rpx
40rpx
;
color
:
#fff
;
.tips
{
...
...
packageEquity/pages/freecard/freecard.wxml
View file @
5630610
...
...
@@ -15,8 +15,6 @@
<button wx:elif="{{!hasUserInfo}}" catchtap="jumpAuthUserInfo" class="text-center btn-defalut">头像昵称</button>
<view wx:else>
<view class="btn-defalut" bindtap="toCheckMember">免费领取</view>
<!-- <view class="btn-defalut" bindtap="tofreeReceive">免费领取</view> -->
<!-- <view class="btn-defalut" bindtap="receiveRed">免费领取</view> -->
</view>
</view>
</view>
...
...
pages/crowdfunding/blank/blank.js
View file @
5630610
...
...
@@ -24,6 +24,16 @@ Page({
headImgUrl
:
info
.
avatarUrl
,
hasUserInfo
:
true
})
let
item
=
{
add_way
:
'104'
,
customer_phone
:
res
.
data
.
userInfo
.
phone
,
customer_name
:
info
.
nickName
,
avatar
:
info
.
avatarUrl
,
merchant_id
:
res
.
data
.
merchantId
}
let
json
=
JSON
.
stringify
(
item
)
// 数据上报
wx
.
p
.
api
.
common
.
trackHttp
({
json
}).
then
(
response
=>
{})
})
},
...
...
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