From 5a2521424e17d35e3432fa9ac8b1f10a6cfffb83 Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Fri, 17 Apr 2026 15:32:49 +0800 Subject: [PATCH] fix service --- .../Auth/AuthService.swift} | 4 +--- .../{API/SDLAPIClient+Network.swift => NetworkService.swift} | 2 +- .../SDLAPIClient+App.swift => Services/AppService.swift} | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) rename punchnet/{Shared/Networking/SDLAPIClient+User.swift => Features/Auth/AuthService.swift} (96%) rename punchnet/Features/Network/{API/SDLAPIClient+Network.swift => NetworkService.swift} (97%) rename punchnet/Shared/{Networking/SDLAPIClient+App.swift => Services/AppService.swift} (98%) diff --git a/punchnet/Shared/Networking/SDLAPIClient+User.swift b/punchnet/Features/Auth/AuthService.swift similarity index 96% rename from punchnet/Shared/Networking/SDLAPIClient+User.swift rename to punchnet/Features/Auth/AuthService.swift index d2503f3..1412435 100644 --- a/punchnet/Shared/Networking/SDLAPIClient+User.swift +++ b/punchnet/Features/Auth/AuthService.swift @@ -6,9 +6,7 @@ // import Foundation -extension SDLAPIClient { - - +struct AuthService { static func loginWithAccountAndPassword(username: String, password: String) async throws -> NetworkSession { var params: [String: Any] = [ diff --git a/punchnet/Features/Network/API/SDLAPIClient+Network.swift b/punchnet/Features/Network/NetworkService.swift similarity index 97% rename from punchnet/Features/Network/API/SDLAPIClient+Network.swift rename to punchnet/Features/Network/NetworkService.swift index 45391f5..0931c3e 100644 --- a/punchnet/Features/Network/API/SDLAPIClient+Network.swift +++ b/punchnet/Features/Network/NetworkService.swift @@ -6,7 +6,7 @@ // import Foundation -extension SDLAPIClient { +struct NetworkService { static func connectNetwork(accesToken: String) async throws -> NetworkContext { let params: [String: Any] = [ diff --git a/punchnet/Shared/Networking/SDLAPIClient+App.swift b/punchnet/Shared/Services/AppService.swift similarity index 98% rename from punchnet/Shared/Networking/SDLAPIClient+App.swift rename to punchnet/Shared/Services/AppService.swift index 600d1a4..a83addc 100644 --- a/punchnet/Shared/Networking/SDLAPIClient+App.swift +++ b/punchnet/Shared/Services/AppService.swift @@ -6,7 +6,7 @@ // import Foundation -extension SDLAPIClient { +struct AppService { // 提交用户反馈 static func appIssue(accessToken: String, contact: String, content: String) async throws -> String {