feat: add registration page for new miniprogram users

- New register page with chooseAvatar, nickname input (random default),
  and required phone number authorization via getPhoneNumber
- Login simplified: removed deprecated wx.getUserProfile, checks
  is_new_user flag to redirect new users to registration
- Server login response now includes is_new_user field
这个提交包含在:
Guoguo
2026-05-06 06:12:34 -07:00
父节点 5cc41f0f10
当前提交 563e515bce
修改 9 个文件,包含 301 行新增92 行删除
+138
查看文件
@@ -0,0 +1,138 @@
.page {
min-height: 100vh;
background: #ffffff;
}
.section-title {
font-size: 30rpx;
font-weight: 600;
color: #333333;
margin-bottom: 20rpx;
margin-top: 36rpx;
}
.section-title:first-child {
margin-top: 0;
}
.avatar-area {
display: flex;
justify-content: center;
margin-bottom: 12rpx;
}
.avatar-btn {
background: none;
border: none;
padding: 0;
margin: 0;
line-height: normal;
display: flex;
flex-direction: column;
align-items: center;
}
.avatar-btn::after {
border: none;
}
.avatar-img {
width: 160rpx;
height: 160rpx;
border-radius: 50%;
border: 4rpx solid #f0f0f0;
background: #f5f5f5;
}
.avatar-edit-hint {
font-size: 24rpx;
color: #999999;
margin-top: 12rpx;
}
.input-wrap {
background: #f5f5f5;
border-radius: 16rpx;
padding: 24rpx 28rpx;
margin-bottom: 12rpx;
}
.nickname-input {
font-size: 30rpx;
color: #333333;
height: 48rpx;
line-height: 48rpx;
}
.phone-area {
margin-bottom: 12rpx;
}
.phone-btn {
display: block;
width: 100%;
padding: 28rpx;
background: #ffffff;
color: #E6508C;
border: 2rpx solid #E6508C;
border-radius: 20rpx;
font-size: 30rpx;
text-align: center;
}
.phone-btn::after {
border: none;
}
.phone-hint {
font-size: 24rpx;
color: #999999;
text-align: center;
margin-top: 12rpx;
}
.phone-done {
display: flex;
align-items: center;
justify-content: center;
background: #f0fff4;
border: 2rpx solid #52c41a;
border-radius: 20rpx;
padding: 28rpx;
}
.phone-icon {
color: #52c41a;
font-size: 36rpx;
margin-right: 16rpx;
}
.phone-text {
font-size: 30rpx;
color: #333333;
}
.submit-btn {
display: block;
width: 100%;
padding: 32rpx;
background: #E6508C;
color: #ffffff;
border: none;
border-radius: 20rpx;
font-size: 32rpx;
font-weight: 600;
text-align: center;
margin-top: 60rpx;
}
.submit-btn::after {
border: none;
}
.agreement {
text-align: center;
font-size: 24rpx;
color: #999999;
margin-top: 32rpx;
}