feat: optimize UI for performance, withdraw and profile pages
This commit is contained in:
parent
615a07fd08
commit
a3abe821cc
|
|
@ -51,7 +51,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="cell">
|
<view class="cell">
|
||||||
<view class="cell-label">年龄段</view>
|
<view class="cell-label">年龄</view>
|
||||||
<view class="cell-value">
|
<view class="cell-value">
|
||||||
<picker mode="selector" range="{{ageRanges}}" bindchange="onAgeRange">
|
<picker mode="selector" range="{{ageRanges}}" bindchange="onAgeRange">
|
||||||
<view class="picker-value {{form.age_range ? '' : 'placeholder'}}">
|
<view class="picker-value {{form.age_range ? '' : 'placeholder'}}">
|
||||||
|
|
@ -93,7 +93,7 @@
|
||||||
|
|
||||||
<view class="reward-tip" wx:if="{{!isProfileCompleted}}">
|
<view class="reward-tip" wx:if="{{!isProfileCompleted}}">
|
||||||
<app-icon name="heart-filled" size="24" color="#B06AB3" />
|
<app-icon name="heart-filled" size="24" color="#B06AB3" />
|
||||||
<text>完善资料可获得 100 爱心值</text>
|
<text>完善资料赠送100爱心</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,8 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
flex: 1; /* 占据剩余空间 */
|
||||||
|
justify-content: space-between; /* 上下分布 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.save-btn {
|
.save-btn {
|
||||||
|
|
@ -155,6 +157,7 @@
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: none;
|
border: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
margin-bottom: auto; /* 按钮靠上 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.save-btn[disabled] {
|
.save-btn[disabled] {
|
||||||
|
|
@ -163,10 +166,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.reward-tip {
|
.reward-tip {
|
||||||
margin-top: 16px;
|
margin-top: 64px; /* 增加上边距,使其远离按钮 */
|
||||||
|
margin-bottom: 40px; /* 增加下边距,使其不贴底 */
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 4px;
|
gap: 6px;
|
||||||
font-size: 14px;
|
font-size: 18px;
|
||||||
color: #B06AB3;
|
color: #B06AB3;
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,7 @@ Page({
|
||||||
userLevel: userLevel,
|
userLevel: userLevel,
|
||||||
levelClass: levelClass,
|
levelClass: levelClass,
|
||||||
orderAmount: record.orderAmount ? Number(record.orderAmount).toFixed(2) : (record.amount ? Number(record.amount).toFixed(2) : '0.00'),
|
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
|
time: fmtTime
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -52,17 +52,17 @@
|
||||||
<view class="order-item" wx:for="{{list}}" wx:key="id">
|
<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}}" />
|
<image class="user-avatar" src="{{item.userAvatar || defaultAvatar}}" mode="aspectFill" binderror="onAvatarError" data-index="{{index}}" />
|
||||||
<view class="order-info">
|
<view class="order-info">
|
||||||
|
<view class="info-row">
|
||||||
<view class="user-name">{{item.userName}}</view>
|
<view class="user-name">{{item.userName}}</view>
|
||||||
<view class="product-info">
|
<view class="order-amount">¥{{item.orderAmount}}</view>
|
||||||
{{item.productName ? item.productName + ' · ' : ''}}
|
|
||||||
<text class="tag-badge {{item.levelClass}}">{{item.userLevel}}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="order-time">时间: {{item.time}}</view>
|
<view class="info-row">
|
||||||
<view class="order-no">单号: {{item.orderNo}}</view>
|
<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>
|
||||||
<view class="order-right">
|
|
||||||
|
|
||||||
<text class="amount">¥{{item.orderAmount}}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,13 @@
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 4rpx;
|
gap: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-row {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-name {
|
.user-name {
|
||||||
|
|
@ -159,36 +165,31 @@
|
||||||
color: #111827;
|
color: #111827;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-info {
|
.order-amount {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 900;
|
||||||
|
color: #B06AB3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.order-time {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #9CA3AF;
|
color: #9CA3AF;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-no {
|
.commission-amount {
|
||||||
font-size: 20rpx;
|
font-size: 26rpx;
|
||||||
color: #D1D5DB;
|
color: #10B981; /* Green color for earnings */
|
||||||
font-weight: 400;
|
font-weight: 700;
|
||||||
margin-top: 4rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-right {
|
.product-name {
|
||||||
display: flex;
|
font-size: 26rpx;
|
||||||
flex-direction: column;
|
color: #4B5563;
|
||||||
align-items: flex-end;
|
font-weight: 500;
|
||||||
gap: 4rpx;
|
background: #F3F4F6;
|
||||||
}
|
padding: 4rpx 12rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
.label {
|
|
||||||
font-size: 22rpx;
|
|
||||||
color: #9CA3AF;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.amount {
|
|
||||||
font-size: 34rpx;
|
|
||||||
font-weight: 900;
|
|
||||||
color: #B06AB3;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tag Styles */
|
/* Tag Styles */
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,8 @@
|
||||||
<app-icon name="chevron-right" size="32" color="#D1D5DB" />
|
<app-icon name="chevron-right" size="32" color="#D1D5DB" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 隐藏复制推广码功能 -->
|
||||||
|
<!--
|
||||||
<view class="menu-item" bindtap="copyReferralCode">
|
<view class="menu-item" bindtap="copyReferralCode">
|
||||||
<view class="menu-left">
|
<view class="menu-left">
|
||||||
<view class="icon-circle orange">
|
<view class="icon-circle orange">
|
||||||
|
|
@ -118,6 +120,7 @@
|
||||||
</view>
|
</view>
|
||||||
<app-icon name="chevron-right" size="32" color="#D1D5DB" />
|
<app-icon name="chevron-right" size="32" color="#D1D5DB" />
|
||||||
</view>
|
</view>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
<button class="menu-item btn-reset" open-type="share" style="width: 100%; text-align: left; font-weight: normal; margin: 0;">
|
<button class="menu-item btn-reset" open-type="share" style="width: 100%; text-align: left; font-weight: normal; margin: 0;">
|
||||||
|
|
|
||||||
|
|
@ -69,9 +69,9 @@ Page({
|
||||||
|
|
||||||
// 状态映射
|
// 状态映射
|
||||||
const statusMap = {
|
const statusMap = {
|
||||||
'pending': '待审核',
|
'pending': '提现中',
|
||||||
'processing': '打款中',
|
'processing': '打款中',
|
||||||
'completed': '已通过',
|
'completed': '已提现',
|
||||||
'rejected': '已拒绝'
|
'rejected': '已拒绝'
|
||||||
};
|
};
|
||||||
item.statusText = statusMap[item.status] || '未知';
|
item.statusText = statusMap[item.status] || '未知';
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: flex-start; /* 顶部对齐,避免因右侧高度增加导致左侧被拉伸 */
|
||||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.02);
|
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.02);
|
||||||
border: 2rpx solid #F9FAFB;
|
border: 2rpx solid #F9FAFB;
|
||||||
}
|
}
|
||||||
|
|
@ -380,8 +380,9 @@
|
||||||
.record-info {
|
.record-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 8rpx;
|
gap: 12rpx; /* 增加间距,使时间与左侧标题间距更合理 */
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
padding-top: 4rpx; /* 微调顶部对齐 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.record-type {
|
.record-type {
|
||||||
|
|
@ -398,14 +399,16 @@
|
||||||
.record-amount {
|
.record-amount {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-end;
|
align-items: center; /* 改为居中对齐 */
|
||||||
gap: 8rpx;
|
gap: 8rpx;
|
||||||
|
width: 140rpx; /* 固定宽度确保对齐 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.amount-value {
|
.amount-value {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
color: #111827;
|
color: #111827;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.record-status {
|
.record-status {
|
||||||
|
|
@ -440,8 +443,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-pending {
|
.status-pending {
|
||||||
background: #FEF3C7;
|
background: rgba(176, 106, 179, 0.1);
|
||||||
color: #D97706;
|
color: #B06AB3;
|
||||||
|
font-size: 28rpx; /* 增大字号 */
|
||||||
|
padding: 8rpx 24rpx; /* 调整内边距以适应大字号 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-processing {
|
.status-processing {
|
||||||
|
|
@ -452,6 +457,8 @@
|
||||||
.status-completed {
|
.status-completed {
|
||||||
background: #D1FAE5;
|
background: #D1FAE5;
|
||||||
color: #059669;
|
color: #059669;
|
||||||
|
font-size: 28rpx;
|
||||||
|
padding: 8rpx 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-rejected {
|
.status-rejected {
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
Loading…
Reference in New Issue
Block a user