From c459808efab29dc1b8439fbb90556bdb16f4c88b Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期三, 01 四月 2026 22:40:59 +0800
Subject: [PATCH] feat: 优化支付时显示任务ID
---
app/api/task.js | 79 ++++++++++++++++++++++++++++++++++++++-
1 files changed, 76 insertions(+), 3 deletions(-)
diff --git a/app/api/task.js b/app/api/task.js
index 9287710..bbbe038 100644
--- a/app/api/task.js
+++ b/app/api/task.js
@@ -26,7 +26,7 @@
export function updateTask(data) {
return request({
- url: '/task/' + data.taskId,
+ url: '/task',
method: 'put',
data: data
})
@@ -61,11 +61,14 @@
}
// 闄勪欢绠$悊API
-export function uploadAttachment(taskId, file) {
+export function uploadAttachment(taskId, file, category) {
const formData = new FormData()
formData.append('file', file)
+ if (category) {
+ formData.append('category', category)
+ }
return request({
- url: '/task/' + taskId + '/attachment',
+ url: '/task/attachment/upload/' + taskId,
method: 'post',
data: formData,
headers: {
@@ -74,10 +77,36 @@
})
}
+export function uploadAttachmentFromWechat(taskId, mediaId, category) {
+ return request({
+ url: '/task/attachment/uploadFromWechat/' + taskId,
+ method: 'post',
+ params: {
+ mediaId: mediaId,
+ category: category
+ }
+ })
+}
+
+export function getAttachmentList(taskId) {
+ return request({
+ url: '/task/attachment/list/' + taskId,
+ method: 'get'
+ })
+}
+
export function deleteAttachment(attachmentId) {
return request({
url: '/task/attachment/' + attachmentId,
method: 'delete'
+ })
+}
+
+// 鑾峰彇寰俊AccessToken
+export function getWechatAccessToken() {
+ return request({
+ url: '/wechat/accessToken',
+ method: 'get'
})
}
@@ -112,3 +141,47 @@
method: 'get'
})
}
+
+// 妫�鏌ヨ溅杈嗘槸鍚︽湁姝e湪杩涜涓殑浠诲姟
+export function checkVehicleActiveTasks(vehicleId) {
+ return request({
+ url: '/task/vehicle/' + vehicleId + '/active',
+ method: 'get'
+ })
+}
+
+// 鏍囪鎵ц浜哄氨缁�
+export function setAssigneeReady(taskId) {
+ return request({
+ url: '/task/' + taskId + '/assignee/ready',
+ method: 'post'
+ })
+}
+
+// 妫�鏌ヤ换鍔℃槸鍚︿笂浼犱簡鐭ユ儏鍚屾剰涔�
+export function checkTaskConsentAttachment(taskId) {
+ return request({
+ url: '/task/attachment/sync/task/check/' + taskId,
+ method: 'post'
+ })
+}
+
+// 妫�鏌ヤ换鍔℃槸鍚﹂噸澶嶏紙鏍规嵁鑱旂郴浜虹數璇濆拰鍒涘缓鏃ユ湡锛�
+export function checkTaskDuplicate(phone, createDate) {
+ return request({
+ url: '/task/checkDuplicate',
+ method: 'get',
+ params: {
+ phone: phone,
+ createDate: createDate
+ }
+ })
+}
+
+// 鍚屾浠诲姟鍒版棫绯荤粺锛堜换鍔$紪鍙蜂互T2寮�澶存椂鏈悓姝ワ紝缁撶畻鍓嶈嚜鍔ㄨЕ鍙戯級
+export function syncTaskStatus(taskId) {
+ return request({
+ url: '/task/syncServiceOrder/' + taskId,
+ method: 'post'
+ })
+}
--
Gitblit v1.9.1