feat: 后台订单列表新增手动激活按钮

- API 层新增 activateOrder 方法 (POST /v1/admin/order/activate)
- pending(1) 和 cancelled(3) 状态的订单显示 Activate 按钮
- 点击后调用后端手动激活接口,强制发放订阅权益
This commit is contained in:
2026-03-09 04:08:23 -07:00
parent 778e78ac68
commit 31803a1d24
2 changed files with 54 additions and 13 deletions
+18
View File
@@ -55,3 +55,21 @@ export async function updateOrderStatus(
}
);
}
/** Manually activate order POST /v1/admin/order/activate */
export async function activateOrder(
body: { order_no: string },
options?: { [key: string]: any }
) {
return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/order/activate`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
}
);
}