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