This commit is contained in:
2026-07-10 16:14:31 +08:00
commit 637b0bd144
158 changed files with 33269 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
{
"usingComponents": {
"custom-nav": "/components/custom-nav/custom-nav",
"vip-popup": "/components/vip-popup/vip-popup",
"checkin-popup": "/components/checkin-popup/checkin-popup"
},
"navigationStyle": "custom"
}
+80
View File
@@ -0,0 +1,80 @@
import { customEvent } from "../../utils/event"
Page({
data: {
showVipPopup: false,
showCheckinPopup: false,
menus: [
{ key: 'feedback', title: '意见反馈', icon: '/static/images/my/my_icon_8.png' },
{ key: 'privacy', title: '帮助中心', icon: '/static/images/my/my_icon_3.png' },
{ key: 'privacy', title: '隐私协议', icon: '/static/images/my/my_icon_7.png' },
],
userinfo: {
nickname: '创作小助手',
id: '10010',
avatar: 'https://cdn.zhuangb123.com/avatar/boy/a2cfe723-98ddc-12de-723b8f51b-71b1e3.jpeg',
description: 'AI 创作,让想象力触手可及 ✨'
}
},
onLoad() {
this.setData({
userinfo: wx.getStorageSync('userInfo')
})
customEvent.on('update:userinfo', this.onResetUserinfo)
},
onUnload() {
customEvent.off('update:userinfo', this.onResetUserinfo)
},
onResetUserinfo() {
this.setData({ userinfo: wx.getStorageSync('userInfo') })
},
handleEdit() {
wx.navigateTo({
url: '/pages/myPackage/edit/index',
})
},
handleCheckin() {
this.setData({ showCheckinPopup: true })
},
handleCheckinClose() {
this.setData({ showCheckinPopup: false })
},
handleCheckinRule() {
wx.showToast({ title: '每日签到可领取金币', icon: 'none' })
},
handleAddCoin() {
wx.navigateTo({
url: '/pages/myPackage/golb/index',
})
},
handleOpenVip() {
this.setData({ showVipPopup: true })
},
handleVipClose() {
this.setData({ showVipPopup: false })
},
handleVipConfirm(e: WechatMiniprogram.CustomEvent) {
this.setData({ showVipPopup: false })
const plan = e.detail.plan
wx.showToast({ title: plan ? '已选择' + plan.name : '立即开通', icon: 'none' })
},
handleMenuTap(e: WechatMiniprogram.TouchEvent) {
const key = e.currentTarget.dataset.key
const routeMap: Record<string, string> = {
feedback: '/pages/myPackage/yjfk/index',
privacy: '/pages/myPackage/ysxy/index',
}
const url = routeMap[String(key || '')]
if (url) {
wx.navigateTo({ url })
}
},
})
+64
View File
@@ -0,0 +1,64 @@
<view class="profile-page">
<custom-nav padding-x="38">
<view class="profile-nav">
<text class="nav-title">个人中心</text>
</view>
</custom-nav>
<view class="profile-content">
<view class="user-section">
<view class="avatar">
<image src="{{userinfo.avatar}}"></image>
</view>
<view class="user-info">
<view class="name-row">
<text class="user-name">{{userinfo.nickname}}</text>
<text class="level-badge">普通用户</text>
</view>
<text class="user-id">ID{{userinfo.id}}</text>
<text class="user-desc">{{userinfo.description}}</text>
</view>
<view class="user-actions">
<view class="outline-action" bindtap="handleEdit">
<!-- <text class="edit-icon"></text> -->
<image src="../../static/images/my/edit.png" style="width: 24rpx;height: 24rpx;"></image>
<text>编辑资料</text>
</view>
<view class="outline-action checkin" bindtap="handleCheckin">
<image src="../../static/images/my/Signin.png" style="width: 24rpx;height: 24rpx;"></image>
<text>签到领金币</text>
</view>
</view>
</view>
<view class="coin-card" bind:tap="handleAddCoin">
<image src="/static/images/my/my_icon_1.png"
style="width: 700rpx;height: 186rpx;position: absolute;left: 0;top: 0;"></image>
<view class="coin-copy">
<text>{{userinfo.diamond}}</text>
<image src="/static/images/my/add.png" style="width: 40rpx;height: 40rpx;"></image>
</view>
</view>
<view class="vip-card" bindtap="handleOpenVip">
<image class="crown-icon icon-placeholder" src="/static/images/my/my_icon_2.png" mode="widthFix"></image>
<!-- <view class="vip-left">
<image class="crown-icon icon-placeholder" src="/static/images/my/image.png" mode="aspectFit"></image>
<text class="vip-title">会员中心</text>
</view>
<text class="vip-desc">解锁更多创作权益,生成更鲨金币</text>
<view class="vip-btn" bindtap="handleOpenVip">开通会员</view> -->
</view>
<view class="menu-card">
<view wx:for="{{menus}}" wx:key="key" class="menu-item" bindtap="handleMenuTap" data-key="{{item.key}}">
<image src="{{item.icon}}" style="width: 38rpx;height: 38rpx;"></image>
<text class="menu-title">{{item.title}}</text>
<text class="menu-arrow"></text>
</view>
</view>
</view>
<vip-popup visible="{{showVipPopup}}" bind:close="handleVipClose" bind:confirm="handleVipConfirm"></vip-popup>
<checkin-popup visible="{{showCheckinPopup}}" bind:close="handleCheckinClose" bind:rule="handleCheckinRule">
</checkin-popup>
</view>
+462
View File
@@ -0,0 +1,462 @@
page {
min-height: 100vh;
background: #f8f8ff;
color: #111521;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.profile-page {
width: 750rpx;
min-height: 100vh;
margin: 0 auto;
display: flex;
flex-direction: column;
box-sizing: border-box;
background:
radial-gradient(circle at 80% 6%, rgba(129, 93, 255, 0.22), transparent 20%),
radial-gradient(circle at 18% 9%, rgba(116, 118, 255, 0.16), transparent 24%),
linear-gradient(180deg, #f1efff 0%, #fbfbff 36%, #ffffff 100%);
}
.profile-nav {
width: 100%;
display: flex;
align-items: center;
}
.nav-title {
font-size: 31rpx;
font-weight: 800;
color: #090c15;
letter-spacing: 0;
}
.profile-content {
flex: 1;
display: flex;
flex-direction: column;
gap: 20rpx;
padding: 34rpx 27rpx 28rpx;
box-sizing: border-box;
}
.user-section {
min-height: 136rpx;
display: flex;
align-items: center;
gap: 26rpx;
}
.avatar {
width: 94rpx;
height: 94rpx;
border-radius: 50%;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
/* background: linear-gradient(135deg, #f4c2d0, #b985ff); */
box-shadow: 0 10rpx 18rpx rgba(136, 95, 186, 0.18);
}
.avatar image {
width: 100%;
height: 100%;
}
.user-info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 10rpx;
}
.name-row {
display: flex;
align-items: center;
gap: 12rpx;
}
.user-name {
font-size: 30rpx;
line-height: 1.2;
font-weight: 900;
color: #111521;
}
.level-badge {
height: 30rpx;
padding: 0 14rpx;
border-radius: 999rpx;
display: flex;
align-items: center;
color: #ffffff;
font-size: 18rpx;
font-weight: 800;
background: linear-gradient(135deg, #5c7cff, #7e39eb);
}
.user-id,
.user-desc {
color: #72727c;
font-size: 21rpx;
line-height: 1.2;
white-space: nowrap;
}
.user-actions {
width: 176rpx;
display: flex;
flex-direction: column;
gap: 14rpx;
flex-shrink: 0;
}
.outline-action {
height: 52rpx;
border-radius: 999rpx;
display: flex;
align-items: center;
justify-content: center;
gap: 10rpx;
color: #664cff;
font-size: 21rpx;
font-weight: 800;
background: rgba(255, 255, 255, 0.72);
border: 2rpx solid #8b72ff;
box-sizing: border-box;
}
.checkin {
border-color: transparent;
background: rgba(255, 255, 255, 0.88);
box-shadow: 0 6rpx 14rpx rgba(122, 102, 255, 0.08);
}
.edit-icon {
width: 20rpx;
height: 20rpx;
display: block;
border-left: 4rpx solid currentColor;
border-bottom: 4rpx solid currentColor;
transform: rotate(-45deg);
box-sizing: border-box;
}
.calendar-icon {
width: 22rpx;
height: 24rpx;
display: block;
border: 3rpx solid currentColor;
border-radius: 5rpx;
box-sizing: border-box;
}
.coin-card {
min-height: 180rpx;
margin-top: 26rpx;
padding: 30rpx 38rpx;
border-radius: 22rpx;
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
overflow: hidden;
background:
radial-gradient(circle at 78% 50%, rgba(255, 210, 105, 0.18), transparent 26%),
linear-gradient(100deg, #fffdf9 0%, #fff8eb 100%);
border: 1rpx solid #f1d8a9;
box-shadow: 0 8rpx 18rpx rgba(159, 117, 46, 0.06);
box-sizing: border-box;
}
.coin-copy {
display: flex;
flex-direction: column;
gap: 20rpx;
position: absolute;
left: 100rpx;
top: 80rpx;
display: flex;
flex-direction: row;
align-items: center;
}
.coin-copy text:first-child{
font-size: 50rpx;
font-weight: bold;
line-height: 1.2;
}
.coin-copy image{
margin-top: -4rpx;
}
.coin-title {
font-size: 24rpx;
font-weight: 700;
color: #141925;
}
.coin-row {
display: flex;
align-items: center;
gap: 14rpx;
}
.coin-symbol,
.coin-add {
width: 44rpx;
height: 44rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
font-weight: 900;
background: linear-gradient(135deg, #ffd46a, #ff9900);
box-shadow: inset 0 0 0 3rpx rgba(255, 255, 255, 0.42), 0 6rpx 12rpx rgba(245, 154, 16, 0.2);
}
.coin-symbol {
font-size: 18rpx;
}
.coin-count {
font-size: 50rpx;
line-height: 1;
font-weight: 900;
color: #111925;
}
.coin-add {
font-size: 32rpx;
}
.treasure-scene {
width: 284rpx;
height: 122rpx;
display: flex;
align-items: flex-end;
justify-content: center;
}
.treasure-box {
width: 116rpx;
height: 92rpx;
display: flex;
flex-direction: column;
align-items: center;
filter: drop-shadow(0 8rpx 12rpx rgba(127, 76, 216, 0.22));
}
.treasure-lid {
width: 120rpx;
height: 36rpx;
border-radius: 18rpx 18rpx 8rpx 8rpx;
background: linear-gradient(90deg, #ce79ff 0 24%, #ffc05d 24% 38%, #8d57e8 38% 76%, #ffc05d 76% 100%);
transform: skewX(8deg);
}
.treasure-body {
width: 104rpx;
height: 58rpx;
border-radius: 8rpx 8rpx 16rpx 16rpx;
background: linear-gradient(90deg, #7e55d9 0 28%, #ffb845 28% 44%, #9f62ef 44% 100%);
}
.coin-stack {
width: 74rpx;
height: 28rpx;
border-radius: 50%;
background: linear-gradient(180deg, #ffd366, #f39b12);
box-shadow: 10rpx -13rpx 0 -1rpx #ffc457, 24rpx 6rpx 0 -2rpx #f39b12;
}
.left-stack {
margin-right: -10rpx;
margin-bottom: 18rpx;
}
.right-stack {
margin-left: -8rpx;
margin-bottom: 8rpx;
}
.spark {
width: 22rpx;
height: 22rpx;
background: #ffc95d;
border-radius: 4rpx;
transform: rotate(45deg);
}
.spark-one {
margin-right: 18rpx;
margin-bottom: 74rpx;
}
.spark-two {
width: 14rpx;
height: 14rpx;
margin-right: 18rpx;
margin-bottom: 88rpx;
}
.vip-card {
/* height: 126rpx; */
/* padding: 20rpx 16rpx 20rpx 24rpx; */
/* border-radius: 16rpx; */
/* display: flex;
align-items: center; */
/* gap: 22rpx; */
/* background: linear-gradient(100deg, #fffdf8, #fff8ea); */
/* border: 1rpx solid #f0d8aa; */
box-sizing: border-box;
}
.vip-left {
display: flex;
align-items: center;
gap: 16rpx;
flex-shrink: 0;
}
.crown-icon {
width: 100%;
/* height: 100%; */
}
.crown-icon text {
flex: 1;
height: 28rpx;
border-radius: 3rpx 3rpx 7rpx 7rpx;
background: linear-gradient(180deg, #ffd45d, #f8a50a);
}
.crown-icon text:nth-child(2) {
height: 38rpx;
}
.vip-title {
font-size: 28rpx;
font-weight: 900;
color: #151925;
}
.vip-desc {
flex: 1;
min-width: 0;
font-size: 20rpx;
line-height: 1.2;
color: #9a5a1f;
white-space: nowrap;
}
.vip-btn {
width: 132rpx;
height: 54rpx;
border-radius: 999rpx;
display: flex;
align-items: center;
justify-content: center;
color: #7b4b12;
font-size: 23rpx;
font-weight: 900;
background: linear-gradient(135deg, #fff0bd, #ffd886);
flex-shrink: 0;
}
.menu-card {
margin-top: 8rpx;
padding: 20rpx 28rpx;
border-radius: 18rpx;
display: flex;
flex-direction: column;
background: rgba(255, 255, 255, 0.92);
box-shadow: 0 8rpx 22rpx rgba(76, 84, 135, 0.06);
box-sizing: border-box;
}
.menu-item {
min-height: 96rpx;
display: flex;
align-items: center;
gap: 22rpx;
}
.menu-icon {
width: 46rpx;
height: 46rpx;
border-radius: 14rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
color: #ffffff;
}
.feedback-icon {
background: linear-gradient(135deg, #ed8aff, #9d5cff);
}
.help-icon {
background: linear-gradient(135deg, #7fb8ff, #4e7dff);
}
.privacy-icon {
background: linear-gradient(135deg, #31dec2, #15bd96);
}
.feedback-icon text {
width: 24rpx;
height: 18rpx;
border-radius: 6rpx;
display: block;
background: currentColor;
color: rgba(255, 255, 255, 0.92);
box-shadow: inset 7rpx 0 0 rgba(255, 255, 255, 0.2), inset 14rpx 0 0 rgba(255, 255, 255, 0.35);
}
.help-icon text {
width: 24rpx;
height: 24rpx;
border-radius: 50%;
display: block;
border: 5rpx solid rgba(255, 255, 255, 0.92);
box-sizing: border-box;
}
.privacy-icon text {
width: 22rpx;
height: 26rpx;
border-radius: 5rpx 5rpx 10rpx 10rpx;
display: block;
background: rgba(255, 255, 255, 0.94);
}
.menu-title {
flex: 1;
font-size: 25rpx;
font-weight: 700;
color: #151925;
}
.menu-arrow {
width: 18rpx;
height: 18rpx;
border-top: 4rpx solid #bdc1ca;
border-right: 4rpx solid #bdc1ca;
transform: rotate(45deg);
}
.icon-placeholder {
display: block;
flex-shrink: 0;
background: none;
border: 0;
box-shadow: none;
transform: none;
}