From 8534025c45b4736975730678b9ccf23570a75f95 Mon Sep 17 00:00:00 2001
From: liuyu <yu.liu@cqgbkj.com>
Date: 星期二, 22 九月 2026 09:25:48 +0800
Subject: [PATCH] feat(tms): 新增试卷、培训任务、个人任务页面
---
apps/jnpf-web-apps-main/src/api/x/tms/place.ts | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/apps/jnpf-web-apps-main/src/api/x/tms/place.ts b/apps/jnpf-web-apps-main/src/api/x/tms/place.ts
new file mode 100644
index 0000000..5b9c45e
--- /dev/null
+++ b/apps/jnpf-web-apps-main/src/api/x/tms/place.ts
@@ -0,0 +1,24 @@
+import { defHttp } from '#/api/request';
+
+/** 姝e紡璺緞锛�/api/tms/place/** */
+const prefix = '/api/tms/place';
+
+export interface PlaceOption {
+ id: string;
+ placeNo?: string;
+ fullName: string;
+ placeGroup?: string;
+}
+
+async function unwrapData<T>(promise: Promise<any>): Promise<T> {
+ const res = await promise;
+ if (res && typeof res === 'object' && 'data' in res && ('code' in res || 'msg' in res)) {
+ return res.data as T;
+ }
+ return res as T;
+}
+
+/** 鍚敤涓殑鍩硅鍦扮偣锛堟潵鑷煿璁湴鐐圭鐞� / tms_place锛� */
+export function getPlaceOptions() {
+ return unwrapData<PlaceOption[]>(defHttp.get({ url: `${prefix}/options` }));
+}
--
Gitblit v1.8.0