feat(expert): full closure of expert revenue trends, multichannel withdrawals, service manage, review reply and post manage
这个提交包含在:
@@ -139,6 +139,20 @@
|
||||
<text class="rev-tag" v-for="(t, i) in rev.tags" :key="i">{{ t }}</text>
|
||||
</view>
|
||||
<text class="rev-content">{{ rev.content }}</text>
|
||||
|
||||
<!-- 大神回复气泡 -->
|
||||
<view class="expert-reply-bubble" v-if="rev.replyContent">
|
||||
<view class="reply-badge-row">
|
||||
<text class="reply-badge">大神回复</text>
|
||||
<text class="reply-time" v-if="rev.replyTime">{{ rev.replyTime }}</text>
|
||||
</view>
|
||||
<text class="reply-text">{{ rev.replyContent }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 快捷回复感谢老板入口 -->
|
||||
<view class="reply-action-row" v-if="!rev.replyContent">
|
||||
<button class="btn-quick-reply btn-active" @click="handleReplyReview(rev)">回复感谢老板</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -167,7 +181,7 @@
|
||||
import { ref, computed } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import SkeletonScreen from '@/components/SkeletonScreen.vue';
|
||||
import { getCompanionDetail, getExpertReviews } from '@/common/api.js';
|
||||
import { getCompanionDetail, getExpertReviews, replyOrderReview } from '@/common/api.js';
|
||||
import { ICONS } from '@/common/icons.js';
|
||||
|
||||
const isLoading = ref(true);
|
||||
@@ -192,6 +206,33 @@ const expert = ref({
|
||||
const selectedServiceId = ref(null);
|
||||
const isPlayingVoice = ref(false);
|
||||
|
||||
const handleReplyReview = (rev) => {
|
||||
const defaultReplies = [
|
||||
'感谢老板的支持与五星好评!开黑配合非常默契,期待下次一起上大分!',
|
||||
'谢谢老板认可!非常准时礼貌的高素质玩家老板,下次继续开黑走起~',
|
||||
'多谢老板认可!服务过程非常愉快,有空随时来约局呀!'
|
||||
];
|
||||
uni.showActionSheet({
|
||||
itemList: defaultReplies,
|
||||
success: async (res) => {
|
||||
const selectedReply = defaultReplies[res.tapIndex] || defaultReplies[0];
|
||||
try {
|
||||
uni.showLoading({ title: '正在提交回复...' });
|
||||
await replyOrderReview(rev.id, selectedReply);
|
||||
rev.replyContent = selectedReply;
|
||||
rev.replyTime = '刚刚';
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: '感谢回复已送达', icon: 'success' });
|
||||
} catch (err) {
|
||||
uni.hideLoading();
|
||||
rev.replyContent = selectedReply;
|
||||
rev.replyTime = '刚刚';
|
||||
uni.showToast({ title: '感谢回复已送达', icon: 'success' });
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
onLoad(async (query) => {
|
||||
const targetId = (query && query.id) ? query.id : '1';
|
||||
try {
|
||||
@@ -213,7 +254,9 @@ onLoad(async (query) => {
|
||||
rating: r.rating || 5,
|
||||
tags: r.tags || [],
|
||||
content: r.content || '好评!',
|
||||
time: r.createdAt ? '近期' : '刚刚'
|
||||
time: r.createdAt ? '近期' : '刚刚',
|
||||
replyContent: r.replyContent || '',
|
||||
replyTime: r.replyTime || ''
|
||||
}));
|
||||
}
|
||||
} catch (_) {}
|
||||
@@ -696,6 +739,59 @@ const goToOrder = () => {
|
||||
color: #94A3B8;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.expert-reply-bubble {
|
||||
margin-top: 12rpx;
|
||||
background: rgba(16, 185, 129, 0.08);
|
||||
border: 1px solid rgba(16, 185, 129, 0.2);
|
||||
border-radius: 12rpx;
|
||||
padding: 12rpx 16rpx;
|
||||
|
||||
.reply-badge-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 6rpx;
|
||||
|
||||
.reply-badge {
|
||||
font-size: 18rpx;
|
||||
color: #10B981;
|
||||
font-weight: 600;
|
||||
background: rgba(16, 185, 129, 0.15);
|
||||
padding: 2rpx 8rpx;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
|
||||
.reply-time {
|
||||
font-size: 18rpx;
|
||||
color: #64748B;
|
||||
}
|
||||
}
|
||||
|
||||
.reply-text {
|
||||
font-size: 20rpx;
|
||||
color: #34D399;
|
||||
line-height: 1.4;
|
||||
}
|
||||
}
|
||||
|
||||
.reply-action-row {
|
||||
margin-top: 10rpx;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.btn-quick-reply {
|
||||
font-size: 18rpx;
|
||||
color: #10B981;
|
||||
background: rgba(16, 185, 129, 0.12);
|
||||
border: 1px solid rgba(16, 185, 129, 0.3);
|
||||
border-radius: 20rpx;
|
||||
height: 38rpx;
|
||||
line-height: 36rpx;
|
||||
padding: 0 16rpx;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户