2026-05-18 09:46:11 +08:00
|
|
|
/**
|
|
|
|
|
* Mini program API wrapper for this module.
|
|
|
|
|
* Call guide: require this module in a page, then invoke the matching method from page event handlers or lifecycle hooks.
|
|
|
|
|
*/
|
2026-04-01 15:18:35 +08:00
|
|
|
const request = require('../utils/request')
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
createOrder(data) {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/order/create',
|
|
|
|
|
method: 'POST',
|
|
|
|
|
data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getOrderList() {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/order/list'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 15:16:40 +08:00
|
|
|
listMyPendingReviews() {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/order/review/my-pending'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
listOrderReviews(orderId) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/order/${orderId}/reviews`
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
submitArtistReview(reviewId, data) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/order/review/${reviewId}/submit`,
|
|
|
|
|
method: 'POST',
|
|
|
|
|
data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getArtistChangeOptions(orderId, orderItemId) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/order/${orderId}/artist-change/options`,
|
|
|
|
|
params: {
|
|
|
|
|
orderItemId
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
requestArtistChange(data) {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/order/artist-change/request',
|
|
|
|
|
method: 'POST',
|
|
|
|
|
data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
listMyPendingArtistChangeRequests() {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/order/artist-change/my-pending'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
approveArtistChange(requestId) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/order/artist-change/${requestId}/approve`,
|
|
|
|
|
method: 'PUT',
|
|
|
|
|
data: {}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
rejectArtistChange(requestId, data) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/order/artist-change/${requestId}/reject`,
|
|
|
|
|
method: 'PUT',
|
|
|
|
|
data: data || {}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-04-01 15:18:35 +08:00
|
|
|
cancelOrder(orderId) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/order/cancel/${orderId}`,
|
|
|
|
|
method: 'PUT'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|