Commit 6444ee2e by 匡雅琴

修改tab样式

1 parent 34092d64
......@@ -9,9 +9,10 @@
<view class="tab-list">
<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="bg-img" mode="widthFix" webp src="{{IMGURL}}home/icon-bg.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>
<view>{{item.name}}</view>
<view class="tab-text">{{item.name}}</view>
<!-- 合作申请hot -->
<image wx:if="{{index === 3}}" class="icon-hot" webp src="{{IMGURL}}home/icon-hot.png"></image>
</view>
......@@ -26,16 +27,10 @@
<import src="../../template/menu/menu.wxml" />
<block wx:if="{{curTabIndex === 1 }}">
<template is="menu" data="{{menuList, curIntroduceIndex, templateMethods, customerType}}"></template>
<block wx:if="{{curIntroduceIndex === 0}}">企微魔方</block>
<block wx:elif="{{curIntroduceIndex === 1}}">数字化权益</block>
<block wx:elif="{{curIntroduceIndex == 2}}">智能线索</block>
</block>
</view>
<button wx:if="{{!hasUserInfo}}" class="user-profile" bindtap="getUserProfile"></button>
<!-- 服务咨询 -->
<view bindtap="goConsult">
<image mode="widthFix" class="icon-consult" webp src="{{IMGURL}}home/custom.png"></image>
</view>
</view>
</view>
\ No newline at end of file
......@@ -13,7 +13,7 @@ page {
}
.tab-item {
width: 160rpx;
width: 220rpx;
height: 144rpx;
background: #F5F6FA;
border-radius: 8rpx;
......@@ -26,10 +26,18 @@ page {
position: relative;
}
.bg-img {
width: 220rpx;
height: 144rpx;
position: absolute;
top: 0;
left: 0;
}
.tab-item-active {
color: #FFFFFF;
background-image: url("https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/home/icon-bg.png");
background-size: 100% 100%;
/* background-image: url("https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/home/icon-bg.png");
background-size: 220rpx 144rpx; */
}
.tab-apply {
......@@ -49,7 +57,17 @@ page {
.tab-img {
width: 72rpx;
height: 72rpx;
margin-top: 16rpx;
position: absolute;
top: 16rpx;
left: 50%;
transform: translateX(-50%);
}
.tab-text {
position: absolute;
top: 88rpx;
left: 50%;
transform: translateX(-50%);
}
......@@ -60,7 +78,7 @@ page {
}
.icon-consult {
width: 80rpx;
width: 90rpx;
position: absolute;
right: 6rpx;
bottom: 90rpx;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!