Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
ai-card
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6444ee2e
authored
Sep 07, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改tab样式
1 parent
34092d64
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
12 deletions
pages/tab/index/index.wxml
pages/tab/index/index.wxss
pages/tab/index/index.wxml
View file @
6444ee2
...
@@ -9,9 +9,10 @@
...
@@ -9,9 +9,10 @@
<view class="tab-list">
<view class="tab-list">
<block wx:for="{{tabList}}" wx:key="index">
<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="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: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
class="tab-text"
>{{item.name}}</view>
<!-- 合作申请hot -->
<!-- 合作申请hot -->
<image wx:if="{{index === 3}}" class="icon-hot" webp src="{{IMGURL}}home/icon-hot.png"></image>
<image wx:if="{{index === 3}}" class="icon-hot" webp src="{{IMGURL}}home/icon-hot.png"></image>
</view>
</view>
...
@@ -26,14 +27,8 @@
...
@@ -26,14 +27,8 @@
<import src="../../template/menu/menu.wxml" />
<import src="../../template/menu/menu.wxml" />
<block wx:if="{{curTabIndex === 1 }}">
<block wx:if="{{curTabIndex === 1 }}">
<template is="menu" data="{{menuList, curIntroduceIndex, templateMethods, customerType}}"></template>
<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>
</block>
</view>
</view>
<button wx:if="{{!hasUserInfo}}" class="user-profile" bindtap="getUserProfile"></button>
<!-- 服务咨询 -->
<!-- 服务咨询 -->
<view bindtap="goConsult">
<view bindtap="goConsult">
<image mode="widthFix" class="icon-consult" webp src="{{IMGURL}}home/custom.png"></image>
<image mode="widthFix" class="icon-consult" webp src="{{IMGURL}}home/custom.png"></image>
...
...
pages/tab/index/index.wxss
View file @
6444ee2
...
@@ -13,7 +13,7 @@ page {
...
@@ -13,7 +13,7 @@ page {
}
}
.tab-item {
.tab-item {
width:
16
0rpx;
width:
22
0rpx;
height: 144rpx;
height: 144rpx;
background: #F5F6FA;
background: #F5F6FA;
border-radius: 8rpx;
border-radius: 8rpx;
...
@@ -26,10 +26,18 @@ page {
...
@@ -26,10 +26,18 @@ page {
position: relative;
position: relative;
}
}
.bg-img {
width: 220rpx;
height: 144rpx;
position: absolute;
top: 0;
left: 0;
}
.tab-item-active {
.tab-item-active {
color: #FFFFFF;
color: #FFFFFF;
background-image: url("https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/home/icon-bg.png");
/*
background-image: url("https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/home/icon-bg.png");
background-size:
100% 100%;
background-size:
220rpx 144rpx; */
}
}
.tab-apply {
.tab-apply {
...
@@ -49,7 +57,17 @@ page {
...
@@ -49,7 +57,17 @@ page {
.tab-img {
.tab-img {
width: 72rpx;
width: 72rpx;
height: 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 {
...
@@ -60,7 +78,7 @@ page {
}
}
.icon-consult {
.icon-consult {
width:
8
0rpx;
width:
9
0rpx;
position: absolute;
position: absolute;
right: 6rpx;
right: 6rpx;
bottom: 90rpx;
bottom: 90rpx;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment