Files
biz_xfj_cloud/lib/common/api/app_api.dart
T
2026-07-30 17:06:17 +08:00

27 lines
901 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:dio/dio.dart' as dio;
import 'package:pj_supermarket_cloud/common/index.dart';
/// 终端 App 配置与版本接口入口,统一复用 HttpManage 的鉴权、租户和错误处理。
abstract class AppApi {
///
/// 分页获取匹配 App 编码和平台的已发布版本。
///
/// [pa] 包含 appUniqueCode、platform、current 和 size;[silent] 为 true 时后台任务
/// 只记录异常,不弹业务 Toast。
static Future<ServiceAppVersionPage?> openCardList(
dynamic pa, {
bool silent = false,
}) async {
final res = await HttpManage().dio.get(
"/integrated/app-version/ad/page",
queryParameters: pa,
options: dio.Options(
extra: {if (silent) HttpManage.silentRequestKey: true},
),
);
if (res.data == null) return null;
return ServiceAppVersionPage.fromJson(res.data);
}
}