feat: 忽略反馈也支持回复 — 统一标记处理/忽略的回复流程
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
<view v-if="item.status === 'pending'" class="action-btn process" @tap="openReplyModal(item)">
|
||||
<text class="action-text">标记处理</text>
|
||||
</view>
|
||||
<view v-if="item.status === 'pending'" class="action-btn ignore" @tap="updateStatus(item, 'ignored')">
|
||||
<view v-if="item.status === 'pending'" class="action-btn ignore" @tap="openReplyModal(item, 'ignored')">
|
||||
<text class="action-text">忽略</text>
|
||||
</view>
|
||||
<view v-if="item.status !== 'pending'" class="action-btn pending" @tap="updateStatus(item, 'pending')">
|
||||
@@ -82,7 +82,7 @@
|
||||
<view class="modal-mask" v-if="showReplyModal" @tap="showReplyModal = false">
|
||||
<view class="reply-modal" @tap.stop>
|
||||
<view class="modal-header">
|
||||
<text class="modal-title">回复反馈</text>
|
||||
<text class="modal-title">{{ replyAction === 'processed' ? '标记处理' : '忽略反馈' }}</text>
|
||||
<view class="modal-close" @tap="showReplyModal = false">
|
||||
<text class="modal-close-text">×</text>
|
||||
</view>
|
||||
@@ -101,11 +101,12 @@
|
||||
/>
|
||||
</view>
|
||||
<view class="reply-footer">
|
||||
<view class="reply-btn skip" @tap="handleProcessSkipReply">
|
||||
<text class="reply-btn-text">仅标记处理</text>
|
||||
<view class="reply-btn skip" @tap="handleSkipReply">
|
||||
<text class="reply-btn-text">{{ replyAction === 'processed' ? '仅标记处理' : '仅忽略' }}</text>
|
||||
</view>
|
||||
<view class="reply-btn confirm" @tap="handleWithReply">
|
||||
<text class="reply-btn-text">{{ replyAction === 'processed' ? '回复并处理' : '回复并忽略' }}</text>
|
||||
</view>
|
||||
<view class="reply-btn confirm" @tap="handleProcessWithReply">
|
||||
<text class="reply-btn-text">回复并处理</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -147,6 +148,7 @@ const initialLoaded = ref(false)
|
||||
// 回复弹窗
|
||||
const showReplyModal = ref(false)
|
||||
const replyTarget = ref<Feedback | null>(null)
|
||||
const replyAction = ref<'processed' | 'ignored'>('processed')
|
||||
const replyText = ref('')
|
||||
|
||||
const noMore = computed(() => list.value.length >= total.value && total.value > 0)
|
||||
@@ -199,20 +201,21 @@ function loadMore() {
|
||||
loadList(false)
|
||||
}
|
||||
|
||||
function openReplyModal(item: Feedback) {
|
||||
function openReplyModal(item: Feedback, action: 'processed' | 'ignored' = 'processed') {
|
||||
replyTarget.value = item
|
||||
replyAction.value = action
|
||||
replyText.value = ''
|
||||
showReplyModal.value = true
|
||||
}
|
||||
|
||||
async function handleProcessSkipReply() {
|
||||
async function handleSkipReply() {
|
||||
if (!replyTarget.value) return
|
||||
await doUpdateStatus(replyTarget.value, 'processed')
|
||||
await doUpdateStatus(replyTarget.value, replyAction.value)
|
||||
}
|
||||
|
||||
async function handleProcessWithReply() {
|
||||
async function handleWithReply() {
|
||||
if (!replyTarget.value) return
|
||||
await doUpdateStatus(replyTarget.value, 'processed', replyText.value.trim() || undefined)
|
||||
await doUpdateStatus(replyTarget.value, replyAction.value, replyText.value.trim() || undefined)
|
||||
}
|
||||
|
||||
async function doUpdateStatus(item: Feedback, status: string, admin_reply?: string) {
|
||||
|
||||
Reference in New Issue
Block a user