完成了登录模块

This commit is contained in:
2025-05-18 09:30:05 +08:00
parent f7e90b2c0b
commit 7c934ded5f
7 changed files with 264 additions and 414 deletions

View File

@ -1,4 +1,3 @@
// pages/projectModule/projectDetail/projectDetail.js
Page({
/**
@ -8,6 +7,11 @@ Page({
items: [null, null, null],
items_1: [null, null, null],
items_2: [null, null, null],
activeTab: 0
},
switchTab(e) {
const idx = +e.currentTarget.dataset.index;
this.setData({ activeTab: idx });
},
/**

View File

@ -26,16 +26,21 @@
<view class="flex-col mt-35">
<view class="flex-col group_3">
<view class="flex-row justify-between group_4">
<text class="font text_6">项目详情</text>
<text class="font text_7">我的推广码</text>
<text class="font text_6 {{ activeTab===0 ? 'tab-active' : 'tab-inactive' }}"
bindtap="switchTab"
data-index="0">项目详情</text>
<text class="font text_7 {{ activeTab===1 ? 'tab-active' : 'tab-inactive' }}"
bindtap="switchTab"
data-index="1"
>我的推广码</text>
</view>
<view class="flex-row justify-between group_5">
<view class="section_2"></view>
<view class="section_2 view"></view>
<view class="section_2 {{ activeTab===0 ? 'line-active' : 'line-hidden' }}"></view>
<view class="section_2 view {{ activeTab===1 ? 'line-active' : 'line-hidden' }}"></view>
</view>
</view>
<view class="flex-col group_6">
<view class="flex-col section_3">
<view class="flex-col group_6 ">
<view wx:if="{{ activeTab === 0 }}" class="flex-col section_3">
<view class="flex-row items-center">
<image
class="image_3"
@ -58,7 +63,7 @@
</view>
</view>
</view>
<view class="flex-col section_4">
<view wx:if="{{ activeTab === 0 }}" class="flex-col section_4">
<view class="flex-row items-center">
<image
class="image_4"
@ -85,7 +90,7 @@
</view>
</view>
</view>
<view class="flex-col list">
<view wx:if="{{ activeTab === 0 }}" class="flex-col list">
<view class="flex-col relative section_7">
<text class="self-start font_5 text_15">结算说明</text>
<view class="self-stretch section_8 view_2"></view>
@ -111,7 +116,8 @@
/>
</view>
</view>
<view class="flex-col list_2">
<view wx:if="{{ activeTab === 1 }}"
class="flex-col list_2">
<view
class="flex-col relative list-item_2 mt-18"
wx:for="{{items_2}}"

View File

@ -27,8 +27,7 @@
background-color: #ffffff;
width: 100%;
overflow-y: auto;
overflow-x: hidden;
height: 100%;
height: 100vh;
}
.group {
padding-left: 33.75rpx;
@ -108,7 +107,7 @@
line-height: 28.01rpx;
}
.group_5 {
padding: 0 21.64rpx;
padding: 0 37.64rpx;
}
.section_2 {
background-color: #000000;
@ -266,7 +265,7 @@
top: 29.06rpx;
}
.list_2 {
margin-top: 92.81rpx;
margin-top: 0;
}
.list-item_2 {
background-color: #ffffff;
@ -409,4 +408,28 @@
bottom: 0;
left: 0;
right: 0;
}
}
/* 默认非激活状态(可以跟现有 text_6/text_7 配合,也可覆盖) */
.tab-inactive {
font-weight: normal;
font-size: 30rpx; /* 原始大小 */
color: #000000; /* 原始颜色 */
}
/* 激活状态:字体变大、加粗、橙色 */
.tab-active {
font-weight: bold;
font-size: 36rpx; /* 放大后的尺寸 */
color: #ff8d1a;
}
/* 非激活时隐藏下划线 */
.line-hidden {
background-color: transparent !important;
}
/* 激活时下划线显示为橙色 */
.line-active {
background-color: #ff8d1a !important;
}