zoukankan      html  css  js  c++  java
  • 升级

    1. 类库迁移

      直接拷贝到netcore 类库下,修改命名空间即可;

    2. 迁移包(不同项目需要迁移的包不一下)

      using System.Web.Script.Serialization;  ---》using Nancy.Json;

     3. Action 跳转

      View 写法: 

     @await Component.InvokeAsync("IndexMapSpot", new { PageType = "show_page" })
     // @*@{Html.Action("IndexMapSpot", "Matrix", new { PageType = "show_page" });}*@
    

      定义实现IndexMapSpotViewComponent

    namespace Techub.QHNY.Web.Components
    {
        public class IndexMapSpotViewComponent : ViewComponent
        {
            /// <summary>
            /// 
            /// </summary>
            /// <param name="data"></param>
            /// <returns></returns>
            public IViewComponentResult Invoke(string PageType = "", string from = "0")
            {
                ViewBag.page = PageType;
                ViewBag.from = from;
                return View("~/Views/Matrix/IndexMapSpot.cshtml");
            }
        }
    }
    

      

    4. JsonResult 数据

      

     

     5. @Scripts @Styles

      改成具体的文件链接,参考项目默认的layount

      <link href="~/Content/bundles.min.css" rel="stylesheet" />
    
      <script src="~/Scripts/bundles.min.js"></script>
    

    6. 静态文件脚本

      

  • 相关阅读:
    assign、weak
    iOS 使用 github
    iOS 知识点
    thinkphp 具体常量,在view里面使用
    一个php+jquery+json+ajax实例
    php pdo操作
    nginx缓存
    php模版静态化技术
    php模版静态化原理
    thinkphp实现多数据库操作
  • 原文地址:https://www.cnblogs.com/ctfyfd/p/13742922.html
Copyright © 2011-2022 走看看