feat: optimize UI for performance, withdraw and profile pages

This commit is contained in:
xin 2026-02-05 17:43:21 +08:00
parent 615a07fd08
commit a3abe821cc
11 changed files with 63 additions and 93 deletions

View File

@ -51,7 +51,7 @@
</view>
<view class="cell">
<view class="cell-label">年龄</view>
<view class="cell-label">年龄</view>
<view class="cell-value">
<picker mode="selector" range="{{ageRanges}}" bindchange="onAgeRange">
<view class="picker-value {{form.age_range ? '' : 'placeholder'}}">
@ -93,7 +93,7 @@
<view class="reward-tip" wx:if="{{!isProfileCompleted}}">
<app-icon name="heart-filled" size="24" color="#B06AB3" />
<text>完善资料可获得 100 爱心值</text>
<text>完善资料赠送100爱心</text>
</view>
</view>
</view>

View File

@ -142,6 +142,8 @@
display: flex;
flex-direction: column;
align-items: center;
flex: 1; /* 占据剩余空间 */
justify-content: space-between; /* 上下分布 */
}
.save-btn {
@ -155,6 +157,7 @@
border-radius: 8px;
border: none;
padding: 0;
margin-bottom: auto; /* 按钮靠上 */
}
.save-btn[disabled] {
@ -163,10 +166,12 @@
}
.reward-tip {
margin-top: 16px;
margin-top: 64px; /* 增加上边距,使其远离按钮 */
margin-bottom: 40px; /* 增加下边距,使其不贴底 */
display: flex;
align-items: center;
gap: 4px;
font-size: 14px;
gap: 6px;
font-size: 18px;
color: #B06AB3;
font-weight: 500;
}

View File

@ -190,6 +190,7 @@ Page({
userLevel: userLevel,
levelClass: levelClass,
orderAmount: record.orderAmount ? Number(record.orderAmount).toFixed(2) : (record.amount ? Number(record.amount).toFixed(2) : '0.00'),
commission: record.commission ? Number(record.commission).toFixed(2) : '0.00',
time: fmtTime
}
},

View File

@ -52,17 +52,17 @@
<view class="order-item" wx:for="{{list}}" wx:key="id">
<image class="user-avatar" src="{{item.userAvatar || defaultAvatar}}" mode="aspectFill" binderror="onAvatarError" data-index="{{index}}" />
<view class="order-info">
<view class="user-name">{{item.userName}}</view>
<view class="product-info">
{{item.productName ? item.productName + ' · ' : ''}}
<text class="tag-badge {{item.levelClass}}">{{item.userLevel}}</text>
<view class="info-row">
<view class="user-name">{{item.userName}}</view>
<view class="order-amount">¥{{item.orderAmount}}</view>
</view>
<view class="info-row">
<view class="product-name">{{item.productName || '推广服务'}}</view>
<view class="commission-amount">收益 ¥{{item.commission}}</view>
</view>
<view class="info-row">
<view class="order-time">{{item.time}}</view>
</view>
<view class="order-time">时间: {{item.time}}</view>
<view class="order-no">单号: {{item.orderNo}}</view>
</view>
<view class="order-right">
<text class="amount">¥{{item.orderAmount}}</text>
</view>
</view>
</view>

View File

