56 lines
1.9 KiB
Plaintext
56 lines
1.9 KiB
Plaintext
<!-- 黑名单管理页(重构:matchStore + ui-nav-bar + DangerActionDialog) -->
|
||
<view class="page">
|
||
<ui-nav-bar
|
||
title="黑名单管理"
|
||
show-back="{{true}}"
|
||
status-bar-height="{{statusBarHeight}}"
|
||
nav-bar-height="{{navBarHeight}}"
|
||
bind:back="onBack"
|
||
/>
|
||
|
||
<view class="body" style="padding-top: {{statusBarHeight + navBarHeight}}px;">
|
||
<ui-loading wx:if="{{loading}}" mode="skeleton" rows="4" />
|
||
|
||
<block wx:elif="{{blockedList.length > 0}}">
|
||
<view class="list">
|
||
<view class="item" wx:for="{{blockedList}}" wx:key="userId">
|
||
<ui-avatar
|
||
src="{{item.avatarUrl}}"
|
||
size="lg"
|
||
default-text="{{item.userName}}"
|
||
/>
|
||
<view class="info">
|
||
<text class="name">{{item.userName || '用户'}}</text>
|
||
<text class="meta">拉黑于 {{item.blockedAtText || '未知时间'}}</text>
|
||
<text class="reason" wx:if="{{item.reason}}">原因:{{item.reason}}</text>
|
||
</view>
|
||
<button
|
||
class="btn-unblock {{actionLoadingUserId === item.userId ? 'disabled' : ''}}"
|
||
catchtap="onUnblock"
|
||
data-user-id="{{item.userId}}"
|
||
data-user-name="{{item.userName}}"
|
||
disabled="{{actionLoadingUserId === item.userId}}"
|
||
>解除拉黑</button>
|
||
</view>
|
||
</view>
|
||
<ui-loading wx:if="{{loadingMore}}" mode="skeleton" rows="2" />
|
||
</block>
|
||
|
||
<ui-empty
|
||
wx:else
|
||
illustration="default"
|
||
title="黑名单是空的"
|
||
description="你还没有拉黑过任何人。拉黑后对方将无法与你互动。"
|
||
/>
|
||
</view>
|
||
|
||
<!-- 解除拉黑二次确认 -->
|
||
<ui-danger-action-dialog
|
||
visible="{{showDangerDialog}}"
|
||
action="{{dangerAction}}"
|
||
target-name="{{dangerTargetName}}"
|
||
bind:confirm="onDangerConfirm"
|
||
bind:cancel="onDangerCancel"
|
||
/>
|
||
</view>
|