HomeLease/pages/profile/profile.vue

480 lines
10 KiB
Vue
Raw Normal View History

2025-08-13 11:43:35 +08:00
<template>
<view class="profile-page">
2025-08-13 16:56:25 +08:00
<image :src="commonEnum.FIRE_BACKGROUND" class="fire-background"></image>
2025-08-13 11:43:35 +08:00
<!-- 头部用户信息 -->
<view class="user-header">
2025-08-13 17:34:14 +08:00
<view class="avatar">
<text class="avatar-text"></text>
</view>
2025-08-13 11:43:35 +08:00
<view class="user-info">
2025-08-13 17:17:49 +08:00
<view class="share-btn">
<image :src="commonEnum.GIFT" class="share-img" mode="aspectFit"></image>
<text class="share-text">分享推广</text>
2025-08-13 16:03:05 +08:00
</view>
2025-08-13 17:17:49 +08:00
</view>
<view class="user-details">
<text class="user-name">昵称</text>
<text class="user-id">123****8912</text>
2025-08-16 09:28:04 +08:00
<view class="settings-icon" @click="gotoPage('/pages/set/set')">
<image :src="commonEnum.SET" class="settings-img" mode="aspectFit" />
2025-08-13 11:43:35 +08:00
</view>
</view>
</view>
2025-08-13 16:03:05 +08:00
<!-- 财务摘要 -->
<view class="financial-summary">
2025-08-13 17:17:49 +08:00
<image :src="commonEnum.COIN_BACKGROUND" class="coin-background" mode="width"></image>
2025-08-13 16:03:05 +08:00
<view class="main-amount">
<text class="amount-number">18079.29</text>
<text class="amount-label">可提现()</text>
2025-08-13 11:43:35 +08:00
</view>
2025-08-13 16:03:05 +08:00
<view class="action-buttons">
<view class="action-btn income-expense-btn" @click="goToIncomeExpense">
2025-08-13 16:03:05 +08:00
<text class="btn-text">收支明细 ></text>
</view>
<view class="action-btn withdraw-btn" @click="goToWithdraw">
2025-08-13 16:03:05 +08:00
<text class="btn-text">立即提现 ></text>
</view>
2025-08-13 11:43:35 +08:00
</view>
2025-08-13 16:03:05 +08:00
<view class="financial-stats">
<view class="stat-item">
<text class="stat-number">399.59</text>
<text class="stat-label">待入账()</text>
</view>
<view class="stat-item">
<text class="stat-number">9.59</text>
<text class="stat-label">提现中()</text>
</view>
<view class="stat-item">
<text class="stat-number">999.59</text>
<text class="stat-label">已提现()</text>
</view>
2025-08-13 11:43:35 +08:00
</view>
</view>
2025-08-13 16:03:05 +08:00
<!-- 我的用户 -->
<view class="my-users-section">
<view class="section-header">
<text class="section-title">我的用户</text>
<view class="view-details" @click="goToUserList">
2025-08-13 16:03:05 +08:00
<text class="details-text">查看详情 ></text>
2025-08-13 11:43:35 +08:00
</view>
2025-08-13 16:03:05 +08:00
</view>
<view class="user-stats">
<view class="stat-item">
<text class="stat-number">30</text>
<text class="stat-label">名下用户()</text>
2025-08-13 11:43:35 +08:00
</view>
2025-08-13 16:03:05 +08:00
<view class="stat-item">
<text class="stat-number">30</text>
<text class="stat-label">租赁数量()</text>
</view>
<view class="stat-item">
<text class="stat-number">3000</text>
<text class="stat-label">租赁金额()</text>
2025-08-13 11:43:35 +08:00
</view>
</view>
2025-08-13 16:03:05 +08:00
</view>
2025-08-13 11:43:35 +08:00
2025-08-13 16:03:05 +08:00
<!-- 其他功能 -->
<view class="other-functions">
<view class="section-header">
<text class="section-title">其他功能</text>
</view>
<view class="function-grid">
<view class="function-item" @click="goToAgentApply">
<view class="function-icon">
<image :src="commonEnum.REQUEST_AGENT" class="function-img" mode="aspectFit"></image>
2025-08-13 11:43:35 +08:00
</view>
2025-08-13 16:03:05 +08:00
<text class="function-text">申请代理</text>
2025-08-13 11:43:35 +08:00
</view>
2025-08-13 16:03:05 +08:00
<view class="function-item" @click="goToAgentBenefits">
<view class="function-icon">
<image :src="commonEnum.AGENCY_INTERESTS" class="function-img" mode="aspectFit"></image>
2025-08-13 11:43:35 +08:00
</view>
2025-08-13 16:03:05 +08:00
<text class="function-text">代理权益</text>
2025-08-13 11:43:35 +08:00
</view>
2025-08-13 16:03:05 +08:00
<view class="function-item" @click="goToCustomerService">
<view class="function-icon">
<image
:src="commonEnum.ONLINE_CUSTOMER_SERVICE"
class="function-img"
mode="aspectFit"
></image>
2025-08-13 11:43:35 +08:00
</view>
2025-08-13 16:03:05 +08:00
<text class="function-text">在线客服</text>
2025-08-13 11:43:35 +08:00
</view>
</view>
</view>
</view>
</template>
<script>
2025-08-13 16:03:05 +08:00
import { commonEnum } from '@/enum/commonEnum.js'
2025-08-13 11:43:35 +08:00
export default {
name: 'ProfilePage',
data() {
return {
2025-08-13 16:03:05 +08:00
commonEnum,
2025-08-13 11:43:35 +08:00
userInfo: {
2025-08-13 16:03:05 +08:00
name: '昵称',
id: '123****8912',
},
financialData: {
withdrawable: '18079.29',
pending: '399.59',
withdrawing: '9.59',
withdrawn: '999.59',
},
userStats: {
users: 30,
leases: 30,
amount: 3000,
2025-08-13 11:43:35 +08:00
},
}
},
methods: {
2025-08-16 09:28:04 +08:00
gotoPage(url) {
uni.navigateTo({ url })
},
2025-08-13 16:03:05 +08:00
goToAgentApply() {
2025-08-18 17:34:18 +08:00
uni.navigateTo({
url: '/pages/agents/agents',
2025-08-13 11:43:35 +08:00
})
},
2025-08-13 16:03:05 +08:00
goToAgentBenefits() {
2025-08-13 11:43:35 +08:00
uni.showToast({
2025-08-13 16:03:05 +08:00
title: '代理权益',
icon: 'none',
2025-08-13 11:43:35 +08:00
})
},
2025-08-13 16:03:05 +08:00
goToCustomerService() {
2025-08-13 11:43:35 +08:00
uni.showToast({
2025-08-13 16:03:05 +08:00
title: '在线客服',
icon: 'none',
2025-08-13 11:43:35 +08:00
})
},
goToIncomeExpense() {
uni.navigateTo({
url: '/pages/cashFlow/cashFlow',
})
},
goToWithdraw() {
uni.navigateTo({
url: '/pages/requestWithdrawal/requestWithdrawal',
})
},
goToUserList() {
uni.navigateTo({
url: '/pages/useList/useList',
})
},
2025-08-13 16:03:05 +08:00
},
2025-08-13 11:43:35 +08:00
}
</script>
<style lang="scss" scoped>
.profile-page {
2025-08-13 16:56:25 +08:00
background: #f3f5f6;
2025-08-13 16:32:50 +08:00
.fire-background {
position: absolute;
top: 0;
left: 0;
2025-08-13 16:56:25 +08:00
width: 750rpx;
height: 592rpx;
2025-08-13 16:32:50 +08:00
opacity: 1;
2025-08-13 16:56:25 +08:00
z-index: -1;
2025-08-13 11:43:35 +08:00
}
}
// 用户头部
.user-header {
2025-08-13 17:34:14 +08:00
padding: 40rpx 40rpx 40rpx 40rpx;
2025-08-13 16:56:25 +08:00
margin: 270rpx 20rpx 20rpx 20rpx;
2025-08-13 16:03:05 +08:00
border-radius: 20rpx;
position: relative;
2025-08-13 16:56:25 +08:00
background: #ffffff;
2025-08-13 16:03:05 +08:00
2025-08-13 17:34:14 +08:00
.avatar {
position: absolute;
top: -80rpx; // 头像向上偏移,一半在容器外
left: 40rpx;
width: 160rpx;
height: 160rpx;
background: #817f7f;
border-radius: 50%;
2025-08-13 11:43:35 +08:00
display: flex;
align-items: center;
2025-08-13 17:34:14 +08:00
justify-content: center;
z-index: 10; // 确保头像在最上层
2025-08-13 16:03:05 +08:00
2025-08-13 17:34:14 +08:00
.avatar-text {
font-size: 60rpx;
font-weight: bold;
color: #ffffff;
2025-08-13 11:43:35 +08:00
}
2025-08-13 17:34:14 +08:00
}
.user-info {
display: flex;
align-items: center;
justify-content: flex-end; // 分享按钮靠右对齐
margin-bottom: 30rpx;
2025-08-13 16:03:05 +08:00
2025-08-13 17:17:49 +08:00
.share-btn {
background: linear-gradient(135deg, #fffcfa 0, #ffe0c7 100%);
padding: 20rpx 30rpx;
border-radius: 30rpx;
display: flex;
align-items: center;
2025-08-13 16:03:05 +08:00
2025-08-13 17:17:49 +08:00
.share-img {
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
2025-08-13 11:43:35 +08:00
}
2025-08-13 16:03:05 +08:00
2025-08-13 17:17:49 +08:00
.share-text {
font-size: 24rpx;
color: #722b03;
2025-08-13 16:03:05 +08:00
}
}
2025-08-13 17:17:49 +08:00
}
.user-details {
display: flex;
justify-content: space-between;
2025-08-13 17:34:14 +08:00
align-items: flex-start;
2025-08-13 17:17:49 +08:00
.user-name {
display: block;
font-size: 32rpx;
font-weight: bold;
color: #3d3d3d;
margin-bottom: 10rpx;
}
.user-id {
font-size: 28rpx;
color: #817f7f;
}
2025-08-13 16:03:05 +08:00
.settings-icon {
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
display: flex;
2025-08-13 17:34:14 +08:00
padding: 10rpx;
2025-08-13 16:03:05 +08:00
.settings-img {
width: 40rpx;
height: 40rpx;
2025-08-13 11:43:35 +08:00
}
}
}
}
2025-08-13 16:03:05 +08:00
// 财务摘要
.financial-summary {
margin: 20rpx;
2025-08-13 11:43:35 +08:00
border-radius: 20rpx;
2025-08-13 16:32:50 +08:00
padding: 54rpx;
2025-08-13 16:03:05 +08:00
color: #fff;
position: relative;
2025-08-18 17:34:18 +08:00
top: -70rpx;
2025-08-13 16:03:05 +08:00
overflow: hidden;
2025-08-13 17:23:54 +08:00
//border: 1px red solid;
2025-08-13 16:03:05 +08:00
.coin-background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
2025-08-13 16:16:43 +08:00
opacity: 1;
2025-08-13 16:03:05 +08:00
z-index: 1;
}
.main-amount {
2025-08-13 16:16:43 +08:00
margin-top: 30rpx;
margin-bottom: 66rpx;
2025-08-13 16:03:05 +08:00
position: relative;
z-index: 2;
.amount-number {
display: block;
2025-08-13 16:16:43 +08:00
font-size: 44rpx;
2025-08-13 11:43:35 +08:00
font-weight: bold;
margin-bottom: 10rpx;
2025-08-13 16:16:43 +08:00
height: 60rpx;
2025-08-13 11:43:35 +08:00
}
2025-08-13 16:03:05 +08:00
.amount-label {
font-size: 28rpx;
opacity: 0.9;
2025-08-13 11:43:35 +08:00
}
}
2025-08-13 16:03:05 +08:00
.action-buttons {
position: absolute;
2025-08-13 16:32:50 +08:00
top: 80rpx;
2025-08-13 16:03:05 +08:00
right: 40rpx;
display: flex;
flex-direction: column;
gap: 20rpx;
z-index: 2;
.action-btn {
2025-08-13 16:32:50 +08:00
padding: 10rpx 34rpx;
border-radius: 30rpx;
cursor: pointer;
transition: all 0.3s ease;
2025-08-13 16:03:05 +08:00
.btn-text {
font-size: 24rpx;
2025-08-13 16:32:50 +08:00
}
}
.income-expense-btn {
.btn-text {
2025-08-13 16:03:05 +08:00
color: #fff;
2025-08-13 11:43:35 +08:00
}
2025-08-13 16:03:05 +08:00
}
2025-08-13 16:32:50 +08:00
.withdraw-btn {
background: #fff;
.btn-text {
color: #f15a04;
}
}
2025-08-13 16:03:05 +08:00
}
.financial-stats {
display: flex;
2025-08-13 16:32:50 +08:00
justify-content: space-between;
2025-08-13 16:03:05 +08:00
position: relative;
z-index: 2;
.stat-item {
.stat-number {
display: block;
font-size: 32rpx;
font-weight: bold;
margin-bottom: 5rpx;
2025-08-13 11:43:35 +08:00
}
2025-08-13 16:03:05 +08:00
.stat-label {
font-size: 24rpx;
opacity: 0.8;
}
}
}
}
// 我的用户
.my-users-section {
2025-08-18 17:34:18 +08:00
position: relative;
top: -70rpx;
2025-08-13 16:03:05 +08:00
background: #fff;
margin: 20rpx;
border-radius: 20rpx;
padding: 40rpx;
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30rpx;
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.view-details {
.details-text {
2025-08-13 11:43:35 +08:00
font-size: 28rpx;
2025-08-13 16:32:50 +08:00
color: #9e9e9e;
2025-08-13 11:43:35 +08:00
}
2025-08-13 16:03:05 +08:00
}
}
.user-stats {
display: flex;
justify-content: space-around;
.stat-item {
text-align: center;
.stat-number {
display: block;
font-size: 36rpx;
font-weight: bold;
2025-08-13 16:32:50 +08:00
color: #3d3d3d;
2025-08-13 16:03:05 +08:00
margin-bottom: 10rpx;
}
.stat-label {
font-size: 24rpx;
color: #666;
2025-08-13 11:43:35 +08:00
}
}
}
}
2025-08-13 16:03:05 +08:00
// 其他功能
.other-functions {
2025-08-18 17:34:18 +08:00
position: relative;
top: -70rpx;
2025-08-13 16:03:05 +08:00
background: #fff;
margin: 20rpx;
border-radius: 20rpx;
padding: 40rpx;
.section-header {
margin-bottom: 30rpx;
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
}
.function-grid {
display: flex;
justify-content: space-around;
.function-item {
text-align: center;
flex: 1;
.function-icon {
width: 80rpx;
height: 80rpx;
background: #f5f5f5;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 20rpx;
.function-img {
width: 50rpx;
height: 50rpx;
}
}
.function-text {
font-size: 24rpx;
color: #333;
}
2025-08-13 11:43:35 +08:00
}
}
}
2025-08-13 16:03:05 +08:00
</style>