fix(operator): fix operator edit issue
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m51s

This commit is contained in:
sexygoat
2026-04-10 14:00:21 +08:00
parent 9a6f085cde
commit 2b3119c549
53 changed files with 547 additions and 418 deletions

View File

@@ -101,9 +101,14 @@ export class BaseService {
* 获取单个资源
* @param url 请求URL
* @param params 请求参数
* @param config 额外配置
*/
protected static getOne<T>(url: string, params?: Record<string, any>): Promise<BaseResponse<T>> {
return this.get<BaseResponse<T>>(url, params)
protected static getOne<T>(
url: string,
params?: Record<string, any>,
config?: Record<string, any>
): Promise<BaseResponse<T>> {
return this.get<BaseResponse<T>>(url, params, config)
}
/**

View File

@@ -38,7 +38,13 @@ export class AssetService extends BaseService {
*/
static getRealtimeStatus(identifier: string): Promise<BaseResponse<AssetRealtimeStatusResponse>> {
return this.getOne<AssetRealtimeStatusResponse>(
`/api/admin/assets/${identifier}/realtime-status`
`/api/admin/assets/${identifier}/realtime-status`,
undefined,
{
requestOptions: {
show404Error: false // 404时不显示错误提示
}
}
)
}
@@ -67,7 +73,12 @@ export class AssetService extends BaseService {
): Promise<BaseResponse<AssetPackageListResponse>> {
return this.get<BaseResponse<AssetPackageListResponse>>(
`/api/admin/assets/${identifier}/packages`,
params
params,
{
requestOptions: {
show404Error: false // 404时不显示错误提示
}
}
)
}
@@ -79,7 +90,13 @@ export class AssetService extends BaseService {
*/
static getCurrentPackage(identifier: string): Promise<BaseResponse<AssetCurrentPackageResponse>> {
return this.getOne<AssetCurrentPackageResponse>(
`/api/admin/assets/${identifier}/current-package`
`/api/admin/assets/${identifier}/current-package`,
undefined,
{
requestOptions: {
show404Error: false // 404时不显示错误提示
}
}
)
}
@@ -128,7 +145,11 @@ export class AssetService extends BaseService {
* @param identifier 资产标识符ICCID 或 VirtualNo
*/
static getAssetWallet(identifier: string): Promise<BaseResponse<AssetWalletResponse>> {
return this.getOne<AssetWalletResponse>(`/api/admin/assets/${identifier}/wallet`)
return this.getOne<AssetWalletResponse>(`/api/admin/assets/${identifier}/wallet`, undefined, {
requestOptions: {
show404Error: false // 404时不显示错误提示
}
})
}
/**