fix(notification): 修复通知中心API路径
问题: 前端调用 /admin-service/mobile/notifications 路径不存在于Kong网关 修复: 1. Kong网关添加 /api/v1/mobile/notifications 路由到 admin-service 2. 前端 NotificationService 修正 API 路径: - /admin-service/mobile/notifications -> /mobile/notifications - /admin-service/mobile/notifications/unread-count -> /mobile/notifications/unread-count - /admin-service/mobile/notifications/mark-read -> /mobile/notifications/mark-read 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
12c0c796f4
commit
3ed17bb4eb
|
|
@ -190,7 +190,7 @@ services:
|
|||
strip_path: false
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Admin Service - 管理服务 (包含版本管理)
|
||||
# Admin Service - 管理服务 (包含版本管理和通知)
|
||||
# ---------------------------------------------------------------------------
|
||||
- name: admin-service
|
||||
url: http://192.168.1.111:3010
|
||||
|
|
@ -211,6 +211,10 @@ services:
|
|||
paths:
|
||||
- /downloads
|
||||
strip_path: false
|
||||
- name: admin-mobile-notifications
|
||||
paths:
|
||||
- /api/v1/mobile/notifications
|
||||
strip_path: false
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Presence Service - 在线状态服务
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ class NotificationService {
|
|||
}
|
||||
|
||||
final response = await _apiClient.get(
|
||||
'/admin-service/mobile/notifications',
|
||||
'/mobile/notifications',
|
||||
queryParameters: queryParams,
|
||||
);
|
||||
|
||||
|
|
@ -190,7 +190,7 @@ class NotificationService {
|
|||
Future<int> getUnreadCount({required String userSerialNum}) async {
|
||||
try {
|
||||
final response = await _apiClient.get(
|
||||
'/admin-service/mobile/notifications/unread-count',
|
||||
'/mobile/notifications/unread-count',
|
||||
queryParameters: {'userSerialNum': userSerialNum},
|
||||
);
|
||||
|
||||
|
|
@ -213,7 +213,7 @@ class NotificationService {
|
|||
};
|
||||
|
||||
final response = await _apiClient.post(
|
||||
'/admin-service/mobile/notifications/mark-read',
|
||||
'/mobile/notifications/mark-read',
|
||||
data: body,
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue