Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
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 f0777e50
authored
Dec 08, 2022
by
luyt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:场景调整
1 parent
02bab7b0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
14 deletions
pages/tab/index/constant/data.js
pages/viewProd/index.js
pages/viewProdBanner/index.js
pages/tab/index/constant/data.js
View file @
f0777e5
...
@@ -237,15 +237,14 @@ var senceData = [
...
@@ -237,15 +237,14 @@ var senceData = [
prodImg
:
`
${
IMG_URL
}
index/prod2/prod2-1.png`
,
prodImg
:
`
${
IMG_URL
}
index/prod2/prod2-1.png`
,
}
}
],
],
videoList
:[
//无视频时显示的图片
noVideoPicture
:
[
{
{
// videoUrl: `${videoBaseUrl}video/car_beauty.mp4`,
posterUrl
:
`
${
IMG_URL
}
index/poster/no-video.png`
,
posterUrl
:
`
${
IMG_URL
}
index/poster/no-video.png`
,
name
:
'0-6 个月次新车-线上销售轻改精品'
name
:
'0-6 个月次新车-线上销售轻改精品'
,
}
manufacturer
:
'嘀加智慧'
,
view
:
2561
},
],
],
videoList
:[],
posterList
:[
posterList
:[
{
{
// src:`${IMG_URL}index/poster/poster3-0.png`,
// src:`${IMG_URL}index/poster/poster3-0.png`,
...
...
pages/viewProd/index.js
View file @
f0777e5
...
@@ -38,6 +38,9 @@ Page({
...
@@ -38,6 +38,9 @@ Page({
prodItemVideo
(
data
){
prodItemVideo
(
data
){
let
{
senceData
,
actNum
,
activeNavIdx
}
=
data
let
{
senceData
,
actNum
,
activeNavIdx
}
=
data
// return senceData[actNum]?.productList[activeNavIdx]
// return senceData[actNum]?.productList[activeNavIdx]
if
(
actNum
==
2
){
return
senceData
[
actNum
]?.
noVideoPicture
[
0
]
}
return
senceData
[
actNum
]?.
videoList
[
activeNavIdx
]
return
senceData
[
actNum
]?.
videoList
[
activeNavIdx
]
},
},
// 授权昵称弹框显示
// 授权昵称弹框显示
...
@@ -200,10 +203,10 @@ Page({
...
@@ -200,10 +203,10 @@ Page({
let idx
let idx
if(imgTopArr[0]>e.scrollTop){
if(imgTopArr[0]>e.scrollTop){
idx = 0
idx = 0
}else if(imgTopArr[imgTopArr.length-1]<e.scrollTop){
}else if(imgTopArr[imgTopArr.length-1]>e.scrollTop && imgTopArr[0]<e.scrollTop){
idx = imgTopArr.length-1
} else{
idx = imgTopArr.findIndex((item) => item >e.scrollTop) - 1;
idx = imgTopArr.findIndex((item) => item >e.scrollTop) - 1;
} else{
idx = imgTopArr.length-1
}
}
this.setData({
this.setData({
tabAct: idx,
tabAct: idx,
...
...
pages/viewProdBanner/index.js
View file @
f0777e5
...
@@ -36,6 +36,9 @@ Page({
...
@@ -36,6 +36,9 @@ Page({
let
{
senceData
,
actNum
,
activeNavIdx
}
=
data
let
{
senceData
,
actNum
,
activeNavIdx
}
=
data
// return senceData[actNum]?.productList[activeNavIdx]
// return senceData[actNum]?.productList[activeNavIdx]
console
.
log
(
'senceData[actNum]'
,
senceData
[
actNum
])
console
.
log
(
'senceData[actNum]'
,
senceData
[
actNum
])
if
(
actNum
==
2
){
return
senceData
[
actNum
]?.
noVideoPicture
[
0
]
}
return
senceData
[
actNum
]?.
videoList
[
0
]
return
senceData
[
actNum
]?.
videoList
[
0
]
},
},
// 授权昵称弹框显示
// 授权昵称弹框显示
...
@@ -58,6 +61,8 @@ Page({
...
@@ -58,6 +61,8 @@ Page({
isShare
,
isShare
,
phone
phone
});
});
// 分享描述
this
.
shareTitle
=
`给你分享一个活动
${
senceData
[
actNum
]?.
tabname
}
,戳我参与
~
`;
//分享数据
//分享数据
let senceItem = senceData[actNum]
let senceItem = senceData[actNum]
...
@@ -97,7 +102,7 @@ Page({
...
@@ -97,7 +102,7 @@ Page({
let userInfoObj = wx.$storage.get("userInfo");
let userInfoObj = wx.$storage.get("userInfo");
// #服务商账号#取该分享者商户的联系人字段,无则取商户简称,无则取商户全称
// #服务商账号#取该分享者商户的联系人字段,无则取商户简称,无则取商户全称
let name = userInfoObj.merchantName;
let name = userInfoObj.merchantName;
this.shareTitle = `
$
{
name
}
给你分享一个活动
$
{
senceData
[
actNum
]?.
productList
[
activeNavIdx
].
proN
ame
}
,戳我参与
~
`;
this.shareTitle = `
给你分享一个活动
$
{
senceData
[
actNum
]?.
tabn
ame
}
,戳我参与
~
`;
...
@@ -151,10 +156,10 @@ Page({
...
@@ -151,10 +156,10 @@ Page({
let idx
let idx
if(imgTopArr[0]>e.scrollTop){
if(imgTopArr[0]>e.scrollTop){
idx = 0
idx = 0
}else if(imgTopArr[imgTopArr.length-1]<e.scrollTop){
}else if(imgTopArr[imgTopArr.length-1]>e.scrollTop && imgTopArr[0]<e.scrollTop){
idx = imgTopArr.length-1
} else{
idx = imgTopArr.findIndex((item) => item >e.scrollTop) - 1;
idx = imgTopArr.findIndex((item) => item >e.scrollTop) - 1;
} else{
idx = imgTopArr.length-1
}
}
this.setData({
this.setData({
tabAct: idx,
tabAct: idx,
...
...
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