diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Program.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Program.cs index d3e88145..45a105fc 100644 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Program.cs +++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Program.cs @@ -159,9 +159,6 @@ ServiceLocator.Instance = app.Services; //测试页面注入 #endregion app.UseDeveloperExceptionPage(); - #region - //Swagger服务注入 - #endregion app.UseSwaggerService(); } #region 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 326eb9ab..8600b943 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.Model/ArticleEntity.cs b/Yi.Framework.Net6/Yi.Framework.Model/ArticleEntity.cs index fc9ad6b0..0f9cb8ca 100644 --- a/Yi.Framework.Net6/Yi.Framework.Model/ArticleEntity.cs +++ b/Yi.Framework.Net6/Yi.Framework.Model/ArticleEntity.cs @@ -8,6 +8,6 @@ namespace Yi.Framework.Model.Models public partial class ArticleEntity:IBaseModelEntity { [Navigate(NavigateType.OneToOne,nameof(UserId))] - public UserEntity User { get; set; } + public UserEntity? User { get; set; } } } diff --git a/Yi.Framework.Net6/Yi.Framework.Model/CategoryEntity.cs b/Yi.Framework.Net6/Yi.Framework.Model/CategoryEntity.cs index b5f24ae3..565f195e 100644 --- a/Yi.Framework.Net6/Yi.Framework.Model/CategoryEntity.cs +++ b/Yi.Framework.Net6/Yi.Framework.Model/CategoryEntity.cs @@ -11,10 +11,10 @@ namespace Yi.Framework.Model.Models public partial class CategoryEntity:IBaseModelEntity { [SugarColumn(IsIgnore = true)] - public List Children { get; set; } + public List? Children { get; set; } [Navigate(NavigateType.OneToMany,nameof(SpecsGroupEntity.CategoryId))] - public List SpecsGroups { get; set; } + public List? SpecsGroups { get; set; } } } \ No newline at end of file diff --git a/Yi.Framework.Net6/Yi.Framework.Model/MenuEntity.cs b/Yi.Framework.Net6/Yi.Framework.Model/MenuEntity.cs index e56f69ea..7cc31a48 100644 --- a/Yi.Framework.Net6/Yi.Framework.Model/MenuEntity.cs +++ b/Yi.Framework.Net6/Yi.Framework.Model/MenuEntity.cs @@ -25,14 +25,14 @@ namespace Yi.Framework.Model.Models var r = new VueRouterModel(); r.OrderNum = m.OrderNum ?? 0; - var routerName = m.Router.Split("/").LastOrDefault(); + var routerName = m.Router?.Split("/").LastOrDefault(); r.Id = m.Id; - r.ParentId = (long)m.ParentId; + r.ParentId = m.ParentId??-1; //寮澶村ぇ鍐 - r.Name = routerName.First().ToString().ToUpper() + routerName.Substring(1); + r.Name = routerName?.First().ToString().ToUpper() + routerName?.Substring(1); r.Path = m.Router; - r.Hidden = (bool)!m.IsShow; + r.Hidden =!m.IsShow??false; if (m.MenuType == MenuTypeEnum.Catalogue.GetHashCode()) @@ -62,9 +62,9 @@ namespace Yi.Framework.Model.Models { Title = m.MenuName, Icon = m.MenuIcon, - NoCache = (bool)!m.IsCache + NoCache = !m.IsCache??true }; - if ((bool)m.IsLink) + if (m.IsLink??false) { r.Meta.link = m.Router; r.AlwaysShow = false; diff --git a/Yi.Framework.Net6/Yi.Framework.Model/ModelsTemplate/ArticleEntity.cs b/Yi.Framework.Net6/Yi.Framework.Model/ModelsTemplate/ArticleEntity.cs index 3d9d7f17..c1dceebc 100644 --- a/Yi.Framework.Net6/Yi.Framework.Model/ModelsTemplate/ArticleEntity.cs +++ b/Yi.Framework.Net6/Yi.Framework.Model/ModelsTemplate/ArticleEntity.cs @@ -77,6 +77,6 @@ namespace Yi.Framework.Model.Models /// 鍥剧墖鍒楄〃 /// [SugarColumn(ColumnName="Images",IsJson = true)] - public List Images { get; set; } + public List? Images { get; set; } } } diff --git a/Yi.Framework.Net6/Yi.Framework.Model/RoleEntity.cs b/Yi.Framework.Net6/Yi.Framework.Model/RoleEntity.cs index 3aec15c2..6a99237e 100644 --- a/Yi.Framework.Net6/Yi.Framework.Model/RoleEntity.cs +++ b/Yi.Framework.Net6/Yi.Framework.Model/RoleEntity.cs @@ -10,9 +10,9 @@ namespace Yi.Framework.Model.Models { [Navigate(typeof(RoleMenuEntity),nameof(RoleMenuEntity.RoleId),nameof(RoleMenuEntity.MenuId))] - public List Menus { get; set; } + public List? Menus { get; set; } [Navigate(typeof(RoleDeptEntity), nameof(RoleDeptEntity.RoleId), nameof(RoleDeptEntity.DeptId))] - public List Depts { get; set; } + public List? Depts { get; set; } } } diff --git a/Yi.Framework.Net6/Yi.Framework.Model/SkuEntity.cs b/Yi.Framework.Net6/Yi.Framework.Model/SkuEntity.cs index b07a6bcf..582c3283 100644 --- a/Yi.Framework.Net6/Yi.Framework.Model/SkuEntity.cs +++ b/Yi.Framework.Net6/Yi.Framework.Model/SkuEntity.cs @@ -14,12 +14,12 @@ namespace Yi.Framework.Model.Models /// 瑙勬牸sku淇℃伅 /// [SugarColumn(ColumnName = "SpecsSkuInfo", IsJson = true)] - public List SpecsSkuInfo { get; set; } + public List? SpecsSkuInfo { get; set; } /// /// 瑙勬牸sku瀹屾暣淇℃伅 /// [SugarColumn(ColumnName = "SpecsSkuAllInfo", IsJson = true)] - public List SpecsSkuAllInfo { get; set; } + public List? SpecsSkuAllInfo { get; set; } } public class SpecsSkuAllInfoModel diff --git a/Yi.Framework.Net6/Yi.Framework.Model/SpecsGroupEntity.cs b/Yi.Framework.Net6/Yi.Framework.Model/SpecsGroupEntity.cs index 96793422..3a4df243 100644 --- a/Yi.Framework.Net6/Yi.Framework.Model/SpecsGroupEntity.cs +++ b/Yi.Framework.Net6/Yi.Framework.Model/SpecsGroupEntity.cs @@ -11,6 +11,6 @@ namespace Yi.Framework.Model.Models public partial class SpecsGroupEntity:IBaseModelEntity { [Navigate(NavigateType.OneToMany, nameof(SpecsEntity.SpecsGroupId))] - public List Specses { get; set; } + public List? Specses { get; set; } } } diff --git a/Yi.Framework.Net6/Yi.Framework.Model/SpuEntity.cs b/Yi.Framework.Net6/Yi.Framework.Model/SpuEntity.cs index 6f253f55..cb09b8df 100644 --- a/Yi.Framework.Net6/Yi.Framework.Model/SpuEntity.cs +++ b/Yi.Framework.Net6/Yi.Framework.Model/SpuEntity.cs @@ -12,15 +12,15 @@ namespace Yi.Framework.Model.Models /// 瑙勬牸Spu瀹屾暣淇℃伅 /// [SugarColumn(ColumnName = "SpecsAllInfo", IsJson = true)] - public List SpecsSpuAllInfo { get; set; } + public List? SpecsSpuAllInfo { get; set; } /// /// 瑙勬牸Spu淇℃伅 /// [SugarColumn(ColumnName = "SpecsInfo", IsJson = true)] - public List SpecsSpuInfo { get; set; } + public List? SpecsSpuInfo { get; set; } [Navigate(NavigateType.OneToMany, nameof(SkuEntity.SpuId))] - public List Spus { get; set; } + public List? Spus { get; set; } } public class SpecsSpuAllInfoModel diff --git a/Yi.Framework.Net6/Yi.Framework.Model/UserEntity.cs b/Yi.Framework.Net6/Yi.Framework.Model/UserEntity.cs index dd3d2275..07d56a5a 100644 --- a/Yi.Framework.Net6/Yi.Framework.Model/UserEntity.cs +++ b/Yi.Framework.Net6/Yi.Framework.Model/UserEntity.cs @@ -12,13 +12,13 @@ namespace Yi.Framework.Model.Models /// 鐪嬪ソ鍟︼紒ORM绮鹃珦锛屽鑸睘鎬 /// [Navigate(typeof(UserRoleEntity), nameof(UserRoleEntity.UserId), nameof(UserRoleEntity.RoleId))] - public List Roles { get; set; } + public List? Roles { get; set; } [Navigate(typeof(UserPostEntity), nameof(UserPostEntity.UserId), nameof(UserPostEntity.PostId))] - public List Posts { get; set; } + public List? Posts { get; set; } [Navigate( NavigateType.OneToOne,nameof(DeptId))] - public DeptEntity Dept { get; set; } + public DeptEntity? Dept { get; set; } /// /// 鏋勫缓瀵嗙爜锛孧D5鐩愬煎姞瀵 diff --git a/Yi.Vue3.x.Vant/components.d.ts b/Yi.Vue3.x.Vant/components.d.ts index 71bae129..9709bee6 100644 --- a/Yi.Vue3.x.Vant/components.d.ts +++ b/Yi.Vue3.x.Vant/components.d.ts @@ -15,7 +15,6 @@ declare module '@vue/runtime-core' { RouterView: typeof import('vue-router')['RouterView'] VanActionSheet: typeof import('vant/es')['ActionSheet'] VanButton: typeof import('vant/es')['Button'] - VanCell: typeof import('vant/es')['Cell'] VanCellGroup: typeof import('vant/es')['CellGroup'] VanCol: typeof import('vant/es')['Col'] VanDivider: typeof import('vant/es')['Divider'] @@ -27,7 +26,6 @@ declare module '@vue/runtime-core' { VanList: typeof import('vant/es')['List'] VanLoading: typeof import('vant/es')['Loading'] VanNavBar: typeof import('vant/es')['NavBar'] - VanPopup: typeof import('vant/es')['Popup'] VanPullRefresh: typeof import('vant/es')['PullRefresh'] VanRow: typeof import('vant/es')['Row'] VanSticky: typeof import('vant/es')['Sticky'] diff --git a/Yi.Vue3.x.Vant/src/api/articleApi.ts b/Yi.Vue3.x.Vant/src/api/articleApi.ts index 24ad276c..c7ad11a1 100644 --- a/Yi.Vue3.x.Vant/src/api/articleApi.ts +++ b/Yi.Vue3.x.Vant/src/api/articleApi.ts @@ -3,7 +3,6 @@ import { ArticleEntity } from '@/type/interface/ArticleEntity' export default { add(data:any) { - console.log(data) return myaxios({ url: `/article/add`, method: 'post', diff --git a/Yi.Vue3.x.Vant/src/layout/bottom/index.vue b/Yi.Vue3.x.Vant/src/layout/bottom/index.vue index a955d1f4..8f9bdbe3 100644 --- a/Yi.Vue3.x.Vant/src/layout/bottom/index.vue +++ b/Yi.Vue3.x.Vant/src/layout/bottom/index.vue @@ -35,8 +35,8 @@ let tabbar=ref([ {icon:"wap-home",to:"/",title:"涓婚〉"}, {icon:"location-o",to:"",title:"鍙戠幇"}, {icon:"",to:"",title:""}, - // {icon:"friends-o",to:"/shopIndex",title:"鍟嗗煄"}, - {icon:"friends-o",to:"",title:"鍟嗗煄"}, + {icon:"friends-o",to:"/shopIndex",title:"鍟嗗煄"}, + // {icon:"friends-o",to:"",title:"鍟嗗煄"}, {icon:"setting-o",to:"/my",title:"鎴戠殑"}, ]) const onChange=(index:number)=>{ @@ -44,8 +44,8 @@ const onChange=(index:number)=>{ {icon:"wap-home-o",to:"/",title:"涓婚〉"}, {icon:"location-o",to:"",title:"鍙戠幇"}, {icon:"",to:"",title:""}, - // {icon:"friends-o",to:"/shopIndex",title:"鍟嗗煄"}, - {icon:"friends-o",to:"",title:"鍟嗗煄"}, + {icon:"friends-o",to:"/shopIndex",title:"鍟嗗煄"}, + // {icon:"friends-o",to:"",title:"鍟嗗煄"}, {icon:"setting-o",to:"/my",title:"鎴戠殑"}, ]; tabbar.value[index].icon=tabbar.value[index].icon.replace("-o","") diff --git a/Yi.Vue3.x.Vant/src/utils/myaxios.ts b/Yi.Vue3.x.Vant/src/utils/myaxios.ts index fbcd51fd..b25bde49 100644 --- a/Yi.Vue3.x.Vant/src/utils/myaxios.ts +++ b/Yi.Vue3.x.Vant/src/utils/myaxios.ts @@ -42,7 +42,15 @@ myaxios.interceptors.request.use(function(config:any) { myaxios.interceptors.response.use(async function(response) { //鎴愬姛 const resp = response.data - + if(resp.code==401) + { + Notify({ type: 'warning', message: '鐧诲綍杩囨湡' }); + //鐧诲嚭 + useUserStore().logOut().then(() => { + location.href = '/'; + }) + isRelogin.show = false; + } // store.dispatch("closeLoad"); return resp; }, async function(error) {