diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/TestController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/TestController.cs index 603d7eb4..ae30e68f 100644 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/TestController.cs +++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/TestController.cs @@ -51,6 +51,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers _iRoleService = iRoleService; _quartzInvoker = quartzInvoker; _hub = hub; + _local = local; } /// diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Yi.Framework.ApiMicroservice.csproj b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Yi.Framework.ApiMicroservice.csproj index 38f13a52..677bea43 100644 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Yi.Framework.ApiMicroservice.csproj +++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Yi.Framework.ApiMicroservice.csproj @@ -24,6 +24,12 @@ + + + Always + + + Always diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/wwwroot/Image/0.jpg b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/wwwroot/Image/0.jpg new file mode 100644 index 00000000..57c1f446 Binary files /dev/null and b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/wwwroot/Image/0.jpg differ diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db index 429342a3..3c17b29f 100644 Binary files a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db and b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db differ diff --git a/Yi.Framework.Net6/Yi.Framework.Template/Yi.Framework.Template.csproj b/Yi.Framework.Net6/Yi.Framework.Template/Yi.Framework.Template.csproj new file mode 100644 index 00000000..2a3b0053 --- /dev/null +++ b/Yi.Framework.Net6/Yi.Framework.Template/Yi.Framework.Template.csproj @@ -0,0 +1,50 @@ + + + + net6.0 + enable + enable + + + + + True + True + view.tt + + + + + + True + True + view.tt + + + + + + view.vue + TextTemplatingFileGenerator + + + TextTemplatingFileGenerator + api.js + + + True + True + api.tt + + + True + True + view.tt + + + + + + + + diff --git a/Yi.Framework.Net6/Yi.Framework.Template/vue3-ruoyi/api.js b/Yi.Framework.Net6/Yi.Framework.Template/vue3-ruoyi/api.js new file mode 100644 index 00000000..59a62015 --- /dev/null +++ b/Yi.Framework.Net6/Yi.Framework.Template/vue3-ruoyi/api.js @@ -0,0 +1,45 @@ +import request from '@/utils/request' + +// 分页查询 +export function listData(query) { + return request({ + url: '/article/pageList', + method: 'get', + params: query + }) +} + +// id查询 +export function getData(code) { + return request({ + url: '/article/getById/' + code, + method: 'get' + }) +} + +// 新增 +export function addData(data) { + return request({ + url: '/article/add', + method: 'post', + data: data + }) +} + +// 修改 +export function updateData(data) { + return request({ + url: '/article/update', + method: 'put', + data: data + }) +} + +// 删除 +export function delData(code) { + return request({ + url: '/article/delList', + method: 'delete', + data:"string"==typeof(code)?code:[code] + }) +} diff --git a/Yi.Framework.Net6/Yi.Framework.Template/vue3-ruoyi/api.tt b/Yi.Framework.Net6/Yi.Framework.Template/vue3-ruoyi/api.tt new file mode 100644 index 00000000..7757cbed --- /dev/null +++ b/Yi.Framework.Net6/Yi.Framework.Template/vue3-ruoyi/api.tt @@ -0,0 +1,54 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ output extension=".js" #> +<# +var entityName="article"; +#> +import request from '@/utils/request' + +// 分页查询 +export function listData(query) { + return request({ + url: '/<#= entityName #>/pageList', + method: 'get', + params: query + }) +} + +// id查询 +export function getData(code) { + return request({ + url: '/<#= entityName #>/getById/' + code, + method: 'get' + }) +} + +// 新增 +export function addData(data) { + return request({ + url: '/<#= entityName #>/add', + method: 'post', + data: data + }) +} + +// 修改 +export function updateData(data) { + return request({ + url: '/<#= entityName #>/update', + method: 'put', + data: data + }) +} + +// 删除 +export function delData(code) { + return request({ + url: '/<#= entityName #>/delList', + method: 'delete', + data:"string"==typeof(code)?code:[code] + }) +} diff --git a/Yi.Framework.Net6/Yi.Framework.Template/vue3-ruoyi/view.tt b/Yi.Framework.Net6/Yi.Framework.Template/vue3-ruoyi/view.tt new file mode 100644 index 00000000..d7f9ea0b --- /dev/null +++ b/Yi.Framework.Net6/Yi.Framework.Template/vue3-ruoyi/view.tt @@ -0,0 +1,315 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ output extension=".vue" #> +<# +var entityName="article"; +var path="/business/articleApi"; +var entityRemark="文章"; +var perCode="business:article"; +var dataDic=new Dictionary(){ +{"title","文章标题"}, +}; +var isStart=false; +#> +// +<#if(isStart){ + +#> + + + + + +<#} + #> \ No newline at end of file diff --git a/Yi.Framework.Net6/Yi.Framework.Template/vue3-ruoyi/view.vue b/Yi.Framework.Net6/Yi.Framework.Template/vue3-ruoyi/view.vue new file mode 100644 index 00000000..6eae1eb0 --- /dev/null +++ b/Yi.Framework.Net6/Yi.Framework.Template/vue3-ruoyi/view.vue @@ -0,0 +1 @@ +// diff --git a/Yi.Framework.Net6/Yi.Framework.WebCore/Appsettings.cs b/Yi.Framework.Net6/Yi.Framework.WebCore/Appsettings.cs index ae8963cb..23c825f3 100644 --- a/Yi.Framework.Net6/Yi.Framework.WebCore/Appsettings.cs +++ b/Yi.Framework.Net6/Yi.Framework.WebCore/Appsettings.cs @@ -13,7 +13,7 @@ namespace Yi.Framework.WebCore { static IConfiguration Configuration { get; set; } static string contentPath { get; set; } - + public Appsettings(string contentPath) { string Path = "appsettings.json"; diff --git a/Yi.Framework.Net6/Yi.Framework.WebCore/DbExtend/DbSeedExtend.cs b/Yi.Framework.Net6/Yi.Framework.WebCore/DbExtend/DbSeedExtend.cs index e16171a0..54a688f0 100644 --- a/Yi.Framework.Net6/Yi.Framework.WebCore/DbExtend/DbSeedExtend.cs +++ b/Yi.Framework.Net6/Yi.Framework.WebCore/DbExtend/DbSeedExtend.cs @@ -93,7 +93,6 @@ namespace Yi.Framework.WebCore.DbExtend if (Appsettings.appBool("DbSeed_Enabled")) { - var _Db = app.ApplicationServices.GetService(); Invoer(_Db); } diff --git a/Yi.Framework.Net6/Yi.Framework.sln b/Yi.Framework.Net6/Yi.Framework.sln index 47d08aa4..2705a1aa 100644 --- a/Yi.Framework.Net6/Yi.Framework.sln +++ b/Yi.Framework.Net6/Yi.Framework.sln @@ -47,6 +47,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Language", "Yi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.WeChatPay", "Yi.Framework.WeChatPay\Yi.Framework.WeChatPay.csproj", "{C307189D-C42C-4C09-BB65-5A386C9F182B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.Template", "Yi.Framework.Template\Yi.Framework.Template.csproj", "{A51E9091-3745-461A-A3CB-32598BF0DC77}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -121,6 +123,10 @@ Global {C307189D-C42C-4C09-BB65-5A386C9F182B}.Debug|Any CPU.Build.0 = Debug|Any CPU {C307189D-C42C-4C09-BB65-5A386C9F182B}.Release|Any CPU.ActiveCfg = Release|Any CPU {C307189D-C42C-4C09-BB65-5A386C9F182B}.Release|Any CPU.Build.0 = Release|Any CPU + {A51E9091-3745-461A-A3CB-32598BF0DC77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A51E9091-3745-461A-A3CB-32598BF0DC77}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A51E9091-3745-461A-A3CB-32598BF0DC77}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A51E9091-3745-461A-A3CB-32598BF0DC77}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -143,6 +149,7 @@ Global {DA96B62F-2D4C-4AFB-937C-5AEA1119A129} = {DB2506F5-05FD-4E76-940E-41D7AA148550} {3047069B-4084-461F-BC9F-023BC60401D1} = {9ABAF6B1-6C02-498A-90A2-ABC1140CF89A} {C307189D-C42C-4C09-BB65-5A386C9F182B} = {9ABAF6B1-6C02-498A-90A2-ABC1140CF89A} + {A51E9091-3745-461A-A3CB-32598BF0DC77} = {9ABAF6B1-6C02-498A-90A2-ABC1140CF89A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {1ED77A6E-377F-4EEF-A3D0-D65C94657DAF} diff --git a/Yi.Vue3.x.RuoYi/src/api/business/articleApi.js b/Yi.Vue3.x.RuoYi/src/api/business/articleApi.js new file mode 100644 index 00000000..59a62015 --- /dev/null +++ b/Yi.Vue3.x.RuoYi/src/api/business/articleApi.js @@ -0,0 +1,45 @@ +import request from '@/utils/request' + +// 分页查询 +export function listData(query) { + return request({ + url: '/article/pageList', + method: 'get', + params: query + }) +} + +// id查询 +export function getData(code) { + return request({ + url: '/article/getById/' + code, + method: 'get' + }) +} + +// 新增 +export function addData(data) { + return request({ + url: '/article/add', + method: 'post', + data: data + }) +} + +// 修改 +export function updateData(data) { + return request({ + url: '/article/update', + method: 'put', + data: data + }) +} + +// 删除 +export function delData(code) { + return request({ + url: '/article/delList', + method: 'delete', + data:"string"==typeof(code)?code:[code] + }) +} diff --git a/Yi.Vue3.x.RuoYi/src/views/business/article.vue b/Yi.Vue3.x.RuoYi/src/views/business/article.vue new file mode 100644 index 00000000..a3e91803 --- /dev/null +++ b/Yi.Vue3.x.RuoYi/src/views/business/article.vue @@ -0,0 +1,397 @@ + + + \ No newline at end of file diff --git a/Yi.Vue3.x.RuoYi/src/views/system/dict/index copy.vue b/Yi.Vue3.x.RuoYi/src/views/system/dict/index copy.vue new file mode 100644 index 00000000..eb6406a8 --- /dev/null +++ b/Yi.Vue3.x.RuoYi/src/views/system/dict/index copy.vue @@ -0,0 +1,318 @@ + + +