lcl il y a 8 mois
Parent
commit
8e263b0d5d

BIN
.DS_Store


+ 1 - 0
Controllers/AppBottomNavsController.cs

@@ -94,6 +94,7 @@ namespace Controllers
         [Route("/v1/api/AppBottomNavs/update")]
         public IActionResult Update([FromBody] AppBottomNavsUpdateDto parm)
         {
+            Function.WriteLog(Newtonsoft.Json.JsonConvert.SerializeObject(parm), "app底部导航修改");
             var modal = parm.Adapt<AppBottomNavs>().ToUpdate(HttpContext);
             var response = _AppBottomNavsService.Update(modal, true);
             return SUCCESS(response);

+ 5 - 1
Controllers/Client/AppController.cs

@@ -49,6 +49,8 @@ namespace Controllers
         public IActionResult AppBottomNavs([FromQuery] AppAppBottomNavsDto parm)
         {
             var response = _AppBottomNavsService.AppBottomNavs(parm);
+            response.Extra = new Dictionary<string, object>();
+            response.Extra.Add("greyStyle", "");
             return SUCCESS(response);
         }
 
@@ -88,9 +90,11 @@ namespace Controllers
         {
             OssConfigs ossConfigs = new();
             AppSettings.Bind("OssConfigs", ossConfigs);
+            string modulePath = parm.modulePath + ".html";
             var response = _PageUpdateInfoService.Queryable()
-                .First(x => x.moduleVersion == parm.moduleVersion)
+                .First(x => x.modulePath == modulePath)
                 .Adapt<AppPageInfoVo>() ?? new AppPageInfoVo();
+            response.dataId = Function.MD5_16(response.id.ToString() + "123890");
             if (parm.moduleVersion < response.moduleVersion)
             {
                 string PagePath = "template/app/" + parm.kind + "/" + response.modulePath;

+ 6 - 6
Controllers/PageUpdateInfoController.cs

@@ -158,13 +158,13 @@ namespace Controllers
         /// </summary>
         /// <param name="parm">请求参数</param>
         /// <returns>生成APP配置文件</returns>
-        [HttpPut]
-        [Route("/Api/SystemSet/makeAppInitData")]
-        public string makeAppInitData([FromBody] MakeAppInitDataDto parm)
+        [HttpGet]
+        [Route("/noauth/SystemSet/makeAppInitData")]
+        public string makeAppInitData([FromQuery] MakeAppInitDataDto parm)
         {
-            string AppInfoList = _AppBottomNavsService.makeAppInitData(parm.Kind);
-            string FileInfoList = _FileUpdateInfoService.makeAppInitData(parm.Kind);
-            string PageInfoList = _PageUpdateInfoService.makeAppInitData(parm.Kind);
+            string AppInfoList = _AppBottomNavsService.makeAppInitData(parm.kind);
+            string FileInfoList = _FileUpdateInfoService.makeAppInitData(parm.kind);
+            string PageInfoList = _PageUpdateInfoService.makeAppInitData(parm.kind);
             return AppInfoList + "#cut#" + FileInfoList + "#cut#" + PageInfoList;
         }
 

+ 1 - 1
Model/Dto/PageUpdateInfoListDto.cs

@@ -25,7 +25,7 @@ namespace Dto
         /// <summary>
         /// 分类
         /// </summary>
-        public string? Kind { get; set; }
+        public string? kind { get; set; }
 
 
 

+ 30 - 0
Model/Vo/AppBottomNavsQueryVo.cs

@@ -63,6 +63,36 @@ namespace Vo
         public string style { get; set; }
 
 
+        /// <summary>
+        /// 是否显示标题
+        /// </summary>
+        public bool showTitle { get; set; }
+
+
+        /// <summary>
+        /// pag文件路径
+        /// </summary>
+        public string pagLocalPath { get; set; }
+
+
+        /// <summary>
+        /// pag默认图标
+        /// </summary>
+        public string pagDefaultIcon { get; set; }
+
+
+        /// <summary>
+        /// 图标尺寸
+        /// </summary>
+        public int iconSize { get; set; }
+
+
+        /// <summary>
+        /// 状态栏底色
+        /// </summary>
+        public string statusBarColor { get; set; }
+
+
 
     }
 }

+ 6 - 0
Model/Vo/Client/AppPageInfoVo.cs

@@ -138,5 +138,11 @@ namespace Vo
         /// </summary>
         public string moduleContent { get; set; }
 
+
+        /// <summary>
+        /// DataID页面唯一标识
+        /// </summary>
+        public string dataId { get; set; }
+
     }
 }

+ 3 - 0
Program.cs

@@ -25,6 +25,7 @@ builder.Services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
 // builder.Services.AddIPRate(builder.Configuration);
 builder.Services.AddSession();
 builder.Services.AddHttpContextAccessor();
+builder.Services.AddCors(option => option.AddPolicy("cors", policy => policy.AllowAnyHeader().AllowAnyMethod().AllowCredentials().SetIsOriginAllowed(_ => true)));
 builder.Services.Configure<KestrelServerOptions>(x => x.AllowSynchronousIO = true).Configure<IISServerOptions>(x => x.AllowSynchronousIO = true);
 
 //绑定整个对象到Model上
@@ -93,6 +94,8 @@ if (app.Environment.IsDevelopment())
 {
 }
 
+app.UseCors();
+
 app.UseHttpsRedirection();
 
 app.UseAuthorization();

+ 1 - 1
Services/Client/AppBottomNavsService.cs

@@ -28,7 +28,7 @@ namespace Services.Client
             predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.kind), m => m.kind.Contains(parm.kind));
             var response = Queryable()
                 .Where(predicate.ToExpression())
-                .OrderByDescending(m => m.id)
+                .OrderBy(m => m.id)
                 .ToPage<AppBottomNavs, AppAppBottomNavsVo>(new PagerInfo());
             return response;
         }