feat(expert): full closure of expert revenue trends, multichannel withdrawals, service manage, review reply and post manage
这个提交包含在:
@@ -24,8 +24,14 @@
|
||||
<!-- 订单卡片顶部 -->
|
||||
<view class="order-head">
|
||||
<text class="order-sn">单号:{{ order.orderSn }}</text>
|
||||
<view class="status-pill" :class="order.status">
|
||||
{{ getStatusText(order.status) }}
|
||||
<view class="order-head-right">
|
||||
<view class="countdown-badge" v-if="order.status === 'PENDING_PAY'">
|
||||
<image class="clock-svg" :src="ICONS.clock" mode="aspectFit" />
|
||||
<text class="countdown-txt">{{ getOrderCountdown(order) }}</text>
|
||||
</view>
|
||||
<view class="status-pill" :class="order.status">
|
||||
{{ getStatusText(order.status) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -57,14 +63,16 @@
|
||||
|
||||
<!-- 底部业务操作按钮组 -->
|
||||
<view class="order-actions">
|
||||
<text class="btn-report-link btn-active" @click.stop="openReportModal(order)">举报投诉</text>
|
||||
|
||||
<template v-if="order.status === 'PENDING_PAY'">
|
||||
<button class="action-btn cancel-btn btn-active" @click="cancelOrder(order.id)">取消</button>
|
||||
<button class="action-btn primary-btn btn-active" @click="payOrder(order.id)">立即付款</button>
|
||||
<button class="action-btn primary-btn btn-active" :disabled="getOrderCountdown(order) === '已超时'" @click="payOrder(order.id)">立即付款</button>
|
||||
</template>
|
||||
|
||||
<template v-else-if="order.status === 'IN_SERVICE'">
|
||||
<button class="action-btn chat-btn btn-active" @click="contactExpert(order.expert.nickname)">联系大神</button>
|
||||
<button class="action-btn refund-btn btn-active" @click="applyRefund(order.id)">申请退款</button>
|
||||
<button class="action-btn refund-btn btn-active" @click="openRefundModal(order)">申请退款</button>
|
||||
<button class="action-btn success-btn btn-active" @click="confirmComplete(order.id)">确认验收</button>
|
||||
</template>
|
||||
|
||||
@@ -157,6 +165,164 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 退款与售后仲裁申诉工单弹窗 -->
|
||||
<view class="review-modal-mask" v-if="refundModalVisible" @click.self="closeRefundModal">
|
||||
<view class="review-modal-content refund-modal-content">
|
||||
<view class="modal-header">
|
||||
<view class="modal-header-left">
|
||||
<text class="modal-title">申请退款与仲裁</text>
|
||||
<text class="modal-subtitle" v-if="targetRefundOrder">
|
||||
单号:{{ targetRefundOrder.orderSn }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="modal-close" @click="closeRefundModal">
|
||||
<image class="close-icon" :src="ICONS.close" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 退款原因单选胶囊 -->
|
||||
<view class="tags-section">
|
||||
<text class="tags-label">选择退款理由</text>
|
||||
<view class="tags-wrap">
|
||||
<view
|
||||
v-for="r in presetRefundReasons"
|
||||
:key="r"
|
||||
class="review-tag"
|
||||
:class="{ active: refundForm.reason === r }"
|
||||
@click="refundForm.reason = r"
|
||||
>
|
||||
{{ r }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 详细说明文本框 -->
|
||||
<view class="textarea-section">
|
||||
<text class="textarea-label">情况详细说明</text>
|
||||
<textarea
|
||||
class="review-textarea"
|
||||
v-model="refundForm.description"
|
||||
placeholder="请客观描述大神违约或未履约事实,平台专员将核实聊天记录与对局记录..."
|
||||
placeholder-class="textarea-placeholder"
|
||||
maxlength="200"
|
||||
/>
|
||||
<text class="char-count">{{ refundForm.description.length }}/200</text>
|
||||
</view>
|
||||
|
||||
<!-- 上传凭证截图 (最多3张) -->
|
||||
<view class="evidence-section">
|
||||
<text class="textarea-label">上传举证截图 (最多3张)</text>
|
||||
<view class="evidence-grid">
|
||||
<view
|
||||
v-for="(img, idx) in refundForm.evidence"
|
||||
:key="idx"
|
||||
class="evidence-item"
|
||||
>
|
||||
<image class="evidence-img" :src="img" mode="aspectFill" @click="previewEvidence(img)" />
|
||||
<view class="evidence-delete" @click.stop="removeRefundEvidence(idx)">
|
||||
<image class="close-icon" :src="ICONS.close" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="evidence-upload-btn btn-active"
|
||||
v-if="refundForm.evidence.length < 3"
|
||||
@click="chooseRefundEvidence"
|
||||
>
|
||||
<image class="upload-icon-svg" :src="ICONS.camera" mode="aspectFit" />
|
||||
<text class="upload-txt">上传凭证</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="modal-actions">
|
||||
<button class="modal-btn cancel-btn btn-active" @click="closeRefundModal">取消</button>
|
||||
<button class="modal-btn submit-btn btn-active danger" :disabled="submittingRefund" @click="submitRefundTicket">
|
||||
{{ submittingRefund ? '正在提交...' : '提交退款申请' }}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 举报不良行为弹窗 -->
|
||||
<view class="review-modal-mask" v-if="reportModalVisible" @click.self="closeReportModal">
|
||||
<view class="review-modal-content report-modal-content">
|
||||
<view class="modal-header">
|
||||
<view class="modal-header-left">
|
||||
<text class="modal-title">举报不良陪玩</text>
|
||||
<text class="modal-subtitle" v-if="targetReportOrder">
|
||||
举报对象:{{ targetReportOrder.expert ? targetReportOrder.expert.nickname : (targetReportOrder.companionName || '陪玩大神') }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="modal-close" @click="closeReportModal">
|
||||
<image class="close-icon" :src="ICONS.close" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 违规类型单选 -->
|
||||
<view class="tags-section">
|
||||
<text class="tags-label">选择违规类型</text>
|
||||
<view class="tags-wrap">
|
||||
<view
|
||||
v-for="item in presetReportReasons"
|
||||
:key="item"
|
||||
class="review-tag"
|
||||
:class="{ active: reportForm.reason === item }"
|
||||
@click="reportForm.reason = item"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 举报描述 -->
|
||||
<view class="textarea-section">
|
||||
<text class="textarea-label">详细违规线索说明</text>
|
||||
<textarea
|
||||
class="review-textarea"
|
||||
v-model="reportForm.description"
|
||||
placeholder="请填写具体违规线索(如涉黄言论、私下诱导转账、恶意脱离平台等),平台将严肃核处..."
|
||||
placeholder-class="textarea-placeholder"
|
||||
maxlength="200"
|
||||
/>
|
||||
<text class="char-count">{{ reportForm.description.length }}/200</text>
|
||||
</view>
|
||||
|
||||
<!-- 上传凭证截图 -->
|
||||
<view class="evidence-section">
|
||||
<text class="textarea-label">上传违规截图 (最多3张)</text>
|
||||
<view class="evidence-grid">
|
||||
<view
|
||||
v-for="(img, idx) in reportForm.evidence"
|
||||
:key="idx"
|
||||
class="evidence-item"
|
||||
>
|
||||
<image class="evidence-img" :src="img" mode="aspectFill" @click="previewEvidence(img)" />
|
||||
<view class="evidence-delete" @click.stop="removeReportEvidence(idx)">
|
||||
<image class="close-icon" :src="ICONS.close" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="evidence-upload-btn btn-active"
|
||||
v-if="reportForm.evidence.length < 3"
|
||||
@click="chooseReportEvidence"
|
||||
>
|
||||
<image class="upload-icon-svg" :src="ICONS.camera" mode="aspectFit" />
|
||||
<text class="upload-txt">上传截图</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="modal-actions">
|
||||
<button class="modal-btn cancel-btn btn-active" @click="closeReportModal">取消</button>
|
||||
<button class="modal-btn submit-btn btn-active danger" :disabled="submittingReport" @click="submitReportTicket">
|
||||
{{ submittingReport ? '正在提交...' : '确认提交举报' }}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -169,7 +335,9 @@ import {
|
||||
payOrder as payOrderApi,
|
||||
completeOrder as completeOrderApi,
|
||||
refundOrder as refundOrderApi,
|
||||
submitOrderReview as submitOrderReviewApi
|
||||
submitOrderReview as submitOrderReviewApi,
|
||||
submitReport as submitReportApi,
|
||||
uploadImage
|
||||
} from '@/common/api.js';
|
||||
import { ICONS } from '@/common/icons.js';
|
||||
import { getCurrentThemeKey, applyThemeToNativeUI } from '@/common/theme.js';
|
||||
@@ -177,6 +345,8 @@ import { getNavBarInfo } from '@/common/nav.js';
|
||||
|
||||
const currentThemeKey = ref(getCurrentThemeKey());
|
||||
const navInfo = ref(getNavBarInfo());
|
||||
const nowTick = ref(Date.now());
|
||||
let countdownTimer = null;
|
||||
|
||||
const navStyle = computed(() => {
|
||||
return {
|
||||
@@ -207,6 +377,10 @@ onMounted(() => {
|
||||
currentThemeKey.value = getCurrentThemeKey();
|
||||
uni.$on('theme-change', onThemeChanged);
|
||||
loadLiveOrders();
|
||||
|
||||
countdownTimer = setInterval(() => {
|
||||
nowTick.value = Date.now();
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
@@ -218,6 +392,10 @@ onShow(() => {
|
||||
|
||||
onUnmounted(() => {
|
||||
uni.$off('theme-change', onThemeChanged);
|
||||
if (countdownTimer) {
|
||||
clearInterval(countdownTimer);
|
||||
countdownTimer = null;
|
||||
}
|
||||
});
|
||||
|
||||
const tabs = [
|
||||
@@ -311,25 +489,215 @@ const contactExpert = (name) => {
|
||||
});
|
||||
};
|
||||
|
||||
const applyRefund = (id) => {
|
||||
uni.showModal({
|
||||
title: '申请退款/售后仲裁',
|
||||
content: '申请后客服及平台专家将审核对局录像与连麦记录,款项将原路退回。',
|
||||
confirmText: '确认申请',
|
||||
confirmColor: '#EF4444',
|
||||
// 15分钟待支付倒计时动态计算
|
||||
const getOrderCountdown = (order) => {
|
||||
let createdAtTs = null;
|
||||
if (order.createdAt && order.createdAt !== '刚刚') {
|
||||
const parsed = Date.parse(order.createdAt);
|
||||
if (!isNaN(parsed)) createdAtTs = parsed;
|
||||
}
|
||||
if (!createdAtTs) {
|
||||
createdAtTs = Date.now();
|
||||
}
|
||||
const expireTs = createdAtTs + 15 * 60 * 1000;
|
||||
const diffSec = Math.max(0, Math.floor((expireTs - nowTick.value) / 1000));
|
||||
if (diffSec <= 0) {
|
||||
return '已超时';
|
||||
}
|
||||
const m = Math.floor(diffSec / 60);
|
||||
const s = diffSec % 60;
|
||||
return `${m < 10 ? '0' + m : m}:${s < 10 ? '0' + s : s}`;
|
||||
};
|
||||
|
||||
// 退款与售后仲裁申诉工单状态与交互
|
||||
const refundModalVisible = ref(false);
|
||||
const targetRefundOrder = ref(null);
|
||||
const submittingRefund = ref(false);
|
||||
const presetRefundReasons = [
|
||||
'大神未按时履约',
|
||||
'服务态度恶劣/消极',
|
||||
'技术水平严重不符',
|
||||
'擅自提前离场结束',
|
||||
'线下违规行为/争议',
|
||||
'双方友好协商退款'
|
||||
];
|
||||
const refundForm = ref({
|
||||
reason: '大神未按时履约',
|
||||
description: '',
|
||||
evidence: []
|
||||
});
|
||||
|
||||
const openRefundModal = (order) => {
|
||||
targetRefundOrder.value = order;
|
||||
refundForm.value = {
|
||||
reason: '大神未按时履约',
|
||||
description: '',
|
||||
evidence: []
|
||||
};
|
||||
refundModalVisible.value = true;
|
||||
};
|
||||
|
||||
const closeRefundModal = () => {
|
||||
refundModalVisible.value = false;
|
||||
targetRefundOrder.value = null;
|
||||
};
|
||||
|
||||
const chooseRefundEvidence = () => {
|
||||
const remainCount = 3 - refundForm.value.evidence.length;
|
||||
if (remainCount <= 0) return;
|
||||
uni.chooseImage({
|
||||
count: remainCount,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
try {
|
||||
await refundOrderApi(id);
|
||||
} catch (_) {}
|
||||
const o = orders.value.find(item => item.id === id);
|
||||
if (o) o.status = 'REFUNDING';
|
||||
uni.showToast({ title: '退款申请已提交,等待审核', icon: 'none' });
|
||||
const paths = res.tempFilePaths || [];
|
||||
if (paths.length === 0) return;
|
||||
uni.showLoading({ title: '正在上传凭证...' });
|
||||
try {
|
||||
for (const p of paths) {
|
||||
const onlineUrl = await uploadImage(p);
|
||||
if (onlineUrl && refundForm.value.evidence.length < 3) {
|
||||
refundForm.value.evidence.push(onlineUrl);
|
||||
}
|
||||
}
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: '凭证上传成功', icon: 'success' });
|
||||
} catch (err) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: err.message || '上传异常', icon: 'none' });
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const removeRefundEvidence = (idx) => {
|
||||
refundForm.value.evidence.splice(idx, 1);
|
||||
};
|
||||
|
||||
const previewEvidence = (url) => {
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
current: url
|
||||
});
|
||||
};
|
||||
|
||||
const submitRefundTicket = async () => {
|
||||
if (!targetRefundOrder.value) return;
|
||||
submittingRefund.value = true;
|
||||
uni.showLoading({ title: '正在提交退款申诉...' });
|
||||
try {
|
||||
const oId = targetRefundOrder.value.id;
|
||||
await refundOrderApi(oId, {
|
||||
reason: refundForm.value.reason,
|
||||
description: refundForm.value.description.trim(),
|
||||
evidence: refundForm.value.evidence
|
||||
});
|
||||
const o = orders.value.find(item => item.id === oId);
|
||||
if (o) o.status = 'REFUNDING';
|
||||
uni.hideLoading();
|
||||
closeRefundModal();
|
||||
uni.showToast({ title: '退款申诉已受理,进入争议仲裁流程', icon: 'success' });
|
||||
} catch (err) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: err.message || '提交失败,请重试', icon: 'none' });
|
||||
} finally {
|
||||
submittingRefund.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
// 举报不良陪玩工单状态与交互
|
||||
const reportModalVisible = ref(false);
|
||||
const targetReportOrder = ref(null);
|
||||
const submittingReport = ref(false);
|
||||
const presetReportReasons = [
|
||||
'涉黄低俗言论',
|
||||
'私下诱导转账/欺诈',
|
||||
'态度恶劣/人身攻击',
|
||||
'开挂/作弊/战绩造假',
|
||||
'线下违规/安全隐患',
|
||||
'其他违规行为'
|
||||
];
|
||||
const reportForm = ref({
|
||||
reason: '涉黄低俗言论',
|
||||
description: '',
|
||||
evidence: []
|
||||
});
|
||||
|
||||
const openReportModal = (order) => {
|
||||
targetReportOrder.value = order;
|
||||
reportForm.value = {
|
||||
reason: '涉黄低俗言论',
|
||||
description: '',
|
||||
evidence: []
|
||||
};
|
||||
reportModalVisible.value = true;
|
||||
};
|
||||
|
||||
const closeReportModal = () => {
|
||||
reportModalVisible.value = false;
|
||||
targetReportOrder.value = null;
|
||||
};
|
||||
|
||||
const chooseReportEvidence = () => {
|
||||
const remainCount = 3 - reportForm.value.evidence.length;
|
||||
if (remainCount <= 0) return;
|
||||
uni.chooseImage({
|
||||
count: remainCount,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success: async (res) => {
|
||||
const paths = res.tempFilePaths || [];
|
||||
if (paths.length === 0) return;
|
||||
uni.showLoading({ title: '正在上传违规截图...' });
|
||||
try {
|
||||
for (const p of paths) {
|
||||
const onlineUrl = await uploadImage(p);
|
||||
if (onlineUrl && reportForm.value.evidence.length < 3) {
|
||||
reportForm.value.evidence.push(onlineUrl);
|
||||
}
|
||||
}
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: '截图上传成功', icon: 'success' });
|
||||
} catch (err) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: err.message || '上传异常', icon: 'none' });
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const removeReportEvidence = (idx) => {
|
||||
reportForm.value.evidence.splice(idx, 1);
|
||||
};
|
||||
|
||||
const submitReportTicket = async () => {
|
||||
if (!targetReportOrder.value) return;
|
||||
submittingReport.value = true;
|
||||
uni.showLoading({ title: '正在提交举报...' });
|
||||
try {
|
||||
const order = targetReportOrder.value;
|
||||
const expertId = order.expert ? order.expert.id : (order.expertId || 101);
|
||||
const expertName = order.expert ? order.expert.nickname : (order.companionName || '陪玩大神');
|
||||
await submitReportApi({
|
||||
reporterId: 1001,
|
||||
targetType: 'EXPERT',
|
||||
targetId: String(expertId),
|
||||
targetName: expertName,
|
||||
reason: reportForm.value.reason,
|
||||
description: reportForm.value.description.trim(),
|
||||
evidence: reportForm.value.evidence
|
||||
});
|
||||
uni.hideLoading();
|
||||
closeReportModal();
|
||||
uni.showToast({ title: '举报已提交,平台将在24小时内核实处置', icon: 'success' });
|
||||
} catch (err) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: err.message || '举报提交失败', icon: 'none' });
|
||||
} finally {
|
||||
submittingReport.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const confirmComplete = (id) => {
|
||||
uni.showModal({
|
||||
title: '确认验收',
|
||||
@@ -511,6 +879,34 @@ const submitReview = async () => {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.order-head-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
|
||||
.countdown-badge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
background: rgba(245, 158, 11, 0.15);
|
||||
border: 1px solid rgba(245, 158, 11, 0.3);
|
||||
padding: 2rpx 12rpx;
|
||||
border-radius: 10rpx;
|
||||
|
||||
.clock-svg {
|
||||
width: 22rpx;
|
||||
height: 22rpx;
|
||||
}
|
||||
|
||||
.countdown-txt {
|
||||
font-size: 20rpx;
|
||||
color: #F59E0B;
|
||||
font-weight: 700;
|
||||
font-family: monospace;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.status-pill {
|
||||
font-size: 20rpx;
|
||||
padding: 4rpx 14rpx;
|
||||
|
||||
在新工单中引用
屏蔽一个用户