diff --git a/miniprogram/pages/match/match.js b/miniprogram/pages/match/match.js
index 741eba7..5adca0c 100644
--- a/miniprogram/pages/match/match.js
+++ b/miniprogram/pages/match/match.js
@@ -10,8 +10,8 @@ const app = getApp()
let MATCH_TYPES = [
{ id: 'partner', label: '创业合伙', matchLabel: '创业伙伴', icon: '⭐', matchFromDB: true, showJoinAfterMatch: false },
{ id: 'investor', label: '资源对接', matchLabel: '资源对接', icon: '👥', matchFromDB: false, showJoinAfterMatch: true },
- { id: 'mentor', label: '导师顾问', matchLabel: '商业顾问', icon: '❤️', matchFromDB: false, showJoinAfterMatch: true },
- { id: 'team', label: '团队招募', matchLabel: '加入项目', icon: '🎮', matchFromDB: false, showJoinAfterMatch: true }
+ { id: 'mentor', label: '导师顾问', matchLabel: '立即咨询', icon: '❤️', matchFromDB: false, showJoinAfterMatch: true },
+ { id: 'team', label: '团队招募', matchLabel: '团队招募', icon: '🎮', matchFromDB: false, showJoinAfterMatch: true }
]
let FREE_MATCH_LIMIT = 3 // 每日免费匹配次数
diff --git a/miniprogram/pages/match/match.wxml b/miniprogram/pages/match/match.wxml
index 711ee0b..0ccc79c 100644
--- a/miniprogram/pages/match/match.wxml
+++ b/miniprogram/pages/match/match.wxml
@@ -181,7 +181,7 @@
{{joinType === 'investor' ? '👥' : joinType === 'mentor' ? '❤️' : '🎮'}}
- 加入{{joinTypeLabel}}
+ {{joinTypeLabel}}
请先绑定联系方式
填写联系方式,专人对接
✕
diff --git a/miniprogram/pages/my/my.js b/miniprogram/pages/my/my.js
index a78eeaf..f50143e 100644
--- a/miniprogram/pages/my/my.js
+++ b/miniprogram/pages/my/my.js
@@ -102,33 +102,43 @@ Page({
}
},
- // 微信头像选择回调(button open-type="chooseAvatar")
- async onChooseAvatar(e) {
- const avatarUrl = e.detail.avatarUrl
- if (!avatarUrl) return
-
- wx.showLoading({ title: '更新中...', mask: true })
-
- try {
- // 更新本地显示
- const userInfo = this.data.userInfo
- userInfo.avatar = avatarUrl
- this.setData({ userInfo })
- app.globalData.userInfo = userInfo
- wx.setStorageSync('userInfo', userInfo)
-
- // 同步到服务器
- await app.request('/api/user/update', {
- method: 'POST',
- data: { userId: userInfo.id, avatar: avatarUrl }
- })
-
- wx.hideLoading()
- wx.showToast({ title: '头像已更新', icon: 'success' })
- } catch (e) {
- wx.hideLoading()
- wx.showToast({ title: '更新失败', icon: 'none' })
- }
+ // 点击头像 - 从相册选择
+ chooseAvatar() {
+ wx.chooseMedia({
+ count: 1,
+ mediaType: ['image'],
+ sourceType: ['album', 'camera'],
+ success: async (res) => {
+ const tempFilePath = res.tempFiles[0].tempFilePath
+
+ wx.showLoading({ title: '更新中...', mask: true })
+
+ try {
+ // 更新本地显示
+ const userInfo = this.data.userInfo
+ userInfo.avatar = tempFilePath
+ this.setData({ userInfo })
+ app.globalData.userInfo = userInfo
+ wx.setStorageSync('userInfo', userInfo)
+
+ // 同步到服务器
+ try {
+ await app.request('/api/user/update', {
+ method: 'POST',
+ data: { userId: userInfo.id, avatar: tempFilePath }
+ })
+ } catch (e) {
+ console.log('同步头像失败', e)
+ }
+
+ wx.hideLoading()
+ wx.showToast({ title: '头像已更新', icon: 'success' })
+ } catch (e) {
+ wx.hideLoading()
+ wx.showToast({ title: '更新失败', icon: 'none' })
+ }
+ }
+ })
},
// 点击昵称修改
diff --git a/miniprogram/pages/my/my.wxml b/miniprogram/pages/my/my.wxml
index 38452bd..6e2dce7 100644
--- a/miniprogram/pages/my/my.wxml
+++ b/miniprogram/pages/my/my.wxml
@@ -27,8 +27,8 @@
-
+
{{userInfo.nickname || '微信用户'}}
✎
- 微信: {{userInfo.wechatId}}
- ID: {{userIdShort}}
+
+ ID: {{userIdShort}}
+
diff --git a/miniprogram/pages/my/my.wxss b/miniprogram/pages/my/my.wxss
index bee8c07..5601700 100644
--- a/miniprogram/pages/my/my.wxss
+++ b/miniprogram/pages/my/my.wxss
@@ -65,27 +65,16 @@
.user-header-row {
display: flex;
align-items: center;
- gap: 28rpx;
- margin-bottom: 36rpx;
-}
-
-/* 头像按钮样式 */
-.avatar-btn {
- position: relative;
- flex-shrink: 0;
- padding: 0;
- margin: 0;
- background: transparent;
- border: none;
- line-height: normal;
-}
-.avatar-btn::after {
- border: none;
+ gap: 24rpx;
+ margin-bottom: 32rpx;
}
+/* 头像容器 */
.avatar-wrapper {
position: relative;
flex-shrink: 0;
+ width: 120rpx;
+ height: 120rpx;
}
.avatar {
@@ -98,6 +87,7 @@
justify-content: center;
background: linear-gradient(135deg, rgba(0, 206, 209, 0.2) 0%, transparent 100%);
overflow: hidden;
+ box-sizing: border-box;
}
.avatar-img {
@@ -144,32 +134,41 @@
flex: 1;
display: flex;
flex-direction: column;
+ justify-content: center;
gap: 8rpx;
+ min-width: 0;
}
.user-name-row {
display: flex;
align-items: center;
- gap: 16rpx;
- flex-wrap: wrap;
+ gap: 8rpx;
}
.user-name {
- font-size: 34rpx;
+ font-size: 36rpx;
font-weight: 600;
color: #ffffff;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ max-width: 280rpx;
}
.edit-name-icon {
font-size: 24rpx;
color: rgba(255,255,255,0.4);
- margin-left: 8rpx;
+ flex-shrink: 0;
+}
+
+.user-id-row {
+ display: flex;
+ align-items: center;
}
.user-wechat {
font-size: 24rpx;
color: #00CED1;
- margin-top: 4rpx;
}
.user-badge-small {