Commit dcfc15f6 by 匡雅琴

修改方案介绍

1 parent bd841376
...@@ -11,7 +11,6 @@ Page({ ...@@ -11,7 +11,6 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
introduceName: "",
tabList: [ tabList: [
{ {
name:'公司介绍', name:'公司介绍',
...@@ -34,46 +33,42 @@ Page({ ...@@ -34,46 +33,42 @@ Page({
icon1: 'icon-cooperation' icon1: 'icon-cooperation'
}, },
], ],
menuList: [ menuList: ['企微魔方','数字化权益','智能线索','D+增值转化'],
{ curTabIndex: 0,
name: '企微魔方' curIntroduceIndex: 0
},
{
name: '数字化权益'
},
{
name: '智能线索'
},
{
name: 'D+增值转化'
}
],
curTabIndex: 0
}, },
// tab栏切换
introduce(e) { introduce(e) {
console.log(e.currentTarget);
const {name} = e.currentTarget.dataset.name;
const curTabIndex = e.currentTarget.dataset.index; const curTabIndex = e.currentTarget.dataset.index;
// 视频直播和合作申请是跳转新页面,不需要设置激活样式 // 视频直播和合作申请是跳转新页面,不需要设置激活样式
if (curTabIndex !== 2 && curTabIndex !== 3) { // 0-公司介绍 1-方案介绍 2-视频直播 3-合作申请
this.setData({
curTabIndex: curTabIndex
})
}
console.log(this.data.curTabIndex); console.log(this.data.curTabIndex);
switch (name) { switch (curTabIndex) {
case "合作申请": case 3:
wx.$router.go("applicationPartener"); wx.$router.go("applicationPartener");
break; break;
case "视频直播": case 2:
console.log('跳转直播') console.log('跳转直播')
break; break;
default: default:
this.setData({ this.setData({
introduceName: name, curTabIndex: curTabIndex,
}); });
} }
}, },
// 方案介绍tab栏切换
// 0-企微魔方 1-数字化权益 2-智能线索 3-D+增值转化
selectIntroduce(e) {
console.log(e.currentTarget);
const curIntroduceIndex = e.currentTarget.dataset.index
this.setData({
curIntroduceIndex: curIntroduceIndex,
});
},
jump() { jump() {
wx.$router.go("applicationAccount"); wx.$router.go("applicationAccount");
}, },
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<template is="channel"></template> <template is="channel"></template>
<!-- tab介绍 --> <!-- tab介绍 -->
<view class="tab-list"> <view class="tab-list">
<block wx:for="{{tabList}}"> <block wx:for="{{tabList}}" wx:key="index">
<view class="tab-item {{curTabIndex === index ? 'tab-item-active' : '' }} {{index === 3 ? 'tab-apply' : ''}}" data-name="{{item}}" data-index="{{index}}"bindtap="introduce"> <view class="tab-item {{curTabIndex === index ? 'tab-item-active' : '' }} {{index === 3 ? 'tab-apply' : ''}}" data-name="{{item}}" data-index="{{index}}" bindtap="introduce">
<image wx:if="{{curTabIndex !== index}}" class="tab-img" mode="widthFix" webp src="{{IMGURL}}home/{{item.icon1}}.png"></image> <image wx:if="{{curTabIndex !== index}}" class="tab-img" mode="widthFix" webp src="{{IMGURL}}home/{{item.icon1}}.png"></image>
<image wx:else class="tab-img" mode="widthFix" webp src="{{IMGURL}}home/{{item.icon}}.png"></image> <image wx:else class="tab-img" mode="widthFix" webp src="{{IMGURL}}home/{{item.icon}}.png"></image>
<view>{{item.name}}</view> <view>{{item.name}}</view>
...@@ -16,12 +16,17 @@ ...@@ -16,12 +16,17 @@
</block> </block>
</view> </view>
<import src="../../template/company/company.wxml" /> <import src="../../template/company/company.wxml" />
<block wx:if="{{introduceName == '公司介绍'}}"> <!-- 公司介绍 -->
<block wx:if="{{curTabIndex === 0 }}">
<template is="company"></template> <template is="company"></template>
</block> </block>
<view class="menu-list" hidden="{{introduceName != '方案介绍'}}"> <!-- 方案介绍 -->
<view class="menu-item menu-active">企微魔方</view> <view class="menu-list" hidden="{{curTabIndex !== 1}}">
<view class="menu-item">数字化权益</view> <block wx:for="{{menuList}}" wx:key="index">
<view class="menu-item">智能线索</view> <view class="menu-item {{index === curIntroduceIndex ? 'menu-active' : ''}}" bindtap="selectIntroduce" data-index="{{index}}">{{item}}</view>
<view class="menu-item">D+增值转化</view> </block>
</view>
<!-- 服务咨询 -->
<view>
<image mode="widthFix" class="icon-consult" webp src="{{IMGURL}}home/custom.png"></image>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -31,8 +31,8 @@ page { ...@@ -31,8 +31,8 @@ page {
.tab-apply { .tab-apply {
background: #F0F0FF; background: #F0F0FF;
font-weight: 600; font-weight: 600;
color: #5850FF; color: #5850FF;
} }
.icon-hot { .icon-hot {
...@@ -49,16 +49,19 @@ right: 0; ...@@ -49,16 +49,19 @@ right: 0;
margin-top: 16rpx; margin-top: 16rpx;
} }
.application { .application {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
} }
/* 方案介绍 */ /* 方案介绍 */
.menu-list { .menu-list {
display: flex; display: flex;
justify-content: space-evenly; justify-content: space-evenly;
} }
.menu-item { .menu-item {
position: relative; position: relative;
font-size: 26rpx; font-size: 26rpx;
...@@ -66,9 +69,14 @@ right: 0; ...@@ -66,9 +69,14 @@ right: 0;
height: 88rpx; height: 88rpx;
line-height: 88rpx; line-height: 88rpx;
} }
.menu-active { .menu-active {
color: #5850ff; font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 32rpx;
color: #2D2D33;
} }
.menu-active::after { .menu-active::after {
content: ''; content: '';
display: inline-block; display: inline-block;
...@@ -80,4 +88,11 @@ right: 0; ...@@ -80,4 +88,11 @@ right: 0;
height: 6rpx; height: 6rpx;
background-color: #5850ff; background-color: #5850ff;
border-radius: 0.8rpx; border-radius: 0.8rpx;
}
.icon-consult {
width: 82rpx;
position: absolute;
right: 8rpx;
bottom: 88rpx;
} }
\ No newline at end of file \ 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!