更新小程序开发文档,新增2026-03-03的最佳实践记录,优化个人中心类页面的卡片区边距规范,确保一致性与可用性。调整相关页面以反映最新设计稿,提升用户体验与功能一致性。

This commit is contained in:
Alex-larget
2026-03-04 19:06:06 +08:00
parent 7064f82126
commit 5a5f0087d2
66 changed files with 2555 additions and 1059 deletions

View File

@@ -33,11 +33,22 @@ Page({
const res = await app.request({ url: `/api/miniprogram/user/profile?userId=${userInfo.id}`, silent: true })
if (res?.success && res.data) {
const d = res.data
const e = (v) => (v == null || v === undefined ? '' : (String(v).trim() === '' || String(v).trim() === '未填写' ? '' : String(v).trim()))
const phone = d.phone || ''
const wechat = d.wechatId || wx.getStorageSync('user_wechat') || ''
this.setData({
profile: {
...d,
industry: e(d.industry),
position: e(d.position),
businessScale: e(d.businessScale || d.business_scale),
skills: e(d.skills),
storyBestMonth: e(d.storyBestMonth || d.story_best_month),
storyAchievement: e(d.storyAchievement || d.story_achievement),
storyTurning: e(d.storyTurning || d.story_turning),
helpOffer: e(d.helpOffer || d.help_offer),
helpNeed: e(d.helpNeed || d.help_need),
projectIntro: e(d.projectIntro || d.project_intro),
phoneMask: phone ? phone.slice(0, 3) + '****' + phone.slice(-2) : '',
wechatMask: wechat ? (wechat.length > 8 ? wechat.slice(0, 4) + '****' + wechat.slice(-3) : wechat) : '',
phone,

View File

@@ -63,7 +63,7 @@
<text class="field-hint" wx:if="{{profile.wechat}}">复制</text>
</view>
</view>
<view class="field-empty" wx:if="{{!profile.industry && !profile.position && !profile.phone && !profile.wechat && !profile.skills}}">
<view class="field-empty" wx:if="{{!profile.industry && !profile.position && !profile.businessScale && !profile.skills && !profile.phone && !profile.wechat}}">
点击右上角 ⋯ 编辑完善资料
</view>
</view>