Commit 82be361a by 胡悦

修改轮播

1 parent d9b190ba
......@@ -4,13 +4,17 @@ module.exports = Behavior({
menuList: ["企微魔方", "数字化权益", "智能线索", "D+增值转化"],
templateMethods: [{"tap": "selectIntroduce"}],
curIntroduceIndex: 0,
menuTab: [trackData.CUBE,trackData.EQUITY,trackData.CLUE]
menuTab: [trackData.CUBE,trackData.EQUITY,trackData.CLUE],
clueAutoplay: true
},
methods: {
// 0-企微魔方 1-数字化权益 2-智能线索 3-D+增值转化
selectIntroduce(e) {
const curIntroduceIndex = e.currentTarget.dataset.index;
this.setData({
clueAutoplay: false
})
switch(curIntroduceIndex) {
case 3:
wx.$router.go('scene');
......@@ -21,6 +25,12 @@ module.exports = Behavior({
// })
wx.$Track.sendTrack(trackData.DIJIA)
break
case 2:
this.setData({
curIntroduceIndex: curIntroduceIndex,clueAutoplay: true
})
wx.$Track.sendTrack(this.data.menuTab[this.data.curIntroduceIndex]);
break
default:
this.setData({
curIntroduceIndex: curIntroduceIndex,
......
......@@ -65,13 +65,24 @@ Page({
clueCurrent: 0,
awardBanner: [{src: 'company-img7.png', name: '组织荣誉'}, {src: 'company-img71.png', name: '行业奖项'}],
awardCurrent: 0,
shareDisabled: true
shareDisabled: true,
autoplay: true
},
introduce(e) {
const curTabIndex = e.currentTarget.dataset.index;
this.setData({
autoplay: false
})
// 视频直播和合作申请是跳转新页面,不需要设置激活样式
// 0-公司介绍 1-方案介绍 2-视频直播 3-合作申请
switch (curTabIndex) {
case 0:
this.setData({
curTabIndex: curTabIndex,
autoplay: true
})
wx.$Track.sendTrack(this.data.curTab[this.data.curTabIndex]);
break
case 2:
wx.openChannelsUserProfile({
finderUserName: 'sphPIdcy0NVpuao',
......
......@@ -27,11 +27,11 @@
</view>
<!-- 公司介绍 -->
<block wx:if="{{curTabIndex === 0 }}">
<template is="company" data="{{IMGURL, banner, current, img_version, awardBanner, awardCurrent}}"></template>
<template is="company" data="{{IMGURL, banner, current, img_version, awardBanner, awardCurrent, autoplay}}"></template>
</block>
<!-- 方案介绍 -->
<block wx:if="{{curTabIndex === 1 }}">
<template is="menu" data="{{menuList, curIntroduceIndex, templateMethods, customerType, hasPhoneNumber, IMGURL, img_version, clueCurrent, clueList}}"></template>
<template is="menu" data="{{menuList, curIntroduceIndex, templateMethods, customerType, hasPhoneNumber, IMGURL, img_version, clueCurrent, clueList, autoplay, clueAutoplay}}"></template>
</block>
</view>
......
......@@ -7,13 +7,12 @@
<video poster="{{IMGURL}}image/clue/clue-img14.png?v={{img_version}}" src="{{IMGURL}}image/clue/clue.mp4?v={{img_version}}"></video>
</view>
</view>
<view wx:if="{{hasPhoneNumber}}">
<view class="relative m-t-64">
<image mode="widthFix" class="img" lazy-load webp src="{{IMGURL}}image/clue/clue-bg.webp?v={{img_version}}"></image>
<view class="clue">
<!-- <image mode="widthFix" class="img" lazy-load src="{{IMGURL}}image/clue/clue-img2.webp?v={{img_version}}"></image> -->
<swiper class="clue-swiper" autoplay bindchange="clueChange" current="{{clueCurrent}}" interval="5000" circular>
<swiper class="clue-swiper" autoplay="{{clueAutoplay}}" bindchange="clueChange" current="{{clueCurrent}}" interval="5000" circular>
<block wx:for="{{clueList}}" wx:key="ind">
<swiper-item class="swiper-item">
<image class="clue-img" lazy-load webp src="{{IMGURL}}image/clue/{{item}}?v={{img_version}}"></image>
......
......@@ -6,7 +6,7 @@
<view class="relative">
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/company/bg1.png?v={{img_version}}"></image>
<view class="box2">
<swiper class="swiper" autoplay duration="5000" interval="5000" circular>
<swiper class="swiper" autoplay="{{autoplay}}" duration="5000" interval="5000" circular>
<swiper-item class="swiper-item">
<image class="box2-content" webp src="{{IMGURL}}image/company/company-img2.png?v={{img_version}}"></image>
</swiper-item>
......@@ -20,7 +20,7 @@
<view class="relative">
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/company/bg2.png?v={{img_version}}"></image>
<view class="box3">
<swiper class="box3-swiper" autoplay bindchange="changePage" current="{{current}}" indicator-dots="{{false}}" indicator-color="#E6E7EB" indicator-active-color="#5850FF" interval="5000" circular>
<swiper class="box3-swiper" autoplay="{{autoplay}}" bindchange="changePage" current="{{current}}" indicator-dots="{{false}}" indicator-color="#E6E7EB" indicator-active-color="#5850FF" interval="5000" circular>
<block wx:for="{{banner}}" wx:key="ind">
<swiper-item class="swiper-item">
<image class="box3-img" webp src="{{IMGURL}}image/company/{{item}}?v={{img_version}}"></image>
......
......@@ -17,7 +17,7 @@
<template is="equity" data="{{hasPhoneNumber, IMGURL, img_version}}"></template>
</block>
<block wx:elif="{{curIntroduceIndex == 2}}">
<template is="clue" data="{{hasPhoneNumber, IMGURL, img_version, clueCurrent, clueList}}"></template>
<template is="clue" data="{{hasPhoneNumber, IMGURL, img_version, clueCurrent, clueList, clueAutoplay}}"></template>
</block>
</view>
</template>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!