From 16556ddb8490f82809ef01776c04b444c5e1b7ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com> Date: Mon, 27 Mar 2023 23:15:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.BBS.Vue3/.env.development | 2 +- Yi.BBS.Vue3/.env.production | 1 + Yi.BBS.Vue3/index.html | 3 +- Yi.BBS.Vue3/src/router/index.js | 10 +-- Yi.BBS.Vue3/src/views/Login.vue | 3 + Yi.BBS.Vue3/src/views/Register.vue | 67 ++++++++++++++++++ .../Extensions/SqlsugarExtensions.cs | 2 +- .../SqlSugarDbContext.cs | 10 +-- .../DataSeeds/BbsConfigDataSeed.cs | 2 +- .../BBS/Yi.BBS.Domain/YiBBSDomainModule.cs | 2 +- .../Yi.BBS.Web/Properties/launchSettings.json | 2 +- .../project/BBS/Yi.BBS.Web/Yi.BBS.Web.csproj | 3 + .../project/BBS/Yi.BBS.Web/appsettings.json | 8 +-- .../project/BBS/Yi.BBS.Web/yi-sqlsugar-dev.db | Bin 352256 -> 352256 bytes .../Dtos/Discuss/DiscussCreateInputVo.cs | 2 +- .../Forum/DiscussService.cs | 2 +- .../DataSeeds/BbsConfigDataSeed.cs | 2 +- .../Forum/Entities/DiscussEntity.cs | 2 +- .../bbs/Yi.BBS.Domain/YiBBSDomainModule.cs | 2 +- .../Yi.BBS.Web/Properties/launchSettings.json | 2 +- .../project/bbs/Yi.BBS.Web/Yi.BBS.Web.csproj | 3 + .../project/bbs/Yi.BBS.Web/appsettings.json | 8 +-- .../project/bbs/Yi.BBS.Web/yi-sqlsugar-dev.db | Bin 352256 -> 352256 bytes Yi.RuoYi.Vue3/.env.development | 2 +- 24 files changed, 109 insertions(+), 31 deletions(-) create mode 100644 Yi.BBS.Vue3/src/views/Register.vue diff --git a/Yi.BBS.Vue3/.env.development b/Yi.BBS.Vue3/.env.development index 0216e5bd..fef1eee5 100644 --- a/Yi.BBS.Vue3/.env.development +++ b/Yi.BBS.Vue3/.env.development @@ -1,2 +1,2 @@ VITE_APP_BASEAPI="/api-dev" -VITE_APP_URL="http://localhost:19003/api" \ No newline at end of file +VITE_APP_URL="http://localhost:19001/api" \ No newline at end of file diff --git a/Yi.BBS.Vue3/.env.production b/Yi.BBS.Vue3/.env.production index e69de29b..a76814fb 100644 --- a/Yi.BBS.Vue3/.env.production +++ b/Yi.BBS.Vue3/.env.production @@ -0,0 +1 @@ +VITE_APP_BASEAPI="/prod-api" \ No newline at end of file diff --git a/Yi.BBS.Vue3/index.html b/Yi.BBS.Vue3/index.html index fc001173..4d501b99 100644 --- a/Yi.BBS.Vue3/index.html +++ b/Yi.BBS.Vue3/index.html @@ -3,7 +3,8 @@ - + + 意社区 diff --git a/Yi.BBS.Vue3/src/router/index.js b/Yi.BBS.Vue3/src/router/index.js index 7b5aee79..e5a40141 100644 --- a/Yi.BBS.Vue3/src/router/index.js +++ b/Yi.BBS.Vue3/src/router/index.js @@ -26,11 +26,11 @@ const router = createRouter({ path: '/login', component: () => import('../views/Login.vue') }, - // { - // name:'register', - // path: '/register', - // component: () => import('../views/Register.vue') - // }, + { + name:'register', + path: '/register', + component: () => import('../views/Register.vue') + }, ] }, { diff --git a/Yi.BBS.Vue3/src/views/Login.vue b/Yi.BBS.Vue3/src/views/Login.vue index 579aa6fb..d3784214 100644 --- a/Yi.BBS.Vue3/src/views/Login.vue +++ b/Yi.BBS.Vue3/src/views/Login.vue @@ -13,6 +13,9 @@ + + 没有账号?前往注册 +
其他方式登录 diff --git a/Yi.BBS.Vue3/src/views/Register.vue b/Yi.BBS.Vue3/src/views/Register.vue new file mode 100644 index 00000000..d7c8bc79 --- /dev/null +++ b/Yi.BBS.Vue3/src/views/Register.vue @@ -0,0 +1,67 @@ + + + diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Extensions/SqlsugarExtensions.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Extensions/SqlsugarExtensions.cs index 165d8eea..070b1804 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Extensions/SqlsugarExtensions.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Extensions/SqlsugarExtensions.cs @@ -27,7 +27,7 @@ namespace Yi.Framework.Core.Sqlsugar.Extensions //使用上下文对象 public static void AddDbSqlsugarContextServer(this IServiceCollection services) { - services.AddSingleton(x => x.GetRequiredService().SqlSugarClient); + services.AddTransient(x => x.GetRequiredService().SqlSugarClient); services.AddSingleton(); } diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/SqlSugarDbContext.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/SqlSugarDbContext.cs index e83bdb34..6ff158ab 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/SqlSugarDbContext.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/SqlSugarDbContext.cs @@ -131,11 +131,11 @@ namespace Yi.Framework.Core.Sqlsugar db.Aop.OnLogExecuting = (s, p) => { StringBuilder sb = new StringBuilder(); - sb.Append("执行SQL:" + s.ToString()); - foreach (var i in p) - { - sb.Append($"\r\n参数:{i.ParameterName},参数值:{i.Value}"); - } + //sb.Append("执行SQL:" + s.ToString()); + //foreach (var i in p) + //{ + // sb.Append($"\r\n参数:{i.ParameterName},参数值:{i.Value}"); + //} sb.Append($"\r\n 完整SQL:{UtilMethods.GetSqlString(DbType.MySql, s, p)}"); logger?.LogDebug(sb.ToString()); }; diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Domain/DataSeeds/BbsConfigDataSeed.cs b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Domain/DataSeeds/BbsConfigDataSeed.cs index 6c517074..1e4aac53 100644 --- a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Domain/DataSeeds/BbsConfigDataSeed.cs +++ b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Domain/DataSeeds/BbsConfigDataSeed.cs @@ -20,7 +20,7 @@ namespace Yi.BBS.Domain.DataSeed public override async Task IsInvoker() { - return !await _repository.IsAnyAsync(x => x.ConfigKey == "ConfigEntity"); + return !await _repository.IsAnyAsync(x => x.ConfigKey == "bbs.site.name"); } public override List GetSeedData() { diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Domain/YiBBSDomainModule.cs b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Domain/YiBBSDomainModule.cs index 0ba04585..99a24e35 100644 --- a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Domain/YiBBSDomainModule.cs +++ b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Domain/YiBBSDomainModule.cs @@ -24,7 +24,7 @@ namespace Yi.BBS.Domain public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context) { - //services.AddTransient(); + } } } diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/Properties/launchSettings.json b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/Properties/launchSettings.json index 1f81c189..f6eca37f 100644 --- a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/Properties/launchSettings.json +++ b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/Properties/launchSettings.json @@ -6,7 +6,7 @@ "dotnetRunMessages": true, "launchBrowser": true, "launchUrl": "swagger", - "applicationUrl": "http://localhost:19003", + "applicationUrl": "http://localhost:19001", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/Yi.BBS.Web.csproj b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/Yi.BBS.Web.csproj index f5aea785..9332c133 100644 --- a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/Yi.BBS.Web.csproj +++ b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/Yi.BBS.Web.csproj @@ -16,6 +16,9 @@ + + Always + Always diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/appsettings.json b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/appsettings.json index 3938b290..a4139195 100644 --- a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/appsettings.json +++ b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/appsettings.json @@ -8,15 +8,15 @@ "AllowedHosts": "*", //程序启动地址,*代表全部网口 - "StartUrl": "http://*:19003", + "StartUrl": "http://*:19001", //数据库类型列表 "DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ], "DbConnOptions": { - //"Url": "DataSource=yi-sqlsugar-dev.db", - "Url": "server=106.52.94.217;port=3306;database=yi-bbs-dev;user id=root;password=Qz52013142020.", - "DbType": "Mysql", + "Url": "DataSource=yi-sqlsugar-dev.db", + //"Url": "server=106.52.94.217;port=3306;database=yi-bbs-dev;user id=root;password=Qz52013142020.", + "DbType": "Sqlite", "EnabledDbSeed": true, "EnabledReadWrite": false, "EnabledCodeFirst": true, diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/yi-sqlsugar-dev.db b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/yi-sqlsugar-dev.db index c28ae3f8dc3df5d75d5b99074928e2580b539c37..f12a3ef7886c21be29077e09e0c7cc689119f3ac 100644 GIT binary patch delta 643 zcmZvZ&1(}u7{+IIv%9m>$RyhBp+aLdEk&}<$L`Lucyf;-=s!?IPy{cg9+uKWnu^p4 zN`r^dtBM5=iWIsP6-(kxq8E=MdPt3TPoA7)D#j0Z_8A^t*!RctF7J#l?~Jcc!fNYK z3aih~J$!A3#WT|R3@>k%@TW1^cn_`VPUqFq3I^erX+y8m{_#%u(i8n^D7Yp#(ySIiPLTtoe)??}98T5f0i=F2t)U~N^!94{8WKQbp^K{^#{&Nhz1 z4OqBS!tWZ*O6b`~ijx4jX92QP+fESxMFhM(5Xv}ZLsRci1M5G{zsV=sd+Qs!H(I^h zFLs+-{jCSR)~0v$!~VA?F<^x88sRl2DvT#YBvkmE5XM5`-FV-d)7Gh?c>v8zhgeku&8q_wlQ3 z%>sy`1BeL_w+C /// 默认公开 diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/DiscussService.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/DiscussService.cs index 000c595c..5351b2a2 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/DiscussService.cs +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/DiscussService.cs @@ -110,7 +110,7 @@ namespace Yi.BBS.Application.Forum /// public override async Task CreateAsync(DiscussCreateInputVo input) { - if (!await _plateEntityRepository.IsAnyAsync(x => x.Id == input.plateId)) + if (!await _plateEntityRepository.IsAnyAsync(x => x.Id == input.PlateId)) { throw new UserFriendlyException(PlateConst.板块不存在); } diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/DataSeeds/BbsConfigDataSeed.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/DataSeeds/BbsConfigDataSeed.cs index 6c517074..1e4aac53 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/DataSeeds/BbsConfigDataSeed.cs +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/DataSeeds/BbsConfigDataSeed.cs @@ -20,7 +20,7 @@ namespace Yi.BBS.Domain.DataSeed public override async Task IsInvoker() { - return !await _repository.IsAnyAsync(x => x.ConfigKey == "ConfigEntity"); + return !await _repository.IsAnyAsync(x => x.ConfigKey == "bbs.site.name"); } public override List GetSeedData() { diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Forum/Entities/DiscussEntity.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Forum/Entities/DiscussEntity.cs index 52eccc80..d38565c6 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Forum/Entities/DiscussEntity.cs +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Forum/Entities/DiscussEntity.cs @@ -60,6 +60,6 @@ namespace Yi.BBS.Domain.Forum.Entities /// 当PermissionType为部分用户时候,以下列表中的用户+创建者 代表拥有权限 /// [SugarColumn(IsJson = true)]//使用json处理 - public List PermissionUserIds { get; set; } + public List? PermissionUserIds { get; set; } } } diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/YiBBSDomainModule.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/YiBBSDomainModule.cs index 0ba04585..99a24e35 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/YiBBSDomainModule.cs +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/YiBBSDomainModule.cs @@ -24,7 +24,7 @@ namespace Yi.BBS.Domain public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context) { - //services.AddTransient(); + } } } diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/Properties/launchSettings.json b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/Properties/launchSettings.json index 1f81c189..f6eca37f 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/Properties/launchSettings.json +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/Properties/launchSettings.json @@ -6,7 +6,7 @@ "dotnetRunMessages": true, "launchBrowser": true, "launchUrl": "swagger", - "applicationUrl": "http://localhost:19003", + "applicationUrl": "http://localhost:19001", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/Yi.BBS.Web.csproj b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/Yi.BBS.Web.csproj index f5aea785..9332c133 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/Yi.BBS.Web.csproj +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/Yi.BBS.Web.csproj @@ -16,6 +16,9 @@ + + Always + Always diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/appsettings.json b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/appsettings.json index 3938b290..a4139195 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/appsettings.json +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/appsettings.json @@ -8,15 +8,15 @@ "AllowedHosts": "*", //程序启动地址,*代表全部网口 - "StartUrl": "http://*:19003", + "StartUrl": "http://*:19001", //数据库类型列表 "DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ], "DbConnOptions": { - //"Url": "DataSource=yi-sqlsugar-dev.db", - "Url": "server=106.52.94.217;port=3306;database=yi-bbs-dev;user id=root;password=Qz52013142020.", - "DbType": "Mysql", + "Url": "DataSource=yi-sqlsugar-dev.db", + //"Url": "server=106.52.94.217;port=3306;database=yi-bbs-dev;user id=root;password=Qz52013142020.", + "DbType": "Sqlite", "EnabledDbSeed": true, "EnabledReadWrite": false, "EnabledCodeFirst": true, diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/yi-sqlsugar-dev.db b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/yi-sqlsugar-dev.db index c28ae3f8dc3df5d75d5b99074928e2580b539c37..f12a3ef7886c21be29077e09e0c7cc689119f3ac 100644 GIT binary patch delta 643 zcmZvZ&1(}u7{+IIv%9m>$RyhBp+aLdEk&}<$L`Lucyf;-=s!?IPy{cg9+uKWnu^p4 zN`r^dtBM5=iWIsP6-(kxq8E=MdPt3TPoA7)D#j0Z_8A^t*!RctF7J#l?~Jcc!fNYK z3aih~J$!A3#WT|R3@>k%@TW1^cn_`VPUqFq3I^erX+y8m{_#%u(i8n^D7Yp#(ySIiPLTtoe)??}98T5f0i=F2t)U~N^!94{8WKQbp^K{^#{&Nhz1 z4OqBS!tWZ*O6b`~ijx4jX92QP+fESxMFhM(5Xv}ZLsRci1M5G{zsV=sd+Qs!H(I^h zFLs+-{jCSR)~0v$!~VA?F<^x88sRl2DvT#YBvkmE5XM5`-FV-d)7Gh?c>v8zhgeku&8q_wlQ3 z%>sy`1BeL_w+C