优化店务小程序我的页信息卡片

This commit is contained in:
2026-07-22 18:03:28 +08:00
parent b9989f8344
commit ab008a351f
3 changed files with 214 additions and 41 deletions
+34 -9
View File
@@ -1,16 +1,39 @@
<view class="page">
<view class="card profile-card">
<view class="profile-main">
<view wx:if="{{shopCoverImage || userInfo.displayAvatar}}" class="shop-logo image-avatar">
<image src="{{shopCoverImage || userInfo.displayAvatar}}" mode="aspectFill"></image>
<view class="profile-card-head">
<view wx:if="{{userInfo.displayAvatar || shopCoverImage}}" class="shop-logo image-avatar">
<image src="{{userInfo.displayAvatar || shopCoverImage}}" mode="aspectFill"></image>
</view>
<view wx:else class="shop-logo">店</view>
<view wx:else class="shop-logo">我</view>
<view class="profile-copy">
<text class="shop-name">{{shopName}}</text>
<text class="phone">{{phone}}</text>
<view class="profile-title-row">
<text class="profile-name">{{userInfo.nickname || shopName}}</text>
<text class="role-badge">{{roleText}}</text>
</view>
<view class="profile-meta-row">
<text class="profile-meta-label">登录账号</text>
<text class="profile-meta-value">{{userInfo.account || '未设置'}}</text>
</view>
<view class="profile-meta-row">
<text class="profile-meta-label">手机号</text>
<text class="profile-meta-value">{{userInfo.phone || userInfo.contactPhone || phone || '未绑定'}}</text>
</view>
</view>
<view class="shop-summary">
<text>当前所属店铺</text>
<view>{{shopName}}</view>
</view>
</view>
<view class="profile-summary-grid">
<view class="profile-summary-item">
<text>身份</text>
<view>{{roleText}}</view>
</view>
<view class="profile-summary-item">
<text>店铺</text>
<view>{{shopName}}</view>
</view>
</view>
<text class="role-badge">{{roleText}}</text>
</view>
<view class="section menu-list card">
@@ -35,8 +58,10 @@
<text class="profile-avatar-name">{{profileForm.nickname || userInfo.nickname || '个人头像'}}</text>
<text class="profile-avatar-desc">这里只修改个人资料头像</text>
</view>
<button class="avatar-btn" loading="{{avatarUploading}}" bindtap="chooseProfileAvatar">上传</button>
<button wx:if="{{profileForm.avatar}}" class="avatar-remove" bindtap="removeProfileAvatar">移除</button>
<view class="profile-avatar-actions">
<button class="avatar-btn" loading="{{avatarUploading}}" bindtap="chooseProfileAvatar">{{avatarUploading ? '上传中' : profileForm.avatar ? '更换头像' : '上传头像'}}</button>
<button wx:if="{{profileForm.avatar}}" class="avatar-remove" bindtap="removeProfileAvatar">移除</button>
</view>
</view>
<view class="profile-info-grid">
<view class="profile-info-item">