Commit e500853e by 胡悦

提交

1 parent 357051a5
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"glsx-applet-component": { "glsx-applet-component": {
"version": "1.0.14", "version": "1.0.21",
"resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.0.14.tgz", "resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.0.21.tgz",
"integrity": "sha512-Utus5wJbLNE2UptPdi1tKCFZBqvq2r8ypKNz0W0m7yrWRp9Ic6LGTEdljqR+hCa4n23h/ZBLnU5fBiabwDd+uw==" "integrity": "sha512-XtdGqZitLxiMRd4NxtZnHd9mwh/RHcTxNgBUFvK15V0fkffoWuWLzsfN1wm65/GQkHl7ltgumonUsYOwYmCsNQ=="
} }
} }
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"description": "", "description": "",
"main": "app.js", "main": "app.js",
"dependencies": { "dependencies": {
"glsx-applet-component": "^1.0.14" "glsx-applet-component": "^1.0.21"
}, },
"devDependencies": {}, "devDependencies": {},
"scripts": { "scripts": {
......
...@@ -35,7 +35,7 @@ Component({ ...@@ -35,7 +35,7 @@ Component({
const { index } = e.target.dataset const { index } = e.target.dataset
this.setData({ this.setData({
currentScen: index, currentScen: index,
discoverIndex: 1 discoverIndex: 0
}) })
this.triggerEvent('currentScen', this.data.currentScen) this.triggerEvent('currentScen', this.data.currentScen)
}, },
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<view wx:for="{{senceData}}" wx:key="index" class="menu-item {{index == currentScen ? 'menu-active' : ''}}" bindtap="selectScenario" data-index="{{index}}">{{item.tabname}}</view> <view wx:for="{{senceData}}" wx:key="index" class="menu-item {{index == currentScen ? 'menu-active' : ''}}" bindtap="selectScenario" data-index="{{index}}">{{item.tabname}}</view>
</view> </view>
</view> </view>
{{discoverIndex}}
<gl-scene src="{{senceData[currentScen].banner}}"></gl-scene> <gl-scene src="{{senceData[currentScen].banner}}"></gl-scene>
<slot name="swiper"></slot> <slot name="swiper"></slot>
<glsx-discover index="{{discoverIndex}}" list="{{productData[currentScen]}}" bind:proclick="clickTest" bind:videoClick="videoClick"></glsx-discover> <glsx-discover index="{{discoverIndex}}" list="{{productData[currentScen]}}" bind:proclick="clickTest" bind:videoClick="videoClick"></glsx-discover>
\ No newline at end of file \ No newline at end of file
...@@ -7,33 +7,7 @@ ...@@ -7,33 +7,7 @@
*/ */
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/'
const videoBaseUrl = 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/' const videoBaseUrl = 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/'
var senceData = [
{
id: 0,
tabname: '车损升级',
banner: `${IMG_URL}index/banner/banner0.png`
},
{
id: 1,
tabname: '精品升级',
banner: `${IMG_URL}index/banner/banner1.png`
},
{
id: 2,
tabname: '客户线上化',
banner: `${IMG_URL}index/banner/banner2.png`
},
{
id: 3,
tabname: '众筹活动',
banner: `${IMG_URL}index/banner/banner3.png`
},
{
id: 4,
tabname: '膨胀金活动',
banner: `${IMG_URL}index/banner/banner4.png`
}
]
/** /**
* 属性说明: * 属性说明:
...@@ -44,19 +18,19 @@ var senceData = [ ...@@ -44,19 +18,19 @@ var senceData = [
* noVideoPicture: 场景下的产品无视频,显示的图片 * noVideoPicture: 场景下的产品无视频,显示的图片
*/ */
// 车损升级 // 车损升级
const sceneImgs1 = [ const sceneImgs0 = [
`${IMG_URL}index/scene/scene00.png`, `${IMG_URL}index/scene/scene00.png`,
`${IMG_URL}index/scene/scene01.png`, `${IMG_URL}index/scene/scene01.png`,
`${IMG_URL}index/scene/scene02.png`, `${IMG_URL}index/scene/scene02.png`,
`${IMG_URL}index/scene/scene03.png`, `${IMG_URL}index/scene/scene03.png`,
] ]
const productImgs1 = [ const productImgs0 = [
`${IMG_URL}index/productImgs/product00.webp`, `${IMG_URL}index/productImgs/product00.webp`,
`${IMG_URL}index/productImgs/product01.webp`, `${IMG_URL}index/productImgs/product01.webp`,
`${IMG_URL}index/productImgs/product02.webp`, `${IMG_URL}index/productImgs/product02.webp`,
`${IMG_URL}index/productImgs/product03.webp`, `${IMG_URL}index/productImgs/product03.webp`,
] ]
const videoList1 = [ const videoList0 = [
{ {
videoUrl: `${videoBaseUrl}video/digital_card_30s.mp4`, videoUrl: `${videoBaseUrl}video/digital_card_30s.mp4`,
// posterUrl: `${videoBaseUrl}video/digital_card_30s_bitmap.png`, // posterUrl: `${videoBaseUrl}video/digital_card_30s_bitmap.png`,
...@@ -88,7 +62,7 @@ const videoList1 = [ ...@@ -88,7 +62,7 @@ const videoList1 = [
view:1485 view:1485
} }
] ]
const posterList1 = [ const posterList0 = [
{ {
src:`${IMG_URL}index/poster/poster3-0.webp`, src:`${IMG_URL}index/poster/poster3-0.webp`,
name:'劲爆来袭' name:'劲爆来袭'
...@@ -107,13 +81,13 @@ const posterList1 = [ ...@@ -107,13 +81,13 @@ const posterList1 = [
} }
] ]
const scenario_1 = [ const scenario_0 = [
{ {
name: '服务类', name: '服务类',
//场景详情图片 //场景详情图片
sceneImgs:sceneImgs1, sceneImgs:sceneImgs0,
// 产品详情图片 // 产品详情图片
productImgs: productImgs1, productImgs: productImgs0,
productList: [ productList: [
{ {
img: 'product-img1', img: 'product-img1',
...@@ -133,25 +107,25 @@ const scenario_1 = [ ...@@ -133,25 +107,25 @@ const scenario_1 = [
prodImg: `${IMG_URL}index/prod2/prod0-0.png`, prodImg: `${IMG_URL}index/prod2/prod0-0.png`,
} }
], ],
videoList: videoList1, videoList: videoList0,
posterList: posterList1 posterList: posterList0
} }
] ]
// 精品升级 // 精品升级
const sceneImgs2 = [ const sceneImgs1 = [
`${IMG_URL}index/scene/scene10.png`, `${IMG_URL}index/scene/scene10.png`,
`${IMG_URL}index/scene/scene11.png`, `${IMG_URL}index/scene/scene11.png`,
`${IMG_URL}index/scene/scene12.png`, `${IMG_URL}index/scene/scene12.png`,
`${IMG_URL}index/scene/scene13.png`, `${IMG_URL}index/scene/scene13.png`,
] ]
const productImgs2 = [ const productImgs1 = [
`${IMG_URL}index/productImgs/product10.webp`, `${IMG_URL}index/productImgs/product10.webp`,
`${IMG_URL}index/productImgs/product11.webp`, `${IMG_URL}index/productImgs/product11.webp`,
`${IMG_URL}index/productImgs/product12.webp`, `${IMG_URL}index/productImgs/product12.webp`,
`${IMG_URL}index/productImgs/product13.webp`, `${IMG_URL}index/productImgs/product13.webp`,
] ]
const videoList2 = [ const videoList1 = [
{ {
videoUrl: `${videoBaseUrl}video/solar.mp4`, videoUrl: `${videoBaseUrl}video/solar.mp4`,
posterUrl: `${IMG_URL}index/poster/solar_bitmap.png`, posterUrl: `${IMG_URL}index/poster/solar_bitmap.png`,
...@@ -160,7 +134,7 @@ const videoList2 = [ ...@@ -160,7 +134,7 @@ const videoList2 = [
view:1178 view:1178
} }
] ]
const posterList2 = [ const posterList1 = [
{ {
// src:`${IMG_URL}index/poster/poster3-0.png`, // src:`${IMG_URL}index/poster/poster3-0.png`,
src:`${IMG_URL}index/poster/poster3-0.webp`, src:`${IMG_URL}index/poster/poster3-0.webp`,
...@@ -182,11 +156,11 @@ const posterList2 = [ ...@@ -182,11 +156,11 @@ const posterList2 = [
name:'AR实景导航' name:'AR实景导航'
} }
] ]
const scenario_2 = [ const scenario_1 = [
{ {
name: '膜类', name: '膜类',
sceneImgs: sceneImgs2, sceneImgs: sceneImgs1,
productImgs:productImgs2, productImgs:productImgs1,
productList: [ productList: [
{ {
img: 'product-img2', img: 'product-img2',
...@@ -205,25 +179,25 @@ const scenario_2 = [ ...@@ -205,25 +179,25 @@ const scenario_2 = [
prodImg: `${IMG_URL}index/prod2/prod1-0.png`, prodImg: `${IMG_URL}index/prod2/prod1-0.png`,
} }
], ],
videoList: videoList2, videoList: videoList1,
posterList: posterList2 posterList: posterList1
} }
] ]
// 客户线上化 // 客户线上化
const sceneImgs3 = [ const sceneImgs2 = [
`${IMG_URL}index/scene/scene20.png`, `${IMG_URL}index/scene/scene20.png`,
`${IMG_URL}index/scene/scene21.png`, `${IMG_URL}index/scene/scene21.png`,
`${IMG_URL}index/scene/scene22.png`, `${IMG_URL}index/scene/scene22.png`,
`${IMG_URL}index/scene/scene23.png`, `${IMG_URL}index/scene/scene23.png`,
] ]
const productImgs3 = [ const productImgs2 = [
`${IMG_URL}index/productImgs/product20.webp`, `${IMG_URL}index/productImgs/product20.webp`,
`${IMG_URL}index/productImgs/product21.webp`, `${IMG_URL}index/productImgs/product21.webp`,
`${IMG_URL}index/productImgs/product22.webp`, `${IMG_URL}index/productImgs/product22.webp`,
`${IMG_URL}index/productImgs/product23.webp`, `${IMG_URL}index/productImgs/product23.webp`,
] ]
const posterList3 = [ const posterList2 = [
{ {
src:`${IMG_URL}index/poster/poster3-0.webp`, src:`${IMG_URL}index/poster/poster3-0.webp`,
name:'劲爆来袭' name:'劲爆来袭'
...@@ -242,12 +216,12 @@ const posterList3 = [ ...@@ -242,12 +216,12 @@ const posterList3 = [
} }
] ]
const videoList3 = [] const videoList2 = []
const scenario_3 = [ const scenario_2 = [
{ {
name: '膜类', name: '膜类',
sceneImgs: sceneImgs3, sceneImgs: sceneImgs2,
productImgs: productImgs3, productImgs: productImgs2,
productList: [ productList: [
{ {
img: 'product-img3', img: 'product-img3',
...@@ -289,25 +263,25 @@ const scenario_3 = [ ...@@ -289,25 +263,25 @@ const scenario_3 = [
name:'0-6 个月次新车-线上销售轻改精品' name:'0-6 个月次新车-线上销售轻改精品'
} }
], ],
videoList: videoList3, videoList: videoList2,
posterList: posterList3 posterList: posterList2
} }
] ]
// 众筹活动 // 众筹活动
const sceneImgs4 = [ const sceneImgs3 = [
`${IMG_URL}index/scene/scene30.png`, `${IMG_URL}index/scene/scene30.png`,
`${IMG_URL}index/scene/scene31.png`, `${IMG_URL}index/scene/scene31.png`,
`${IMG_URL}index/scene/scene32.png`, `${IMG_URL}index/scene/scene32.png`,
`${IMG_URL}index/scene/scene33.png`, `${IMG_URL}index/scene/scene33.png`,
] ]
const productImgs4 = [ const productImgs3 = [
`${IMG_URL}index/productImgs/product30.webp`, `${IMG_URL}index/productImgs/product30.webp`,
`${IMG_URL}index/productImgs/product31.webp`, `${IMG_URL}index/productImgs/product31.webp`,
`${IMG_URL}index/productImgs/product32.webp`, `${IMG_URL}index/productImgs/product32.webp`,
`${IMG_URL}index/productImgs/product33.webp`, `${IMG_URL}index/productImgs/product33.webp`,
] ]
const videoList4 = [ const videoList3 = [
{ {
videoUrl: `${videoBaseUrl}video/car_beauty.mp4`, videoUrl: `${videoBaseUrl}video/car_beauty.mp4`,
posterUrl: `${IMG_URL}index/poster/car_beauty.png`, posterUrl: `${IMG_URL}index/poster/car_beauty.png`,
...@@ -351,7 +325,7 @@ const videoList4 = [ ...@@ -351,7 +325,7 @@ const videoList4 = [
view:3101 view:3101
} }
] ]
const posterList4 = [ const posterList3 = [
{ {
src:`${IMG_URL}index/poster/poster3-0.webp`, src:`${IMG_URL}index/poster/poster3-0.webp`,
name:'劲爆来袭' name:'劲爆来袭'
...@@ -369,7 +343,7 @@ const posterList4 = [ ...@@ -369,7 +343,7 @@ const posterList4 = [
name:'AR实景导航' name:'AR实景导航'
} }
] ]
const scenario_4 = [ const scenario_3 = [
{ {
name: '美容类', name: '美容类',
productList: [ productList: [
...@@ -390,10 +364,10 @@ const scenario_4 = [ ...@@ -390,10 +364,10 @@ const scenario_4 = [
prodImg: `${IMG_URL}index/prod2/prod3-4.png`, prodImg: `${IMG_URL}index/prod2/prod3-4.png`,
} }
], ],
sceneImgs: sceneImgs4, sceneImgs: sceneImgs3,
productImgs: productImgs4, productImgs: productImgs3,
videoList: videoList4, videoList: videoList3,
posterList: posterList4 posterList: posterList3
}, },
{ {
name: '轻改类', name: '轻改类',
...@@ -479,18 +453,48 @@ const scenario_4 = [ ...@@ -479,18 +453,48 @@ const scenario_4 = [
prodImg: `${IMG_URL}index/prod2/prod3-5.png`, prodImg: `${IMG_URL}index/prod2/prod3-5.png`,
} }
], ],
sceneImgs: sceneImgs4, sceneImgs: sceneImgs3,
productImgs: productImgs4, productImgs: productImgs3,
videoList: videoList4, videoList: videoList3,
posterList: posterList4 posterList: posterList3
}
]
const senceData = [
{
id: 0,
tabname: '车损升级',
banner: `${IMG_URL}index/banner/banner0.png`,
sceneImgs: sceneImgs0
},
{
id: 1,
tabname: '精品升级',
banner: `${IMG_URL}index/banner/banner1.png`,
sceneImgs:sceneImgs1
},
{
id: 2,
tabname: '客户线上化',
banner: `${IMG_URL}index/banner/banner2.png`,
sceneImgs:sceneImgs2
},
{
id: 3,
tabname: '众筹活动',
banner: `${IMG_URL}index/banner/banner3.png`,
sceneImgs: sceneImgs3
},
{
id: 4,
tabname: '膨胀金活动',
banner: `${IMG_URL}index/banner/banner4.png`
} }
] ]
const productData = { const productData = {
0: scenario_1, 0: scenario_0,
1: scenario_2, 1: scenario_1,
2: scenario_3, 2: scenario_2,
3: scenario_4 3: scenario_3
} }
module.exports = { module.exports = {
senceData, senceData,
......
...@@ -108,6 +108,24 @@ Page({ ...@@ -108,6 +108,24 @@ Page({
console.log("合作申请"); console.log("合作申请");
}, },
// 跳转视频详情
videoClick(e) {
const { index, info: {videoUrl}, scenIndex } = e.detail
const videoList = productData[scenIndex][0].videoList
console.log(videoList)
wx.$router.go('/packagesList/pages/videoDetal/videoDetal', {
index,
videoList,
videoUrl: videoUrl
})
},
// 跳转活动页
activityClick(e) {
console.log(e)
wx.$router.go('/packagesList/pages/activityDetail/activityDetail')
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
"activity-info": "./components/activity/activity", "activity-info": "./components/activity/activity",
"glsx-discover": "glsx-applet-component/discover/index", "glsx-discover": "glsx-applet-component/discover/index",
"scenario": "./components/scenario/scenario", "scenario": "./components/scenario/scenario",
"customer": "../../../components/customer/customer" "customer": "../../../components/customer/customer",
"gl-scenario": "glsx-applet-component/scenario/index"
}, },
"navigationBarTitleText": "广联数科智能名片" "navigationBarTitleText": "广联数科智能名片"
} }
...@@ -15,9 +15,11 @@ ...@@ -15,9 +15,11 @@
<view class="main-content"> <view class="main-content">
<block wx:if="{{curTabIndex == 0}}"> <block wx:if="{{curTabIndex == 0}}">
<!-- 增值转化 --> <!-- 增值转化 -->
<scenario productData="{{productData}}" senceData="{{senceData}}"> <gl-scenario productData="{{productData}}" senceData="{{senceData}}" bindactivityClick="activityClick" bind:proclick="proclick" bind:videoClick="videoClick" bind:senceClick="senceClick">
</gl-scenario>
<!-- <scenario productData="{{productData}}" senceData="{{senceData}}">
<activity-info slot="swiper"></activity-info> <activity-info slot="swiper"></activity-info>
</scenario> </scenario> -->
</block> </block>
<block wx:if="{{curTabIndex == 1}}">系统订阅</block> <block wx:if="{{curTabIndex == 1}}">系统订阅</block>
<block wx-if="{{curTabIndex == 2}}"> <block wx-if="{{curTabIndex == 2}}">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!