feat:自动补货/手动采购逻辑修改:批量获取-》打包-》获取Token列表
This commit is contained in:
@@ -572,6 +572,7 @@ export interface RockConfig {
|
||||
bearer_token: string;
|
||||
username: string;
|
||||
points: number;
|
||||
black_token_cost: number;
|
||||
min_points_warning: number;
|
||||
token_warning_stock: number;
|
||||
auto_purchase_enabled: boolean;
|
||||
@@ -594,15 +595,28 @@ export interface RockStats {
|
||||
auto_purchase_enabled: boolean;
|
||||
username: string;
|
||||
last_heartbeat_at?: string;
|
||||
last_purchase_error?: string;
|
||||
last_purchase_error_at?: string;
|
||||
}
|
||||
|
||||
export interface RockDashboard {
|
||||
available_black: number;
|
||||
available_blue: number;
|
||||
black_token_cost: number;
|
||||
blue_token_cost: number;
|
||||
cost_updated: boolean;
|
||||
}
|
||||
|
||||
export interface RockTokenItem {
|
||||
id: number;
|
||||
upstream_token_id: string;
|
||||
package_id?: number;
|
||||
token?: string;
|
||||
redeem_code: string;
|
||||
color: string;
|
||||
region: string;
|
||||
status: string;
|
||||
source?: string;
|
||||
assigned_order_no?: string;
|
||||
client_order_no?: string;
|
||||
expected_uid?: string;
|
||||
@@ -616,10 +630,12 @@ export interface RockTokenItem {
|
||||
mismatch_at?: string;
|
||||
mismatch_reason?: string;
|
||||
remark?: string;
|
||||
raw_data?: string;
|
||||
claimed_at?: string;
|
||||
bound_at?: string;
|
||||
redeemed_at?: string;
|
||||
created_at: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
export const rockApi = {
|
||||
@@ -635,6 +651,10 @@ export const rockApi = {
|
||||
.then((r) => r.data.data),
|
||||
getStats: () =>
|
||||
request.get("/platform/rock/stats").then((r) => r.data.data as RockStats),
|
||||
refreshDashboard: () =>
|
||||
request
|
||||
.post("/platform/rock/dashboard/refresh")
|
||||
.then((r) => r.data.data as RockDashboard),
|
||||
purchaseTokens: (count = 50) =>
|
||||
request.post("/platform/rock/purchase", { count }).then((r) => r.data.data),
|
||||
listTokens: (params?: {
|
||||
|
||||
Reference in New Issue
Block a user