diff --git a/JC-Salon-WeChat/pages/account-settings/index.js b/JC-Salon-WeChat/pages/account-settings/index.js
index 2da5f167..7168aa80 100644
--- a/JC-Salon-WeChat/pages/account-settings/index.js
+++ b/JC-Salon-WeChat/pages/account-settings/index.js
@@ -10,7 +10,8 @@ Page({
smsForm: { phone: '', code: '' },
codeLoading: false,
countdown: 0,
- timer: null
+ timer: null,
+ smsExpanded: false
},
onShow() { this.loadProfile() },
@@ -36,6 +37,10 @@ Page({
this.setData({ [`smsForm.${field}`]: value })
},
+ toggleSms() {
+ this.setData({ smsExpanded: !this.data.smsExpanded })
+ },
+
async bindWechatPhone(event) {
const phoneCode = event.detail && event.detail.code
if (!phoneCode) {
diff --git a/JC-Salon-WeChat/pages/account-settings/index.wxml b/JC-Salon-WeChat/pages/account-settings/index.wxml
index c023dc4a..00554c21 100644
--- a/JC-Salon-WeChat/pages/account-settings/index.wxml
+++ b/JC-Salon-WeChat/pages/account-settings/index.wxml
@@ -1,6 +1,16 @@
微微信身份已安全关联当前账号已关联
- 手机号{{profile.phoneVerified == 1 ? (profile.maskedPhone || profile.phone) : '尚未绑定'}}{{profile.phoneVerified == 1 ? '已验证' : '待绑定'}}或使用短信验证码
+
+ 手机号
+ {{profile.phoneVerified == 1 ? (profile.maskedPhone || profile.phone) : '尚未绑定'}}{{profile.phoneVerified == 1 ? '已验证' : '待绑定'}}
+
+ {{profile.phoneVerified == 1 ? '使用短信验证码更换' : '使用短信验证码绑定'}}›
+
+
+
+
+
+
手机号仅用于账号安全与必要联系,不作为微信快捷登录标识。
diff --git a/JC-Salon-WeChat/pages/account-settings/index.wxss b/JC-Salon-WeChat/pages/account-settings/index.wxss
index 154bc961..4eab3ccf 100644
--- a/JC-Salon-WeChat/pages/account-settings/index.wxss
+++ b/JC-Salon-WeChat/pages/account-settings/index.wxss
@@ -1,2 +1,2 @@
.settings-page { padding-top:24rpx; }.identity-card { display:flex; align-items:center; padding:26rpx; }.identity-mark { display:flex; align-items:center; justify-content:center; width:68rpx; height:68rpx; border-radius:20rpx; background:#dcebe1; color:#35634d; font-size:28rpx; font-weight:800; }.identity-copy { display:flex; flex:1; flex-direction:column; margin-left:18rpx; }.identity-title,.section-title { color:#30483c; font-size:28rpx; font-weight:800; }.identity-status { margin-top:6rpx; color:#8a9a91; font-size:21rpx; }.linked-badge,.status-tag { padding:7rpx 14rpx; border-radius:999rpx; background:#e5f2e8; color:#397055; font-size:20rpx; }
-.phone-card { margin-top:20rpx; padding:28rpx; }.phone-status { display:flex; align-items:center; justify-content:space-between; margin-top:20rpx; padding:20rpx; border-radius:14rpx; background:#f4f8f5; color:#425b4e; font-size:26rpx; }.status-tag { background:#fff0db; color:#9a682e; }.status-tag.done { background:#e5f2e8; color:#397055; }.wechat-phone-btn,.sms-bind-btn { height:80rpx; margin-top:22rpx; border-radius:14rpx; background:#35634d; color:#fff; font-size:26rpx; line-height:80rpx; }.divider { display:flex; align-items:center; justify-content:center; margin:28rpx 0 18rpx; color:#9aa79f; font-size:20rpx; }.field input,.code-row input { box-sizing:border-box; height:78rpx; padding:0 20rpx; border:1rpx solid #dde8e0; border-radius:12rpx; background:#f8faf8; }.code-row { display:flex; gap:12rpx; margin-top:14rpx; }.code-row input { min-width:0; flex:1; }.code-row button { width:190rpx; height:78rpx; padding:0; border-radius:12rpx; background:#e7f0ea; color:#426c57; font-size:23rpx; line-height:78rpx; }.sms-bind-btn { background:#eef4f0; color:#35634d; }.account-note { margin:24rpx 18rpx; color:#8e9c94; font-size:21rpx; line-height:1.6; }.logout-btn { margin-top:52rpx; background:transparent; color:#a24f42; font-size:25rpx; }
+.phone-card { margin-top:20rpx; padding:28rpx; }.phone-status { display:flex; align-items:center; justify-content:space-between; margin-top:20rpx; padding:20rpx; border-radius:14rpx; background:#f4f8f5; color:#425b4e; font-size:26rpx; }.status-tag { background:#fff0db; color:#9a682e; }.status-tag.done { background:#e5f2e8; color:#397055; }.wechat-phone-btn,.sms-bind-btn { height:80rpx; margin-top:22rpx; border-radius:14rpx; background:#35634d; color:#fff; font-size:26rpx; line-height:80rpx; }.sms-entry { display:flex; min-height:82rpx; align-items:center; margin-top:22rpx; border-top:1rpx solid #e5ebe7; color:#627269; font-size:23rpx; }.sms-arrow { margin-left:auto; color:#95a198; font-size:36rpx; transition:transform 180ms ease; }.sms-arrow.expanded { transform:rotate(90deg); }.sms-panel { padding-top:2rpx; }.field input,.code-row input { box-sizing:border-box; height:78rpx; padding:0 20rpx; border:1rpx solid #dde8e0; border-radius:12rpx; background:#f8faf8; }.code-row { display:flex; gap:12rpx; margin-top:14rpx; }.code-row input { min-width:0; flex:1; }.code-row button { width:190rpx; height:78rpx; padding:0; border-radius:12rpx; background:#e7f0ea; color:#426c57; font-size:23rpx; line-height:78rpx; }.sms-bind-btn { background:#eef4f0; color:#35634d; }.account-note { margin:24rpx 18rpx; color:#8e9c94; font-size:21rpx; line-height:1.6; }.logout-btn { margin-top:52rpx; background:transparent; color:#a24f42; font-size:25rpx; }
diff --git a/JC-Salon-WeChat/pages/profile-edit/index.js b/JC-Salon-WeChat/pages/profile-edit/index.js
index 169a85bc..daec287b 100644
--- a/JC-Salon-WeChat/pages/profile-edit/index.js
+++ b/JC-Salon-WeChat/pages/profile-edit/index.js
@@ -20,10 +20,10 @@ function buildPageState(profile, fallbackShopName) {
avatarText: card.avatarText,
roleText: resolveRoleText(source.type),
shopName: card.shopName,
+ phoneDisplay: source.maskedPhone || source.phone || '未绑定',
form: {
nickname: source.nickname || '',
avatar: normalizeAvatar(source.avatar),
- contactPhone: source.contactPhone || '',
wechatId: source.wechatId || '',
signature: source.signature || ''
}
@@ -39,7 +39,9 @@ Page({
avatarText: '用',
roleText: '管理端',
shopName: BRAND_CONFIG.defaultShopName,
- form: { nickname: '', avatar: '', contactPhone: '', wechatId: '', signature: '' }
+ phoneDisplay: '未绑定',
+ wechatProfileExpanded: false,
+ form: { nickname: '', avatar: '', wechatId: '', signature: '' }
},
onLoad() {
@@ -92,18 +94,50 @@ Page({
this.setData(nextData)
},
+ toggleWechatProfile() {
+ this.setData({ wechatProfileExpanded: !this.data.wechatProfileExpanded })
+ },
+
+ onWechatNicknameInput(event) {
+ const nickname = event.detail.value
+ this.setData({
+ 'form.nickname': nickname,
+ avatarText: Array.from(String(nickname || '').trim())[0] || '用'
+ })
+ },
+
+ goAccountSettings() {
+ wx.navigateTo({ url: '/pages/account-settings/index' })
+ },
+
+ async uploadAvatar(filePath) {
+ if (!filePath) return
+ this.setData({ avatarUploading: true })
+ try {
+ const avatar = await uploadProfileImage(filePath)
+ this.setData({ 'form.avatar': avatar })
+ } finally {
+ this.setData({ avatarUploading: false })
+ }
+ },
+
async chooseAvatar() {
if (this.data.avatarUploading || this.data.saving) return
try {
const filePath = await chooseImageFilePath()
if (!filePath) return
- this.setData({ avatarUploading: true })
- const avatar = await uploadProfileImage(filePath)
- this.setData({ 'form.avatar': avatar })
+ await this.uploadAvatar(filePath)
} catch (error) {
wx.showToast({ title: error.message || '头像上传失败', icon: 'none' })
- } finally {
- this.setData({ avatarUploading: false })
+ }
+ },
+
+ async chooseWechatAvatar(event) {
+ if (this.data.avatarUploading || this.data.saving) return
+ try {
+ await this.uploadAvatar(event.detail && event.detail.avatarUrl)
+ } catch (error) {
+ wx.showToast({ title: error.message || '微信头像获取失败', icon: 'none' })
}
},
@@ -111,21 +145,15 @@ Page({
if (this.data.saving || this.data.avatarUploading) return
const form = this.data.form
const nickname = String(form.nickname || '').trim()
- const contactPhone = String(form.contactPhone || '').trim()
if (!nickname) {
wx.showToast({ title: '请填写昵称', icon: 'none' })
return
}
- if (contactPhone && !/^1[3-9]\d{9}$/.test(contactPhone)) {
- wx.showToast({ title: '请输入正确联系电话', icon: 'none' })
- return
- }
this.setData({ saving: true })
try {
await userApi.updateInfo({
nickname,
avatar: form.avatar || '',
- contactPhone,
wechatId: String(form.wechatId || '').trim(),
signature: String(form.signature || '').trim()
})
diff --git a/JC-Salon-WeChat/pages/profile-edit/index.wxml b/JC-Salon-WeChat/pages/profile-edit/index.wxml
index a198111f..774ebb12 100644
--- a/JC-Salon-WeChat/pages/profile-edit/index.wxml
+++ b/JC-Salon-WeChat/pages/profile-edit/index.wxml
@@ -13,10 +13,26 @@
+
+
+ 微
+ 使用微信资料
+ ›
+
+
+
+
+
+
+
基本资料
昵称
- 联系电话
+ 手机号{{phoneDisplay}}›
微信号
个性签名
diff --git a/JC-Salon-WeChat/pages/profile-edit/index.wxss b/JC-Salon-WeChat/pages/profile-edit/index.wxss
index af014224..6a1932b1 100644
--- a/JC-Salon-WeChat/pages/profile-edit/index.wxss
+++ b/JC-Salon-WeChat/pages/profile-edit/index.wxss
@@ -8,10 +8,22 @@
.avatar-copy { display:flex; min-width:0; flex:1; flex-direction:column; margin-left:20rpx; }
.avatar-title { color:#30483c; font-size:30rpx; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.avatar-signature { margin-top:10rpx; color:#8a9a91; font-size:22rpx; line-height:1.5; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
+.wechat-profile-card { margin-top:20rpx; overflow:hidden; }
+.wechat-profile-entry { display:flex; min-height:92rpx; align-items:center; padding:0 24rpx; color:#30483c; font-size:26rpx; font-weight:800; }
+.wechat-profile-mark { display:flex; width:48rpx; height:48rpx; align-items:center; justify-content:center; margin-right:16rpx; border-radius:14rpx; background:#dcebe1; color:#35634d; font-size:21rpx; }
+.expand-arrow { margin-left:auto; color:#8a9a91; font-size:38rpx; transition:transform 180ms ease; }
+.expand-arrow.expanded { transform:rotate(90deg); }
+.wechat-profile-panel { display:flex; align-items:center; gap:20rpx; padding:22rpx 24rpx 26rpx; border-top:1rpx solid #eee8df; background:#faf8f3; }
+.wechat-avatar-picker { position:relative; display:flex; width:112rpx; min-width:112rpx; max-width:112rpx; height:112rpx; min-height:112rpx; align-items:center; justify-content:center; overflow:hidden; border-radius:28rpx; background:#6f8f83; color:#fff; font-size:36rpx; font-weight:900; }
+.wechat-avatar-picker image { width:100%; height:100%; }
+.wechat-avatar-tip { position:absolute; right:0; bottom:0; left:0; height:34rpx; background:rgba(35,42,39,.62); color:#fff; font-size:15rpx; font-weight:500; line-height:34rpx; text-align:center; }
+.wechat-nickname-input { height:78rpx; min-width:0; flex:1; padding:0 20rpx; border:1rpx solid #dde8e0; border-radius:12rpx; background:#fff; color:#27231f; font-size:27rpx; }
.section-title { margin:30rpx 4rpx 14rpx; }
.form-card { padding:0 24rpx; }
.field-label { width:170rpx; }
.field input,.field textarea { text-align:right; }
+.phone-value { display:flex; min-width:0; flex:1; align-items:center; justify-content:flex-end; color:#7f776f; font-size:27rpx; }
+.phone-arrow { margin-left:14rpx; color:#aaa198; font-size:38rpx; }
.signature-field { align-items:flex-start; }
.signature-field .field-label { padding-top:34rpx; }
.signature-field textarea { text-align:left; }
diff --git a/docs/项目变更记录.md b/docs/项目变更记录.md
index c82ddcc0..e261217d 100644
--- a/docs/项目变更记录.md
+++ b/docs/项目变更记录.md
@@ -1,5 +1,11 @@
# 项目变更记录
+## 2026-10-10 Salon 个人资料与手机号入口优化
+
+- 个人信息页手机号改为只读展示,点击跳转账号设置;个人资料保存请求不再提交联系电话或手机号字段。
+- 新增默认折叠的“使用微信资料”区域,通过微信 `chooseAvatar` 与 `nickname` 合规组件填充当前头像和昵称。
+- 账号设置中的短信验证码绑定区域默认折叠,微信一键绑定保持直接展示,展开后沿用原有验证码流程。
+
## 2026-10-10 Salon 个人信息页头像卡精简
- 个人信息页移除独立头像上传按钮、移除头像入口和说明文案,改为直接点击头像更换。