Refactor user profile handling and navigation logic in the mini program. Introduce functions to ensure user profile completeness after login, update avatar selection process, and enhance navigation between chapters based on backend data. Update API endpoints for user data synchronization and improve user experience with new UI elements for profile editing.
This commit is contained in:
@@ -596,8 +596,19 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
// 复制用户ID
|
||||
// 复制联系方式:优先复制微信号,其次复制用户ID
|
||||
copyUserId() {
|
||||
const userWechat = (this.data.userWechat || '').trim()
|
||||
if (userWechat) {
|
||||
wx.setClipboardData({
|
||||
data: userWechat,
|
||||
success: () => {
|
||||
wx.showToast({ title: '微信号已复制', icon: 'success' })
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const userId = this.data.userInfo?.id || ''
|
||||
if (!userId) {
|
||||
wx.showToast({ title: '暂无ID', icon: 'none' })
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<text class="vip-tag {{isVip ? 'vip-tag-active' : ''}}" bindtap="goToMatch">匹配</text>
|
||||
<text class="vip-tag {{isVip ? 'vip-tag-active' : ''}}" bindtap="goToVip">排行</text>
|
||||
</view>
|
||||
<text class="user-wechat" bindtap="copyUserId">微信号: {{userWechat || userIdShort || '--'}}</text>
|
||||
<text class="user-wechat" wx:if="{{userWechat}}" bindtap="copyUserId">微信号: {{userWechat}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="profile-stats-row">
|
||||
|
||||
Reference in New Issue
Block a user