diff --git a/backend/IMTest/obj/Debug/net8.0/IMTest.AssemblyInfo.cs b/backend/IMTest/obj/Debug/net8.0/IMTest.AssemblyInfo.cs
index 1a591d3..ce682ed 100644
--- a/backend/IMTest/obj/Debug/net8.0/IMTest.AssemblyInfo.cs
+++ b/backend/IMTest/obj/Debug/net8.0/IMTest.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("IMTest")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d855c8f8fb8edc48b6c55f08ee2ebf74415cc5ea")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+4bfb6dd7bf0ad0bac6191cafc3a1fe14d991ffe9")]
[assembly: System.Reflection.AssemblyProductAttribute("IMTest")]
[assembly: System.Reflection.AssemblyTitleAttribute("IMTest")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/backend/IMTest/obj/Debug/net8.0/IMTest.AssemblyInfoInputs.cache b/backend/IMTest/obj/Debug/net8.0/IMTest.AssemblyInfoInputs.cache
index 4506613..22036bd 100644
--- a/backend/IMTest/obj/Debug/net8.0/IMTest.AssemblyInfoInputs.cache
+++ b/backend/IMTest/obj/Debug/net8.0/IMTest.AssemblyInfoInputs.cache
@@ -1 +1 @@
-0e2c3a5367325662a3e7db912bec1cd772d661d101def6cb95abbceb77be09ff
+96febace62eca1d7e17cdd7ea78ad1f6616a84225324c273d382d0e701d7b65c
diff --git a/backend/IMTest/obj/Debug/net8.0/IMTest.GeneratedMSBuildEditorConfig.editorconfig b/backend/IMTest/obj/Debug/net8.0/IMTest.GeneratedMSBuildEditorConfig.editorconfig
index aa41851..c718a10 100644
--- a/backend/IMTest/obj/Debug/net8.0/IMTest.GeneratedMSBuildEditorConfig.editorconfig
+++ b/backend/IMTest/obj/Debug/net8.0/IMTest.GeneratedMSBuildEditorConfig.editorconfig
@@ -1,5 +1,7 @@
is_global = true
build_property.TargetFramework = net8.0
+build_property.TargetFrameworkIdentifier = .NETCoreApp
+build_property.TargetFrameworkVersion = v8.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
diff --git a/backend/IMTest/obj/Debug/net8.0/IMTest.GlobalUsings.g.cs b/backend/IMTest/obj/Debug/net8.0/IMTest.GlobalUsings.g.cs
index 2cd3d38..fe43752 100644
--- a/backend/IMTest/obj/Debug/net8.0/IMTest.GlobalUsings.g.cs
+++ b/backend/IMTest/obj/Debug/net8.0/IMTest.GlobalUsings.g.cs
@@ -1,9 +1,9 @@
//
-global using global::System;
-global using global::System.Collections.Generic;
-global using global::System.IO;
-global using global::System.Linq;
-global using global::System.Net.Http;
-global using global::System.Threading;
-global using global::System.Threading.Tasks;
-global using global::Xunit;
+global using System;
+global using System.Collections.Generic;
+global using System.IO;
+global using System.Linq;
+global using System.Net.Http;
+global using System.Threading;
+global using System.Threading.Tasks;
+global using Xunit;
diff --git a/backend/IMTest/obj/Debug/net8.0/IMTest.assets.cache b/backend/IMTest/obj/Debug/net8.0/IMTest.assets.cache
index 21dec49..794c45e 100644
Binary files a/backend/IMTest/obj/Debug/net8.0/IMTest.assets.cache and b/backend/IMTest/obj/Debug/net8.0/IMTest.assets.cache differ
diff --git a/backend/IMTest/obj/Debug/net8.0/IMTest.csproj.AssemblyReference.cache b/backend/IMTest/obj/Debug/net8.0/IMTest.csproj.AssemblyReference.cache
index 033c9f3..0eb737b 100644
Binary files a/backend/IMTest/obj/Debug/net8.0/IMTest.csproj.AssemblyReference.cache and b/backend/IMTest/obj/Debug/net8.0/IMTest.csproj.AssemblyReference.cache differ
diff --git a/backend/IMTest/obj/IMTest.csproj.nuget.dgspec.json b/backend/IMTest/obj/IMTest.csproj.nuget.dgspec.json
index 4e226be..ab66086 100644
--- a/backend/IMTest/obj/IMTest.csproj.nuget.dgspec.json
+++ b/backend/IMTest/obj/IMTest.csproj.nuget.dgspec.json
@@ -49,7 +49,7 @@
"auditLevel": "low",
"auditMode": "direct"
},
- "SdkAnalysisLevel": "9.0.300"
+ "SdkAnalysisLevel": "10.0.100"
},
"frameworks": {
"net8.0": {
@@ -96,7 +96,7 @@
"privateAssets": "all"
}
},
- "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.304/PortableRuntimeIdentifierGraph.json"
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\10.0.102/PortableRuntimeIdentifierGraph.json"
}
}
},
@@ -141,7 +141,7 @@
"auditLevel": "low",
"auditMode": "direct"
},
- "SdkAnalysisLevel": "9.0.300"
+ "SdkAnalysisLevel": "10.0.100"
},
"frameworks": {
"net8.0": {
@@ -155,6 +155,10 @@
"target": "Package",
"version": "[12.0.0, )"
},
+ "MassTransit.RabbitMQ": {
+ "target": "Package",
+ "version": "[8.5.5, )"
+ },
"Microsoft.AspNetCore.Authentication.JwtBearer": {
"target": "Package",
"version": "[8.0.21, )"
@@ -219,7 +223,7 @@
"privateAssets": "all"
}
},
- "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.304/PortableRuntimeIdentifierGraph.json"
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\10.0.102/PortableRuntimeIdentifierGraph.json"
}
}
}
diff --git a/backend/IMTest/obj/IMTest.csproj.nuget.g.props b/backend/IMTest/obj/IMTest.csproj.nuget.g.props
index a72789c..89b6bef 100644
--- a/backend/IMTest/obj/IMTest.csproj.nuget.g.props
+++ b/backend/IMTest/obj/IMTest.csproj.nuget.g.props
@@ -7,7 +7,7 @@
$(UserProfile)\.nuget\packages\
C:\Users\nanxun\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages
PackageReference
- 6.14.1
+ 7.0.0
diff --git a/backend/IMTest/obj/project.assets.json b/backend/IMTest/obj/project.assets.json
index 74d6407..5582463 100644
--- a/backend/IMTest/obj/project.assets.json
+++ b/backend/IMTest/obj/project.assets.json
@@ -53,6 +53,57 @@
"build/netstandard1.0/coverlet.collector.targets": {}
}
},
+ "MassTransit/8.5.5": {
+ "type": "package",
+ "dependencies": {
+ "MassTransit.Abstractions": "8.5.5",
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0",
+ "Microsoft.Extensions.Diagnostics.HealthChecks": "8.0.0",
+ "Microsoft.Extensions.Hosting.Abstractions": "8.0.0",
+ "Microsoft.Extensions.Logging.Abstractions": "8.0.0",
+ "Microsoft.Extensions.Options": "8.0.0"
+ },
+ "compile": {
+ "lib/net8.0/MassTransit.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net8.0/MassTransit.dll": {
+ "related": ".xml"
+ }
+ }
+ },
+ "MassTransit.Abstractions/8.5.5": {
+ "type": "package",
+ "compile": {
+ "lib/net8.0/MassTransit.Abstractions.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net8.0/MassTransit.Abstractions.dll": {
+ "related": ".xml"
+ }
+ }
+ },
+ "MassTransit.RabbitMQ/8.5.5": {
+ "type": "package",
+ "dependencies": {
+ "MassTransit": "8.5.5",
+ "RabbitMQ.Client": "7.1.2"
+ },
+ "compile": {
+ "lib/net8.0/MassTransit.RabbitMqTransport.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net8.0/MassTransit.RabbitMqTransport.dll": {
+ "related": ".xml"
+ }
+ }
+ },
"Microsoft.AspNetCore.Authentication.Abstractions/2.3.0": {
"type": "package",
"dependencies": {
@@ -664,6 +715,38 @@
"buildTransitive/net6.0/_._": {}
}
},
+ "Microsoft.Extensions.Diagnostics.HealthChecks/8.0.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions": "8.0.0",
+ "Microsoft.Extensions.Hosting.Abstractions": "8.0.0",
+ "Microsoft.Extensions.Logging.Abstractions": "8.0.0",
+ "Microsoft.Extensions.Options": "8.0.0"
+ },
+ "compile": {
+ "lib/net8.0/Microsoft.Extensions.Diagnostics.HealthChecks.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net8.0/Microsoft.Extensions.Diagnostics.HealthChecks.dll": {
+ "related": ".xml"
+ }
+ }
+ },
+ "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions/8.0.0": {
+ "type": "package",
+ "compile": {
+ "lib/net8.0/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net8.0/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.dll": {
+ "related": ".xml"
+ }
+ }
+ },
"Microsoft.Extensions.FileProviders.Abstractions/8.0.0": {
"type": "package",
"dependencies": {
@@ -1360,6 +1443,23 @@
}
}
},
+ "RabbitMQ.Client/7.1.2": {
+ "type": "package",
+ "dependencies": {
+ "System.IO.Pipelines": "8.0.0",
+ "System.Threading.RateLimiting": "8.0.0"
+ },
+ "compile": {
+ "lib/net8.0/RabbitMQ.Client.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net8.0/RabbitMQ.Client.dll": {
+ "related": ".xml"
+ }
+ }
+ },
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {
"type": "package",
"runtimeTargets": {
@@ -2655,6 +2755,22 @@
"buildTransitive/net6.0/_._": {}
}
},
+ "System.Threading.RateLimiting/8.0.0": {
+ "type": "package",
+ "compile": {
+ "lib/net8.0/System.Threading.RateLimiting.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net8.0/System.Threading.RateLimiting.dll": {
+ "related": ".xml"
+ }
+ },
+ "build": {
+ "buildTransitive/net6.0/_._": {}
+ }
+ },
"System.Threading.Tasks/4.3.0": {
"type": "package",
"dependencies": {
@@ -2859,6 +2975,7 @@
"dependencies": {
"AutoMapper": "12.0.1",
"AutoMapper.Extensions.Microsoft.DependencyInjection": "12.0.0",
+ "MassTransit.RabbitMQ": "8.5.5",
"Microsoft.AspNetCore.Authentication.JwtBearer": "8.0.21",
"Microsoft.AspNetCore.SignalR": "1.2.0",
"Microsoft.VisualStudio.Azure.Containers.Tools.Targets": "1.22.1",
@@ -2987,6 +3104,69 @@
"coverlet.collector.nuspec"
]
},
+ "MassTransit/8.5.5": {
+ "sha512": "bSg8k5q+rP1s+dIGXLLbctqDGdIkfDjdxwNWtCUH7xNCN9ZuM7mqSPQPIFgaYIi34e81m4FqAqo4CAHuWPkhRA==",
+ "type": "package",
+ "path": "masstransit/8.5.5",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "NuGet.README.md",
+ "lib/net472/MassTransit.dll",
+ "lib/net472/MassTransit.xml",
+ "lib/net8.0/MassTransit.dll",
+ "lib/net8.0/MassTransit.xml",
+ "lib/net9.0/MassTransit.dll",
+ "lib/net9.0/MassTransit.xml",
+ "lib/netstandard2.0/MassTransit.dll",
+ "lib/netstandard2.0/MassTransit.xml",
+ "masstransit.8.5.5.nupkg.sha512",
+ "masstransit.nuspec",
+ "mt-logo-small.png"
+ ]
+ },
+ "MassTransit.Abstractions/8.5.5": {
+ "sha512": "0mn2Ay17dD6z5tgSLjbVRlldSbL9iowzFEfVgVfBXVG5ttz9dSWeR4TrdD6pqH93GWXp4CvSmF8i1HqxLX7DZw==",
+ "type": "package",
+ "path": "masstransit.abstractions/8.5.5",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "NuGet.README.md",
+ "lib/net472/MassTransit.Abstractions.dll",
+ "lib/net472/MassTransit.Abstractions.xml",
+ "lib/net8.0/MassTransit.Abstractions.dll",
+ "lib/net8.0/MassTransit.Abstractions.xml",
+ "lib/net9.0/MassTransit.Abstractions.dll",
+ "lib/net9.0/MassTransit.Abstractions.xml",
+ "lib/netstandard2.0/MassTransit.Abstractions.dll",
+ "lib/netstandard2.0/MassTransit.Abstractions.xml",
+ "masstransit.abstractions.8.5.5.nupkg.sha512",
+ "masstransit.abstractions.nuspec",
+ "mt-logo-small.png"
+ ]
+ },
+ "MassTransit.RabbitMQ/8.5.5": {
+ "sha512": "UxWn4o90YVMF9PBkJeoskOFPneh6YtnI1fLJHtvZiSAG0eoiRrWPGa+6FQCvjkQ/ljCKfjzok2eGZc/vmNZ01A==",
+ "type": "package",
+ "path": "masstransit.rabbitmq/8.5.5",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "NuGet.README.md",
+ "lib/net472/MassTransit.RabbitMqTransport.dll",
+ "lib/net472/MassTransit.RabbitMqTransport.xml",
+ "lib/net8.0/MassTransit.RabbitMqTransport.dll",
+ "lib/net8.0/MassTransit.RabbitMqTransport.xml",
+ "lib/net9.0/MassTransit.RabbitMqTransport.dll",
+ "lib/net9.0/MassTransit.RabbitMqTransport.xml",
+ "lib/netstandard2.0/MassTransit.RabbitMqTransport.dll",
+ "lib/netstandard2.0/MassTransit.RabbitMqTransport.xml",
+ "masstransit.rabbitmq.8.5.5.nupkg.sha512",
+ "masstransit.rabbitmq.nuspec",
+ "mt-logo-small.png"
+ ]
+ },
"Microsoft.AspNetCore.Authentication.Abstractions/2.3.0": {
"sha512": "ve6uvLwKNRkfnO/QeN9M8eUJ49lCnWv/6/9p6iTEuiI6Rtsz+myaBAjdMzLuTViQY032xbTF5AdZF5BJzJJyXQ==",
"type": "package",
@@ -3887,6 +4067,44 @@
"useSharedDesignerContext.txt"
]
},
+ "Microsoft.Extensions.Diagnostics.HealthChecks/8.0.0": {
+ "sha512": "P9SoBuVZhJPpALZmSq72aQEb9ryP67EdquaCZGXGrrcASTNHYdrUhnpgSwIipgM5oVC+dKpRXg5zxobmF9xr5g==",
+ "type": "package",
+ "path": "microsoft.extensions.diagnostics.healthchecks/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "THIRD-PARTY-NOTICES.TXT",
+ "lib/net462/Microsoft.Extensions.Diagnostics.HealthChecks.dll",
+ "lib/net462/Microsoft.Extensions.Diagnostics.HealthChecks.xml",
+ "lib/net8.0/Microsoft.Extensions.Diagnostics.HealthChecks.dll",
+ "lib/net8.0/Microsoft.Extensions.Diagnostics.HealthChecks.xml",
+ "lib/netstandard2.0/Microsoft.Extensions.Diagnostics.HealthChecks.dll",
+ "lib/netstandard2.0/Microsoft.Extensions.Diagnostics.HealthChecks.xml",
+ "microsoft.extensions.diagnostics.healthchecks.8.0.0.nupkg.sha512",
+ "microsoft.extensions.diagnostics.healthchecks.nuspec"
+ ]
+ },
+ "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions/8.0.0": {
+ "sha512": "AT2qqos3IgI09ok36Qag9T8bb6kHJ3uT9Q5ki6CySybFsK6/9JbvQAgAHf1pVEjST0/N4JaFaCbm40R5edffwg==",
+ "type": "package",
+ "path": "microsoft.extensions.diagnostics.healthchecks.abstractions/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "THIRD-PARTY-NOTICES.TXT",
+ "lib/net462/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.dll",
+ "lib/net462/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.xml",
+ "lib/net8.0/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.dll",
+ "lib/net8.0/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.xml",
+ "lib/netstandard2.0/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.dll",
+ "lib/netstandard2.0/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.xml",
+ "microsoft.extensions.diagnostics.healthchecks.abstractions.8.0.0.nupkg.sha512",
+ "microsoft.extensions.diagnostics.healthchecks.abstractions.nuspec"
+ ]
+ },
"Microsoft.Extensions.FileProviders.Abstractions/8.0.0": {
"sha512": "ZbaMlhJlpisjuWbvXr4LdAst/1XxH3vZ6A0BsgTphZ2L4PGuxRLz7Jr/S7mkAAnOn78Vu0fKhEgNF5JO3zfjqQ==",
"type": "package",
@@ -4801,6 +5019,23 @@
"pomelo.entityframeworkcore.mysql.nuspec"
]
},
+ "RabbitMQ.Client/7.1.2": {
+ "sha512": "y3c6ulgULScWthHw5PLM1ShHRLhxg0vCtzX/hh61gRgNecL3ZC3WoBW2HYHoXOVRqTl99Br9E7CZEytGZEsCyQ==",
+ "type": "package",
+ "path": "rabbitmq.client/7.1.2",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "README.md",
+ "icon.png",
+ "lib/net8.0/RabbitMQ.Client.dll",
+ "lib/net8.0/RabbitMQ.Client.xml",
+ "lib/netstandard2.0/RabbitMQ.Client.dll",
+ "lib/netstandard2.0/RabbitMQ.Client.xml",
+ "rabbitmq.client.7.1.2.nupkg.sha512",
+ "rabbitmq.client.nuspec"
+ ]
+ },
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {
"sha512": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==",
"type": "package",
@@ -8051,6 +8286,35 @@
"useSharedDesignerContext.txt"
]
},
+ "System.Threading.RateLimiting/8.0.0": {
+ "sha512": "7mu9v0QDv66ar3DpGSZHg9NuNcxDaaAcnMULuZlaTpP9+hwXhrxNGsF5GmLkSHxFdb5bBc1TzeujsRgTrPWi+Q==",
+ "type": "package",
+ "path": "system.threading.ratelimiting/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "THIRD-PARTY-NOTICES.TXT",
+ "buildTransitive/net461/System.Threading.RateLimiting.targets",
+ "buildTransitive/net462/_._",
+ "buildTransitive/net6.0/_._",
+ "buildTransitive/netcoreapp2.0/System.Threading.RateLimiting.targets",
+ "lib/net462/System.Threading.RateLimiting.dll",
+ "lib/net462/System.Threading.RateLimiting.xml",
+ "lib/net6.0/System.Threading.RateLimiting.dll",
+ "lib/net6.0/System.Threading.RateLimiting.xml",
+ "lib/net7.0/System.Threading.RateLimiting.dll",
+ "lib/net7.0/System.Threading.RateLimiting.xml",
+ "lib/net8.0/System.Threading.RateLimiting.dll",
+ "lib/net8.0/System.Threading.RateLimiting.xml",
+ "lib/netstandard2.0/System.Threading.RateLimiting.dll",
+ "lib/netstandard2.0/System.Threading.RateLimiting.xml",
+ "system.threading.ratelimiting.8.0.0.nupkg.sha512",
+ "system.threading.ratelimiting.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
"System.Threading.Tasks/4.3.0": {
"sha512": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
"type": "package",
@@ -8541,7 +8805,7 @@
"auditLevel": "low",
"auditMode": "direct"
},
- "SdkAnalysisLevel": "9.0.300"
+ "SdkAnalysisLevel": "10.0.100"
},
"frameworks": {
"net8.0": {
@@ -8588,7 +8852,7 @@
"privateAssets": "all"
}
},
- "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.304/PortableRuntimeIdentifierGraph.json"
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\10.0.102/PortableRuntimeIdentifierGraph.json"
}
}
}
diff --git a/backend/IMTest/obj/project.nuget.cache b/backend/IMTest/obj/project.nuget.cache
index 696d138..5f1ced1 100644
--- a/backend/IMTest/obj/project.nuget.cache
+++ b/backend/IMTest/obj/project.nuget.cache
@@ -1,6 +1,6 @@
{
"version": 2,
- "dgSpecHash": "/x8TFp9yNjk=",
+ "dgSpecHash": "j7OjEXb1ZGE=",
"success": true,
"projectFilePath": "C:\\Users\\nanxun\\Documents\\IM\\backend\\IMTest\\IMTest.csproj",
"expectedPackageFiles": [
@@ -8,6 +8,9 @@
"C:\\Users\\nanxun\\.nuget\\packages\\automapper.extensions.microsoft.dependencyinjection\\12.0.0\\automapper.extensions.microsoft.dependencyinjection.12.0.0.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\castle.core\\5.1.1\\castle.core.5.1.1.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\coverlet.collector\\6.0.0\\coverlet.collector.6.0.0.nupkg.sha512",
+ "C:\\Users\\nanxun\\.nuget\\packages\\masstransit\\8.5.5\\masstransit.8.5.5.nupkg.sha512",
+ "C:\\Users\\nanxun\\.nuget\\packages\\masstransit.abstractions\\8.5.5\\masstransit.abstractions.8.5.5.nupkg.sha512",
+ "C:\\Users\\nanxun\\.nuget\\packages\\masstransit.rabbitmq\\8.5.5\\masstransit.rabbitmq.8.5.5.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\microsoft.aspnetcore.authentication.abstractions\\2.3.0\\microsoft.aspnetcore.authentication.abstractions.2.3.0.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\microsoft.aspnetcore.authentication.jwtbearer\\8.0.21\\microsoft.aspnetcore.authentication.jwtbearer.8.0.21.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\microsoft.aspnetcore.authorization\\2.3.0\\microsoft.aspnetcore.authorization.2.3.0.nupkg.sha512",
@@ -43,6 +46,8 @@
"C:\\Users\\nanxun\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\8.0.1\\microsoft.extensions.dependencyinjection.8.0.1.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\8.0.2\\microsoft.extensions.dependencyinjection.abstractions.8.0.2.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\microsoft.extensions.diagnostics.abstractions\\8.0.1\\microsoft.extensions.diagnostics.abstractions.8.0.1.nupkg.sha512",
+ "C:\\Users\\nanxun\\.nuget\\packages\\microsoft.extensions.diagnostics.healthchecks\\8.0.0\\microsoft.extensions.diagnostics.healthchecks.8.0.0.nupkg.sha512",
+ "C:\\Users\\nanxun\\.nuget\\packages\\microsoft.extensions.diagnostics.healthchecks.abstractions\\8.0.0\\microsoft.extensions.diagnostics.healthchecks.abstractions.8.0.0.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\microsoft.extensions.fileproviders.abstractions\\8.0.0\\microsoft.extensions.fileproviders.abstractions.8.0.0.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\microsoft.extensions.hosting.abstractions\\8.0.1\\microsoft.extensions.hosting.abstractions.8.0.1.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\microsoft.extensions.logging\\8.0.1\\microsoft.extensions.logging.8.0.1.nupkg.sha512",
@@ -72,6 +77,7 @@
"C:\\Users\\nanxun\\.nuget\\packages\\nuget.frameworks\\6.5.0\\nuget.frameworks.6.5.0.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\pipelines.sockets.unofficial\\2.2.8\\pipelines.sockets.unofficial.2.2.8.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\pomelo.entityframeworkcore.mysql\\8.0.3\\pomelo.entityframeworkcore.mysql.8.0.3.nupkg.sha512",
+ "C:\\Users\\nanxun\\.nuget\\packages\\rabbitmq.client\\7.1.2\\rabbitmq.client.7.1.2.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl\\4.3.0\\runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl\\4.3.0\\runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl\\4.3.0\\runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512",
@@ -148,6 +154,7 @@
"C:\\Users\\nanxun\\.nuget\\packages\\system.text.regularexpressions\\4.3.0\\system.text.regularexpressions.4.3.0.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\system.threading\\4.3.0\\system.threading.4.3.0.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\system.threading.channels\\8.0.0\\system.threading.channels.8.0.0.nupkg.sha512",
+ "C:\\Users\\nanxun\\.nuget\\packages\\system.threading.ratelimiting\\8.0.0\\system.threading.ratelimiting.8.0.0.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\system.threading.tasks\\4.3.0\\system.threading.tasks.4.3.0.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\system.threading.tasks.extensions\\4.3.0\\system.threading.tasks.extensions.4.3.0.nupkg.sha512",
"C:\\Users\\nanxun\\.nuget\\packages\\system.threading.timer\\4.3.0\\system.threading.timer.4.3.0.nupkg.sha512",
diff --git a/backend/IM_API/Application/EventHandlers/FriendAddHandler/FriendAddConversationHandler.cs b/backend/IM_API/Application/EventHandlers/FriendAddHandler/FriendAddConversationHandler.cs
new file mode 100644
index 0000000..99f62fe
--- /dev/null
+++ b/backend/IM_API/Application/EventHandlers/FriendAddHandler/FriendAddConversationHandler.cs
@@ -0,0 +1,13 @@
+using IM_API.Domain.Events;
+using MassTransit;
+
+namespace IM_API.Application.EventHandlers.FriendAddHandler
+{
+ public class FriendAddConversationHandler : IConsumer
+ {
+ public Task Consume(ConsumeContext context)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/backend/IM_API/Application/EventHandlers/FriendAddHandler/FriendAddSignalRHandler.cs b/backend/IM_API/Application/EventHandlers/FriendAddHandler/FriendAddSignalRHandler.cs
new file mode 100644
index 0000000..5bf323e
--- /dev/null
+++ b/backend/IM_API/Application/EventHandlers/FriendAddHandler/FriendAddSignalRHandler.cs
@@ -0,0 +1,31 @@
+using IM_API.Domain.Events;
+using IM_API.Models;
+using MassTransit;
+
+namespace IM_API.Application.EventHandlers.FriendAddHandler
+{
+ public class FriendAddSignalRHandler : IConsumer
+ {
+ private readonly ImContext _context;
+ public FriendAddSignalRHandler(ImContext context)
+ {
+ _context = context;
+ }
+
+ public Task Consume(ConsumeContext context)
+ {
+ throw new NotImplementedException();
+ var @event = context.Message;
+
+ var RequestfriendShip = new Friend()
+ {
+ Avatar = @event.ResponseUser.Avatar,
+ UserId = @event.RequestUser.Id,
+ RemarkName = @event.RequestInfo.NickName,
+ Created = @event.RequestInfo.Created,
+
+
+ };
+ }
+ }
+}
diff --git a/backend/IM_API/Application/EventHandlers/ConversationEventHandler.cs b/backend/IM_API/Application/EventHandlers/MessageCreatedHandler/ConversationEventHandler.cs
similarity index 79%
rename from backend/IM_API/Application/EventHandlers/ConversationEventHandler.cs
rename to backend/IM_API/Application/EventHandlers/MessageCreatedHandler/ConversationEventHandler.cs
index 40cc4d4..405f728 100644
--- a/backend/IM_API/Application/EventHandlers/ConversationEventHandler.cs
+++ b/backend/IM_API/Application/EventHandlers/MessageCreatedHandler/ConversationEventHandler.cs
@@ -7,12 +7,13 @@ using IM_API.Interface.Services;
using IM_API.Models;
using IM_API.Services;
using IM_API.Tools;
+using MassTransit;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
-namespace IM_API.Application.EventHandlers
+namespace IM_API.Application.EventHandlers.MessageCreatedHandler
{
- public class ConversationEventHandler : IEventHandler
+ public class ConversationEventHandler : IConsumer
{
private readonly IConversationService _conversationService;
private readonly ILogger _logger;
@@ -30,9 +31,12 @@ namespace IM_API.Application.EventHandlers
_context = imContext;
_mapper = mapper;
}
- public async Task Handle(MessageCreatedEvent @event)
+
+ public async Task Consume(ConsumeContext context)
{
- if(@event.ChatType == ChatType.PRIVATE)
+ var @event = context.Message;
+
+ if (@event.ChatType == ChatType.PRIVATE)
{
Conversation? userAConversation = await _context.Conversations.FirstOrDefaultAsync(
x => x.UserId == @event.MsgSenderId && x.TargetId == @event.MsgRecipientId
@@ -40,9 +44,9 @@ namespace IM_API.Application.EventHandlers
Conversation? userBConversation = await _context.Conversations.FirstOrDefaultAsync(
x => x.UserId == @event.MsgRecipientId && x.TargetId == @event.MsgSenderId
);
- if(userAConversation is null || userBConversation is null)
+ if (userAConversation is null || userBConversation is null)
{
- _logger.LogError("消息事件更新会话信息失败:{@event}",@event);
+ _logger.LogError("消息事件更新会话信息失败:{@event}", @event);
}
userAConversation.LastMessage = @event.MessageContent;
userAConversation.LastReadMessageId = @event.MessageId;
@@ -50,9 +54,10 @@ namespace IM_API.Application.EventHandlers
userBConversation.LastMessage = @event.MessageContent;
userBConversation.UnreadCount += 1;
userBConversation.LastMessageTime = @event.MessageCreated;
- _context.UpdateRange(userAConversation,userBConversation);
+ _context.UpdateRange(userAConversation, userBConversation);
await _context.SaveChangesAsync();
}
}
+
}
}
diff --git a/backend/IM_API/Application/EventHandlers/SignalREventHandler.cs b/backend/IM_API/Application/EventHandlers/MessageCreatedHandler/SignalREventHandler.cs
similarity index 77%
rename from backend/IM_API/Application/EventHandlers/SignalREventHandler.cs
rename to backend/IM_API/Application/EventHandlers/MessageCreatedHandler/SignalREventHandler.cs
index 63f58a6..643642c 100644
--- a/backend/IM_API/Application/EventHandlers/SignalREventHandler.cs
+++ b/backend/IM_API/Application/EventHandlers/MessageCreatedHandler/SignalREventHandler.cs
@@ -5,11 +5,12 @@ using IM_API.Dtos;
using IM_API.Hubs;
using IM_API.Models;
using IM_API.Tools;
+using MassTransit;
using Microsoft.AspNetCore.SignalR;
-namespace IM_API.Application.EventHandlers
+namespace IM_API.Application.EventHandlers.MessageCreatedHandler
{
- public class SignalREventHandler : IEventHandler
+ public class SignalREventHandler : IConsumer
{
private readonly IHubContext _hub;
private readonly IMapper _mapper;
@@ -19,9 +20,10 @@ namespace IM_API.Application.EventHandlers
_mapper = mapper;
}
- public async Task Handle(MessageCreatedEvent @event)
+ public async Task Consume(ConsumeContext context)
{
- if(@event.ChatType == Models.ChatType.PRIVATE)
+ var @event = context.Message;
+ if (@event.ChatType == Models.ChatType.PRIVATE)
{
MessageBaseDto messageBaseDto = new MessageBaseDto
{
diff --git a/backend/IM_API/Configs/MQConfig.cs b/backend/IM_API/Configs/MQConfig.cs
new file mode 100644
index 0000000..70c8d9e
--- /dev/null
+++ b/backend/IM_API/Configs/MQConfig.cs
@@ -0,0 +1,40 @@
+using IM_API.Application.EventHandlers.FriendAddHandler;
+using IM_API.Application.EventHandlers.MessageCreatedHandler;
+using MassTransit;
+
+namespace IM_API.Configs
+{
+ public static class MQConfig
+ {
+ public static IServiceCollection AddRabbitMQ(this IServiceCollection services, RabbitMqOptions options)
+ {
+ services.AddMassTransit(x =>
+ {
+ x.AddConsumer();
+ x.AddConsumer();
+ x.AddConsumer();
+ x.AddConsumer();
+
+ x.UsingRabbitMq((ctx,cfg) =>
+ {
+ cfg.Host(options.Host, "/", h =>
+ {
+ h.Username(options.Username);
+ h.Password(options.Password);
+ });
+ });
+ });
+
+
+ return services;
+ }
+ }
+
+ public class RabbitMqOptions
+ {
+ public string Host { get; set; }
+ public int Port { get; set; }
+ public string Username { get; set; }
+ public string Password { get;set; }
+ }
+}
diff --git a/backend/IM_API/Configs/MapperConfig.cs b/backend/IM_API/Configs/MapperConfig.cs
index beab767..4475c94 100644
--- a/backend/IM_API/Configs/MapperConfig.cs
+++ b/backend/IM_API/Configs/MapperConfig.cs
@@ -123,8 +123,6 @@ namespace IM_API.Configs
CreateMap()
.ForMember(dest => dest.TargetAvatar, opt => opt.MapFrom(src => src.Avatar))
.ForMember(dest => dest.TargetName, opt => opt.MapFrom(src => src.Name));
-
-
}
}
}
diff --git a/backend/IM_API/Configs/ServiceCollectionExtensions.cs b/backend/IM_API/Configs/ServiceCollectionExtensions.cs
index 6293182..770b8ac 100644
--- a/backend/IM_API/Configs/ServiceCollectionExtensions.cs
+++ b/backend/IM_API/Configs/ServiceCollectionExtensions.cs
@@ -23,8 +23,6 @@ namespace IM_API.Configs
services.AddTransient();
services.AddTransient();
services.AddScoped();
- services.AddScoped, SignalREventHandler>();
- services.AddScoped, ConversationEventHandler>();
services.AddSingleton();
services.AddSingleton();
return services;
diff --git a/backend/IM_API/Controllers/FriendController.cs b/backend/IM_API/Controllers/FriendController.cs
index 01a7f57..e077d54 100644
--- a/backend/IM_API/Controllers/FriendController.cs
+++ b/backend/IM_API/Controllers/FriendController.cs
@@ -59,7 +59,9 @@ namespace IM_API.Controllers
///
///
[HttpPost]
- public async Task HandleRequest([FromRoute]int id, [FromBody]FriendRequestHandleDto dto)
+ public async Task HandleRequest(
+ [FromRoute]int id, [FromBody]FriendRequestHandleDto dto
+ )
{
await _friendService.HandleFriendRequestAsync(new HandleFriendRequestDto()
{
diff --git a/backend/IM_API/Domain/Events/FriendAddEvent.cs b/backend/IM_API/Domain/Events/FriendAddEvent.cs
new file mode 100644
index 0000000..044ac16
--- /dev/null
+++ b/backend/IM_API/Domain/Events/FriendAddEvent.cs
@@ -0,0 +1,24 @@
+using IM_API.Dtos;
+
+namespace IM_API.Domain.Events
+{
+ public record FriendAddEvent:DomainEvent
+ {
+ public override string EventType => "IM.FRIENDS_FRIEND_ADD";
+ ///
+ /// 发起请求用户
+ ///
+ public UserInfoDto RequestUser { get; set; }
+ ///
+ /// 接受请求用户
+ ///
+ public UserInfoDto ResponseUser { get; set; }
+
+ public FriendRequestResDto RequestInfo { get; set; }
+ ///
+ /// 好友关系创建时间
+ ///
+ public DateTime Created { get; set; }
+
+ }
+}
diff --git a/backend/IM_API/IM_API.csproj b/backend/IM_API/IM_API.csproj
index 7d9b73e..92d775a 100644
--- a/backend/IM_API/IM_API.csproj
+++ b/backend/IM_API/IM_API.csproj
@@ -12,6 +12,7 @@
+
diff --git a/backend/IM_API/Program.cs b/backend/IM_API/Program.cs
index 48f2db8..2ad90d3 100644
--- a/backend/IM_API/Program.cs
+++ b/backend/IM_API/Program.cs
@@ -33,6 +33,8 @@ namespace IM_API
//עredis
var redis = ConnectionMultiplexer.Connect(redisConStr);
builder.Services.AddSingleton(redis);
+
+ builder.Services.AddRabbitMQ(configuration.GetSection("RabbitMqOptions").Get());
builder.Services.AddAllService(configuration);
diff --git a/backend/IM_API/Services/FriendService.cs b/backend/IM_API/Services/FriendService.cs
index 9e6cd63..eae08d8 100644
--- a/backend/IM_API/Services/FriendService.cs
+++ b/backend/IM_API/Services/FriendService.cs
@@ -170,9 +170,7 @@ namespace IM_API.Services
throw new BaseException(CodeDefine.ALREADY_FRIENDS);
//生成实体
var friendRequst = _mapper.Map(dto);
- var friend = _mapper.Map(dto);
_context.FriendRequests.Add(friendRequst);
- _context.Friends.Add(friend);
await _context.SaveChangesAsync();
return true;
}
diff --git a/backend/IM_API/Services/MessageService.cs b/backend/IM_API/Services/MessageService.cs
index 0966a1a..0a824c8 100644
--- a/backend/IM_API/Services/MessageService.cs
+++ b/backend/IM_API/Services/MessageService.cs
@@ -6,6 +6,7 @@ using IM_API.Exceptions;
using IM_API.Interface.Services;
using IM_API.Models;
using IM_API.Tools;
+using MassTransit;
using Microsoft.EntityFrameworkCore;
namespace IM_API.Services
@@ -15,13 +16,19 @@ namespace IM_API.Services
private readonly ImContext _context;
private readonly ILogger _logger;
private readonly IMapper _mapper;
- private readonly IEventBus _eventBus;
- public MessageService(ImContext context, ILogger logger, IMapper mapper, IEventBus eventBus)
+ //废弃,此处已使用rabbitMQ替代
+ //private readonly IEventBus _eventBus;
+ private readonly IPublishEndpoint _endpoint;
+ public MessageService(
+ ImContext context, ILogger logger, IMapper mapper, IEventBus eventBus,
+ IPublishEndpoint publishEndpoint
+ )
{
_context = context;
_logger = logger;
_mapper = mapper;
- _eventBus = eventBus;
+ //_eventBus = eventBus;
+ _endpoint = publishEndpoint;
}
public async Task> GetMessagesAsync(int userId, int conversationId, int? msgId, int? pageSize, bool desc)
@@ -93,10 +100,12 @@ namespace IM_API.Services
if (!isMember) throw new BaseException(CodeDefine.NO_GROUP_PERMISSION);
var message = _mapper.Map(dto);
message.Sender = senderId;
- message.StreamKey = StreamKeyBuilder.Group(groupId);
+ message.StreamKey = StreamKeyBuilder.Group(
+
+ groupId);
_context.Messages.Add(message);
await _context.SaveChangesAsync();
- await _eventBus.PublishAsync(_mapper.Map(message));
+ await _endpoint.Publish(_mapper.Map(message));
return _mapper.Map(message);
}
@@ -112,7 +121,7 @@ namespace IM_API.Services
message.StreamKey = StreamKeyBuilder.Private(dto.SenderId, dto.ReceiverId);
_context.Messages.Add(message);
await _context.SaveChangesAsync();
- await _eventBus.PublishAsync(_mapper.Map(message));
+ await _endpoint.Publish(_mapper.Map(message));
return _mapper.Map(message);
}
#endregion
diff --git a/backend/IM_API/appsettings.json b/backend/IM_API/appsettings.json
index 9da907c..fc895fb 100644
--- a/backend/IM_API/appsettings.json
+++ b/backend/IM_API/appsettings.json
@@ -16,5 +16,11 @@
"ConnectionStrings": {
"DefaultConnection": "Server=frp-era.com;Port=26582;Database=IM;User=product;Password=12345678;",
"Redis": "192.168.5.100:6379"
+ },
+ "RabbitMQOptions": {
+ "Host": "192.168.5.100",
+ "Port": 5672,
+ "Username": "test",
+ "Password": "123456"
}
}
diff --git a/frontend/app/android/build.gradle.kts b/frontend/app/android/build.gradle.kts
index dbee657..224f8a9 100644
--- a/frontend/app/android/build.gradle.kts
+++ b/frontend/app/android/build.gradle.kts
@@ -1,7 +1,10 @@
allprojects {
repositories {
+ maven { url = uri("https://maven.aliyun.com/repository/google") }
+ maven { url = uri("https://maven.aliyun.com/repository/public") }
google()
mavenCentral()
+
}
}
diff --git a/frontend/app/android/gradle/wrapper/gradle-wrapper.properties b/frontend/app/android/gradle/wrapper/gradle-wrapper.properties
index e4ef43f..968027a 100644
--- a/frontend/app/android/gradle/wrapper/gradle-wrapper.properties
+++ b/frontend/app/android/gradle/wrapper/gradle-wrapper.properties
@@ -2,4 +2,6 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
+#distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
+# ??????????
+distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.14-all.zip
\ No newline at end of file
diff --git a/frontend/app/android/settings.gradle.kts b/frontend/app/android/settings.gradle.kts
index ca7fe06..d36178c 100644
--- a/frontend/app/android/settings.gradle.kts
+++ b/frontend/app/android/settings.gradle.kts
@@ -11,6 +11,8 @@ pluginManagement {
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
+ maven { url = uri("https://maven.aliyun.com/repository/google") }
+ maven { url = uri("https://maven.aliyun.com/repository/public") }
google()
mavenCentral()
gradlePluginPortal()
diff --git a/frontend/app/lib/app.dart b/frontend/app/lib/app.dart
new file mode 100644
index 0000000..7d117d5
--- /dev/null
+++ b/frontend/app/lib/app.dart
@@ -0,0 +1,14 @@
+import 'package:app/core/router/app_router.dart';
+import 'package:flutter/material.dart';
+
+class MyApp extends StatelessWidget {
+ const MyApp({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp.router(
+ title: '测试应用',
+ routerConfig:appRouter
+ );
+ }
+}
\ No newline at end of file
diff --git a/frontend/app/lib/core/constants/app_colors.dart b/frontend/app/lib/core/constants/app_colors.dart
new file mode 100644
index 0000000..68485b2
--- /dev/null
+++ b/frontend/app/lib/core/constants/app_colors.dart
@@ -0,0 +1,5 @@
+import 'dart:ui';
+
+class AppColors {
+ static const Color primaryColor = Color(0xFF4FDBFF); // 微信绿
+}
\ No newline at end of file
diff --git a/frontend/app/lib/core/constants/app_strings.dart b/frontend/app/lib/core/constants/app_strings.dart
new file mode 100644
index 0000000..e69de29
diff --git a/frontend/app/lib/core/constants/assets_path.dart b/frontend/app/lib/core/constants/assets_path.dart
new file mode 100644
index 0000000..e69de29
diff --git a/frontend/app/lib/core/router/app_router.dart b/frontend/app/lib/core/router/app_router.dart
new file mode 100644
index 0000000..1e8e01e
--- /dev/null
+++ b/frontend/app/lib/core/router/app_router.dart
@@ -0,0 +1,26 @@
+
+
+import 'package:app/features/auth/pages/login_page.dart';
+import 'package:app/features/home/pages/index_page.dart';
+import 'package:go_router/go_router.dart';
+
+import '../../features/home/pages/main_page.dart';
+
+final appRouter = GoRouter(
+ initialLocation: '/auth/login',
+ routes: [
+ GoRoute(path: '/auth/login', builder: (context, state) => const LoginPage()),
+ ShellRoute(
+ builder: (context, state, child) {
+ return MainPage(child: child);
+ },
+ routes: [
+ GoRoute(
+ path: '/',
+ builder: (context, state) => const IndexPage()
+ )
+ ]
+ )
+ ],
+
+);
\ No newline at end of file
diff --git a/frontend/app/lib/features/auth/bloc/login_page_state.dart b/frontend/app/lib/features/auth/bloc/login_page_state.dart
new file mode 100644
index 0000000..7a410df
--- /dev/null
+++ b/frontend/app/lib/features/auth/bloc/login_page_state.dart
@@ -0,0 +1,167 @@
+import 'package:app/core/constants/app_colors.dart';
+import 'package:app/features/auth/pages/login_page.dart';
+import 'package:flutter/material.dart';
+
+class LoginPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: AppBar(
+ backgroundColor: Colors.transparent,
+ elevation: 0,
+ actions: [
+ TextButton(
+ onPressed: () {},
+ child: const Text("找回密码", style: TextStyle(color: Colors.grey)),
+ ),
+ ],
+ ),
+ body: SingleChildScrollView(
+ child: Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 40),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ const SizedBox(height: 20),
+ // 1. 品牌Logo/头像区域
+ Container(
+ width: 100,
+ height: 100,
+ decoration: BoxDecoration(
+ color: AppColors.primaryColor.withOpacity(0.1),
+ shape: BoxShape.circle,
+ ),
+ child: const Icon(
+ Icons.person_rounded,
+ size: 60,
+ color: AppColors.primaryColor,
+ ),
+ ),
+ const SizedBox(height: 24),
+ const Text(
+ "登录您的聊天账号",
+ style: TextStyle(
+ fontSize: 24,
+ fontWeight: FontWeight.bold,
+ color: Colors.black87,
+ ),
+ ),
+ const SizedBox(height: 60),
+
+ // 2. 账号输入框 (极简下划线风格)
+ TextField(
+ decoration: InputDecoration(
+ labelText: "账号 / 邮箱 / 手机号",
+ labelStyle: const TextStyle(color: Colors.grey, fontSize: 14),
+ floatingLabelStyle: const TextStyle(color: AppColors.primaryColor),
+ enabledBorder: UnderlineInputBorder(
+ borderSide: BorderSide(color: Colors.grey.shade300),
+ ),
+ focusedBorder: const UnderlineInputBorder(
+ borderSide: BorderSide(color: AppColors.primaryColor, width: 2),
+ ),
+ ),
+ ),
+ const SizedBox(height: 25),
+
+ // 3. 密码输入框
+ TextField(
+ obscureText: true,
+ decoration: InputDecoration(
+ labelText: "请输入密码",
+ labelStyle: const TextStyle(color: Colors.grey, fontSize: 14),
+ floatingLabelStyle: const TextStyle(color: AppColors.primaryColor),
+ enabledBorder: UnderlineInputBorder(
+ borderSide: BorderSide(color: Colors.grey.shade300),
+ ),
+ focusedBorder: const UnderlineInputBorder(
+ borderSide: BorderSide(color: AppColors.primaryColor, width: 2),
+ ),
+ ),
+ ),
+ const SizedBox(height: 60),
+
+ // 4. 登录按钮 (圆润大按钮)
+ SizedBox(
+ width: double.infinity,
+ height: 50,
+ child: ElevatedButton(
+ onPressed: () {},
+ style: ElevatedButton.styleFrom(
+ backgroundColor: AppColors.primaryColor,
+ foregroundColor: Colors.white,
+ elevation: 0,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(10),
+ ),
+ ),
+ child: const Text(
+ "登 录",
+ style: TextStyle(fontSize: 18, fontWeight: FontWeight.w500),
+ ),
+ ),
+ ),
+ const SizedBox(height: 20),
+
+ // 5. 注册/切换登录方式
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ TextButton(
+ onPressed: () {},
+ child: const Text(
+ "注册账号",
+ style: TextStyle(color: Color(0xFF576B95)),
+ ), // 经典的链接蓝
+ ),
+ const SizedBox(
+ height: 20,
+ child: VerticalDivider(color: Colors.grey),
+ ),
+ TextButton(
+ onPressed: () {},
+ child: const Text(
+ "验证码登录",
+ style: TextStyle(color: Color(0xFF576B95)),
+ ),
+ ),
+ ],
+ ),
+
+ const SizedBox(height: 80),
+ // 6. 底部协议 (社交App必有)
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Checkbox(
+ value: true,
+ activeColor: AppColors.primaryColor,
+ onChanged: (v) {},
+ ),
+ const Text(
+ "我已阅读并同意",
+ style: TextStyle(color: Colors.grey, fontSize: 12),
+ ),
+ const Text(
+ "《用户协议》",
+ style: TextStyle(color: Color(0xFF576B95), fontSize: 12),
+ ),
+ const Text(
+ "与",
+ style: TextStyle(color: Colors.grey, fontSize: 12),
+ ),
+ const Text(
+ "《隐私政策》",
+ style: TextStyle(color: Color(0xFF576B95), fontSize: 12),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+
+}
\ No newline at end of file
diff --git a/frontend/app/lib/features/auth/pages/login_page.dart b/frontend/app/lib/features/auth/pages/login_page.dart
new file mode 100644
index 0000000..5a90fe8
--- /dev/null
+++ b/frontend/app/lib/features/auth/pages/login_page.dart
@@ -0,0 +1,12 @@
+import 'package:app/features/auth/bloc/login_page_state.dart';
+import 'package:flutter/cupertino.dart';
+
+class LoginPage extends StatefulWidget {
+ const LoginPage({super.key});
+
+ @override
+ State createState() {
+ return LoginPageState();
+ }
+
+}
\ No newline at end of file
diff --git a/frontend/app/lib/features/home/bloc/index_page_state.dart b/frontend/app/lib/features/home/bloc/index_page_state.dart
new file mode 100644
index 0000000..afc6a16
--- /dev/null
+++ b/frontend/app/lib/features/home/bloc/index_page_state.dart
@@ -0,0 +1,10 @@
+import 'package:app/features/home/pages/index_page.dart';
+import 'package:flutter/cupertino.dart';
+
+class IndexPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Text('test');
+ }
+
+}
\ No newline at end of file
diff --git a/frontend/app/lib/features/home/bloc/main_page_state.dart b/frontend/app/lib/features/home/bloc/main_page_state.dart
new file mode 100644
index 0000000..0086cc9
--- /dev/null
+++ b/frontend/app/lib/features/home/bloc/main_page_state.dart
@@ -0,0 +1,19 @@
+import 'package:app/features/home/pages/main_page.dart';
+import 'package:flutter/material.dart';
+
+class MainPageState extends State {
+
+ int count = 0;
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text(count.toString()),
+ backgroundColor: Colors.blue,
+ ),
+ body: widget.child
+ );
+ }
+
+}
\ No newline at end of file
diff --git a/frontend/app/lib/features/home/pages/index_page.dart b/frontend/app/lib/features/home/pages/index_page.dart
new file mode 100644
index 0000000..1336e1e
--- /dev/null
+++ b/frontend/app/lib/features/home/pages/index_page.dart
@@ -0,0 +1,12 @@
+import 'package:app/features/home/bloc/index_page_state.dart';
+import 'package:flutter/cupertino.dart';
+
+class IndexPage extends StatefulWidget {
+ const IndexPage({super.key});
+
+ @override
+ State createState() {
+ return IndexPageState();
+ }
+
+}
\ No newline at end of file
diff --git a/frontend/app/lib/features/home/pages/main_page.dart b/frontend/app/lib/features/home/pages/main_page.dart
new file mode 100644
index 0000000..ab280de
--- /dev/null
+++ b/frontend/app/lib/features/home/pages/main_page.dart
@@ -0,0 +1,13 @@
+import 'package:app/features/home/bloc/main_page_state.dart';
+import 'package:flutter/material.dart';
+
+class MainPage extends StatefulWidget {
+ final Widget child;
+ const MainPage({super.key,required this.child});
+
+ @override
+ State createState() {
+ return MainPageState();
+ }
+
+}
\ No newline at end of file
diff --git a/frontend/app/lib/main.dart b/frontend/app/lib/main.dart
index 77ca2ee..8a7315f 100644
--- a/frontend/app/lib/main.dart
+++ b/frontend/app/lib/main.dart
@@ -1,178 +1,10 @@
+import 'package:flutter_web_plugins/url_strategy.dart';
+import 'package:app/app.dart';
import 'package:flutter/material.dart';
-void main() => runApp(
- const MaterialApp(home: IMLoginPage(), debugShowCheckedModeBanner: false),
-);
+void main(List args){
-class IMLoginPage extends StatefulWidget {
- const IMLoginPage({super.key});
+ usePathUrlStrategy();
- @override
- State createState() => _IMLoginPageState();
-}
-
-class _IMLoginPageState extends State {
- @override
- Widget build(BuildContext context) {
- // 主题色定义:这里用类似微信的深绿或经典的社交蓝
- const Color primaryColor = Color(0xFF07C160); // 微信绿,你也可以换成 0xFF0084FF (社交蓝)
-
- return Scaffold(
- backgroundColor: Colors.white,
- appBar: AppBar(
- backgroundColor: Colors.transparent,
- elevation: 0,
- actions: [
- TextButton(
- onPressed: () {},
- child: const Text("找回密码", style: TextStyle(color: Colors.grey)),
- ),
- ],
- ),
- body: SingleChildScrollView(
- child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 40),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- const SizedBox(height: 20),
- // 1. 品牌Logo/头像区域
- Container(
- width: 100,
- height: 100,
- decoration: BoxDecoration(
- color: primaryColor.withOpacity(0.1),
- shape: BoxShape.circle,
- ),
- child: const Icon(
- Icons.person_rounded,
- size: 60,
- color: primaryColor,
- ),
- ),
- const SizedBox(height: 24),
- const Text(
- "登录您的聊天账号",
- style: TextStyle(
- fontSize: 24,
- fontWeight: FontWeight.bold,
- color: Colors.black87,
- ),
- ),
- const SizedBox(height: 60),
-
- // 2. 账号输入框 (极简下划线风格)
- TextField(
- decoration: InputDecoration(
- labelText: "账号 / 邮箱 / 手机号",
- labelStyle: const TextStyle(color: Colors.grey, fontSize: 14),
- floatingLabelStyle: const TextStyle(color: primaryColor),
- enabledBorder: UnderlineInputBorder(
- borderSide: BorderSide(color: Colors.grey.shade300),
- ),
- focusedBorder: const UnderlineInputBorder(
- borderSide: BorderSide(color: primaryColor, width: 2),
- ),
- ),
- ),
- const SizedBox(height: 25),
-
- // 3. 密码输入框
- TextField(
- obscureText: true,
- decoration: InputDecoration(
- labelText: "请输入密码",
- labelStyle: const TextStyle(color: Colors.grey, fontSize: 14),
- floatingLabelStyle: const TextStyle(color: primaryColor),
- enabledBorder: UnderlineInputBorder(
- borderSide: BorderSide(color: Colors.grey.shade300),
- ),
- focusedBorder: const UnderlineInputBorder(
- borderSide: BorderSide(color: primaryColor, width: 2),
- ),
- ),
- ),
- const SizedBox(height: 60),
-
- // 4. 登录按钮 (圆润大按钮)
- SizedBox(
- width: double.infinity,
- height: 50,
- child: ElevatedButton(
- onPressed: () {},
- style: ElevatedButton.styleFrom(
- backgroundColor: primaryColor,
- foregroundColor: Colors.white,
- elevation: 0,
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(10),
- ),
- ),
- child: const Text(
- "登 录",
- style: TextStyle(fontSize: 18, fontWeight: FontWeight.w500),
- ),
- ),
- ),
- const SizedBox(height: 20),
-
- // 5. 注册/切换登录方式
- Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- TextButton(
- onPressed: () {},
- child: const Text(
- "注册账号",
- style: TextStyle(color: Color(0xFF576B95)),
- ), // 经典的链接蓝
- ),
- const SizedBox(
- height: 20,
- child: VerticalDivider(color: Colors.grey),
- ),
- TextButton(
- onPressed: () {},
- child: const Text(
- "验证码登录",
- style: TextStyle(color: Color(0xFF576B95)),
- ),
- ),
- ],
- ),
-
- const SizedBox(height: 80),
- // 6. 底部协议 (社交App必有)
- Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Checkbox(
- value: true,
- activeColor: primaryColor,
- onChanged: (v) {},
- ),
- const Text(
- "我已阅读并同意",
- style: TextStyle(color: Colors.grey, fontSize: 12),
- ),
- const Text(
- "《用户协议》",
- style: TextStyle(color: Color(0xFF576B95), fontSize: 12),
- ),
- const Text(
- "与",
- style: TextStyle(color: Colors.grey, fontSize: 12),
- ),
- const Text(
- "《隐私政策》",
- style: TextStyle(color: Color(0xFF576B95), fontSize: 12),
- ),
- ],
- ),
- ],
- ),
- ),
- ),
- );
- }
-}
+ runApp(const MyApp());
+}
\ No newline at end of file
diff --git a/frontend/app/pubspec.lock b/frontend/app/pubspec.lock
index 3ae5fce..8b91c6e 100644
--- a/frontend/app/pubspec.lock
+++ b/frontend/app/pubspec.lock
@@ -6,7 +6,7 @@ packages:
description:
name: async
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "2.13.0"
boolean_selector:
@@ -14,7 +14,7 @@ packages:
description:
name: boolean_selector
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.2"
characters:
@@ -22,7 +22,7 @@ packages:
description:
name: characters
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "1.4.0"
clock:
@@ -30,7 +30,7 @@ packages:
description:
name: clock
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.2"
collection:
@@ -38,7 +38,7 @@ packages:
description:
name: collection
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "1.19.1"
cupertino_icons:
@@ -46,7 +46,7 @@ packages:
description:
name: cupertino_icons
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.8"
fake_async:
@@ -54,7 +54,7 @@ packages:
description:
name: fake_async
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.3"
flutter:
@@ -67,7 +67,7 @@ packages:
description:
name: flutter_lints
sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1"
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "6.0.0"
flutter_test:
@@ -75,12 +75,25 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
+ flutter_web_plugins:
+ dependency: "direct main"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ go_router:
+ dependency: "direct main"
+ description:
+ name: go_router
+ sha256: eff94d2a6fc79fa8b811dde79c7549808c2346037ee107a1121b4a644c745f2a
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "17.0.1"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "11.0.2"
leak_tracker_flutter_testing:
@@ -88,7 +101,7 @@ packages:
description:
name: leak_tracker_flutter_testing
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.10"
leak_tracker_testing:
@@ -96,7 +109,7 @@ packages:
description:
name: leak_tracker_testing
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.2"
lints:
@@ -104,15 +117,23 @@ packages:
description:
name: lints
sha256: a5e2b223cb7c9c8efdc663ef484fdd95bb243bff242ef5b13e26883547fce9a0
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "6.0.0"
+ logging:
+ dependency: transitive
+ description:
+ name: logging
+ sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "1.3.0"
matcher:
dependency: transitive
description:
name: matcher
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.17"
material_color_utilities:
@@ -120,7 +141,7 @@ packages:
description:
name: material_color_utilities
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "0.11.1"
meta:
@@ -128,7 +149,7 @@ packages:
description:
name: meta
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "1.17.0"
path:
@@ -136,7 +157,7 @@ packages:
description:
name: path
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "1.9.1"
sky_engine:
@@ -149,7 +170,7 @@ packages:
description:
name: source_span
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "1.10.1"
stack_trace:
@@ -157,7 +178,7 @@ packages:
description:
name: stack_trace
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "1.12.1"
stream_channel:
@@ -165,7 +186,7 @@ packages:
description:
name: stream_channel
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.4"
string_scanner:
@@ -173,7 +194,7 @@ packages:
description:
name: string_scanner
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "1.4.1"
term_glyph:
@@ -181,7 +202,7 @@ packages:
description:
name: term_glyph
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.2"
test_api:
@@ -189,7 +210,7 @@ packages:
description:
name: test_api
sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "0.7.7"
vector_math:
@@ -197,7 +218,7 @@ packages:
description:
name: vector_math
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "2.2.0"
vm_service:
@@ -205,9 +226,9 @@ packages:
description:
name: vm_service
sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60"
- url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
+ url: "https://pub.flutter-io.cn"
source: hosted
version: "15.0.2"
sdks:
dart: ">=3.10.4 <4.0.0"
- flutter: ">=3.18.0-18.0.pre.54"
+ flutter: ">=3.35.0"
diff --git a/frontend/app/pubspec.yaml b/frontend/app/pubspec.yaml
index 7e5495e..f953d81 100644
--- a/frontend/app/pubspec.yaml
+++ b/frontend/app/pubspec.yaml
@@ -31,9 +31,13 @@ dependencies:
flutter:
sdk: flutter
+ flutter_web_plugins:
+ sdk: flutter
+
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.8
+ go_router: ^17.0.1
dev_dependencies:
flutter_test:
diff --git a/frontend/app/test/widget_test.dart b/frontend/app/test/widget_test.dart
index 70de33c..6851c91 100644
--- a/frontend/app/test/widget_test.dart
+++ b/frontend/app/test/widget_test.dart
@@ -5,15 +5,14 @@
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
+import 'package:app/features/auth/pages/login_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
-import 'package:app/main.dart';
-
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
- await tester.pumpWidget(const IMLoginPage());
+ await tester.pumpWidget(const LoginPage());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
diff --git a/frontend/web/.env b/frontend/web/.env
index a848dca..d0640cb 100644
--- a/frontend/web/.env
+++ b/frontend/web/.env
@@ -1,4 +1,4 @@
-#VITE_API_BASE_URL = http://localhost:5202/api
-#VITE_SIGNALR_BASE_URL = http://localhost:5202/chat
-VITE_API_BASE_URL = http://192.168.5.116:7070/api
-VITE_SIGNALR_BASE_URL = http://192.168.5.116:7070/chat
\ No newline at end of file
+VITE_API_BASE_URL = http://localhost:5202/api
+VITE_SIGNALR_BASE_URL = http://localhost:5202/chat
+#VITE_API_BASE_URL = http://192.168.5.116:7070/api
+#VITE_SIGNALR_BASE_URL = http://192.168.5.116:7070/chat
\ No newline at end of file
diff --git a/frontend/web/package-lock.json b/frontend/web/package-lock.json
index 2069b46..4499a81 100644
--- a/frontend/web/package-lock.json
+++ b/frontend/web/package-lock.json
@@ -105,6 +105,7 @@
"integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@babel/code-frame": "^7.27.1",
"@babel/generator": "^7.28.3",
@@ -657,6 +658,7 @@
}
],
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=18"
},
@@ -703,6 +705,7 @@
}
],
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=18"
}
@@ -2667,6 +2670,7 @@
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"dev": true,
"license": "MIT",
+ "peer": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -2870,6 +2874,7 @@
}
],
"license": "MIT",
+ "peer": true,
"dependencies": {
"baseline-browser-mapping": "^2.8.9",
"caniuse-lite": "^1.0.30001746",
@@ -3484,6 +3489,7 @@
"integrity": "sha512-XyLmROnACWqSxiGYArdef1fItQd47weqB7iwtfr9JHwRrqIXZdcFMvvEcL9xHCmL0SNsOvF0c42lWyM1U5dgig==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.8.0",
"@eslint-community/regexpp": "^4.12.1",
@@ -3545,6 +3551,7 @@
"integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==",
"dev": true,
"license": "MIT",
+ "peer": true,
"bin": {
"eslint-config-prettier": "bin/cli.js"
},
@@ -5266,6 +5273,7 @@
}
],
"license": "MIT",
+ "peer": true,
"dependencies": {
"nanoid": "^3.3.11",
"picocolors": "^1.1.1",
@@ -5305,6 +5313,7 @@
"integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
"dev": true,
"license": "MIT",
+ "peer": true,
"bin": {
"prettier": "bin/prettier.cjs"
},
@@ -5928,6 +5937,7 @@
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
"dev": true,
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=12"
},
@@ -6222,6 +6232,7 @@
"integrity": "sha512-ITcnkFeR3+fI8P1wMgItjGrR10170d8auB4EpMLPqmx6uxElH3a/hHGQabSHKdqd4FXWO1nFIp9rRn7JQ34ACQ==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"esbuild": "^0.25.0",
"fdir": "^6.5.0",
@@ -6483,6 +6494,7 @@
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
"dev": true,
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=12"
},
@@ -6496,6 +6508,7 @@
"integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@types/chai": "^5.2.2",
"@vitest/expect": "3.2.4",
@@ -6581,6 +6594,7 @@
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.22.tgz",
"integrity": "sha512-toaZjQ3a/G/mYaLSbV+QsQhIdMo9x5rrqIpYRObsJ6T/J+RyCSFwN2LHNVH9v8uIcljDNa3QzPVdv3Y6b9hAJQ==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@vue/compiler-dom": "3.5.22",
"@vue/compiler-sfc": "3.5.22",
@@ -6610,7 +6624,6 @@
"integrity": "sha512-CydUvFOQKD928UzZhTp4pr2vWz1L+H99t7Pkln2QSPdvmURT0MoC4wUccfCnuEaihNsu9aYYyk+bep8rlfkUXw==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"debug": "^4.4.0",
"eslint-scope": "^8.2.0",
@@ -6635,7 +6648,6 @@
"integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
"dev": true,
"license": "Apache-2.0",
- "peer": true,
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
diff --git a/frontend/web/src/services/useBrowserNotification.js b/frontend/web/src/services/useBrowserNotification.js
index d97a58c..d43fed5 100644
--- a/frontend/web/src/services/useBrowserNotification.js
+++ b/frontend/web/src/services/useBrowserNotification.js
@@ -18,4 +18,4 @@ export function useBrowserNotification() {
};
return { requestPermission, send };
-}
\ No newline at end of file
+}
diff --git a/frontend/web/src/views/messages/MessageList.vue b/frontend/web/src/views/messages/MessageList.vue
index b5df7bf..44d8aa6 100644
--- a/frontend/web/src/views/messages/MessageList.vue
+++ b/frontend/web/src/views/messages/MessageList.vue
@@ -14,9 +14,9 @@
新消息无法通知,点我授予通知权限
-
+