资料字段支持下拉选项与买家截图,大厅按 VIP 等级延迟可见
资料字段: - CollectField 支持 type(text/select) 与 options,规则字段语法 key:名称#选项1,选项2 - 默认字段改为游戏编号/游戏昵称/系统(安卓,苹果)/区服(QQ区,微信区),旧默认模板字段自动替换为新版 - 采集页与管理端补资料支持单选下拉与买家主页截图上传(新增公开上传接口) - 管理端工单详情展示买家截图 VIP 延迟可见: - 等级权限新增 visibleDelaySeconds(默认 VIP1=20s~VIP5=0s,可后台配置) - 大厅按等级延迟过滤新发布工单,页面提示延迟规则
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { apiDelete, apiGet, apiPost } from '@/lib/http'
|
||||
import type {
|
||||
UploadedFile,
|
||||
WorkCategory,
|
||||
WorkOrder,
|
||||
WorkOrderShare,
|
||||
@@ -62,6 +63,7 @@ export function saveAdminWorkerLevel(payload: {
|
||||
depositFreeAmount?: number
|
||||
maxActiveOrders?: number
|
||||
upgradeThreshold?: number
|
||||
visibleDelaySeconds?: number
|
||||
status?: string
|
||||
}) {
|
||||
return apiPost<{ level: WorkerLevel }>(
|
||||
@@ -203,10 +205,11 @@ export function syncAdminWorkerOrdersFromSource(payload: {
|
||||
export function submitAdminWorkOrderMaterial(
|
||||
workOrderId: number,
|
||||
fields: Record<string, string>,
|
||||
screenshots?: UploadedFile[],
|
||||
) {
|
||||
return apiPost<{ order: WorkOrder; complete: boolean }>(
|
||||
`/api/v1/admin/worker-platform/orders/${workOrderId}/material`,
|
||||
{ fields },
|
||||
{ fields, screenshots },
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { apiPostForm } from '@/lib/http'
|
||||
import type { UploadedFile } from '@/types/worker-platform'
|
||||
import { optimizeImageForUpload } from '@/utils/image-upload'
|
||||
|
||||
type UploadScope = 'admin' | 'worker'
|
||||
type UploadScope = 'admin' | 'worker' | 'collect'
|
||||
|
||||
export async function uploadFile(
|
||||
file: File,
|
||||
@@ -16,7 +16,9 @@ export async function uploadFile(
|
||||
const endpoint =
|
||||
scope === 'admin'
|
||||
? '/api/v1/admin/files/upload'
|
||||
: '/api/v1/worker/files/upload'
|
||||
: scope === 'collect'
|
||||
? '/api/v1/collect/upload'
|
||||
: '/api/v1/worker/files/upload'
|
||||
const response = await apiPostForm<{ file: UploadedFile }>(endpoint, form)
|
||||
return response.data.file
|
||||
}
|
||||
|
||||
@@ -143,6 +143,7 @@ export function submitCollectOrder(payload: {
|
||||
orderNo: string
|
||||
workOrderId?: number
|
||||
fields: Record<string, string>
|
||||
screenshots?: UploadedFile[]
|
||||
}) {
|
||||
return apiPost<{ complete: boolean; order: Record<string, unknown> }>(
|
||||
'/api/v1/collect/submit',
|
||||
|
||||
Reference in New Issue
Block a user