第一版

This commit is contained in:
17792275749
2025-03-25 20:52:15 +08:00
commit 04d373b84e
88 changed files with 4539 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
import $ from "../../utils/request";
Page({
data: {
userInfo: null,
subUserList: [],
},
onShow() {
this.setData({
userInfo: wx.getStorageSync("userInfo") || null
})
this.getSubUser();
},
// 获取家庭成员列表
getSubUser() {
let params = {};
$.ajax("weighingScale/list/subUser", params, "GET", true, "正在获取...").then(res => {
this.setData({
subUserList: res.result
})
})
},
openUserInfo() {
wx.navigateTo({
url: "/pages/userInfo/userInfo?initBluetooth=1&customerType=0"
})
},
editMyInfo() {
wx.navigateTo({
url: "/pages/userInfo/userInfo?initBluetooth=1&customerType=1"
})
},
editUserInfo(e) {
let id = e.currentTarget.dataset.id;
wx.navigateTo({
url: "/pages/userInfo/userInfo?id="+ id +"&initBluetooth=1&customerType=0"
})
}
})
+5
View File
@@ -0,0 +1,5 @@
{
"usingComponents": {},
"navigationBarTitleText": "家庭成员",
"disableScroll": true
}
+31
View File
@@ -0,0 +1,31 @@
<view class="myInfo" bind:tap="editMyInfo">
<view>
<image src="/images/my/user.png" />
</view>
<view>{{userInfo ? userInfo.realname : '-'}}</view>
<view class="arrowAfter">修改我的档案</view>
</view>
<view class="familyMembers">
<view>家庭成员</view>
<view>
<block wx:if="{{subUserList && subUserList.length}}">
<block wx:for="{{subUserList}}" wx:key="index">
<view data-id="{{item.id}}" bind:tap="editUserInfo">
<view>
<image src="/images/my/user.png" />
</view>
<view>{{item.realname}}</view>
<view class="arrowAfter">修改档案</view>
</view>
</block>
</block>
</view>
</view>
<view class="btn">
<view>
<image src="/images/familyMembers/add.png" />
</view>
<view bind:tap="openUserInfo">添加新成员</view>
</view>
+128
View File
@@ -0,0 +1,128 @@
page {
padding: 30rpx 30rpx 0;
}
.myInfo {
width: 100%;
height: 150rpx;
padding: 0 30rpx 0 38rpx;
box-sizing: border-box;
display: flex;
flex-wrap: nowrap;
align-items: center;
border-radius: 16rpx;
margin-bottom: 40rpx;
background-color: #FFFFFF;
}
.myInfo>view:nth-of-type(1) {
width: 84rpx;
height: 84rpx;
border-radius: 50%;
margin-right: 24rpx;
}
.myInfo>view:nth-of-type(2) {
color: #252535;
flex: 1;
height: 32rpx;
font-size: 32rpx;
font-weight: bold;
line-height: 32rpx;
}
.myInfo>view:nth-of-type(3) {
color: #B6B6B6;
height: 28rpx;
font-size: 28rpx;
line-height: 28rpx;
padding-right: 30rpx;
}
.familyMembers {
width: 100%;
margin-bottom: 24rpx;
}
.familyMembers>view:first-of-type {
color: #252535;
width: 100%;
height: 32rpx;
font-size: 32rpx;
font-weight: bold;
line-height: 32rpx;
margin-bottom: 30rpx;
}
.familyMembers>view:last-of-type {
width: 100%;
border-radius: 16rpx;
}
.familyMembers>view:last-of-type>view {
width: 100%;
height: 150rpx;
padding: 0 30rpx 0 38rpx;
box-sizing: border-box;
display: flex;
flex-wrap: nowrap;
align-items: center;
background-color: #FFFFFF;
border-bottom: 1rpx solid #EAECF1;
}
.familyMembers>view:last-of-type>view:last-of-type {
border-bottom: 0;
}
.familyMembers>view:last-of-type>view>view:nth-of-type(1) {
width: 84rpx;
height: 84rpx;
border-radius: 50%;
margin-right: 24rpx;
}
.familyMembers>view:last-of-type>view>view:nth-of-type(2) {
color: #252535;
flex: 1;
height: 32rpx;
font-size: 32rpx;
font-weight: bold;
line-height: 32rpx;
}
.familyMembers>view:last-of-type>view>view:nth-of-type(3) {
color: #B6B6B6;
height: 28rpx;
font-size: 28rpx;
line-height: 28rpx;
padding-right: 30rpx;
}
.btn {
width: 100%;
height: 150rpx;
padding: 0 38rpx;
box-sizing: border-box;
display: flex;
flex-wrap: nowrap;
align-items: center;
border-radius: 16rpx;
background-color: #FFFFFF;
}
.btn>view:first-of-type {
width: 84rpx;
height: 84rpx;
border-radius: 50%;
margin-right: 24rpx;
}
.btn>view:last-of-type {
color: #252535;
flex: 1;
height: 32rpx;
font-size: 32rpx;
font-weight: bold;
line-height: 32rpx;
}