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 1fa9c5ee
authored
Nov 26, 2022
by
luyt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:选中场景,产品下标
1 parent
af2a3c32
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
228 additions
and
84 deletions
pages/tab/index/components/indexProduct/indexProduct.js
pages/tab/index/components/indexProduct/indexProduct.scss
pages/tab/index/components/indexProduct/indexProduct.wxml
pages/tab/index/components/poster-item/index.wxml
pages/tab/index/components/video-item/index.scss
pages/tab/index/components/video-item/index.wxml
pages/tab/index/constant/data.js
pages/viewProd/index.js
pages/viewVideo/index.js
pages/viewVideo/index.wxml
pages/tab/index/components/indexProduct/indexProduct.js
View file @
1fa9c5e
...
@@ -18,6 +18,27 @@ Component({
...
@@ -18,6 +18,27 @@ Component({
senceData
:
Array
,
senceData
:
Array
,
headerHeight
:
Number
,
headerHeight
:
Number
,
},
},
computed
:
{
// 特色产品
prodList
(
data
)
{
if
(
data
.
mainActiveIndex
==
0
){
return
data
.
senceData
[
data
.
tabActive
].
productList
}
else
{
let
type
=
data
.
items
[
data
.
mainActiveIndex
].
type
return
data
.
senceData
[
data
.
tabActive
].
productList
.
filter
(
item
=>
item
.
type
==
type
)
}
},
// 视频
prodVideoList
(
data
){
return
data
.
senceData
[
data
.
tabActive
].
videoList
},
// 海报
prodPosterList
(
data
){
return
data
.
senceData
[
data
.
tabActive
].
posterList
},
},
// 默认已深度监听
// 默认已深度监听
watch
:
{
watch
:
{
'tabActive'
:
function
(
a
,
b
)
{
'tabActive'
:
function
(
a
,
b
)
{
...
@@ -36,7 +57,8 @@ Component({
...
@@ -36,7 +57,8 @@ Component({
refresherFlag
:
true
,
refresherFlag
:
true
,
IMG_URL
,
IMG_URL
,
// 头部tab
// 头部tab
tabActive
:
0
,
tabActive
:
3
,
tabHeaderShow
:
false
,
items
:
[
items
:
[
{
{
text
:
"全部"
,
text
:
"全部"
,
...
@@ -46,8 +68,12 @@ Component({
...
@@ -46,8 +68,12 @@ Component({
mainActiveIndex
:
0
,
mainActiveIndex
:
0
,
contentHeight
:
0
,
contentHeight
:
0
,
// 视频海报
// 视频海报
videoActive
:
1
,
videoActive
:
0
,
overlayShow
:
false
,
overlayShow
:
false
,
checkPosterItem
:{
src
:
`
${
IMG_URL
}
index/poster/poster3-0.png`
},
// checkVideoItem:{}
},
},
lifetimes
:
{
lifetimes
:
{
attached
()
{
attached
()
{
...
@@ -72,6 +98,13 @@ Component({
...
@@ -72,6 +98,13 @@ Component({
});
});
});
});
query
.
exec
();
query
.
exec
();
//头部tab显示
setTimeout
(()
=>
{
this
.
setData
({
tabHeaderShow
:
true
})
},
200
)
},
},
},
},
/**
/**
...
@@ -127,7 +160,7 @@ Component({
...
@@ -127,7 +160,7 @@ Component({
onclickVideoTab
(
event
)
{
onclickVideoTab
(
event
)
{
// console.log('event: ', event);
// console.log('event: ', event);
let
videoActive
=
+
event
.
currentTarget
.
dataset
.
num
;
let
videoActive
=
+
event
.
currentTarget
.
dataset
.
num
;
console
.
log
(
"videoActive: "
,
videoActive
);
//
console.log("videoActive: ", videoActive);
this
.
setData
({
this
.
setData
({
videoActive
,
videoActive
,
});
});
...
@@ -146,6 +179,41 @@ Component({
...
@@ -146,6 +179,41 @@ Component({
tabActive
:
index
tabActive
:
index
})
})
},
},
checkProd
(
e
){
let
{
tabActive
}
=
this
.
data
// let item = e.currentTarget.dataset.item
let
index
=
e
.
currentTarget
.
dataset
.
index
let
obj
=
{
actNum
:
tabActive
,
//选中的场景
activeNavIdx
:
index
//选中的产品
}
wx
.
$router
.
go
(
"/pages/viewProd/index"
,
obj
)
},
// 查看海报 视频
checkVideo
(
e
){
// console.log('e: ', e);
let
{
tabActive
}
=
this
.
data
// let item = e.currentTarget.dataset.item
let
index
=
e
.
currentTarget
.
dataset
.
index
// this.setData({
// checkVideoItem:item
// })
let
obj
=
{
tabActive
,
videoIndex
:
index
}
wx
.
$router
.
go
(
"/pages/viewVideo/index"
,
obj
)
},
checkPoster
(
e
){
// console.log('e: ', e);
let
item
=
e
.
currentTarget
.
dataset
.
item
this
.
setData
({
checkPosterItem
:
item
,
overlayShow
:
true
})
},
// 选车场景切换
// 选车场景切换
selectCar
(
e
)
{
selectCar
(
e
)
{
...
...
pages/tab/index/components/indexProduct/indexProduct.scss
View file @
1fa9c5e
...
@@ -104,6 +104,9 @@
...
@@ -104,6 +104,9 @@
// }
// }
.page-pro
{
.page-pro
{
.pro-head
{
.pro-head
{
.pro-head-hidden
{
visibility
:
hidden
;
}
.van-tabs__line
{
.van-tabs__line
{
width
:
40rpx
!
important
;
width
:
40rpx
!
important
;
height
:
8rpx
;
height
:
8rpx
;
...
@@ -186,7 +189,7 @@
...
@@ -186,7 +189,7 @@
.list
{
.list
{
}
}
.pro
{
.pro
{
margin-right
:
20
rpx
;
margin-right
:
14
rpx
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
display
:
inline-block
;
display
:
inline-block
;
width
:
176rpx
;
width
:
176rpx
;
...
@@ -195,6 +198,9 @@
...
@@ -195,6 +198,9 @@
border
:
2rpx
solid
#ffffff
;
border
:
2rpx
solid
#ffffff
;
box-shadow
:
0
8rpx
20rpx
0
rgba
(
180
,
186
,
204
,
0
.32
);
box-shadow
:
0
8rpx
20rpx
0
rgba
(
180
,
186
,
204
,
0
.32
);
border-radius
:
8rpx
;
border-radius
:
8rpx
;
&
:nth-child
(
3n
+
3
)
{
margin-right
:
0
;
}
.pro-img
{
.pro-img
{
margin
:
0
auto
;
margin
:
0
auto
;
width
:
176rpx
;
width
:
176rpx
;
...
@@ -206,6 +212,9 @@
...
@@ -206,6 +212,9 @@
line-height
:
52rpx
;
line-height
:
52rpx
;
font-size
:
24rpx
;
font-size
:
24rpx
;
color
:
#323436
;
color
:
#323436
;
overflow
:
hidden
;
//溢出隐藏
white-space
:
nowrap
;
//禁止换行
text-overflow
:
ellipsis
;
//...
}
}
}
}
}
}
...
...
pages/tab/index/components/indexProduct/indexProduct.wxml
View file @
1fa9c5e
<view class="page-wrapper page-pro">
<view class="page-wrapper page-pro">
<view class="pro-head">
<view class="pro-head">
<van-tabs active="{{ tabActive }}" bind:change="onTabChange">
<van-tabs active="{{ tabActive }}"
class="{{tabHeaderShow?'':'pro-head-hidden'}}"
bind:change="onTabChange">
<van-tab wx:for="{{senceData}}" wx:key="index" title="{{item.tabname}}">
<van-tab wx:for="{{senceData}}" wx:key="index" title="{{item.tabname}}">
<image class="pro-banner" src="{{item.banner}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
<image class="pro-banner" src="{{item.banner}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
</van-tab>
</van-tab>
...
@@ -16,9 +16,9 @@
...
@@ -16,9 +16,9 @@
<view class="tab-pro">
<view class="tab-pro">
<view class="title">特色产品</view>
<view class="title">特色产品</view>
<view class="list">
<view class="list">
<view class="pro">
<view class="pro"
wx:for="{{prodList}}" wx:key="index" data-item="{{item}}" data-index="{{index}}" bindtap="checkProd"
>
<image class="pro-img" src="{{
IMG_URL}}index/prod2/prod0-0.png
" />
<image class="pro-img" src="{{
item.prodImg}}?v={{img_version}}
" />
<view class="pro-name">
数字无忧权益卡
</view>
<view class="pro-name">
{{item.productName}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -33,18 +33,16 @@
...
@@ -33,18 +33,16 @@
</view>
</view>
</view>
</view>
<view class="video-cont" wx:if="{{videoActive == 0}}">
<view class="video-cont" wx:if="{{videoActive == 0}}">
<video-item even-class=""></video-item>
<video-item wx:for="{{prodVideoList}}" wx:key="index" even-class="{{index%2?'even-class':''}}" item="{{item}}" data-item="{{item}}" data-index="{{index}}" bindtap="checkVideo"></video-item>
<video-item even-class="even-class"></video-item>
<video-item></video-item>
<!-- 无 -->
<!-- 无 -->
<image wx:if="{{
false
}}" class="empty" src="{{IMG_URL}}index/no-video.png?v={{img_version}}" />
<image wx:if="{{
prodVideoList.length == 0
}}" class="empty" src="{{IMG_URL}}index/no-video.png?v={{img_version}}" />
</view>
</view>
<view class="poster-cont" wx:else>
<view class="poster-cont" wx:else>
<poster-item
even-class="
"></poster-item>
<poster-item
wx:for="{{prodPosterList}}" wx:key="index" even-class="{{index%2?'even-class':''}}" item="{{item}}" data-item="{{item}}" bindtap="checkPoster
"></poster-item>
<poster-item even-class="even-class"></poster-item>
<
!-- <
poster-item even-class="even-class"></poster-item>
<poster-item></poster-item>
<poster-item></poster-item>
-->
<!-- 无 -->
<!-- 无 -->
<image wx:if="{{
false
}}" class="empty" src="{{IMG_URL}}index/no-video.png?v={{img_version}}" />
<image wx:if="{{
prodPosterList.length == 0
}}" class="empty" src="{{IMG_URL}}index/no-video.png?v={{img_version}}" />
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -63,7 +61,7 @@
...
@@ -63,7 +61,7 @@
<!-- 图片预览弹窗 -->
<!-- 图片预览弹窗 -->
<van-overlay show="{{ overlayShow }}" z-index="100">
<van-overlay show="{{ overlayShow }}" z-index="100">
<view class="overlay-wrap">
<view class="overlay-wrap">
<image class="overlay-img" show-menu-by-longpress src="{{
IMG_URL}}index/poster/poster0-0.png
?v={{img_version}}" />
<image class="overlay-img" show-menu-by-longpress src="{{
checkPosterItem.src}}
?v={{img_version}}" />
<view class="overlay-msg">
<view class="overlay-msg">
<image class="hand" src="{{IMG_URL}}index/hand.png?v={{img_version}}"/>
<image class="hand" src="{{IMG_URL}}index/hand.png?v={{img_version}}"/>
<view class="forward">长按图片转发</view>
<view class="forward">长按图片转发</view>
...
...
pages/tab/index/components/poster-item/index.wxml
View file @
1fa9c5e
<!-- pages/tab/index/components/poster-item/index.wxml -->
<!-- pages/tab/index/components/poster-item/index.wxml -->
<view class="poster-item even-class">
<view class="poster-item even-class">
<image class="img" src="{{
IMG_URL}}index/poster/poster0-0.png
?v={{img_version}}" />
<image class="img" src="{{
item.src}}
?v={{img_version}}" />
<view class="msg">生成专属海报</view>
<view class="msg">生成专属海报</view>
</view>
</view>
<!-- <view class="poster-item">
<!-- <view class="poster-item">
...
...
pages/tab/index/components/video-item/index.scss
View file @
1fa9c5e
...
@@ -29,10 +29,19 @@
...
@@ -29,10 +29,19 @@
margin-bottom
:
12rpx
;
margin-bottom
:
12rpx
;
margin-left
:
16rpx
;
margin-left
:
16rpx
;
margin-right
:
16rpx
;
margin-right
:
16rpx
;
height
:
80rpx
;
//
height: 80rpx;
font-weight
:
500
;
font-weight
:
500
;
font-size
:
26rpx
;
font-size
:
26rpx
;
color
:
#323436
;
color
:
#323436
;
display
:
-
webkit-box
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
word-wrap
:
break-word
;
white-space
:
normal
!
important
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
}
.detail
{
.detail
{
display
:
flex
;
display
:
flex
;
...
...
pages/tab/index/components/video-item/index.wxml
View file @
1fa9c5e
<!-- pages/tab/index/components/video-item/index.wxml -->
<!-- pages/tab/index/components/video-item/index.wxml -->
<view class="video-item even-class">
<view class="video-item even-class">
<image class="play" src="{{IMG_URL}}index/poster/play.png?v={{img_version}}" />
<image class="play" src="{{IMG_URL}}index/poster/play.png?v={{img_version}}" />
<!-- <image class="img" src="{{item.posterUrl}}?v={{img_version}}" alt="" /> -->
<image class="img" src="{{IMG_URL}}index/poster/poster0-0.png?v={{img_version}}" alt="" />
<image class="img" src="{{IMG_URL}}index/poster/poster0-0.png?v={{img_version}}" alt="" />
<view class="name">
30秒告诉你数字无忧卡是什么
</view>
<view class="name">
{{item.name}}
</view>
<view class="detail">
<view class="detail">
<image class="avtor" src="{{IMG_URL}}index/poster/avtor.png?v={{img_version}}" />
<image class="avtor" src="{{IMG_URL}}index/poster/avtor.png?v={{img_version}}" />
<view class="location">
嘀加智慧
</view>
<view class="location">
{{item.manufacturer}}
</view>
<image class="check" src="{{IMG_URL}}index/poster/check.png?v={{img_version}}" />
<image class="check" src="{{IMG_URL}}index/poster/check.png?v={{img_version}}" />
<view class="num">
12345
</view>
<view class="num">
{{item.view}}
</view>
</view>
</view>
</view>
</view>
<!-- <view class="video-item">
<!-- <view class="video-item">
...
...
pages/tab/index/constant/data.js
View file @
1fa9c5e
import
{
IMG_URL
}
from
"~/utils/constantData.js"
;
import
{
IMG_URL
}
from
"~/utils/constantData.js"
;
const
videoBaseUrl
=
'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/'
var
senceData
=
[
var
senceData
=
[
{
{
name
:
'新车洽谈场景'
,
name
:
'新车洽谈场景'
,
...
@@ -33,34 +34,41 @@ var senceData = [
...
@@ -33,34 +34,41 @@ var senceData = [
"productCode"
:
"PC001"
,
"productCode"
:
"PC001"
,
"productName"
:
"数字无忧权益卡"
,
"productName"
:
"数字无忧权益卡"
,
"category"
:
"服务类"
,
"category"
:
"服务类"
,
prodImg
:
`
${
IMG_URL
}
index/prod2/prod0-0.png`
,
}
}
],
],
videoList
:
[
videoList
:
[
{
{
videoUrl
:
'digital_card_30s'
,
videoUrl
:
`
${
videoBaseUrl
}
video/digital_card_30s.mp4`
,
posterUrl
:
'digital_card_30s_bitmap'
,
posterUrl
:
`
${
videoBaseUrl
}
video/digital_card_30s_bitmap.png`
,
name
:
'数字无忧卡服务30秒'
,
name
:
'数字无忧卡服务30秒'
,
view
:
1004
manufacturer
:
'嘀加智慧'
,
view
:
1004
,
},
},
{
{
videoUrl
:
'digital_card_money3'
,
videoUrl
:
`
${
videoBaseUrl
}
video/digital_card_money3.mp4`
,
posterUrl
:
'digital_card_money3_bitmap'
,
posterUrl
:
`
${
videoBaseUrl
}
video/digital_card_money3_bitmap.png`
,
name
:
'数字无忧卡3道钱'
,
name
:
'数字无忧卡3道钱'
,
manufacturer
:
'嘀加智慧'
,
view
:
1563
view
:
1563
},
},
{
{
videoUrl
:
'digital_card'
,
videoUrl
:
`
${
videoBaseUrl
}
video/digital_card.mp4`
,
posterUrl
:
'digital_card_bitmap'
,
posterUrl
:
`
${
videoBaseUrl
}
video/digital_card_bitmap.png`
,
name
:
'数字无忧卡服务'
,
name
:
'数字无忧卡服务'
,
manufacturer
:
'嘀加智慧'
,
view
:
1320
view
:
1320
},
},
{
{
videoUrl
:
'digital_card_reason6'
,
videoUrl
:
`
${
videoBaseUrl
}
video/digital_card_reason6.mp4`
,
posterUrl
:
'digital_card_reason6_bitmap'
,
posterUrl
:
`
${
videoBaseUrl
}
video/digital_card_reason6_bitmap.png`
,
name
:
'数字无忧卡6大理由'
,
name
:
'数字无忧卡6大理由'
,
manufacturer
:
'嘀加智慧'
,
view
:
1485
view
:
1485
}
}
]
],
posterList
:[]
},
},
{
{
name
:
'新车交付场景'
,
name
:
'新车交付场景'
,
...
@@ -94,16 +102,19 @@ var senceData = [
...
@@ -94,16 +102,19 @@ var senceData = [
"productCode"
:
"PC002"
,
"productCode"
:
"PC002"
,
"productName"
:
"汽车太阳膜"
,
"productName"
:
"汽车太阳膜"
,
"category"
:
"膜类"
,
"category"
:
"膜类"
,
prodImg
:
`
${
IMG_URL
}
index/prod2/prod1-0.png`
,
}
}
],
],
videoList
:[
videoList
:[
{
{
videoUrl
:
'solar'
,
videoUrl
:
`
${
videoBaseUrl
}
video/solar.mp4`
,
posterUrl
:
'solar_bitmap'
,
posterUrl
:
`
${
videoBaseUrl
}
video/solar_bitmap.png`
,
name
:
'太阳膜转化售中案例-门店新增产值12w每月'
,
name
:
'太阳膜转化售中案例-门店新增产值12w每月'
,
manufacturer
:
'嘀加智慧'
,
view
:
1178
view
:
1178
}
}
]
],
posterList
:[]
},
},
{
{
name
:
'0-6个月'
,
name
:
'0-6个月'
,
...
@@ -137,6 +148,7 @@ var senceData = [
...
@@ -137,6 +148,7 @@ var senceData = [
"productCode"
:
"PC003"
,
"productCode"
:
"PC003"
,
"productName"
:
"漆面保护膜(车衣)"
,
"productName"
:
"漆面保护膜(车衣)"
,
"category"
:
"膜类"
,
"category"
:
"膜类"
,
prodImg
:
`
${
IMG_URL
}
index/prod2/prod2-0.png`
,
},
},
{
{
img
:
'product-img4'
,
img
:
'product-img4'
,
...
@@ -152,8 +164,11 @@ var senceData = [
...
@@ -152,8 +164,11 @@ var senceData = [
"productCode"
:
"PC004"
,
"productCode"
:
"PC004"
,
"productName"
:
"改色膜"
,
"productName"
:
"改色膜"
,
"category"
:
"膜类"
,
"category"
:
"膜类"
,
prodImg
:
`
${
IMG_URL
}
index/prod2/prod2-1.png`
,
}
}
]
],
videoList
:[],
posterList
:[]
},
},
{
{
name
:
'6个月以上'
,
name
:
'6个月以上'
,
...
@@ -187,6 +202,7 @@ var senceData = [
...
@@ -187,6 +202,7 @@ var senceData = [
"productCode"
:
"PC005"
,
"productCode"
:
"PC005"
,
"productName"
:
"数字化美容"
,
"productName"
:
"数字化美容"
,
"category"
:
"美容类"
,
"category"
:
"美容类"
,
prodImg
:
`
${
IMG_URL
}
index/prod2/prod3-4.png`
,
},
},
{
{
img
:
'product-img6'
,
img
:
'product-img6'
,
...
@@ -202,6 +218,7 @@ var senceData = [
...
@@ -202,6 +218,7 @@ var senceData = [
"productCode"
:
"PC006"
,
"productCode"
:
"PC006"
,
"productName"
:
"座椅通风"
,
"productName"
:
"座椅通风"
,
"category"
:
"轻改类"
,
"category"
:
"轻改类"
,
prodImg
:
`
${
IMG_URL
}
index/prod2/prod3-3.png`
,
},
},
{
{
img
:
'product-img7'
,
img
:
'product-img7'
,
...
@@ -217,6 +234,7 @@ var senceData = [
...
@@ -217,6 +234,7 @@ var senceData = [
"productCode"
:
"PC007"
,
"productCode"
:
"PC007"
,
"productName"
:
"AR导航"
,
"productName"
:
"AR导航"
,
"category"
:
"轻改类"
,
"category"
:
"轻改类"
,
prodImg
:
`
${
IMG_URL
}
index/prod2/prod3-0.png`
,
},
},
{
{
img
:
'product-img8'
,
img
:
'product-img8'
,
...
@@ -232,6 +250,7 @@ var senceData = [
...
@@ -232,6 +250,7 @@ var senceData = [
"productCode"
:
"PC008"
,
"productCode"
:
"PC008"
,
"productName"
:
"氛围灯"
,
"productName"
:
"氛围灯"
,
"category"
:
"轻改类"
,
"category"
:
"轻改类"
,
prodImg
:
`
${
IMG_URL
}
index/prod2/prod3-2.png`
,
},
},
{
{
img
:
'product-img9'
,
img
:
'product-img9'
,
...
@@ -247,33 +266,57 @@ var senceData = [
...
@@ -247,33 +266,57 @@ var senceData = [
"productCode"
:
"PC009"
,
"productCode"
:
"PC009"
,
"productName"
:
"360全景导航"
,
"productName"
:
"360全景导航"
,
"category"
:
"轻改类"
,
"category"
:
"轻改类"
,
prodImg
:
`
${
IMG_URL
}
index/prod2/prod3-1.png`
,
}
}
],
],
videoList
:
[
videoList
:
[
{
{
videoUrl
:
'seat'
,
videoUrl
:
`
${
videoBaseUrl
}
video/seat.mp4`
,
posterUrl
:
'seat_bitmap'
,
posterUrl
:
`
${
videoBaseUrl
}
video/seat_bitmap.png`
,
name
:
'座椅通风系统-新增产值20w'
,
name
:
'座椅通风系统-新增产值20w'
,
manufacturer
:
'嘀加智慧'
,
view
:
1365
view
:
1365
},
},
{
{
videoUrl
:
'AR'
,
videoUrl
:
`
${
videoBaseUrl
}
video/AR.mp4`
,
posterUrl
:
'AR_bitmap'
,
posterUrl
:
`
${
videoBaseUrl
}
video/AR_bitmap.png`
,
name
:
'单品AR导航-新增产值20w+'
,
name
:
'单品AR导航-新增产值20w+'
,
manufacturer
:
'嘀加智慧'
,
view
:
1172
view
:
1172
},
},
{
{
videoUrl
:
'light'
,
videoUrl
:
`
${
videoBaseUrl
}
video/light.mp4`
,
posterUrl
:
'light_bitmap'
,
posterUrl
:
`
${
videoBaseUrl
}
video/light_bitmap.png`
,
name
:
'单品类氛围灯-新增产值27w'
,
name
:
'单品类氛围灯-新增产值27w'
,
manufacturer
:
'嘀加智慧'
,
view
:
1006
view
:
1006
},
},
{
{
videoUrl
:
'360_AR'
,
videoUrl
:
`
${
videoBaseUrl
}
video/360_AR.mp4`
,
posterUrl
:
'360_AR_bitmap'
,
posterUrl
:
`
${
videoBaseUrl
}
video/360_AR_bitmap.png`
,
name
:
'360全景导航-新增产值57w+'
,
name
:
'360全景导航-新增产值57w+'
,
manufacturer
:
'嘀加智慧'
,
view
:
1891
view
:
1891
}
}
],
posterList
:[
{
src
:
`
${
IMG_URL
}
index/poster/poster3-0.png`
,
name
:
'劲爆来袭'
},
{
src
:
`
${
IMG_URL
}
index/poster/poster3-1.png`
,
name
:
'疯狂让利'
},
{
src
:
`
${
IMG_URL
}
index/poster/poster3-2.png`
,
name
:
'娱乐系统'
},
{
src
:
`
${
IMG_URL
}
index/poster/poster3-3.png`
,
name
:
'AR实景导航'
}
]
]
},
},
// {
// {
...
...
pages/viewProd/index.js
View file @
1fa9c5e
...
@@ -27,6 +27,7 @@ Page({
...
@@ -27,6 +27,7 @@ Page({
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
* 分享出去,或扫码进来
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
if
(
!
options
||
utils
.
isEmptyObj
(
options
))
return
if
(
!
options
||
utils
.
isEmptyObj
(
options
))
return
...
@@ -58,8 +59,8 @@ Page({
...
@@ -58,8 +59,8 @@ Page({
let { actNum = 0, activeNavIdx = 0 } = options;
let { actNum = 0, activeNavIdx = 0 } = options;
this.setData({
this.setData({
actNum,
actNum,
//选中的场景下标
activeNavIdx,
activeNavIdx,
//选中的产品
});
});
// 设置标题
// 设置标题
...
...
pages/viewVideo/index.js
View file @
1fa9c5e
// pages/viewVideo/index.js
// pages/viewVideo/index.js
import
{
IMG_URL
}
from
'~/utils/constantData.js'
import
{
IMG_URL
}
from
"~/utils/constantData.js"
;
import
{
senceData
}
from
"~/pages/tab/index/constant/data"
;
// 导入方法
import
{
behavior
as
computedBehavior
}
from
"~/utils/lib/miniprogram-computed"
;
Page
({
Page
({
// 混入
behaviors
:
[
computedBehavior
],
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
IMG_URL
,
IMG_URL
,
videoSrc
:
''
videoSrc
:
""
,
senceData
,
tabActive
:
0
,
//场景值
videoIndex
:
0
,
//场景中的视频下表
},
// 使用
computed
:
{
videoitem
(
data
)
{
let
{
senceData
,
tabActive
,
videoIndex
}
=
data
;
return
senceData
[
tabActive
].
videoList
[
videoIndex
];
},
videoLeft
(
data
)
{
let
{
senceData
,
tabActive
,
videoIndex
}
=
data
;
// return senceData[tabActive].videoList.filter((item,index) => index != videoIndex)
return
senceData
[
tabActive
].
videoList
;
},
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{},
},
//接受跳转的路由参数(小程序页面跳转)
//接受跳转的路由参数(小程序页面跳转)
onRoute
(
options
)
{
onRoute
(
options
)
{
console
.
log
(
"options: "
,
options
);
this
.
setData
({
tabActive
:
options
.
tabActive
,
videoIndex
:
options
.
videoIndex
,
});
wx
.
setNavigationBarTitle
({
wx
.
setNavigationBarTitle
({
title
:
'当前页面当前页面当前页面当前页面当前页面'
title
:
"当前页面当前页面当前页面当前页面当前页面"
,
})
});
},
changeVideo
(
e
)
{
let
{
index
}
=
e
.
currentTarget
.
dataset
;
this
.
setData
({
videoIndex
:
index
,
});
},
},
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
()
{
onReady
()
{},
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{
onShow
()
{},
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
()
{
onHide
()
{},
},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload
()
{
onUnload
()
{},
},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
()
{
onPullDownRefresh
()
{},
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
()
{
onReachBottom
()
{},
},
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
\ No newline at end of file
onShareAppMessage
()
{},
});
pages/viewVideo/index.wxml
View file @
1fa9c5e
<!--pages/viewVideo/index.wxml-->
<!--pages/viewVideo/index.wxml-->
<view class="view-video" >
<view class="view-video" >
<video class="frame" src=""></video>
<!-- poster="{{videoitem.posterUrl}}?v={{img_version}}" -->
<video class="frame" src="{{videoitem.videoUrl}}"></video>
<view class="title-wrap">
<view class="title-wrap">
<view class="title" >
<view class="title" >
单品AR导航-新增产值20w+
{{videoitem.name}}
</view>
</view>
<image class="check" src="{{IMG_URL}}index/poster/check.png?v={{img_version}}" />
<image class="check" src="{{IMG_URL}}index/poster/check.png?v={{img_version}}" />
<view class="num">
<view class="num">
3256
{{videoitem.view}}
</view>
</view>
</view>
</view>
<view class="gus-like">
<view class="gus-like">
...
@@ -16,9 +17,11 @@
...
@@ -16,9 +17,11 @@
<view class="gus-list">
<view class="gus-list">
<scroll-view scroll-x="true" style="height: 336rpx;">
<scroll-view scroll-x="true" style="height: 336rpx;">
<view class="gus-scroll">
<view class="gus-scroll">
<video-item></video-item>
<block wx:for="{{videoLeft}}" wx:key="index">
<video-item></video-item>
<video-item wx:if="{{index != videoIndex}}" item="{{item}}" data-index="{{index}}" bindtap="changeVideo"></video-item>
<video-item></video-item>
</block>
</view>
</view>
</scroll-view>
</scroll-view>
</view>
</view>
...
...
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