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 427d4fa4
authored
Dec 28, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'huyue_v3.3.0' of
http://192.168.3.233:8090/saas/mini-program/ai-card
into huyue_v3.3.0
2 parents
bc37abfb
e82a6752
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
104 additions
and
258 deletions
app.json
package-lock.json
package.json
packagesList/pages/activityDetail/activityDetail.js
packagesList/pages/measure/constant/data.js
packagesList/pages/productDetail/productDetail.js
packagesList/pages/scenarioDetail/scenarioDetail.js
pages/tab/index/constant/senceData.js
pages/tab/index/index.js
utils/data.js
app.json
View file @
427d4fa
{
{
"pages"
:
[
"pages"
:
[
"pages/tab/index/index"
"pages/tab/index/index"
,
"pages/webView/webView"
],
],
"window"
:
{
"window"
:
{
"backgroundTextStyle"
:
"light"
,
"backgroundTextStyle"
:
"light"
,
...
...
package-lock.json
View file @
427d4fa
...
@@ -10,9 +10,9 @@
...
@@ -10,9 +10,9 @@
"integrity"
:
"sha512-hFJ48SCSvRgcwT/9TcxwNnNnWSpy2BpaBfwQwVdU6uwgFH+2OqGL435VQN7EDpIMH8YjHbiM84hueTyxAzIPqQ=="
"integrity"
:
"sha512-hFJ48SCSvRgcwT/9TcxwNnNnWSpy2BpaBfwQwVdU6uwgFH+2OqGL435VQN7EDpIMH8YjHbiM84hueTyxAzIPqQ=="
},
},
"glsx-applet-component"
:
{
"glsx-applet-component"
:
{
"version"
:
"1.0.3
5
"
,
"version"
:
"1.0.3
7
"
,
"resolved"
:
"https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.0.3
5
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.0.3
7
.tgz"
,
"integrity"
:
"sha512-
DwdJ/wpD6T9onCiMTJZrBsD9nkxZBn0aM8C/ySXZdhuSri0WAyMW51eTp1CnQhg40Ke5zDgV0AsHwg5si0beaw
=="
"integrity"
:
"sha512-
Imu/2+0R9Vru6o73rwzTPqB+hNh5dXeWHj78SV15C0QcK6RhLry5tcrjvv1+B2M16/ajeljEBSFY5WXppD9gCg
=="
}
}
}
}
}
}
package.json
View file @
427d4fa
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
"main"
:
"app.js"
,
"main"
:
"app.js"
,
"dependencies"
:
{
"dependencies"
:
{
"@vant/weapp"
:
"^1.10.9"
,
"@vant/weapp"
:
"^1.10.9"
,
"glsx-applet-component"
:
"^1.0.3
5
"
"glsx-applet-component"
:
"^1.0.3
7
"
},
},
"devDependencies"
:
{},
"devDependencies"
:
{},
"scripts"
:
{
"scripts"
:
{
...
...
packagesList/pages/activityDetail/activityDetail.js
View file @
427d4fa
...
@@ -32,6 +32,8 @@ Page({
...
@@ -32,6 +32,8 @@ Page({
onLoad
(
options
)
{
onLoad
(
options
)
{
console
.
log
(
options
)
console
.
log
(
options
)
if
(
options
&&
options
.
id
)
{
if
(
options
&&
options
.
id
)
{
wx
.
$trackData
=
options
wx
.
$storage
.
set
(
'scene'
,
options
)
this
.
getActivityDetail
(
options
.
id
)
this
.
getActivityDetail
(
options
.
id
)
this
.
setData
({
this
.
setData
({
hasPhoneNumber
:
true
// 不需要授权
hasPhoneNumber
:
true
// 不需要授权
...
@@ -49,8 +51,13 @@ Page({
...
@@ -49,8 +51,13 @@ Page({
getActivityDetail
(
id
)
{
getActivityDetail
(
id
)
{
entmicroApi
.
getActivityDetail
({
id
}).
then
(
res
=>
{
entmicroApi
.
getActivityDetail
({
id
}).
then
(
res
=>
{
res
.
beginTime
=
new
Date
(
res
.
beginTime
).
format
(
'yyyy年MM月dd日'
)
console
.
log
(
wx
.
$util
.
iosTimeFormat
(
res
.
beginTime
),
new
Date
(
wx
.
$util
.
iosTimeFormat
(
res
.
beginTime
)).
format
(
'yyyy年MM月dd日'
))
res
.
endTime
=
new
Date
(
res
.
endTime
).
format
(
'yyyy年MM月dd日'
)
res
.
beginTime
=
new
Date
(
wx
.
$util
.
iosTimeFormat
(
res
.
beginTime
)).
format
(
'yyyy年MM月dd日'
)
res
.
endTime
=
new
Date
(
wx
.
$util
.
iosTimeFormat
(
res
.
endTime
)).
format
(
'yyyy年MM月dd日'
)
wx
.
$Track
.
sendTrack
({
pageKey
:
res
.
crowdFundActivityId
,
pageName
:
res
.
activityName
})
this
.
setData
({
this
.
setData
({
activityInfo
:
res
activityInfo
:
res
})
})
...
@@ -105,9 +112,11 @@ Page({
...
@@ -105,9 +112,11 @@ Page({
onShareAppMessage
()
{
onShareAppMessage
()
{
const
shareType
=
'ACTIVITY'
const
shareType
=
'ACTIVITY'
const
{
id
}
=
this
.
data
.
activityInfo
const
{
id
}
=
this
.
data
.
activityInfo
const
cardId
=
wx
.
$storage
.
get
(
'scene'
).
cardId
const
merchant
=
wx
.
$storage
.
get
(
'scene'
).
merchant
||
wx
.
$storage
.
get
(
'scene'
).
merchantId
return
{
return
{
title
:
`您好,我向你分享了一个活动~`
,
title
:
`您好,我向你分享了一个活动~`
,
path
:
`packagesList/pages/activityDetail/activityDetail?id=
${
id
}
&shareType=
${
shareType
}
`
path
:
`packagesList/pages/activityDetail/activityDetail?id=
${
id
}
&shareType=
${
shareType
}
&cardId=
${
cardId
}
&merchant=
${
merchant
}
`
}
}
}
}
})
})
\ No newline at end of file
\ No newline at end of file
packagesList/pages/measure/constant/data.js
View file @
427d4fa
var
measureList
=
Object
.
freeze
([
var
measureList
=
Object
.
freeze
([
{
{
name
:
'
1.0 新车权益升级
'
,
name
:
'
新车洽谈场景
'
,
tips
:
'
新车洽谈场景
'
,
tips
:
'
车损升级
'
,
iconName
:
'icon1'
,
iconName
:
'icon1'
,
product
:
[
product
:
[
{
{
name
:
'车损升级'
,
name
:
'车损升级'
,
parentName
:
'
1.0 新车权益升级
'
,
parentName
:
'
新车洽谈场景
'
,
tips
:
'
新车洽谈场景
'
,
tips
:
'
车损升级
'
,
value
:
'0-0'
,
value
:
'0-0'
,
typeIndex
:
'1.0'
,
typeIndex
:
'1.0'
,
isCheck
:
false
,
isCheck
:
false
,
...
@@ -20,14 +20,14 @@ var measureList = Object.freeze([
...
@@ -20,14 +20,14 @@ var measureList = Object.freeze([
]
]
},
},
{
{
name
:
'
1.1 新车精品升级
'
,
name
:
'
新车交付场景
'
,
tips
:
'
新车交付场景
'
,
tips
:
'
精品升级
'
,
iconName
:
'icon2'
,
iconName
:
'icon2'
,
product
:
[
product
:
[
{
{
name
:
'太阳膜升级'
,
name
:
'太阳膜升级'
,
parentName
:
'
1.1 新车精品升级
'
,
parentName
:
'
新车交付场景
'
,
tips
:
'
新车交付场景
'
,
tips
:
'
精品升级
'
,
value
:
'1-0'
,
value
:
'1-0'
,
typeIndex
:
'1.1'
,
typeIndex
:
'1.1'
,
isCheck
:
false
,
isCheck
:
false
,
...
@@ -40,14 +40,14 @@ var measureList = Object.freeze([
...
@@ -40,14 +40,14 @@ var measureList = Object.freeze([
]
]
},
},
{
{
name
:
'
1.2 次新车膨胀金活动
'
,
name
:
'
0-6月
'
,
iconName
:
'icon3'
,
iconName
:
'icon3'
,
tips
:
'
0-6个月
'
,
tips
:
'
膨胀金活动
'
,
product
:
[
product
:
[
{
{
name
:
'膨胀金活动-车衣'
,
name
:
'膨胀金活动-车衣'
,
parentName
:
'
1.2 次新车膨胀金活动
'
,
parentName
:
'
0-6月
'
,
tips
:
'
0-6个月
'
,
tips
:
'
膨胀金活动
'
,
value
:
'2-0'
,
value
:
'2-0'
,
typeIndex
:
'1.2'
,
typeIndex
:
'1.2'
,
isCheck
:
false
,
isCheck
:
false
,
...
@@ -59,8 +59,8 @@ var measureList = Object.freeze([
...
@@ -59,8 +59,8 @@ var measureList = Object.freeze([
},
},
{
{
name
:
'膨胀金活动-改色膜'
,
name
:
'膨胀金活动-改色膜'
,
parentName
:
'
1.2 次新车膨胀金活动
'
,
parentName
:
'
0-6月
'
,
tips
:
'
0-6个月
'
,
tips
:
'
膨胀金活动
'
,
value
:
'2-1'
,
value
:
'2-1'
,
typeIndex
:
'1.2'
,
typeIndex
:
'1.2'
,
isCheck
:
false
,
isCheck
:
false
,
...
@@ -73,14 +73,14 @@ var measureList = Object.freeze([
...
@@ -73,14 +73,14 @@ var measureList = Object.freeze([
]
]
},
},
{
{
name
:
'
1.3 售后直播众筹活动
'
,
name
:
'
6个月以上
'
,
iconName
:
'icon4'
,
iconName
:
'icon4'
,
tips
:
'
6个月以上
'
,
tips
:
'
众筹活动
'
,
product
:
[
product
:
[
{
{
name
:
'360全景导航'
,
name
:
'360全景导航'
,
parentName
:
'
1.3 售后直播众筹活动
'
,
parentName
:
'
6个月以上
'
,
tips
:
'
6个月以上
'
,
tips
:
'
众筹活动
'
,
typeIndex
:
'1.3'
,
typeIndex
:
'1.3'
,
value
:
'3-0'
,
value
:
'3-0'
,
isCheck
:
false
,
isCheck
:
false
,
...
@@ -92,8 +92,8 @@ var measureList = Object.freeze([
...
@@ -92,8 +92,8 @@ var measureList = Object.freeze([
},
},
{
{
name
:
'AR导航'
,
name
:
'AR导航'
,
parentName
:
'
1.3 售后直播众筹活动
'
,
parentName
:
'
6个月以上
'
,
tips
:
'
6个月以上
'
,
tips
:
'
众筹活动
'
,
value
:
'3-1'
,
value
:
'3-1'
,
typeIndex
:
'1.3'
,
typeIndex
:
'1.3'
,
isCheck
:
false
,
isCheck
:
false
,
...
@@ -105,8 +105,8 @@ var measureList = Object.freeze([
...
@@ -105,8 +105,8 @@ var measureList = Object.freeze([
},
},
{
{
name
:
'氛围灯'
,
name
:
'氛围灯'
,
parentName
:
'
1.3 售后直播众筹活动
'
,
parentName
:
'
6个月以上
'
,
tips
:
'
6个月以上
'
,
tips
:
'
众筹活动
'
,
value
:
'3-2'
,
value
:
'3-2'
,
typeIndex
:
'1.3'
,
typeIndex
:
'1.3'
,
isCheck
:
false
,
isCheck
:
false
,
...
@@ -118,8 +118,8 @@ var measureList = Object.freeze([
...
@@ -118,8 +118,8 @@ var measureList = Object.freeze([
},
},
{
{
name
:
'座椅通风'
,
name
:
'座椅通风'
,
parentName
:
'
1.3 售后直播众筹活动
'
,
parentName
:
'
6个月以上
'
,
tips
:
'
6个月以上
'
,
tips
:
'
众筹活动
'
,
value
:
'3-3'
,
value
:
'3-3'
,
typeIndex
:
'1.3'
,
typeIndex
:
'1.3'
,
isCheck
:
false
,
isCheck
:
false
,
...
@@ -131,8 +131,8 @@ var measureList = Object.freeze([
...
@@ -131,8 +131,8 @@ var measureList = Object.freeze([
},
},
{
{
name
:
'智能香薰'
,
name
:
'智能香薰'
,
parentName
:
'
1.3 售后直播众筹活动
'
,
parentName
:
'
6个月以上
'
,
tips
:
'
6个月以上
'
,
tips
:
'
众筹活动
'
,
value
:
'3-4'
,
value
:
'3-4'
,
typeIndex
:
'1.3'
,
typeIndex
:
'1.3'
,
isCheck
:
false
,
isCheck
:
false
,
...
...
packagesList/pages/productDetail/productDetail.js
View file @
427d4fa
...
@@ -40,12 +40,15 @@ Page({
...
@@ -40,12 +40,15 @@ Page({
sharephone
:
''
,
//主要微信用户,服务商
sharephone
:
''
,
//主要微信用户,服务商
cardInfo
:
{},
cardInfo
:
{},
hasPhoneNumber
:
false
,
// 是否有授权手机号码
hasPhoneNumber
:
false
,
// 是否有授权手机号码
pageName
:
''
,
leftMenuIndex
:
0
,
proName
:
''
,
trackList
:
[
trackList
:
[
[
trackData
.
EQUITYCARD
],
[
trackData
.
EQUITYCARD
],
[
trackData
.
SOLARFILM
],
[
trackData
.
SOLARFILM
],
[
trackData
.
PAINTPROTECT
,
trackData
.
CHANGEFILM
],
[
trackData
.
PAINTPROTECT
,
trackData
.
CHANGEFILM
],
[
trackData
.
CARBEAUTY
,
trackData
.
SEATVENTILATE
,
trackData
.
ARNAVIGATION
,
trackData
.
LIGHT
,
trackData
.
NAVIGATIONARROUND
,
trackData
.
LOSSPGASE
],
[
trackData
.
CARBEAUTY
,
trackData
.
SEATVENTILATE
,
trackData
.
ARNAVIGATION
,
trackData
.
LIGHT
,
trackData
.
NAVIGATIONARROUND
,
trackData
.
LOSSPGASE
],
[]
[
trackData
.
EXPANGOLD
]
],
],
systemTrackList
:
[
systemTrackList
:
[
[
trackData
.
SYSUSER
,
trackData
.
SYSNUMBER
],
[
trackData
.
SYSUSER
,
trackData
.
SYSNUMBER
],
...
@@ -82,21 +85,26 @@ Page({
...
@@ -82,21 +85,26 @@ Page({
console
.
log
(
options
);
console
.
log
(
options
);
if
(
!
options
||
utils
.
isEmptyObj
(
options
))
return
if
(
!
options
||
utils
.
isEmptyObj
(
options
))
return
let
{
let
{
actNum
=
0
,
activeNavIdx
=
0
,
phone
,
hasPhoneNumber
,
name
,
leftMenuIndex
=
0
actNum
=
0
,
activeNavIdx
=
0
,
phone
,
hasPhoneNumber
,
name
,
leftMenuIndex
=
0
,
proName
}
=
options
}
=
options
console
.
log
(
options
)
console
.
log
(
options
)
this
.
setData
({
this
.
setData
({
actNum
,
//选中的场景下标
actNum
,
//选中的场景下标
activeNavIdx
,
//选中的产品
activeNavIdx
,
//选中的产品
sharephone
:
phone
,
//联系电话 (登陆的用户)
sharephone
:
phone
,
//联系电话 (登陆的用户)
hasPhoneNumber
:
hasPhoneNumber
hasPhoneNumber
:
hasPhoneNumber
,
pageName
:
name
,
leftMenuIndex
,
proName
})
})
if
(
name
==
'增值转化'
)
{
if
(
name
==
'增值转化'
)
{
wx
.
$Track
.
sendTrack
(
this
.
data
.
trackList
[
actNum
][
activeNavIdx
])
wx
.
$Track
.
sendTrack
(
this
.
data
.
trackList
[
actNum
][
activeNavIdx
])
}
else
if
(
name
==
'系统订阅'
)
{
}
else
if
(
name
==
'系统订阅'
)
{
wx
.
$Track
.
sendTrack
(
this
.
data
.
systemTrackList
[
leftMenuIndex
][
activeNavIdx
])
wx
.
$Track
.
sendTrack
(
this
.
data
.
systemTrackList
[
leftMenuIndex
][
activeNavIdx
])
}
}
setTimeout
(()
=>
{
utils
.
setNavigationBarTitle
(
proName
)
},
100
)
},
},
onPageScroll
:
(
function
()
{
onPageScroll
:
(
function
()
{
let
timer
=
null
;
let
timer
=
null
;
...
@@ -144,14 +152,34 @@ Page({
...
@@ -144,14 +152,34 @@ Page({
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
console
.
log
(
options
)
console
.
log
(
options
)
this
.
getActiveApiFn
()
if
(
options
&&
options
.
cardId
)
{
if
(
options
&&
options
.
cardId
)
{
wx
.
$trackData
=
options
.
query
wx
.
$trackData
=
options
// wx.$trackData.cardId = options.cardId
wx
.
$storage
.
set
(
'scene'
,
options
)
wx
.
$storage
.
set
(
'scene'
,
options
)
this
.
setData
({
this
.
setData
({
actNum
:
options
.
actNum
,
actNum
:
options
.
actNum
,
activeNavIdx
:
options
.
activeNavIdx
activeNavIdx
:
options
.
activeNavIdx
})
})
getApp
()
.
login
()
.
then
(({
data
})
=>
{
if
(
data
&&
data
.
phone
)
{
this
.
setData
({
hasPhoneNumber
:
true
})
}
})
const
{
name
,
actNum
,
activeNavIdx
,
leftMenuIndex
,
proName
}
=
options
this
.
getCardDetail
()
this
.
getCardDetail
()
if
(
name
==
'增值转化'
)
{
wx
.
$Track
.
sendTrack
(
this
.
data
.
trackList
[
actNum
][
activeNavIdx
])
}
else
if
(
name
==
'系统订阅'
)
{
wx
.
$Track
.
sendTrack
(
this
.
data
.
systemTrackList
[
leftMenuIndex
][
activeNavIdx
])
}
setTimeout
(()
=>
{
utils
.
setNavigationBarTitle
(
proName
)
},
100
)
}
else
{
}
else
{
this
.
getCardDetail
()
this
.
getCardDetail
()
}
}
...
@@ -208,11 +236,11 @@ Page({
...
@@ -208,11 +236,11 @@ Page({
const
merchant
=
wx
.
$storage
.
get
(
'scene'
).
merchant
||
wx
.
$storage
.
get
(
'scene'
).
merchantId
const
merchant
=
wx
.
$storage
.
get
(
'scene'
).
merchant
||
wx
.
$storage
.
get
(
'scene'
).
merchantId
const
shareType
=
'SHARE_PRO'
const
shareType
=
'SHARE_PRO'
console
.
log
(
'cardId'
,
cardId
,
'merchant'
,
merchant
)
console
.
log
(
'cardId'
,
cardId
,
'merchant'
,
merchant
)
const
{
actNum
,
activeNavIdx
}
=
this
.
data
const
{
actNum
,
activeNavIdx
,
pageName
,
leftMenuIndex
,
proName
}
=
this
.
data
return
{
return
{
title
:
`您好,我向你推荐了广联数科
${
this
.
data
.
cardInfo
.
staffName
}
的智能名片~`
,
title
:
`您好,我向你推荐了广联数科
${
this
.
data
.
cardInfo
.
staffName
}
的智能名片~`
,
imageUrl
:
this
.
data
.
shareImg
,
imageUrl
:
this
.
data
.
shareImg
,
path
:
`packagesList/pages/productDetail/productDetail?cardId=
${
cardId
}
&merchant=
${
merchant
}
&shareType=
${
shareType
}
&actNum=
${
actNum
}
&activeNavIdx=
${
activeNavIdx
}
`
path
:
`packagesList/pages/productDetail/productDetail?cardId=
${
cardId
}
&merchant=
${
merchant
}
&shareType=
${
shareType
}
&actNum=
${
actNum
}
&activeNavIdx=
${
activeNavIdx
}
&name=
${
pageName
}
&leftMenuIndex=
${
leftMenuIndex
}
&proName=
${
proName
}
`
}
}
},
},
...
...
packagesList/pages/scenarioDetail/scenarioDetail.js
View file @
427d4fa
...
@@ -100,20 +100,6 @@ Page({
...
@@ -100,20 +100,6 @@ Page({
setTimeout
(()
=>
{
setTimeout
(()
=>
{
utils
.
setNavigationBarTitle
(
this
.
data
.
scenarList
[
actNum
])
utils
.
setNavigationBarTitle
(
this
.
data
.
scenarList
[
actNum
])
},
100
)
},
100
)
//分享人openId
let
wx_user_info
=
wx
.
$storage
.
get
(
'wx_user_info'
),
shareOpenId
=
wx_user_info
.
openId
||
''
this
.
shareQuery
=
`sceneCode=
${
senceData
[
actNum
].
sceneCode
}
&productCode=
${
item
?.
productCode
}
&
isShare
=
$
{
true
}
&
productDesc
=
$
{
item
?.
productName
}
&
category
=
$
{
item
?.
category
}
&
actNum
=
$
{
actNum
}
&
activeNavIdx
=
$
{
activeNavIdx
}
&
sharephone
=
$
{
phone
}
`
this.shareTrackData = {
sceneCode: senceData[actNum]?.sceneCode,
productCode: item?.productCode,
productName: item?.productName,
category: item?.category,
productDesc: item?.productName,
shareOpenId:shareOpenId
}
},
},
onPageScroll
:
(
function
()
{
onPageScroll
:
(
function
()
{
let
timer
=
null
;
let
timer
=
null
;
...
@@ -134,13 +120,17 @@ Page({
...
@@ -134,13 +120,17 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
console
.
log
(
options
)
if
(
options
&&
options
.
cardId
)
{
if
(
options
&&
options
.
cardId
)
{
// const options = wx.getEnterOptionsSync()
wx
.
$trackData
=
options
wx.$trackData = options.query
wx
.
$storage
.
set
(
'scene'
,
options
)
wx
.
$storage
.
set
(
'scene'
,
options
)
this.getCardDetail()
this
.
setData
({
} else {
actNum
:
options
.
actNum
this.getCardDetail()
})
wx
.
$Track
.
sendTrack
(
this
.
data
.
trackList
[
options
.
actNum
])
setTimeout
(()
=>
{
utils
.
setNavigationBarTitle
(
this
.
data
.
scenarList
[
options
.
actNum
])
},
100
)
}
}
},
},
...
@@ -194,170 +184,11 @@ Page({
...
@@ -194,170 +184,11 @@ Page({
// merchantId 兼容旧链接
// merchantId 兼容旧链接
const
merchant
=
wx
.
$storage
.
get
(
'scene'
).
merchant
||
wx
.
$storage
.
get
(
'scene'
).
merchantId
const
merchant
=
wx
.
$storage
.
get
(
'scene'
).
merchant
||
wx
.
$storage
.
get
(
'scene'
).
merchantId
const
shareType
=
'SHARE_SCEN'
const
shareType
=
'SHARE_SCEN'
const
{
actNum
}
=
this
.
data
console
.
log
(
'cardId'
,
cardId
,
'merchant'
,
merchant
)
console
.
log
(
'cardId'
,
cardId
,
'merchant'
,
merchant
)
return
{
return
{
title: `
您好,我向你推荐了广联数科
$
{
this
.
data
.
cardInfo
.
staffName
}
的智能名片
~
`,
title
:
`给你分享一个合作场景介绍,戳我了解~`
,
imageUrl: this.data.shareImg,
path
:
`packagesList/pages/scenarioDetail/scenarioDetail?cardId=
${
cardId
}
&merchant=
${
merchant
}
&shareType=
${
shareType
}
&actNum=
${
actNum
}
`
path: `
packagesList
/
pages
/
scenarioDetail
/
scenarioDetail
?
cardId
=
$
{
cardId
}
&
merchant
=
$
{
merchant
}
&
shareType
=
$
{
shareType
}
`
}
},
setShareInfo(data = {}) {
const canvasWidth = 208,
canvasHeight = 166,
textBaseline = 'top'
const draw_function = new Draw(this, {
width: canvasWidth,
height: canvasHeight
// pixelRatio: 2,
// backgroundColor: '#096'
})
const drawCard = callBack => {
let index = 0
const iconWidth = 9,
iconHeight = 9,
iconX = 18,
iconY = 79,
imgList = [
{
url: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/share/bg.png',
x: 0,
y: 0,
width: canvasWidth,
height: 124
},
{
url: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/share/logo.png',
x: 15,
y: 18,
width: 152,
height: 10
},
// 头像的
{
// url: "https://img.zcool.cn/community/01e47e60ab5b4011013eaf70962e3f.jpg@520w_390h_1c_1e_2o_100sh.jpg",
url: data.image,
x: 154,
y: 36,
width: 36,
height: 36
},
{
url: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/share/icon-phone.png',
x: iconX,
y: iconY,
width: iconWidth,
height: iconHeight
},
{
url: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/share/icon-address.png',
x: iconX,
y: iconY + 13,
width: iconWidth,
height: iconHeight
},
{
url: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/share/btn.png',
x: 64,
y: 138,
width: 80,
height: 24
}
],
textList = [
{
text: data.staffName,
x: 18,
y: 40,
color: '#2D2D33',
fontWeight: 600,
fontSize: 14
},
{
text: data.operation,
x: 22 + draw_function.getTextWidth(data.staffName, 14),
y: 44,
color: '#6E6E7A',
fontWeight: 400,
fontSize: 8
},
{
text: data.staffPhone,
x: 30,
y: 80,
color: '#6E6E7A',
fontSize: 7
},
{
text: '深圳市南山区留仙大道3370号南山智园崇文园区1号楼14层',
x: 30,
y: 94,
color: '#6E6E7A',
fontSize: 7,
lineNum: 2,
width: 185,
lineHeight: 9
}
]
const drawImages = callBack => {
draw_function.drawImages(imgList[index], () => {
index += 1
if (index != imgList.length) drawImages(callBack)
else callBack()
})
}
drawImages(() => {
try {
textList.map((e, ind) => {
e.textBaseline = textBaseline
draw_function.drawText(e)
if (ind == textList.length - 1) throw true
})
} catch (error) {
draw_function.toDataURL(({ path }) => {
this.setData(
{
shareImg: path,
shareDisabled: false
},
() => {
wx.showShareMenu({
menus: ['shareAppMessage']
})
}
)
})
}
})
}
drawCard()
},
// 获取员工名片信息
getCardDetail() {
const scene = wx.$storage.get('scene')
let params = {
cardId: scene.cardId
}
}
console.log(params)
entmicroApi.getCardDetail(params).then(({ data, code, message }) => {
wx.hideLoading()
if (code == -1) {
wx.showToast({
title: message,
icon: 'none',
duration: 2000
})
}
const cardInfo = data || this.data.defaultInfo
console.log(data, cardInfo)
this.setData(
{
cardInfo
},
() => {
this.setShareInfo(cardInfo)
}
)
})
}
}
})
})
\ No newline at end of file
\ No newline at end of file
pages/tab/index/constant/senceData.js
View file @
427d4fa
...
@@ -429,11 +429,11 @@ const scenario_3 = [
...
@@ -429,11 +429,11 @@ const scenario_3 = [
const
productImgs4
=
[
`
${
IMG_URL
}
index/productImgs/product40.webp`
,
`
${
IMG_URL
}
index/productImgs/product41.webp`
,
`
${
IMG_URL
}
index/productImgs/product42.webp`
,
`
${
IMG_URL
}
index/productImgs/product43.webp`
,
`
${
IMG_URL
}
index/productImgs/product44.webp`
,
`
${
IMG_URL
}
index/productImgs/product45.webp`
]
const
productImgs4
=
[
`
${
IMG_URL
}
index/productImgs/product40.webp`
,
`
${
IMG_URL
}
index/productImgs/product41.webp`
,
`
${
IMG_URL
}
index/productImgs/product42.webp`
,
`
${
IMG_URL
}
index/productImgs/product43.webp`
,
`
${
IMG_URL
}
index/productImgs/product44.webp`
,
`
${
IMG_URL
}
index/productImgs/product45.webp`
]
const
videoList4
=
[
const
videoList4
=
[
{
{
videoUrl
:
`
${
videoBaseUrl
}
video/
solar
.mp4`
,
videoUrl
:
`
${
videoBaseUrl
}
video/
expansive_activity
.mp4`
,
posterUrl
:
`
${
IMG_URL
}
index/poster/
solar_bitmap
.png`
,
posterUrl
:
`
${
IMG_URL
}
index/poster/
expansive_activity
.png`
,
name
:
'
太阳膜转化售中案例-门店新增产值12w每月
'
,
name
:
'
如何利用膨胀金服务帮助门店锁客返厂
'
,
manufacturer
:
'嘀加智慧'
,
manufacturer
:
'嘀加智慧'
,
view
:
1
17
8
view
:
1
8
8
}
}
]
]
const
scenario_4
=
[
const
scenario_4
=
[
...
...
pages/tab/index/index.js
View file @
427d4fa
...
@@ -74,7 +74,6 @@ Page({
...
@@ -74,7 +74,6 @@ Page({
this
.
setData
({
this
.
setData
({
autoplay
:
false
autoplay
:
false
})
})
console
.
log
(
curTabIndex
)
// 视频直播是跳转新页面,不需要设置激活样式
// 视频直播是跳转新页面,不需要设置激活样式
// 0-增值转化 1-系统订阅 2-公司介绍 3-视频直播
// 0-增值转化 1-系统订阅 2-公司介绍 3-视频直播
switch
(
curTabIndex
)
{
switch
(
curTabIndex
)
{
...
@@ -104,7 +103,6 @@ Page({
...
@@ -104,7 +103,6 @@ Page({
// 更新手机号
// 更新手机号
updatePhoneNumber
(
e
)
{
updatePhoneNumber
(
e
)
{
console
.
log
(
e
)
if
(
e
.
detail
)
{
if
(
e
.
detail
)
{
this
.
setData
({
this
.
setData
({
hasPhoneNumber
:
true
hasPhoneNumber
:
true
...
@@ -116,9 +114,8 @@ Page({
...
@@ -116,9 +114,8 @@ Page({
checkCooperate
()
{
checkCooperate
()
{
const
userInfo
=
wx
.
$storage
.
get
(
'aicard_user_info'
)
const
userInfo
=
wx
.
$storage
.
get
(
'aicard_user_info'
)
if
(
userInfo
)
{
if
(
userInfo
)
{
const
{
phone
}
=
userInfo
const
{
openId
}
=
userInfo
entmicroApi
.
checkCooperate
({
phone
}).
then
(
res
=>
{
entmicroApi
.
checkCooperate
({
openId
}).
then
(
res
=>
{
console
.
log
(
res
)
this
.
setData
({
this
.
setData
({
showCooperate
:
res
showCooperate
:
res
})
})
...
@@ -129,33 +126,23 @@ Page({
...
@@ -129,33 +126,23 @@ Page({
})
})
}
}
},
},
// 合作申请
toApplication
()
{
console
.
log
(
'合作申请'
)
},
// 获取二级菜单下标
// 获取二级菜单下标
getCurrentScen
(
e
)
{
getCurrentScen
(
e
)
{
console
.
log
(
e
)
const
index
=
e
.
detail
const
index
=
e
.
detail
wx
.
$Track
.
sendTrack
(
this
.
data
.
secondTab
[
index
])
wx
.
$Track
.
sendTrack
(
this
.
data
.
secondTab
[
index
])
},
},
proClick
(
e
)
{
proClick
(
e
)
{
console
.
log
(
e
)
const
{
name
}
=
e
.
target
.
dataset
const
{
name
}
=
e
.
target
.
dataset
let
{
detail
}
=
e
let
{
detail
}
=
e
//登录的用户手机号
console
.
log
(
detail
)
console
.
log
(
detail
)
// let userInfo = wx.$storage.get("userInfo")
// const { cardInfo } = this.data
let
obj
=
{
let
obj
=
{
// || 99
name
,
name
,
actNum
:
isNaN
(
detail
.
scenIndex
)
?
99
:
detail
.
scenIndex
,
//选中的场景 没有就是订阅系统的
actNum
:
isNaN
(
detail
.
scenIndex
)
?
99
:
detail
.
scenIndex
,
//选中的场景 没有就是订阅系统的
activeNavIdx
:
detail
.
id
,
//选中的产品,
activeNavIdx
:
detail
.
id
,
//选中的产品,
// cardInfo
,
hasPhoneNumber
:
this
.
data
.
hasPhoneNumber
,
hasPhoneNumber
:
this
.
data
.
hasPhoneNumber
proName
:
detail
.
proName
}
}
if
(
name
==
'系统订阅'
)
{
if
(
name
==
'系统订阅'
)
{
obj
.
menuIndex
=
this
.
data
.
leftMenuIndex
obj
.
menuIndex
=
this
.
data
.
leftMenuIndex
...
@@ -164,7 +151,6 @@ Page({
...
@@ -164,7 +151,6 @@ Page({
},
},
// 跳转视频详情
// 跳转视频详情
videoClick
(
e
)
{
videoClick
(
e
)
{
console
.
log
(
e
)
const
{
const
{
index
,
index
,
info
:
{
videoUrl
},
info
:
{
videoUrl
},
...
@@ -185,7 +171,6 @@ Page({
...
@@ -185,7 +171,6 @@ Page({
activityClick
(
e
)
{
activityClick
(
e
)
{
const
{
hasPhoneNumber
}
=
this
.
data
const
{
hasPhoneNumber
}
=
this
.
data
const
id
=
e
.
detail
const
id
=
e
.
detail
console
.
log
(
e
)
wx
.
$router
.
go
(
'/packagesList/pages/activityDetail/activityDetail'
,
{
hasPhoneNumber
,
id
})
wx
.
$router
.
go
(
'/packagesList/pages/activityDetail/activityDetail'
,
{
hasPhoneNumber
,
id
})
},
},
...
@@ -193,7 +178,6 @@ Page({
...
@@ -193,7 +178,6 @@ Page({
// 场景跳转
// 场景跳转
senceClick
(
e
)
{
senceClick
(
e
)
{
const
{
hasPhoneNumber
}
=
this
.
data
const
{
hasPhoneNumber
}
=
this
.
data
console
.
log
(
e
)
const
{
scenIndex
}
=
e
.
detail
const
{
scenIndex
}
=
e
.
detail
wx
.
$router
.
go
(
'/packagesList/pages/scenarioDetail/scenarioDetail'
,
{
hasPhoneNumber
,
actNum
:
scenIndex
})
wx
.
$router
.
go
(
'/packagesList/pages/scenarioDetail/scenarioDetail'
,
{
hasPhoneNumber
,
actNum
:
scenIndex
})
},
},
...
@@ -222,7 +206,6 @@ Page({
...
@@ -222,7 +206,6 @@ Page({
.
login
()
.
login
()
.
then
(({
data
})
=>
{
.
then
(({
data
})
=>
{
if
(
data
&&
data
.
phone
)
{
if
(
data
&&
data
.
phone
)
{
console
.
log
(
data
)
this
.
setData
({
this
.
setData
({
hasPhoneNumber
:
true
hasPhoneNumber
:
true
})
})
...
@@ -240,9 +223,7 @@ Page({
...
@@ -240,9 +223,7 @@ Page({
},
},
addAll
(
data
)
{
addAll
(
data
)
{
console
.
log
(
data
)
for
(
let
i
in
data
)
{
for
(
let
i
in
data
)
{
console
.
log
(
data
[
i
])
let
arr
=
[],
let
arr
=
[],
m
=
[],
m
=
[],
n
=
[]
n
=
[]
...
@@ -257,7 +238,6 @@ Page({
...
@@ -257,7 +238,6 @@ Page({
videoList
:
m
,
videoList
:
m
,
posterList
:
n
posterList
:
n
}
}
console
.
log
(
allData
,
'--------'
)
data
[
i
].
unshift
(
allData
)
data
[
i
].
unshift
(
allData
)
}
}
return
data
return
data
...
@@ -271,7 +251,6 @@ Page({
...
@@ -271,7 +251,6 @@ Page({
},
},
closeQR
()
{
closeQR
()
{
console
.
log
(
1111
)
this
.
setData
({
this
.
setData
({
showCustomer
:
false
showCustomer
:
false
})
})
...
@@ -329,7 +308,6 @@ Page({
...
@@ -329,7 +308,6 @@ Page({
// merchantId 兼容旧链接
// merchantId 兼容旧链接
const
merchant
=
wx
.
$storage
.
get
(
'scene'
).
merchant
||
wx
.
$storage
.
get
(
'scene'
).
merchantId
const
merchant
=
wx
.
$storage
.
get
(
'scene'
).
merchant
||
wx
.
$storage
.
get
(
'scene'
).
merchantId
const
shareType
=
'SHARE_HOME'
const
shareType
=
'SHARE_HOME'
console
.
log
(
'cardId'
,
cardId
,
'merchant'
,
merchant
)
return
{
return
{
title
:
`您好,我向你推荐了广联数科
${
this
.
data
.
cardInfo
.
staffName
}
的智能名片~`
,
title
:
`您好,我向你推荐了广联数科
${
this
.
data
.
cardInfo
.
staffName
}
的智能名片~`
,
imageUrl
:
this
.
data
.
shareImg
,
imageUrl
:
this
.
data
.
shareImg
,
...
@@ -469,11 +447,9 @@ Page({
...
@@ -469,11 +447,9 @@ Page({
// 获取员工名片信息
// 获取员工名片信息
getCardDetail
()
{
getCardDetail
()
{
console
.
log
(
wx
.
showMeasure
)
this
.
setData
({
this
.
setData
({
'tabList[3].isShow'
:
wx
.
showMeasure
'tabList[3].isShow'
:
wx
.
showMeasure
})
})
console
.
log
(
wx
.
$storage
.
get
(
'scene'
),
wx
.
$trackData
.
cardId
)
const
scene
=
wx
.
$storage
.
get
(
'scene'
)
const
scene
=
wx
.
$storage
.
get
(
'scene'
)
let
params
=
{
let
params
=
{
cardId
:
wx
.
$trackData
.
cardId
||
scene
.
cardId
cardId
:
wx
.
$trackData
.
cardId
||
scene
.
cardId
...
@@ -488,7 +464,6 @@ Page({
...
@@ -488,7 +464,6 @@ Page({
})
})
}
}
const
cardInfo
=
data
||
this
.
data
.
defaultInfo
const
cardInfo
=
data
||
this
.
data
.
defaultInfo
console
.
log
(
data
,
cardInfo
)
this
.
setData
(
this
.
setData
(
{
{
cardInfo
cardInfo
...
@@ -502,7 +477,6 @@ Page({
...
@@ -502,7 +477,6 @@ Page({
/** 系统订阅 */
/** 系统订阅 */
sysMenuClick
(
e
)
{
sysMenuClick
(
e
)
{
console
.
log
(
e
)
this
.
setData
({
this
.
setData
({
leftMenuIndex
:
e
.
detail
.
id
leftMenuIndex
:
e
.
detail
.
id
})
})
...
...
utils/data.js
View file @
427d4fa
...
@@ -69,7 +69,7 @@ const trackData = {
...
@@ -69,7 +69,7 @@ const trackData = {
},
},
LOSSPGASE
:
{
LOSSPGASE
:
{
pageKey
:
15
,
pageKey
:
15
,
pageName
:
"
新能源0元换购
"
,
pageName
:
"
智能香薰系统
"
,
},
},
NEWENERGY
:
{
NEWENERGY
:
{
pageKey
:
16
,
pageKey
:
16
,
...
@@ -174,8 +174,11 @@ const trackData = {
...
@@ -174,8 +174,11 @@ const trackData = {
SYSCAR
:
{
SYSCAR
:
{
pageKey
:
44
,
pageKey
:
44
,
pageName
:
"事故车救援服务"
pageName
:
"事故车救援服务"
},
EXPANGOLD
:
{
pageKey
:
45
,
pageName
:
"膨胀金"
}
}
};
};
const
productTrack
=
[
const
productTrack
=
[
...
...
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