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 fe710afe
authored
Oct 28, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
dd010a0c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
10 deletions
pages/checkProduct/checkProduct.js
pages/scene/components/product/product.js
pages/scene/scene.js
pages/tab/index/index.js
pages/checkProduct/checkProduct.js
View file @
fe710af
...
...
@@ -168,7 +168,7 @@ Page({
name
=
userInfoObj
.
merchantName
}
this
.
shareTitle
=
`
${
name
}
给你分享一个活动
${
senceData
[
actNum
]?.
productList
[
activeNavIdx
].
proName
}
,戳我参与
~
`;
this.getImgInfo(actNum)
//
this.getImgInfo(actNum)
this.setData({
actNum,
...
...
@@ -573,12 +573,13 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {
// let {senceData,actNum,activeNavIdx} = this.data
// let product = senceData[actNum]?.productList[activeNavIdx].proName
// console.log('product: ', product);
// return {
// title: `
给你分享一个活动
$
{
product
}
,戳我参与
~
`,
// }
let {senceData,actNum,activeNavIdx} = this.data
let product = senceData[actNum]?.productList[activeNavIdx].proName
console.log('product: ', product);
return {
// title: `
给你分享一个活动
$
{
product
}
,戳我参与
~
`,
title: `
给你分享一个活动,戳我参与
~
`,
}
},
/**
* 浏览埋点
...
...
pages/scene/components/product/product.js
View file @
fe710af
...
...
@@ -6,6 +6,7 @@ const videoBaseUrl =
"https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/"
;
let
IMG_URL
=
wx
.
$imgUrl
import
{
trackData
}
from
"../../../../utils/data"
;
Component
({
// behaviors: [imgUrlMixin],
/**
...
...
@@ -56,6 +57,13 @@ Component({
getMoreBtn
:
false
,
showVideo
:
true
,
//显示视频列表
imgTopArr
:
[],
trackList
:
[
[
'EQUITYCARD'
],
[
'SOLARFILM'
],
[
'PAINTPROTECT'
,
'CHANGEFILM'
],
[
'CARBEAUTY'
,
'SEATVENTILATE'
,
'ARNAVIGATION'
,
'LIGHT'
,
'NAVIGATIONARROUND'
],
[
'LOSSPGASE'
]
]
},
lifetimes
:
{
ready
:
function
()
{
...
...
@@ -135,6 +143,7 @@ Component({
// "合作案例",
];
let
num
=
this
.
data
.
actNum
;
console
.
log
(
num
)
switch
(
num
)
{
case
0
:
navList
=
[
"数字无忧权益卡"
];
...
...
@@ -291,9 +300,13 @@ Component({
});
},
changeNav
(
event
)
{
const
index
=
event
.
target
.
dataset
.
index
this
.
setData
({
activeNavIdx
:
event
.
target
.
dataset
.
index
,
activeNavIdx
:
index
,
});
const
trackName
=
this
.
data
.
trackList
[
this
.
data
.
actNum
][
index
]
console
.
log
(
trackName
)
wx
.
$Track
.
sendTrack
(
trackData
[
trackName
]);
},
// scrolltoupper(event) {
// console.log(event.detail.scrollHeight,event.detail.scrollTop)
...
...
pages/scene/scene.js
View file @
fe710af
const
navStyle
=
"background-color: transparent;"
;
import
util
from
"../../utils/util"
;
import
{
trackData
}
from
"../../utils/data"
;
// import { IMG_URL } from '~/utils/constantData.js'
// wx.$imgUrl = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/'
import
{
senceData
}
from
"./constant/data"
;
...
...
@@ -98,6 +99,13 @@ Page({
cluePageSize
:
10
,
clueCurrentPage
:
1
,
hasPhoneNumber
:
false
,
trackList
:
[
[
'EQUITYCARD'
],
[
'SOLARFILM'
],
[
'PAINTPROTECT'
,
'CHANGEFILM'
],
[
'CARBEAUTY'
,
'SEATVENTILATE'
,
'ARNAVIGATION'
,
'LIGHT'
,
'NAVIGATIONARROUND'
],
[
'LOSSPGASE'
]
]
},
//引导图
...
...
@@ -139,6 +147,8 @@ Page({
// if(scenestatus == 1){
// }
const
trackName
=
this
.
data
.
trackList
[
num
][
0
]
wx
.
$Track
.
sendTrack
(
trackData
[
trackName
]);
this
.
setData
({
actNum
:
num
,
});
...
...
@@ -450,6 +460,14 @@ Page({
},
onRoute
(
options
)
{
console
.
log
(
options
,
"options"
);
if
(
options
.
actNum
)
{
const
trackName
=
this
.
data
.
trackList
[
options
.
actNum
][
options
.
activeNavIdx
]
console
.
log
(
trackName
)
wx
.
$Track
.
sendTrack
(
trackData
[
trackName
]);
}
else
{
// 无参数默认埋点
wx
.
$Track
.
sendTrack
(
trackData
.
CARBEAUTY
);
}
this
.
setData
({
actNum
:
options
.
actNum
,
wrapactiveNavIdx
:
options
.
activeNavIdx
,
...
...
pages/tab/index/index.js
View file @
fe710af
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-08-30 11:26:21
* @LastEditors: huyue
* @LastEditTime: 2022-10-28 10:
30:34
* @LastEditTime: 2022-10-28 10:
51:40
*/
// pages/tab/index/index.js
import
{
menuMixin
}
from
"../../../mixins/index"
;
...
...
@@ -106,6 +106,7 @@ Page({
extraData
:
storeParams
,
envVersion
:
'develop'
,
success
(
res
)
{
console
.
log
(
res
,
storeParams
)
// 打开成功
}
})
...
...
@@ -215,7 +216,7 @@ Page({
*/
onShow
()
{
this
.
setData
({
hasPhoneNumber
:
util
.
getUserInfo
().
phone
hasPhoneNumber
:
util
.
getUserInfo
()
&&
util
.
getUserInfo
()
.
phone
})
const
options
=
wx
.
getEnterOptionsSync
()
wx
.
$trackData
=
options
.
query
...
...
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