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 5bcf8b3e
authored
Sep 08, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
3b60d7cd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
27 deletions
components/UserInfo/UserInfo.js
components/UserInfo/UserInfo.wxml
components/UserInfo/UserInfo.wxss
mixins/menuMixin.js
pages/tab/index/index.js
utils/Track.js
components/UserInfo/UserInfo.js
View file @
5bcf8b3
...
@@ -40,17 +40,17 @@ Component({
...
@@ -40,17 +40,17 @@ Component({
addPhone
()
{
addPhone
()
{
let
_this
=
this
,
let
_this
=
this
,
{
clickCount
}
=
this
.
data
;
{
clickCount
}
=
this
.
data
;
const
{
staffName
,
phoneNumber
,
operation
,
address
,
agentName
}
=
const
{
staffName
,
staffPhone
,
operation
,
address
,
agentName
}
=
this
.
data
.
cardInfo
;
this
.
data
.
cardInfo
;
wx
.
addPhoneContact
({
wx
.
addPhoneContact
({
firstName
:
staffName
,
firstName
:
staffName
,
mobilePhoneNumber
:
phoneNumber
,
mobilePhoneNumber
:
staffPhone
,
title
:
operation
,
title
:
operation
,
organization
:
agentName
,
organization
:
'广联数科'
,
workAddressCountry
:
"中国"
,
workAddressCountry
:
"中国"
,
workAddressState
:
"广东省"
,
workAddressState
:
"广东省"
,
workAddressCity
:
"深圳市"
,
workAddressCity
:
"深圳市"
,
workAddressStreet
:
address
,
workAddressStreet
:
"留仙大道3370号南山智园崇文园区1号楼14层"
,
fail
({
errMsg
})
{
fail
({
errMsg
})
{
if
(
clickCount
)
if
(
clickCount
)
_this
.
setData
({
_this
.
setData
({
...
...
components/UserInfo/UserInfo.wxml
View file @
5bcf8b3
...
@@ -4,15 +4,15 @@
...
@@ -4,15 +4,15 @@
<block wx:if="{{!showWechant}}">
<block wx:if="{{!showWechant}}">
<view class="user-company">
<view class="user-company">
<image class="company-logo" src="{{IMGURL}}home/logo.png"></image>
<image class="company-logo" src="{{IMGURL}}home/logo.png"></image>
<
text>汽车流通行业数字化运营服务商</text
>
<
!-- <text>汽车流通行业数字化运营服务商</text> --
>
</view>
</view>
<view class="user-name">
<view class="user-name">
<view class="name">{{cardInfo.staffName}}</view>
<view class="name">{{cardInfo.staffName
|| ''
}}</view>
<view class="position">{{cardInfo.operation}}</view>
<view class="position">{{cardInfo.operation
|| ''
}}</view>
</view>
</view>
<view class="user-phone">
<view class="user-phone">
<image class="user-icon" webp src="{{IMGURL}}home/icon-phone.png"></image>
<image class="user-icon" webp src="{{IMGURL}}home/icon-phone.png"></image>
<view>{{cardInfo.
agentPhone
}}</view>
<view>{{cardInfo.
staffPhone || ''
}}</view>
</view>
</view>
<view class="user-address">
<view class="user-address">
<image class="user-icon" webp src="{{IMGURL}}home/icon-address.png"></image>
<image class="user-icon" webp src="{{IMGURL}}home/icon-address.png"></image>
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<image bindtap="addWechat" class="add-wechat" webp src="{{IMGURL}}home/add-wechat.png"></image>
<image bindtap="addWechat" class="add-wechat" webp src="{{IMGURL}}home/add-wechat.png"></image>
</block>
</block>
<view class="scrm" wx:else>
<view class="scrm" wx:else>
<image class="srcm-img"
webp src="{{cardInfo.wechat
Code}}" lazy-load></image>
<image class="srcm-img"
show-menu-by-longpress src="{{cardInfo.qr
Code}}" lazy-load></image>
<view class="scrm-text">长按识别二维码,免费体验嘀加SCRM</view>
<view class="scrm-text">长按识别二维码,免费体验嘀加SCRM</view>
<image bindtap="addWechat" class="add-wechat" webp src="{{IMGURL}}home/back-user.png"></image>
<image bindtap="addWechat" class="add-wechat" webp src="{{IMGURL}}home/back-user.png"></image>
</view>
</view>
...
...
components/UserInfo/UserInfo.wxss
View file @
5bcf8b3
...
@@ -30,8 +30,8 @@
...
@@ -30,8 +30,8 @@
align-items: center;
align-items: center;
}
}
.company-logo{
.company-logo{
width:
112
rpx;
width:
296
rpx;
height:
24
rpx;
height:
60
rpx;
}
}
.user-company text {
.user-company text {
font-size: 18rpx;
font-size: 18rpx;
...
...
mixins/menuMixin.js
View file @
5bcf8b3
...
@@ -12,7 +12,7 @@ module.exports = Behavior({
...
@@ -12,7 +12,7 @@ module.exports = Behavior({
const
curIntroduceIndex
=
e
.
currentTarget
.
dataset
.
index
;
const
curIntroduceIndex
=
e
.
currentTarget
.
dataset
.
index
;
switch
(
curIntroduceIndex
)
{
switch
(
curIntroduceIndex
)
{
case
3
:
case
3
:
wx
.
$router
.
go
(
'addTransform'
);
wx
.
$router
.
go
(
'addTransform'
,
{
notIntercept
:
true
}
);
break
break
default
:
default
:
this
.
setData
({
this
.
setData
({
...
...
pages/tab/index/index.js
View file @
5bcf8b3
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-08-30 11:26:21
* @Date: 2022-08-30 11:26:21
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2022-09-0
2 13:48:49
* @LastEditTime: 2022-09-0
8 17:10:17
*/
*/
// pages/tab/index/index.js
// pages/tab/index/index.js
import
{
menuMixin
}
from
"../../../mixins/index"
;
import
{
menuMixin
}
from
"../../../mixins/index"
;
...
@@ -115,8 +115,9 @@ Page({
...
@@ -115,8 +115,9 @@ Page({
*/
*/
onShow
()
{
onShow
()
{
this
.
setShareInfo
();
this
.
setShareInfo
();
console
.
log
(
wx
.
$util
.
getUserInfo
());
if
(
wx
.
$trackData
.
merchant
)
{
wx
.
$Track
.
sendTrack
(
this
.
data
.
curTab
[
this
.
data
.
curTabIndex
]);
wx
.
$Track
.
sendTrack
(
this
.
data
.
curTab
[
this
.
data
.
curTabIndex
])
}
},
},
/**
/**
...
@@ -179,8 +180,10 @@ Page({
...
@@ -179,8 +180,10 @@ Page({
width
:
152
,
width
:
152
,
height
:
10
,
height
:
10
,
},
},
// 头像的
{
{
url
:
"https://img.zcool.cn/community/01e47e60ab5b4011013eaf70962e3f.jpg@520w_390h_1c_1e_2o_100sh.jpg"
,
// url: "https://img.zcool.cn/community/01e47e60ab5b4011013eaf70962e3f.jpg@520w_390h_1c_1e_2o_100sh.jpg",
url
:
''
,
x
:
154
,
x
:
154
,
y
:
36
,
y
:
36
,
width
:
36
,
width
:
36
,
...
@@ -303,13 +306,12 @@ Page({
...
@@ -303,13 +306,12 @@ Page({
getCardDetail
()
{
getCardDetail
()
{
const
sessionId
=
util
.
getSessionId
();
const
sessionId
=
util
.
getSessionId
();
let
params
=
{};
let
params
=
{};
params
.
cardId
=
21
;
params
.
cardId
=
wx
.
$trackData
.
cardId
params
.
sessionId
=
sessionId
;
console
.
log
(
params
,
"+++"
);
console
.
log
(
params
,
"+++"
);
entmicroApi
.
getCardDetail
(
params
).
then
((
res
)
=>
{
entmicroApi
.
getCardDetail
(
params
).
then
((
{
data
}
)
=>
{
console
.
log
(
res
);
this
.
setData
({
if
(
res
.
data
)
{
cardInfo
:
data
}
}
)
});
});
},
},
});
});
utils/Track.js
View file @
5bcf8b3
...
@@ -126,7 +126,9 @@ class TRACK {
...
@@ -126,7 +126,9 @@ class TRACK {
sendTrack
(
p
)
{
sendTrack
(
p
)
{
console
.
log
(
wx
.
$trackData
)
console
.
log
(
wx
.
$trackData
)
let
params
=
{
let
params
=
{
method
:
'entmicro.api.business.card.cardRecord'
method
:
'entmicro.api.business.card.cardRecord'
,
cardId
:
wx
.
$trackData
.
cardId
,
merchant
:
wx
.
$trackData
.
merchant
}
}
const
userInfo
=
{
const
userInfo
=
{
nickName
:
'萌萌哒西瓜'
,
nickName
:
'萌萌哒西瓜'
,
...
@@ -137,10 +139,10 @@ class TRACK {
...
@@ -137,10 +139,10 @@ class TRACK {
// merchant: '12121',
// merchant: '12121',
// cardId: '1'
// cardId: '1'
}
}
if
(
!
wx
.
$trackData
.
merchant
)
{
//
if (!wx.$trackData.merchant) {
// params.merchant = wx.$trackData.merchant
}
//
}
params
=
Object
.
assign
(
params
,
userInfo
,
p
,
wx
.
$trackData
)
params
=
Object
.
assign
(
params
,
userInfo
,
p
)
console
.
log
(
params
)
console
.
log
(
params
)
api
.
reportTrack
(
params
).
then
(({
api
.
reportTrack
(
params
).
then
(({
code
,
code
,
...
...
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