From 52267147e624f3a0daef4870ba72f023ef9162a9 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期六, 07 十月 2023 12:46:29 +0800
Subject: [PATCH] 修改中国政府采购网爬虫规则
---
zhengcaioa/zhengcaioa/Controllers/admin/SimController.cs | 40 +++++++++++++++++++++++++++++++---------
1 files changed, 31 insertions(+), 9 deletions(-)
diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/SimController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/SimController.cs
index adfd74c..fd3b723 100644
--- a/zhengcaioa/zhengcaioa/Controllers/admin/SimController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/admin/SimController.cs
@@ -21,13 +21,16 @@
private readonly ILiaotianService _liaotianService;
private readonly IUserService _userService;
private readonly ISimService _simService;
+ private readonly IPltPageService _pltPageService;
- public SimController(ILogger<SimController> logger, IUserService userService, ILiaotianService liaotianService,ISimService simService)
+ public SimController(ILogger<SimController> logger, IUserService userService, ILiaotianService liaotianService,ISimService simService
+ , IPltPageService pltPageService)
{
_logger = logger;
_liaotianService = liaotianService;
_userService = userService;
_simService = simService;
+ _pltPageService = pltPageService;
}
/// <summary>
@@ -36,6 +39,8 @@
/// <returns></returns>
public IActionResult Index()
{
+ var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+ ViewData["curentuser"] = curentuser;
List<ActionEntity> actionlist = new List<ActionEntity>();
ActionEntity actionEntity = new ActionEntity();
actionEntity.OpenType = 0;
@@ -45,14 +50,25 @@
actionEntity.ActionName = "鏌ヨ";
actionlist.Add(actionEntity);
- ActionEntity actionEntity1 = new ActionEntity();
- actionEntity1.OpenType = 0;
- actionEntity1.ActionUrl = "";
- actionEntity1.ActionFun = "UnBind";
- actionEntity1.PageIco = "fa fa-remove";
- actionEntity1.ActionName = "鎵归噺瑙i櫎缁戝畾";
- actionlist.Add(actionEntity1);
-
+ //ActionEntity actionEntity1 = new ActionEntity();
+ //actionEntity1.OpenType = 0;
+ //actionEntity1.ActionUrl = "";
+ //actionEntity1.ActionFun = "UnBind";
+ //actionEntity1.PageIco = "fa fa-remove";
+ //actionEntity1.ActionName = "鎵归噺瑙i櫎缁戝畾";
+ //actionlist.Add(actionEntity1);
+ var pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/Sim/Index/");
+ var pageEntities1 = pageEntities.Where(x => x.PageMethod == "01").ToList();
+ foreach (var pageEntity in pageEntities1)
+ {
+ ActionEntity actionEntity1 = new ActionEntity();
+ actionEntity1.OpenType = pageEntity.OpenType;
+ actionEntity1.ActionUrl = "";
+ actionEntity1.ActionFun = pageEntity.PageShortcut;
+ actionEntity1.PageIco = pageEntity.PageIco;
+ actionEntity1.ActionName = pageEntity.PageName;
+ actionlist.Add(actionEntity1);
+ }
ViewData["ActionInfo"] = actionlist;
return View();
}
@@ -74,6 +90,12 @@
/// <returns></returns>
public IActionResult Edit(string id)
{
+ var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+ ViewData["curentuser"] = curentuser;
+ var pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/Sim/Index/");
+ var pageEntities2 = pageEntities.Where(x => x.PageMethod == "02").ToList();
+ ViewData["ActionInfo2"] = pageEntities2;
+
ViewBag.CardPro = _liaotianService.GetSYScode("t_sim_bind", "cardpro");
ViewData["users"] = _userService.GetList();
SimBindView dto = new SimBindView();
--
Gitblit v1.9.1