ry_app/pages/asset/asset.vue

284 lines
5.6 KiB
Vue

<template>
<view class="page">
<!-- 顶部资产卡片 -->
<view class="asset-card">
<view class="asset-title">我的资产</view>
<view class="asset-amount">¥0.00</view>
<view class="asset-details">
<view class="detail-item">
<view class="label">可提现</view>
<view class="value">¥0.00</view>
</view>
<view class="divider"></view>
<view class="detail-item">
<view class="label">待结算</view>
<view class="value">¥0.00</view>
<view class="hint">次日可提现</view>
</view>
</view>
</view>
<!-- 操作按钮 -->
<view class="action-buttons">
<button class="btn primary" @tap="handleRecharge"></button>
<button class="btn outline" @tap="handleWithdraw"></button>
</view>
<!-- -->
<view class="section-title">资金明细</view>
<!-- 明细列表 -->
<view class="detail-list">
<view class="list-item" @tap="goToDetail('withdrawable')">
<view class="item-left">
<view class="item-icon withdrawable">可提现</view>
<view class="item-label">¥0.00</view>
</view>
<view class="item-arrow">></view>
</view>
<view class="list-item active" @tap="goToDetail('pending')">
<view class="item-left">
<view class="item-icon pending">待结算()</view>
<view class="item-label">¥0.00</view>
</view>
<view class="item-arrow"></view>
</view>
<view class="list-item" @tap="goToDetail('withdrawn')">
<view class="item-left">
<view class="item-icon withdrawn">已提现()</view>
<view class="item-label">¥0.00</view>
</view>
<view class="item-arrow">></view>
</view>
<view class="list-item" @tap="goToDetail('cash')">
<view class="item-left">
<view class="item-icon cash">现金支付()</view>
<view class="item-label">¥0.00</view>
</view>
<view class="item-arrow">></view>
</view>
<view class="list-item" @tap="goToBankCard">
<view class="item-left">
<view class="item-icon bank">我的银行卡</view>
<view class="item-label">未绑定</view>
</view>
<view class="item-arrow">></view>
</view>
</view>
<!-- 常见问题 -->
<view class="faq-section">
<view class="faq-title">常见问题</view>
<!-- 这里可以展开常见问题列表 -->
</view>
</view>
</template>
<script setup>
const handleRecharge = () => {
uni.showToast({
title: '充值功能',
icon: 'none'
})
}
const handleWithdraw = () => {
uni.showToast({
title: '提现功能',
icon: 'none'
})
}
const goToDetail = (type) => {
uni.showToast({
title: `查看${type}明细`,
icon: 'none'
})
}
const goToBankCard = () => {
uni.showToast({
title: '前往绑定银行卡',
icon: 'none'
})
}
</script>
<style lang="scss" scoped>
.page {
padding: 20rpx 30rpx;
background-color: #f8f8f8;
min-height: 100vh;
}
// 资产卡片
.asset-card {
background: linear-gradient(135deg, #4a6ee0, #6a8eff);
border-radius: 20rpx;
padding: 40rpx 30rpx;
color: #fff;
margin-bottom: 40rpx;
box-shadow: 0 10rpx 20rpx rgba(74, 110, 224, 0.2);
}
.asset-title {
font-size: 28rpx;
opacity: 0.9;
margin-bottom: 20rpx;
}
.asset-amount {
font-size: 60rpx;
font-weight: bold;
margin-bottom: 50rpx;
}
.asset-details {
display: flex;
justify-content: space-between;
align-items: center;
}
.detail-item {
flex: 1;
text-align: center;
}
.label {
font-size: 26rpx;
opacity: 0.85;
margin-bottom: 10rpx;
}
.value {
font-size: 36rpx;
font-weight: bold;
}
.hint {
font-size: 24rpx;
opacity: 0.7;
margin-top: 8rpx;
}
.divider {
width: 2rpx;
height: 80rpx;
background-color: rgba(255, 255, 255, 0.3);
}
// 操作按钮
.action-buttons {
display: flex;
gap: 20rpx;
margin-bottom: 50rpx;
}
.btn {
flex: 1;
height: 90rpx;
border-radius: 45rpx;
font-size: 30rpx;
font-weight: 500;
border: none;
display: flex;
align-items: center;
justify-content: center;
&.primary {
background-color: #4a6ee0;
color: #fff;
}
&.outline {
background-color: transparent;
border: 2rpx solid #4a6ee0;
color: #4a6ee0;
}
}
// 分区标题
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
margin-bottom: 30rpx;
padding-left: 10rpx;
}
// 明细列表
.detail-list {
background-color: #fff;
border-radius: 20rpx;
padding: 0 30rpx;
margin-bottom: 40rpx;
box-shadow: 0 5rpx 15rpx rgba(0, 0, 0, 0.03);
}
.list-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx 0;
border-bottom: 1rpx solid #f0f0f0;
&:last-child {
border-bottom: none;
}
&.active {
.item-icon {
color: #4a6ee0;
}
.item-label {
color: #4a6ee0;
}
}
}
.item-left {
display: flex;
align-items: center;
gap: 20rpx;
}
.item-icon {
font-size: 30rpx;
color: #333;
&.withdrawable::before { content: "💳 "; }
&.pending::before { content: "⏳ "; }
&.withdrawn::before { content: "💰 "; }
&.cash::before { content: "💵 "; }
&.bank::before { content: "🏦 "; }
}
.item-label {
font-size: 28rpx;
color: #666;
}
.item-arrow {
font-size: 32rpx;
color: #999;
}
// 常见问题
.faq-section {
background-color: #fff;
border-radius: 20rpx;
padding: 30rpx;
box-shadow: 0 5rpx 15rpx rgba(0, 0, 0, 0.03);
}
.faq-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
</style>