@ -150,7 +150,13 @@
flex: 1;
display: flex;
flex-direction: column;
gap: 4rpx;
gap: 12rpx;
}
.info-row {
display: flex;
justify-content: space-between;
align-items: center;
}
.user-name {
@ -159,36 +165,31 @@
color: #111827;
}
.product-info {
.order-amount {
font-size: 32rpx;
font-weight: 900;
color: #B06AB3;
}
.order-time {
font-size: 24rpx;
color: #9CA3AF;
font-weight: 500;
}
.order-no {
font-size: 20rpx;
color: #D1D5DB;
font-weight: 400;
margin-top: 4rpx;
.commission-amount {
font-size: 26rpx;
color: #10B981; /* Green color for earnings */
font-weight: 700;
}
.order-right {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 4rpx;
}
.label {
font-size: 22rpx;
color: #9CA3AF;
font-weight: 600;
}
.amount {
font-size: 34rpx;
font-weight: 900;
color: #B06AB3;
.product-name {
font-size: 26rpx;
color: #4B5563;
font-weight: 500;
background: #F3F4F6;
padding: 4rpx 12rpx;
border-radius: 8rpx;
}
/* Tag Styles */

View File

@ -109,6 +109,8 @@
<app-icon name="chevron-right" size="32" color="#D1D5DB" />
</view>
<!-- 隐藏复制推广码功能 -->
<!--
<view class="menu-item" bindtap="copyReferralCode">
<view class="menu-left">
<view class="icon-circle orange">
@ -118,6 +120,7 @@
</view>
<app-icon name="chevron-right" size="32" color="#D1D5DB" />
</view>
-->
<button class="menu-item btn-reset" open-type="share" style="width: 100%; text-align: left; font-weight: normal; margin: 0;">

View File

@ -69,9 +69,9 @@ Page({
// 状态映射
const statusMap = {
'pending': '待审核',
'pending': '提现中',
'processing': '打款中',
'completed': '已通过',
'completed': '已提现',
'rejected': '已拒绝'
};
item.statusText = statusMap[item.status] || '未知';

View File

@ -372,7 +372,7 @@
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
align-items: flex-start; /* 顶部对齐,避免因右侧高度增加导致左侧被拉伸 */
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.02);
border: 2rpx solid #F9FAFB;
}
@ -380,8 +380,9 @@
.record-info {
display: flex;
flex-direction: column;
gap: 8rpx;
gap: 12rpx; /* 增加间距,使时间与左侧标题间距更合理 */
flex: 1;
padding-top: 4rpx; /* 微调顶部对齐 */
}
.record-type {
@ -398,14 +399,16 @@
.record-amount {
display: flex;
flex-direction: column;
align-items: flex-end;
align-items: center; /* 改为居中对齐 */
gap: 8rpx;
width: 140rpx; /* 固定宽度确保对齐 */
}
.amount-value {
font-size: 32rpx;
font-weight: 800;
color: #111827;
text-align: center;
}
.record-status {
@ -440,8 +443,10 @@
}
.status-pending {
background: #FEF3C7;
color: #D97706;
background: rgba(176, 106, 179, 0.1);
color: #B06AB3;
font-size: 28rpx; /* 增大字号 */
padding: 8rpx 24rpx; /* 调整内边距以适应大字号 */
}
.status-processing {
@ -452,6 +457,8 @@
.status-completed {
background: #D1FAE5;
color: #059669;
font-size: 28rpx;
padding: 8rpx 24rpx;
}
.status-rejected {

View File

@ -1,20 +0,0 @@
$base = "temp_ui_ux_skill/src/ui-ux-pro-max/templates/base"
$skillContent = Get-Content "$base/skill-content.md" -Raw
$quickRef = Get-Content "$base/quick-reference.md" -Raw
$skillContent = $skillContent.Replace("{{TITLE}}", "UI UX Pro Max")
$skillContent = $skillContent.Replace("{{DESCRIPTION}}", "An AI skill that provides design intelligence for building professional UI/UX across multiple platforms and frameworks.")
$skillContent = $skillContent.Replace("{{QUICK_REFERENCE}}", $quickRef)
$skillContent = $skillContent.Replace("{{SKILL_OR_WORKFLOW}}", "Skill")
$skillContent = $skillContent.Replace("{{SCRIPT_PATH}}", ".trae/skills/ui-ux-pro-max/scripts/search.py")
$frontmatter = @"
---
name: "ui-ux-pro-max"
description: "An AI skill that provides design intelligence for building professional UI/UX across multiple platforms. Invoke when designing UI, choosing colors/fonts, or checking UX."
---
"@
$finalContent = $frontmatter + $skillContent
$finalContent | Set-Content ".trae/skills/ui-ux-pro-max/SKILL.md" -Encoding UTF8

View File

@ -1,26 +0,0 @@
import os
base_path = "temp_ui_ux_skill/src/ui-ux-pro-max/templates/base"
with open(os.path.join(base_path, "skill-content.md"), "r", encoding="utf-8") as f:
content = f.read()
with open(os.path.join(base_path, "quick-reference.md"), "r", encoding="utf-8") as f:
quick_ref = f.read()
content = content.replace("{{TITLE}}", "UI UX Pro Max")
content = content.replace("{{DESCRIPTION}}", "An AI skill that provides design intelligence for building professional UI/UX across multiple platforms and frameworks.")
content = content.replace("{{QUICK_REFERENCE}}", quick_ref)
content = content.replace("{{SKILL_OR_WORKFLOW}}", "Skill")
content = content.replace("{{SCRIPT_PATH}}", ".trae/skills/ui-ux-pro-max/scripts/search.py")
frontmatter = """---
name: "ui-ux-pro-max"
description: "An AI skill that provides design intelligence for building professional UI/UX across multiple platforms. Invoke when designing UI, choosing colors/fonts, or checking UX."
---
"""
final_content = frontmatter + content
with open(".trae/skills/ui-ux-pro-max/SKILL.md", "w", encoding="utf-8") as f:
f.write(final_content)

@ -1 +0,0 @@
Subproject commit 2ba6ca2f1ee68f73ce4fde139f1ede1432054c51