1111111
This commit is contained in:
@@ -85,3 +85,51 @@
|
||||
background: linear-gradient(135deg, #4A90D9, #357ABD);
|
||||
color: #fff; font-size: 28rpx; font-weight: 600; border-radius: 36rpx;
|
||||
}
|
||||
|
||||
/* 红包记录入口 */
|
||||
.red-packet-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 24rpx 30rpx 0;
|
||||
padding: 24rpx 28rpx;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.red-packet-card:active {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.red-packet-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.red-packet-icon {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #FFF0F0;
|
||||
border-radius: 12rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.icon-text {
|
||||
font-size: 34rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.red-packet-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.red-packet-arrow {
|
||||
font-size: 36rpx;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
@@ -11,13 +11,13 @@ interface FamilyMember {
|
||||
notes: string;
|
||||
}
|
||||
|
||||
const MEMBER_KEY = 'family_member';
|
||||
const EDIT_URL = '/pages/tab-bar/profile/edit/index';
|
||||
const RED_HISTORY_URL = '/pages/live/red-history/red-history';
|
||||
|
||||
Page({
|
||||
data: {
|
||||
member: {} as FamilyMember,
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({ selected: 3 });
|
||||
@@ -25,10 +25,13 @@ Page({
|
||||
this.loadMember();
|
||||
},
|
||||
loadMember() {
|
||||
const member = wx.getStorageSync(MEMBER_KEY) || {};
|
||||
const member = wx.getStorageSync('family_member') || {};
|
||||
this.setData({ member });
|
||||
},
|
||||
goEdit() {
|
||||
wx.navigateTo({ url: '/pages/tab-bar/profile/edit/index' });
|
||||
wx.navigateTo({ url: EDIT_URL });
|
||||
},
|
||||
});
|
||||
goRedHistory() {
|
||||
wx.navigateTo({ url: RED_HISTORY_URL });
|
||||
},
|
||||
});
|
||||
@@ -7,9 +7,20 @@
|
||||
<view class="name">{{member.name || '点击添加家庭成员'}}</view>
|
||||
<view class="relation" wx:if="{{member.relation}}">{{member.relation}}</view>
|
||||
<view class="edit-btn" bindtap="goEdit">{{member.name ? '编辑信息' : '添加信息'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 成员详细信息 -->
|
||||
<!-- 红包记录入口 -->
|
||||
<view class="red-packet-card" bindtap="goRedHistory">
|
||||
<view class="red-packet-left">
|
||||
<view class="red-packet-icon">
|
||||
<text class="icon-text">🧧</text>
|
||||
</view>
|
||||
<view class="red-packet-title">红包记录</view>
|
||||
</view>
|
||||
<view class="red-packet-arrow">›</view>
|
||||
</view>
|
||||
|
||||
<!-- 成员详细信息 -->
|
||||
<view class="content" wx:if="{{member.name}}">
|
||||
<view class="info-card">
|
||||
<view class="info-row">
|
||||
|
||||
Reference in New Issue
Block a user