Przeglądaj źródła

菜单按钮bug调整

zhengbingbing 5 lat temu
rodzic
commit
610a4fa69d

+ 6 - 2
代码/TVShoppingCallCenter_ZLJ/Controllers/System/ModuleButtonInfoController.cs

@@ -167,8 +167,10 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.System
167 167
         [HttpPost("updatemodule")]
168 168
         public async Task<IActionResult> UpdateModule(ModuleInfoButtonDto input)
169 169
         {
170
-            if (input.moduleid > 0)
170
+            if(input.id<=0)
171 171
                 return Error("参数错误");
172
+            if (input.moduleid <= 0)
173
+                return Error("菜单参数错误");
172 174
             if (string.IsNullOrEmpty(input.name))
173 175
                 return Error("请输入按钮名称");
174 176
             if (string.IsNullOrEmpty(input.code))
@@ -243,8 +245,10 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.System
243 245
         [HttpPost("editmodule")]
244 246
         public async Task<IActionResult> EditModuleAsync(ModuleInfoButtonDto input)
245 247
         {
246
-            if (input.moduleid > 0)
248
+            if (input.id <= 0)
247 249
                 return Error("参数错误");
250
+            if (input.moduleid <= 0)
251
+                return Error("菜单参数错误");
248 252
             if (string.IsNullOrEmpty(input.name))
249 253
                 return Error("请输入按钮名称");
250 254
             if (string.IsNullOrEmpty(input.code))