feat(store-center): 在门店中心添加扫码登录PC后台功能

- 门店中心右上角新增扫码登录按钮,使用base64 SVG图标兼容小程序Image组件渲染
- 扫码后通过解析二维码内容调用confirmWechatQRLogin接口完成PC端登录确认
- 支持扫码取消静默处理,扫码失败则弹窗提示错误信息
- 优化门店中心页面布局,调整扫码按钮绝对定位及样式
- 优化了用户管理页面的小型样式,包括按钮和文本间距调整
- 调整用户页面部分Badge显示逻辑,排除tabIndex为4的项不显示角标
This commit is contained in:
2026-07-17 12:38:27 +08:00
parent 21b8403fab
commit bd3589af61
5 changed files with 1322 additions and 1230 deletions

View File

@@ -183,7 +183,7 @@ export default function StoreUsersPage() {
{displayName}
</Text>
<View
className='px-1.5 py-0.5 rounded text-[10px]'
className='px-1 py-1 rounded text-xs'
style={{
color: isDisabled ? '#dc2626' : '#16a34a',
background: isDisabled ? '#fef2f2' : '#f0fdf4',
@@ -192,14 +192,14 @@ export default function StoreUsersPage() {
{isDisabled ? '已禁用' : '正常'}
</View>
</View>
<Text className='text-xs text-gray-400 mt-0.5 block'>
<Text className='text-xs text-gray-400 mt-1 block'>
{user.phone || user.mobile || '未绑定手机'}
</Text>
</View>
{/* 禁用/启用按钮 */}
<View
className={`px-3 py-1.5 rounded-lg flex-shrink-0 ${isDisabled ? 'bg-green-50' : 'bg-red-50'}`}
className={`px-3 py-1 rounded-lg flex-shrink-0 ${isDisabled ? 'bg-green-50' : 'bg-red-50'}`}
onClick={(e) => {
e.stopPropagation()
handleToggleStatus(user)
@@ -215,17 +215,17 @@ export default function StoreUsersPage() {
<View className='flex items-center gap-4 mt-3 pt-3 border-t border-gray-50'>
{user.memberLevelName && (
<View className='flex items-center gap-1'>
<Text className='text-[10px] text-gray-400'>:</Text>
<Text className='text-xs text-gray-400'>:</Text>
<Text className='text-xs text-purple-500'>{user.memberLevelName}</Text>
</View>
)}
<View className='flex items-center gap-1'>
<Text className='text-[10px] text-gray-400'>:</Text>
<Text className='text-xs text-gray-400'>:</Text>
<Text className='text-xs text-gray-500'>{formatTime(user.createTime)}</Text>
</View>
{user.balance !== undefined && Number(user.balance) > 0 && (
<View className='flex items-center gap-1'>
<Text className='text-[10px] text-gray-400'>:</Text>
<Text className='text-xs text-gray-400'>:</Text>
<Text className='text-xs text-orange-500'>¥{user.balance}</Text>
</View>
)}
@@ -238,7 +238,7 @@ export default function StoreUsersPage() {
<View className='min-h-full bg-gray-50'>
{/* 搜索栏 */}
<View className='bg-white px-3 py-2 flex items-center gap-2'>
<View className='flex-1 flex items-center bg-gray-100 rounded-lg px-3 py-1.5'>
<View className='flex-1 flex items-center bg-gray-100 rounded-lg px-3 py-1'>
<Input
className='flex-1 text-sm'
placeholder='搜索昵称 / 手机号'
@@ -255,7 +255,7 @@ export default function StoreUsersPage() {
) : null}
</View>
<View
className='px-3 py-1.5 rounded-lg bg-blue-500'
className='px-3 py-1 rounded-lg bg-blue-500'
onClick={handleSearch}
>
<Text className='text-sm text-white'></Text>
@@ -342,7 +342,7 @@ export default function StoreUsersPage() {
{detailUser.nickname || detailUser.realName || '未设置昵称'}
</Text>
<View
className='px-2 py-0.5 rounded text-xs'
className='px-2 py-1 rounded text-xs'
style={{
color: detailUser.status === 1 ? '#dc2626' : '#16a34a',
background: detailUser.status === 1 ? '#fef2f2' : '#f0fdf4',