Commit dcfc15f6 by 匡雅琴

修改方案介绍

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