diff --git a/src/JR.Cms.App/Routes.cs b/src/JR.Cms.App/Routes.cs index e82d015df..e7699c2ee 100755 --- a/src/JR.Cms.App/Routes.cs +++ b/src/JR.Cms.App/Routes.cs @@ -73,7 +73,7 @@ private static void RegisterInstalledCmsRoutes(IEndpointRouteBuilder endpoints, dict.Add(UrlRulePageKeys.Tag, urlPrefix + "tag?t={0}"); dict.Add(UrlRulePageKeys.TagPager, urlPrefix + "tag?t={0}&p={1}"); - dict.Add(UrlRulePageKeys.Category, urlPrefix + "{0}/"); + dict.Add(UrlRulePageKeys.Category, urlPrefix + "{0}"); dict.Add(UrlRulePageKeys.CategoryPager, urlPrefix + "{0}/list_{1}.html"); dict.Add(UrlRulePageKeys.Archive,urlPrefix + "{0}.html"); diff --git a/src/JR.Cms.App/Startup.cs b/src/JR.Cms.App/Startup.cs index ad44d067e..a7cb7b87e 100755 --- a/src/JR.Cms.App/Startup.cs +++ b/src/JR.Cms.App/Startup.cs @@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Diagnostics; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.ResponseCompression; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Server.Kestrel.Core; using Microsoft.Extensions.DependencyInjection; @@ -29,10 +30,10 @@ public void ConfigureServices(IServiceCollection services) services.AddDistributedMemoryCache(); services.AddSession(options => { - options.Cookie.Name = "_cms_session"; + options.Cookie.Name = "j_session"; options.IdleTimeout = TimeSpan.FromSeconds(1200); //options.Cookie.Path = "/" + Settings.SYS_ADMIN_TAG; - options.Cookie.HttpOnly = true; + options.Cookie.HttpOnly = false; options.Cookie.IsEssential = true; }); // 启动异步IO @@ -40,7 +41,14 @@ public void ConfigureServices(IServiceCollection services) services.Configure(options => options.AllowSynchronousIO = true); // 使用MVC并添加Session支持 services.AddControllers().AddSessionStateTempDataProvider(); - services.AddResponseCompression(); + // GZIP + services.Configure(options => + options.Level = System.IO.Compression.CompressionLevel.Fastest); + services.AddResponseCompression(options => + { + options.EnableForHttps = true; + options.Providers.Add(); + }); HttpContextNetCoreExtension.AddHttpContextAccessor(services); } diff --git a/src/JR.Cms.App/public/assets/base.css b/src/JR.Cms.App/public/assets/base.css index 8b96b4f34..26c2c6ce1 100755 --- a/src/JR.Cms.App/public/assets/base.css +++ b/src/JR.Cms.App/public/assets/base.css @@ -1,4 +1,4 @@ /* 此文件由系统自动生成,所有样式表请引用此文件!*/ -*,::after,::before{box-sizing:border-box}a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,font,form,h1,h2,h3,h4,h5,h6,html,i,iframe,img,ins,kbd,label,legend, li,object,ol,p,pre,q,s,samp,small,span,strike,strong,table, tbody,td,tfoot,th,thead,tr,tt,ul,var{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:normal;font-family:inherit;text-decoration:none;-webkit-text-size-adjust:none;-ms-interpolation-mode:bicubic;}strong{font-weight:600}html{font-size:62.5%;}@media only screen and (max-width: 958px) {@media only screen and (min-width:361px){html{font-size:70.31%!important}}@media only screen and (min-width:376px){html{font-size:73.24%!important;}}@media only screen and (min-width: 481px) {html {font-size: 94% !important;}}@media only screen and (min-width: 561px) {html {font-size: 109% !important;}}@media only screen and (min-width: 641px) {html {font-size: 125% !important; }}}body,html{height:100%;}:focus{outline:0}ol,ul{list-style:none}textarea{resize:none}table{border-collapse:collapse;border-spacing:0;empty-cells:show}template{display:none;visibility:hidden;}caption,td,th{font-weight:400}h1,h2,h3,h4,h5,h6{font-weight:500;line-height:1.1em;}blockquote:after,blockquote:before,q:after,q:before{content:""}blockquote,q{quotes:"" ""}pre{white-space: pre-wrap;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type="password"]{font-family:inherit}input[type=search]::-webkit-search-decoration{-webkit-appearance:none}img{max-width:100%;border:0}.container,.container-fluid{padding-right:15px;padding-left:15px;margin:0 auto}.row{display:flex;flex-wrap:wrap;margin-left:-15px;margin-right:-15px;}.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12,.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {padding-left: 15px;padding-right: 15px; position: relative;width:100%;min-height: 1px;}.col-1{flex:0 0 8.333333%;max-width:8.333333%}.col-2{flex:0 0 16.666666%;max-width:16.666666%}.col-3{flex:0 0 25%;max-width:25%}.col-4{flex:0 0 33.333333%;max-width:33.333333%}.col-5{flex:0 0 41.666666%;max-width:41.666666%}.col-6{flex:0 0 50%;max-width:50%}.col-7{flex:0 0 58.333333%;max-width:58.333333%}.col-8{flex:0 0 66.666666%;max-width:66.666666%}.col-9{flex:0 0 75%;max-width:75%}.col-10{flex:0 0 83.333333%;max-width:83.333333%}.col-11{flex:0 0 91.666666%;max-width:91.666666%}.col-12{flex:0 0 100%;max-width:100%}.offset-1{margin-left:8.333333%}.offset-2{margin-left:16.666666%}.offset-3{margin-left:25%}.offset-4{margin-left:33.333333%}.offset-5{margin-left:41.666666%}.offset-6{margin-left:50%}.offset-7{margin-left:58.333333%}.offset-8{margin-left:66.666666%}.offset-9{margin-left:75%}.offset-10{margin-left:83.333333%}.offset-11{margin-left:91.666666%}@media (min-width:576px){.container{width:540px}.hidden-sm{display: none !important}.col-sm-1{flex:0 0 8.333333%;max-width:8.333333%}.col-sm-2{flex:0 0 16.666666%;max-width:16.666666%}.col-sm-3{flex:0 0 25%;max-width:25%}.col-sm-4{flex:0 0 33.333333%;max-width:33.333333%}.col-sm-5{flex:0 0 41.666666%;max-width:41.666666%}.col-sm-6{flex:0 0 50%;max-width:50%}.col-sm-7{flex:0 0 58.333333%;max-width:58.333333%}.col-sm-8{flex:0 0 66.666666%;max-width:66.666666%}.col-sm-9{flex:0 0 75%;max-width:75%}.col-sm-10{flex:0 0 83.333333%;max-width:83.333333%}.col-sm-11{flex:0 0 91.666666%;max-width:91.666666%}.col-sm-12{flex:0 0 100%;max-width:100%}.offset-sm-1{margin-left:8.333333%}.offset-sm-2{margin-left:16.666666%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.333333%}.offset-sm-5{margin-left:41.666666%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.333333%}.offset-sm-8{margin-left:66.666666%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.333333%}.offset-sm-11{margin-left:91.666666%}}@media (min-width: 768px){.container{width:720px}.hidden-md{display: none !important}.col-md-1{flex:0 0 8.333333%;max-width:8.333333%}.col-md-2{flex:0 0 16.666666%;max-width:16.666666%}.col-md-3{flex:0 0 25%;max-width:25%}.col-md-4{flex:0 0 33.333333%;max-width:33.333333%}.col-md-5{flex:0 0 41.666666%;max-width:41.666666%}.col-md-6{flex:0 0 50%;max-width:50%}.col-md-7{flex:0 0 58.333333%;max-width:58.333333%}.col-md-8{flex:0 0 66.666666%;max-width:66.666666%}.col-md-9{flex:0 0 75%;max-width:75%}.col-md-10{flex:0 0 83.333333%;max-width:83.333333%}.col-md-11{flex:0 0 91.666666%;max-width:91.666666%}.col-md-12{flex:0 0 100%;max-width:100%}.offset-md-1{margin-left:8.333333%}.offset-md-2{margin-left:16.666666%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.333333%}.offset-md-5{margin-left:41.666666%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.333333%}.offset-md-8{margin-left:66.666666%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.333333%}.offset-md-11{margin-left:91.666666%}}@media (min-width:992px){.container{width:960px}.hidden-lg{display: none !important}.col-lg-1{flex:0 0 8.333333%;max-width:8.333333%}.col-lg-2{flex:0 0 16.666666%;max-width:16.666666%}.col-lg-3{flex:0 0 25%;max-width:25%}.col-lg-4{flex:0 0 33.333333%;max-width:33.333333%}.col-lg-5{flex:0 0 41.666666%;max-width:41.666666%}.col-lg-6{flex:0 0 50%;max-width:50%}.col-lg-7{flex:0 0 58.333333%;max-width:58.333333%}.col-lg-8{flex:0 0 66.666666%;max-width:66.666666%}.col-lg-9{flex:0 0 75%;max-width:75%}.col-lg-10{flex:0 0 83.333333%;max-width:83.333333%}.col-lg-11{flex:0 0 91.666666%;max-width:91.666666%}.col-lg-12{flex:0 0 100%;max-width:100%}.offset-lg-1{margin-left:8.333333%}.offset-lg-2{margin-left:16.666666%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.333333%}.offset-lg-5{margin-left:41.666666%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.333333%}.offset-lg-8{margin-left:66.666666%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.333333%}.offset-lg-11{margin-left:91.666666%}}@media (min-width:1200px){.container{width:1140px}.hidden-xl{display: none !important}.col-xl-1{flex:0 0 8.333333%;max-width:8.333333%}.col-xl-2{flex:0 0 16.666666%;max-width:16.666666%}.col-xl-3{flex:0 0 25%;max-width:25%}.col-xl-4{flex:0 0 33.333333%;max-width:33.333333%}.col-xl-5{flex:0 0 41.666666%;max-width:41.666666%}.col-xl-6{flex:0 0 50%;max-width:50%}.col-xl-7{flex:0 0 58.333333%;max-width:58.333333%}.col-xl-8{flex:0 0 66.666666%;max-width:66.666666%}.col-xl-9{flex:0 0 75%;max-width:75%}.col-xl-10{flex:0 0 83.333333%;max-width:83.333333%}.col-xl-11{flex:0 0 91.666666%;max-width:91.666666%}.col-xl-12{flex:0 0 100%;max-width:100%}.offset-xl-1{margin-left:8.333333%}.offset-xl-2{margin-left:16.666666%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.333333%}.offset-xl-5{margin-left:41.666666%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.333333%}.offset-xl-8{margin-left:66.666666%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.333333%}.offset-xl-11{margin-left:91.666666%}}@media (max-width:575px){.hidden-xs{display:none !important;}}.pull{float:left;}.push{float:right;}.hidden{display:none !important;}.container:after,.container-fluid:after,.clearfix:after{content:".";display:block;visibility:hidden;height:0;line-height:0;clear:both;}.clearfix{zoom:1;}.uppercase{text-transform:uppercase;}.g-arrow{height:0;width:0;margin:auto;display:inline-block;border:solid 5px transparent;}.g-arrow-r{border-right:none;border-left-color:#FFF;margin-left:5px;}.g-arrow-l{border-left:none;border-right-color:#FFF;margin-right:5px;}.g-arrow-t{border-top:none;border-bottom-color:#FFF;margin-top:5px;}.g-arrow-b{border-bottom:none;border-top-color:#FFF;margin-bottom:5px;}.g-arrow-slot{position: relative;}.g-arrow-slot span{position: absolute;border-style: solid dashed dashed;top:0;border-width: 10px;}.g-arrow-slot span:first-child{border-color: #666 transparent transparent;top:1px;}.g-arrow-slot span:last-child{border-color: #FFF transparent transparent;border-style: solid dashed dashed;}.g-arrow-slot-r span:first-child{margin-left:1px;top:1px;border-style: dashed dashed dashed solid;border-color: transparent transparent transparent #666;}.g-arrow-slot-r span:last-child{top:1px;border-style: dashed dashed dashed solid;border-color:transparent transparent transparent #fff;}.g-arrow-slot-l span:first-child{top:1px;border-style: dashed solid dashed dashed;border-color: transparent #666 transparent transparent;}.g-arrow-slot-l span:last-child{margin-left:1px;top:1px;border-style: dashed solid dashed dashed;border-color: transparent #fff transparent transparent;}.g-arrow-hr{border-bottom:solid 1px #999;height:1px;position:relative;margin-bottom:15px;}.g-arrow-hr .g-arrow-slot{position: absolute;margin-left:-5px;}.g-arrow-hr .g-arrow-slot span{border-width:7px;}.g-single-row{text-overflow: ellipsis;white-space: nowrap;overflow:hidden;}/** 文字居中 */.g-text-center{text-align:center;}.g-text-right{text-align:right;}.g-align-center{align-content:center !important;align-items: center !important;}/** 内容右对齐 */.g-align-right{display:flex;justify-content: flex-end;}.g-flex{display:flex;}.g-flex-boxes>*{display:flex;justify-content:center;align-items:center}/** 背景覆盖 */.g-bg-cover{background-size:cover !important;}@media(max-width:768px){.wrapper{padding-left:0;padding-right:0}}.g-circle-button,.g-circle-fill-button{border:solid 2px #2699FB;line-height:30px;display:inline-block;font-size:14px;font-weight:bold;padding:0 15px;border-radius:30px;user-select:none;}.g-circle-button:hover,.g-circle-button-on,.g-circle-button-on:hover{background:#FFF;color:#2699FB !important;}.g-circle-button-small{line-height:24px;font-size:12px;}.g-circle-fill-button{background:#2699FB;color:#FFF !important;}.g-circle-fill-button:hover{background:#FFF;color:#2699FBf8 !important;transition:all .3s}.g-circle-button:hover,.g-circle-fill-button:hover{text-decoration:none !important;}.g-pop{position:relative;background:#FFE;border-radius:10px;color:#000;padding:10px;}.g-pop-left,.g-pop-right,.g-pop-top,.g-pop-bottom{position:absolute;margin:0 auto;width: 0;height: 0;border:solid 10px transparent;}.g-pop .g-pop-left,.g-pop .g-pop-right{top:calc(50% - 10px);}.g-pop .g-pop-top,.g-pop .g-pop-bottom{left:0;right:0;}.g-pop .g-pop-top{top:-10px;border-bottom-color:#FFE;border-top:0;}.g-pop .g-pop-bottom{bottom:-10px;border-top-color:#FFE;border-bottom:0;}.g-pop .g-pop-left{left:-10px;border-right-color: #FFE;border-left:0;}.g-pop .g-pop-right{right:-10px;border-left-color:#FFE;border-right:0;}.g-pop-dark{background:#333;color:#FFF;}.g-pop-dark .g-pop-left{border-right-color:#333;}.g-pop-dark .g-pop-right{border-left-color:#333;}.g-pop-dark .g-pop-top{border-bottom-color:#333;}.g-pop-dark .g-pop-bottom{border-top-color:#333;}.mod-player{position:relative;}.mod-player-mark,.mod-player-mask{position: absolute;top:0;right:0;}.mod-player-mask{left:0;bottom:30px;background:#FFF;filter:alpha(opacity=0);opacity:0;z-index:1;}.mod-player-mark{color:#FFF;font-size:10px;right:1em;height:1em;z-index:2;}.mod-player .vjs-poster{z-index:3;}.mod-player .vjs-big-play-button{z-index:4;left:0 !important;right:0 !important; top:0 !important;bottom:0 !important;margin:auto;}.mod-play-box{position:relative;}.mod-play-box .mask,.mod-play-box .play{position: absolute;left:0;right:0;top:0;bottom:0;margin:auto;}.mod-play-box .mask{background:#000;opacity:.05;}.mod-play-box .play{width:60px; height:60px;border:solid 5px #EEE;border-radius:99em;z-index:3;text-align:center}.mod-play-box .play i{width:0;height:0;display:inline-block;border-top:solid 12px transparent;border-bottom:solid 12px transparent; border-left:solid 16px #EEE;margin:12px 0 0 4px}.g-suited-img{padding-bottom:65%;position:relative;overflow:hidden;}.g-suited-img>img,.g-suited-img .mask{position: absolute;left:0;top:0;bottom:0;width:100%;margin:auto;}.g-suited-img .mask{z-index:1;}.g-article-thumb>img{}.g-big-tit{font-size:1.6em;margin:30px 0;font-weight:500;text-align:center;letter-spacing:1px;}.g-big-tit .sub{font-size:0.65em;color:#333;margin:15px 0;color:#666;line-height:1.5em;}.g-text-box{border:solid 1px #C0C0C0;line-height:24px;padding:0 5px;}.g-text-box:focus{outline:solid 2px #2699FB;outline-offset:-2px;box-shadow:0 0 3px rgba(0,0,0,0.3);background:#FFE;}.g-btn{color:#FFF;background:#06C;text-align:center;display:block;padding:0 1.5em;border-radius:3px;cursor:default;line-height:30px;opacity:0.85;filter:alpha(opacity=85);user-select:none;-moz-user-select:none;-webkit-user-select:none;border:0; }.g-btn:hover{opacity:1;filter:alpha(opacity=100)}.g-btn a:link,.g-btn a:visited,.g-btn button,.g-btn input{display:block;color:#FFF;}.g-btn a:hover{color:#FFF;text-decoration:none;}.g-btn-inline{display:inline-block;padding:0 12px;}.g-btn-a{display:inline-block;line-height:2em;padding:0 25px;color:#FFF;background:#2D83DA;margin-right: 5px;}.g-btn-a:hover{color:#FFF;background:#06C;}.g-btn-div{cursor:default;display:inline-block;line-height:2em;padding:0 25px;color:#FFF;background:#2D83DA;margin-right: 5px;margin-bottom:0;}.g-btn-div:hover{color:#FFF;background:#06C}.g-btn-div a{display:block;}.g-btn-div:hover,.g-btn-a:hover,.g-btn a:hover{text-decoration:none;}.g-item-dot{width:3px;height:3px;margin:10px 5px 0 0;background:#000;display:inline-block;float:left;}/*.mod-form>(.field>label.label{label$}+(.col>input.text.g-text-box+br+i.desc{请填写内容}))*3*/.g-form-i{border:solid 1px #DADADA;padding:0px 5px;font-size:1em;overflow:hidden;line-height:30px;height:30px;border-radius:5px;}.mod-form *{vertical-align:middle;}.mod-form .group{margin-bottom:2em;border:solid 0px #ddd;background:#FFF;}.mod-form .title{line-height:2em;padding:1em;font-size:1.2em;color:#888;}.mod-form .field{padding:0 0 15px 0;}.mod-form .field div,.mod-form .field p{display:inline-block;}.mod-form .label{margin-right: 15px;}.g-modal .mask,.g-modal .modal{position:fixed;top:0;left:0;right:0;bottom:0;margin:auto;z-index:99999;}.g-modal .mask{background:#000;z-index:99998;opacity:0.5;filter:alpha(opacity=50)}.g-modal .modal{background:#FFF;padding:0;box-shadow:0 0 30px rgba(0,0,0,0.3);}.g-modal .close{position:absolute;right:0;top:0;width:45px;padding:10px 12.5px;}.g-modal .close i{width:20px;}.g-modal .title{text-align:center;line-height:45px;font-size:16px;letter-spacing:.5px;font-weight:400;border-bottom:solid 1px #EAEAEA;color:#AAA}.g-modal .content{padding:15px;}.g-modal .bottom{display:none;}.g-modal .ui-alert-message{padding:1.5em 1.5em 0 1.5em;font-size:1em;min-width:200px;color:#666;color:#F00;}.g-modal .ui-alert-control{text-align:right;padding:0 1em 1em 0;border-radius: 0 0 10px 10px;}.g-modal .ui-alert-control input{display: inline-block;vertical-align:middle;padding:5px 15px;color:#666;background:none;}@media(max-width:600px){.g-modal .title{display:none;}}.g-tab-card{position:relative;}.g-tab-card ul{list-style:none;padding:0;margin:0;}.g-tab-card .tab{float:left;position:relative;text-align:center;}.g-tab-card .frame{clear: both;display:none;}.g-tab-card .active{display:inherit;}.g-tab-card .frame:after{content:".";display:block;visibility:hidden;height:0;clear:both;}.g-tab-card .mask{position:absolute;left:1px;top:0;background:#f5f5f5;opacity:0.7;filter:alpha(opacity=70);z-index:898;}.g-btn-upload{position:relative;background:#F0F0F0;border:solid 1px #CCC;display:inline-block;line-height:25px;}.g-btn-upload:hover{border-color:#888;}.g-btn-upload button{border:none;}.g-table,.g-table table{width:100%;border-collapse: collapse;line-height:30px;}.g-table td{padding-left:12px;margin-right:-12px;}.g-table td div{padding:5px 0;}.g-table thead{background:#EBEBEB;line-height:350%;border:solid 1px #EBEBEB;}.g-table thead td{font-weight: bold;color:#666;}.g-table tbody{border:solid 1px #EBEBEB;border-top-width:0;}.g-table tbody td{border-bottom:solid 1px #EBEBEB;}.g-table .td-op{color:#CCC;}.g-table .td-op a{color:#06C;}.g-table .td-op a:hover{color:#000;}.g-ani-hover-border{position:relative;}.g-ani-hover-border:after{content:" ";border-bottom:solid 2px transparent;position:absolute;bottom:-2px;left:0;right:0;margin:auto;width:0;}.g-ani-hover-border:hover:after{border-bottom:solid 2px #000;transition:all .3s;width:100%;} +*,::after,::before{box-sizing:border-box}a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,font,form,h1,h2,h3,h4,h5,h6,html,i,iframe,img,ins,kbd,label,legend, li,object,ol,p,pre,q,s,samp,small,span,strike,strong,table, tbody,td,tfoot,th,thead,tr,tt,ul,var{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:normal;font-family:inherit;text-decoration:none;-webkit-text-size-adjust:none;-ms-interpolation-mode:bicubic;}strong{font-weight:600}html{font-size:62.5%;}@media only screen and (max-width: 958px) {@media only screen and (min-width:361px){html{font-size:70.31%!important}}@media only screen and (min-width:376px){html{font-size:73.24%!important;}}@media only screen and (min-width: 481px) {html {font-size: 94% !important;}}@media only screen and (min-width: 561px) {html {font-size: 109% !important;}}@media only screen and (min-width: 641px) {html {font-size: 125% !important; }}}body,html{height:100%;}:focus{outline:0}ol,ul{list-style:none}textarea{resize:none}table{border-collapse:collapse;border-spacing:0;empty-cells:show}template{display:none;visibility:hidden;}caption,td,th{font-weight:400}h1,h2,h3,h4,h5,h6{font-weight:500;line-height:1.1em;}blockquote:after,blockquote:before,q:after,q:before{content:""}blockquote,q{quotes:"" ""}pre{white-space: pre-wrap;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type="password"]{font-family:inherit}input[type=search]::-webkit-search-decoration{-webkit-appearance:none}img{max-width:100%;border:0}.container,.container-fluid{padding-right:15px;padding-left:15px;margin:0 auto}.row{display:flex;flex-wrap:wrap;margin-left:-15px;margin-right:-15px;}.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12,.col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12 {padding-left: 15px;padding-right: 15px; position: relative;width:100%;min-height: 1px;}.col-1{flex:0 0 8.333333%;max-width:8.333333%}.col-2{flex:0 0 16.666666%;max-width:16.666666%}.col-3{flex:0 0 25%;max-width:25%}.col-4{flex:0 0 33.333333%;max-width:33.333333%}.col-5{flex:0 0 41.666666%;max-width:41.666666%}.col-6{flex:0 0 50%;max-width:50%}.col-7{flex:0 0 58.333333%;max-width:58.333333%}.col-8{flex:0 0 66.666666%;max-width:66.666666%}.col-9{flex:0 0 75%;max-width:75%}.col-10{flex:0 0 83.333333%;max-width:83.333333%}.col-11{flex:0 0 91.666666%;max-width:91.666666%}.col-12{flex:0 0 100%;max-width:100%}.offset-1{margin-left:8.333333%}.offset-2{margin-left:16.666666%}.offset-3{margin-left:25%}.offset-4{margin-left:33.333333%}.offset-5{margin-left:41.666666%}.offset-6{margin-left:50%}.offset-7{margin-left:58.333333%}.offset-8{margin-left:66.666666%}.offset-9{margin-left:75%}.offset-10{margin-left:83.333333%}.offset-11{margin-left:91.666666%}@media (min-width:576px){.container{width:540px}.hidden-sm{display: none !important}.col-sm-1{flex:0 0 8.333333%;max-width:8.333333%}.col-sm-2{flex:0 0 16.666666%;max-width:16.666666%}.col-sm-3{flex:0 0 25%;max-width:25%}.col-sm-4{flex:0 0 33.333333%;max-width:33.333333%}.col-sm-5{flex:0 0 41.666666%;max-width:41.666666%}.col-sm-6{flex:0 0 50%;max-width:50%}.col-sm-7{flex:0 0 58.333333%;max-width:58.333333%}.col-sm-8{flex:0 0 66.666666%;max-width:66.666666%}.col-sm-9{flex:0 0 75%;max-width:75%}.col-sm-10{flex:0 0 83.333333%;max-width:83.333333%}.col-sm-11{flex:0 0 91.666666%;max-width:91.666666%}.col-sm-12{flex:0 0 100%;max-width:100%}.offset-sm-1{margin-left:8.333333%}.offset-sm-2{margin-left:16.666666%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.333333%}.offset-sm-5{margin-left:41.666666%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.333333%}.offset-sm-8{margin-left:66.666666%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.333333%}.offset-sm-11{margin-left:91.666666%}}@media (min-width: 768px){.container{width:720px}.hidden-md{display: none !important}.col-md-1{flex:0 0 8.333333%;max-width:8.333333%}.col-md-2{flex:0 0 16.666666%;max-width:16.666666%}.col-md-3{flex:0 0 25%;max-width:25%}.col-md-4{flex:0 0 33.333333%;max-width:33.333333%}.col-md-5{flex:0 0 41.666666%;max-width:41.666666%}.col-md-6{flex:0 0 50%;max-width:50%}.col-md-7{flex:0 0 58.333333%;max-width:58.333333%}.col-md-8{flex:0 0 66.666666%;max-width:66.666666%}.col-md-9{flex:0 0 75%;max-width:75%}.col-md-10{flex:0 0 83.333333%;max-width:83.333333%}.col-md-11{flex:0 0 91.666666%;max-width:91.666666%}.col-md-12{flex:0 0 100%;max-width:100%}.offset-md-1{margin-left:8.333333%}.offset-md-2{margin-left:16.666666%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.333333%}.offset-md-5{margin-left:41.666666%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.333333%}.offset-md-8{margin-left:66.666666%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.333333%}.offset-md-11{margin-left:91.666666%}}@media (min-width:992px){.container{width:960px}.hidden-lg{display: none !important}.col-lg-1{flex:0 0 8.333333%;max-width:8.333333%}.col-lg-2{flex:0 0 16.666666%;max-width:16.666666%}.col-lg-3{flex:0 0 25%;max-width:25%}.col-lg-4{flex:0 0 33.333333%;max-width:33.333333%}.col-lg-5{flex:0 0 41.666666%;max-width:41.666666%}.col-lg-6{flex:0 0 50%;max-width:50%}.col-lg-7{flex:0 0 58.333333%;max-width:58.333333%}.col-lg-8{flex:0 0 66.666666%;max-width:66.666666%}.col-lg-9{flex:0 0 75%;max-width:75%}.col-lg-10{flex:0 0 83.333333%;max-width:83.333333%}.col-lg-11{flex:0 0 91.666666%;max-width:91.666666%}.col-lg-12{flex:0 0 100%;max-width:100%}.offset-lg-1{margin-left:8.333333%}.offset-lg-2{margin-left:16.666666%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.333333%}.offset-lg-5{margin-left:41.666666%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.333333%}.offset-lg-8{margin-left:66.666666%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.333333%}.offset-lg-11{margin-left:91.666666%}}@media (min-width:1200px){.container{width:1140px}.hidden-xl{display: none !important}.col-xl-1{flex:0 0 8.333333%;max-width:8.333333%}.col-xl-2{flex:0 0 16.666666%;max-width:16.666666%}.col-xl-3{flex:0 0 25%;max-width:25%}.col-xl-4{flex:0 0 33.333333%;max-width:33.333333%}.col-xl-5{flex:0 0 41.666666%;max-width:41.666666%}.col-xl-6{flex:0 0 50%;max-width:50%}.col-xl-7{flex:0 0 58.333333%;max-width:58.333333%}.col-xl-8{flex:0 0 66.666666%;max-width:66.666666%}.col-xl-9{flex:0 0 75%;max-width:75%}.col-xl-10{flex:0 0 83.333333%;max-width:83.333333%}.col-xl-11{flex:0 0 91.666666%;max-width:91.666666%}.col-xl-12{flex:0 0 100%;max-width:100%}.offset-xl-1{margin-left:8.333333%}.offset-xl-2{margin-left:16.666666%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.333333%}.offset-xl-5{margin-left:41.666666%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.333333%}.offset-xl-8{margin-left:66.666666%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.333333%}.offset-xl-11{margin-left:91.666666%}}@media (max-width:575px){.hidden-xs{display:none !important;}}.pull{float:left;}.push{float:right;}.hidden{display:none !important;}.container:after,.container-fluid:after,.clearfix:after{content:".";display:block;visibility:hidden;height:0;line-height:0;clear:both;}.clearfix{zoom:1;}.uppercase{text-transform:uppercase;}.g-arrow{height:0;width:0;margin:auto;display:inline-block;border:solid 5px transparent;}.g-arrow-r{border-right:none;border-left-color:#FFF;margin-left:5px;}.g-arrow-l{border-left:none;border-right-color:#FFF;margin-right:5px;}.g-arrow-t{border-top:none;border-bottom-color:#FFF;margin-top:5px;}.g-arrow-b{border-bottom:none;border-top-color:#FFF;margin-bottom:5px;}.g-arrow-slot{position: relative;}.g-arrow-slot span{position: absolute;border-style: solid dashed dashed;top:0;border-width: 10px;}.g-arrow-slot span:first-child{border-color: #666 transparent transparent;top:1px;}.g-arrow-slot span:last-child{border-color: #FFF transparent transparent;border-style: solid dashed dashed;}.g-arrow-slot-r span:first-child{margin-left:1px;top:1px;border-style: dashed dashed dashed solid;border-color: transparent transparent transparent #666;}.g-arrow-slot-r span:last-child{top:1px;border-style: dashed dashed dashed solid;border-color:transparent transparent transparent #fff;}.g-arrow-slot-l span:first-child{top:1px;border-style: dashed solid dashed dashed;border-color: transparent #666 transparent transparent;}.g-arrow-slot-l span:last-child{margin-left:1px;top:1px;border-style: dashed solid dashed dashed;border-color: transparent #fff transparent transparent;}.g-arrow-hr{border-bottom:solid 1px #999;height:1px;position:relative;margin-bottom:15px;}.g-arrow-hr .g-arrow-slot{position: absolute;margin-left:-5px;}.g-arrow-hr .g-arrow-slot span{border-width:7px;}.g-single-row{text-overflow: ellipsis;white-space: nowrap;overflow:hidden;}/** 文字居中 */.g-text-center{text-align:center;}.g-text-right{text-align:right;}.g-align-center{align-content:center !important;align-items: center !important;}/** 内容右对齐 */.g-align-right{display:flex;justify-content: flex-end;}/** 元素垂直居中 */.g-align-middle *{vertical-align: middle}.g-flex{display:flex;}.g-flex-boxes>*{display:flex;justify-content:center;align-items:center}/** 背景覆盖 */.g-bg-cover{background-size:cover !important;}@media(max-width:768px){.wrapper{padding-left:0;padding-right:0}}.g-circle-button,.g-circle-fill-button{border:solid 2px #2699FB;line-height:30px;display:inline-block;font-size:14px;font-weight:bold;padding:0 15px;border-radius:30px;user-select:none;}.g-circle-button:hover,.g-circle-button-on,.g-circle-button-on:hover{background:#FFF;color:#2699FB !important;}.g-circle-button-small{line-height:24px;font-size:12px;}.g-circle-fill-button{background:#2699FB;color:#FFF !important;}.g-circle-fill-button:hover{background:#FFF;color:#2699FBf8 !important;transition:all .3s}.g-circle-button:hover,.g-circle-fill-button:hover{text-decoration:none !important;}.g-pop{position:relative;background:#FFE;border-radius:10px;color:#000;padding:10px;}.g-pop-left,.g-pop-right,.g-pop-top,.g-pop-bottom{position:absolute;margin:0 auto;width: 0;height: 0;border:solid 10px transparent;}.g-pop .g-pop-left,.g-pop .g-pop-right{top:calc(50% - 10px);}.g-pop .g-pop-top,.g-pop .g-pop-bottom{left:0;right:0;}.g-pop .g-pop-top{top:-10px;border-bottom-color:#FFE;border-top:0;}.g-pop .g-pop-bottom{bottom:-10px;border-top-color:#FFE;border-bottom:0;}.g-pop .g-pop-left{left:-10px;border-right-color: #FFE;border-left:0;}.g-pop .g-pop-right{right:-10px;border-left-color:#FFE;border-right:0;}.g-pop-dark{background:#333;color:#FFF;}.g-pop-dark .g-pop-left{border-right-color:#333;}.g-pop-dark .g-pop-right{border-left-color:#333;}.g-pop-dark .g-pop-top{border-bottom-color:#333;}.g-pop-dark .g-pop-bottom{border-top-color:#333;}.mod-player{position:relative;}.mod-player-mark,.mod-player-mask{position: absolute;top:0;right:0;}.mod-player-mask{left:0;bottom:30px;background:#FFF;filter:alpha(opacity=0);opacity:0;z-index:1;}.mod-player-mark{color:#FFF;font-size:10px;right:1em;height:1em;z-index:2;}.mod-player .vjs-poster{z-index:3;}.mod-player .vjs-big-play-button{z-index:4;left:0 !important;right:0 !important; top:0 !important;bottom:0 !important;margin:auto;}.mod-play-box{position:relative;}.mod-play-box .mask,.mod-play-box .play{position: absolute;left:0;right:0;top:0;bottom:0;margin:auto;}.mod-play-box .mask{background:#000;opacity:.05;}.mod-play-box .play{width:60px; height:60px;border:solid 5px #EEE;border-radius:99em;z-index:3;text-align:center}.mod-play-box .play i{width:0;height:0;display:inline-block;border-top:solid 12px transparent;border-bottom:solid 12px transparent; border-left:solid 16px #EEE;margin:12px 0 0 4px}.g-suited-img{padding-bottom:65%;position:relative;overflow:hidden;}.g-suited-img>img,.g-suited-img .mask{position: absolute;left:0;top:0;bottom:0;width:100%;margin:auto;}.g-suited-img .mask{z-index:1;}.g-article-thumb>img{}.g-big-tit{font-size:1.6em;margin:30px 0;font-weight:500;text-align:center;letter-spacing:1px;}.g-big-tit .sub{font-size:0.65em;color:#333;margin:15px 0;color:#666;line-height:1.5em;}.g-text-box{border:solid 1px #C0C0C0;line-height:24px;padding:0 5px;}.g-text-box:focus{outline:solid 2px #2699FB;outline-offset:-2px;box-shadow:0 0 3px rgba(0,0,0,0.3);background:#FFE;}.g-btn{color:#FFF;background:#06C;text-align:center;display:block;padding:0 1.5em;border-radius:3px;cursor:default;line-height:30px;opacity:0.85;filter:alpha(opacity=85);user-select:none;-moz-user-select:none;-webkit-user-select:none;border:0; }.g-btn:hover{opacity:1;filter:alpha(opacity=100)}.g-btn a:link,.g-btn a:visited,.g-btn button,.g-btn input{display:block;color:#FFF;}.g-btn a:hover{color:#FFF;text-decoration:none;}.g-btn-inline{display:inline-block;padding:0 12px;}.g-btn-a{display:inline-block;line-height:2em;padding:0 25px;color:#FFF;background:#2D83DA;margin-right: 5px;}.g-btn-a:hover{color:#FFF;background:#06C;}.g-btn-div{cursor:default;display:inline-block;line-height:2em;padding:0 25px;color:#FFF;background:#2D83DA;margin-right: 5px;margin-bottom:0;}.g-btn-div:hover{color:#FFF;background:#06C}.g-btn-div a{display:block;}.g-btn-div:hover,.g-btn-a:hover,.g-btn a:hover{text-decoration:none;}.g-item-dot{width:3px;height:3px;margin:10px 5px 0 0;background:#000;display:inline-block;float:left;}/*.mod-form>(.field>label.label{label$}+(.col>input.text.g-text-box+br+i.desc{请填写内容}))*3*/.g-form-i{border:solid 1px #DADADA;padding:0px 5px;font-size:1em;overflow:hidden;line-height:30px;height:30px;border-radius:5px;}.mod-form *{vertical-align:middle;}.mod-form .group{margin-bottom:2em;border:solid 0px #ddd;background:#FFF;}.mod-form .title{line-height:2em;padding:1em;font-size:1.2em;color:#888;}.mod-form .field{padding:0 0 15px 0;}.mod-form .field div,.mod-form .field p{display:inline-block;}.mod-form .label{margin-right: 15px;}.g-modal .mask,.g-modal .modal{position:fixed;top:0;left:0;right:0;bottom:0;margin:auto;z-index:99999;}.g-modal .mask{background:#000;z-index:99998;opacity:0.5;filter:alpha(opacity=50)}.g-modal .modal{background:#FFF;padding:0;box-shadow:0 0 30px rgba(0,0,0,0.3);}.g-modal .close{position:absolute;right:0;top:0;width:45px;padding:10px 12.5px;}.g-modal .close i{width:20px;}.g-modal .title{text-align:center;line-height:45px;font-size:16px;letter-spacing:.5px;font-weight:400;border-bottom:solid 1px #EAEAEA;color:#AAA}.g-modal .content{padding:15px;}.g-modal .bottom{display:none;}.g-modal .ui-alert-message{padding:1.5em 1.5em 0 1.5em;font-size:1em;min-width:200px;color:#666;color:#F00;}.g-modal .ui-alert-control{text-align:right;padding:0 1em 1em 0;border-radius: 0 0 10px 10px;}.g-modal .ui-alert-control input{display: inline-block;vertical-align:middle;padding:5px 15px;color:#666;background:none;}@media(max-width:600px){.g-modal .title{display:none;}}.g-tab-card{position:relative;}.g-tab-card ul{list-style:none;padding:0;margin:0;}.g-tab-card .tab{float:left;position:relative;text-align:center;}.g-tab-card .frame{clear: both;display:none;}.g-tab-card .active{display:inherit;}.g-tab-card .frame:after{content:".";display:block;visibility:hidden;height:0;clear:both;}.g-tab-card .mask{position:absolute;left:1px;top:0;background:#f5f5f5;opacity:0.7;filter:alpha(opacity=70);z-index:898;}.g-btn-upload{position:relative;background:#F0F0F0;border:solid 1px #CCC;display:inline-block;line-height:25px;}.g-btn-upload:hover{border-color:#888;}.g-btn-upload button{border:none;}.g-table,.g-table table{width:100%;border-collapse: collapse;line-height:30px;}.g-table td{padding-left:12px;margin-right:-12px;}.g-table td div{padding:5px 0;}.g-table thead{background:#EBEBEB;line-height:350%;border:solid 1px #EBEBEB;}.g-table thead td{font-weight: bold;color:#666;}.g-table tbody{border:solid 1px #EBEBEB;border-top-width:0;}.g-table tbody td{border-bottom:solid 1px #EBEBEB;}.g-table .td-op{color:#CCC;}.g-table .td-op a{color:#06C;}.g-table .td-op a:hover{color:#000;}.g-ani-hover-border{position:relative;}.g-ani-hover-border:after{content:" ";border-bottom:solid 2px transparent;position:absolute;bottom:-2px;left:0;right:0;margin:auto;width:0;}.g-ani-hover-border:hover:after{border-bottom:solid 2px #000;transition:all .3s;width:100%;} /* merge page.css */ -body{font-family:Helvetica,Tahoma,sans-serif;margin:0;}a{outline:none;}table{border-collapse:collapse;border:none;}a:link,a:visited{color:#0066ff;}a:hover{color:#0000cc;}.mask{background:url(/public/assets/images/mask.gif);opacity:0.2;filter:alpha(opacity=20);position:absolute;top:0;left:0;bottom: 0;right: 0;}p,td,blockquote,pre{ word-break: break-all;word-wrap: break-word;}/** 作废,使用col-*代替 */@media(max-width:575px){.hidden-xs{display:none !important;}.col-xs-1{flex:0 0 8.333333%;max-width:8.333333%}.col-xs-2{flex:0 0 16.666666%;max-width:16.666666%}.col-xs-3{flex:0 0 25%;max-width:25%}.col-xs-4{flex:0 0 33.333333%;max-width:33.333333%}.col-xs-5{flex:0 0 41.666666%;max-width:41.666666%}.col-xs-6{flex:0 0 50%;max-width:50%}.col-xs-7{flex:0 0 58.333333%;max-width:58.333333%}.col-xs-8{flex:0 0 66.666666%;max-width:66.666666%}.col-xs-9{flex:0 0 75%;max-width:75%}.col-xs-10{flex:0 0 83.333333%;max-width:83.333333%}.col-xs-11{flex:0 0 91.666666%;max-width:91.666666%}.col-xs-12{flex:0 0 100%;max-width:100%}}/** 作废 */.center{text-align:center;}.clear,.clear-fix,.clearfix{clear:both;margin-bottom:0;}.overflow{overflow:hidden;}.clearfix{clear:both;}.nom{margin:auto;}div.line{border-top:solid 1px #ddd;border-bottom:solid 1px #fff;height:0px;overflow:hidden;}.hight_light,.search_hightlight,.special{color:Red;}img.full{width:100%;}*:required {-moz-box-shadow: none; }.pt-30{padding-top:30px;}.pt-60{padding-top:60px;}.pt-90{padding-top:90px;}.pb-90{padding-bottom:90px;}.mt-30{margin-top:30px;}.mt-60{margin-top:60px;}.g-section-title>h1{font-size:2.4rem;}.g-section-title>p{padding:0.5em 0 1em;font-size:1.4rem;font-weight:400;color:#333;}.g-suited-img-65{padding-bottom:65%;}.g-suited-img-75{padding-bottom:75%;}.g-suited-img-100{padding-bottom:100%}.g-primary-btn{display: inline-block;font-size: 15px;font-weight: 500;line-height: 48px;background-color: #6147f0;border: 2px solid #6147f0;color: #fff;padding: 0 34px;border-radius: 50px;-webkit-box-shadow: 0 6px 12px 0 rgba(97,71,240,0.34);box-shadow: 0 6px 12px 0 rgba(97,71,240,0.34);-webkit-transition: all 0.4s linear;transition: all 0.4s linear;cursor: pointer;}.g-primary-btn:hover{color: #999;background-color: transparent;border-color: #999;-webkit-box-shadow: none;box-shadow: none;}.g-second-btn{color: #999;background-color: transparent;border-color: #999;-webkit-box-shadow: none;box-shadow: none;}.g-second-btn:hover{background-color: #6147f0;border-color: #6147f0;-webkit-box-shadow: 0 6px 12px 0 rgba(97,71,240,0.34);box-shadow: 0 6px 12px 0 rgba(97,71,240,0.34);color: #fff;}.mod-flash-p{margin: 0;}.mod-flash-p .top{position:absolute;left:0;right:0;margin:auto;width:100%;height:100%;background-size: cover;}.mod-flash-p ul{list-style:none;margin:0;padding:0;height: 100%;}.mod-flash-p li{ height: 100%;margin: 0;padding: 0;}.mod-flash-p .item{height:100%;background:#F5F5F5 center top no-repeat;width: 100%;}.mod-flash-p .flash-pager{position:absolute;bottom:5px;left:0;right:0;margin:0 auto;width:100px;}.mod-flash-p .flash-pager a{width:18px;line-height:18px;text-align:center;display:inline-block;background:#666;margin:0 2px;border-radius:3px;text-decoration:none;outline:none;}.panel-archives ul{margin:0;padding:0;}.panel-archives p.outline{text-indent:2em;margin:0;padding:10px 0;border:none;}.panel-archives li{clear:both;border-bottom:solid 1px #ddd;}.panel-archives img.thumbnail{float:left;margin-right:20px;}.panel-archives strong{font-size:120%;line-height:150%;}.panel-archives-hor ul{margin:0;list-style:none;}.panel-archives-hor li{position:relative;float:left;width:24%;margin:10px 0.5% 10px 0.5%;text-align:center;}.panel-archives-hor img{width:100%;border-radius: 5px;}.panel-archives-hor li:hover mask,.panel-archives-hor a:hover mask{display: none}.panel-archive div.meta{padding:0 10px;}.panel-archive{padding:0 10px;}.panel-archive div.outline{border:solid 1px #d686cb;background:#ffccff;padding:10px;line-height:22px;margin:30px 10px 20px 10px;text-indent: 2em;}.panel-archive div.content{font-size:120%;line-height:2em;padding:10px;}.panel-archive div.content p{margin-top:0;margin-bottom: 20px}.panel-archive div.meta{border-top:dotted 1px #ddd;padding-top:10px;margin-top:10px;text-align:left;line-height:40px;}.panel-archive div.relation{}.g-dropdown{position:relative;}.g-dropdown>div{position:absolute;left:0;z-index:9999;height:0px;overflow:hidden;transition:all .1s;}.g-dropdown:hover>div{height:auto;transition:all .3s;}.auto-fit{position:relative;padding-top:60px;text-align:center;}.auto-fit img{max-width:100%;max-height:100%;position: absolute;left:0;top:0;right:0;bottom:0;margin:auto;}.center{text-align:center;}.inline{display:inline-block;}.hidden{display:none;}a{text-decoration:none;outline:0;background:transparent;}a.f{color:#6E6E6E;}.auto-fit{position:relative;padding-top:60px;text-align:center;}.auto-fit img{max-width:100%;max-height:100%;position: absolute;left:0;top:0;right:0;bottom:0;margin:auto;}.mg5{margin:5px;}.pd5{padding:5px;}.load-box{position:fixed;top:0;left:0;right:0;bottom:0;margin:auto;background:#FFF;color:#ff3600;width:80px;height:50px;z-index:100;border-radius:5px;box-shadow:0 0 1px #DDD;padding:10px;text-align:center;font-size: 12px;}.load-box .icon{font-size:1.8em;display:block;line-height:1.5em;}.loading-large{padding:1em 0;text-align:center;}.loading-large .icon{font-size:2em;text-align:center;color:#AAA}.loading .icon{position: relative;-webkit-animation: anim_loading 1s linear infinite;-moz-animation: anim_loading 2s linear infinite;-o-animation: anim_loading 1s linear infinite;animation: anim_loading 1s linear infinite;}@-webkit-keyframes anim_loading {from { -webkit-transform: rotateZ(0deg); }50% { -webkit-transform: rotateZ(180deg); }to { -webkit-transform: rotateZ(360deg); }}@-moz-keyframes anim_loading {from { -moz-transform: rotateZ(0deg); }50% { -moz-transform: rotateZ(180deg); }to { -moz-transform: rotateZ(360deg); }}@-ms-keyframes anim_loading {from { -ms-transform: rotateZ(0deg); }50% { -ms-transform: rotateZ(180deg); }to { -ms-transform: rotateZ(360deg); }}@-o-keyframes anim_loading {from { -o-transform: rotateZ(0deg); }50% { -o-transform: rotateZ(180deg); }to { -o-transform: rotateZ(360deg); }}@keyframes anim_loading {from { transform: rotateZ(0deg); }50% { transform: rotateZ(180deg); }to { transform: rotateZ(360deg); }}/** 分页 **/.mod-pagination{line-height:1.6em;text-align:center;}.mod-pagination .it{margin:5px 0 5px 5px;vertical-align:middle;user-select:none;display:inline-block;padding:0 5px;}.mod-pagination .page{padding-left:0 !important;padding-right:0 !important;}.mod-pagination .page a{display:inline-block;padding:0 5px;}@media(min-width:320px){.ui-pagination .info{display:none;}}.g-drop{position: relative;padding:0;}.g-drop em{display:none;}.g-drop-label{padding:0 25px 0 10px;border:solid 1px transparent;display:block;}.g-drop-layer{position:absolute;left:0;top:30px;background:#FFF;z-index:52;display:none;}.g-drop-layer .b{padding:10px;font-weight: normal;}.g-drop-icon{position:absolute;right:12px;top:25%;}.g-drop:hover .g-drop-label,.g-drop-down .g-drop-label{background:#FFF;border-bottom:solid 1px #fff;}.g-drop:hover .g-drop-layer,.g-drop-down .g-drop-layer{display:inherit;}.g-drop:hover em,.g-drop-down em{display:none;}.g-hr{border-top:solid 1px #ddd;}.g-toolbar{line-height: 30px;margin-bottom:1em;}.g-toolbar-right{float:right;}.g-toolbar-top{margin-top:1em;}.g-dashed-box{background: #FFF;padding: 5px 1em;border: dashed 1px #CCC;}.g-tabs{position:relative;height:100%;}.g-tabs .tabs {height:35px;border-bottom:solid 1px #CCC;line-height:30px;background:#FFF;}.g-tabs .tabs ul{list-style:none;padding:0;margin:0;}.g-tabs .tabs li{float:left;position:relative;text-align:center;width:60px;padding:2px 10px;}.g-tabs .tabs li a{display:block;font-size:14px;}.g-tabs .tabs li.current{color:#038fdd;line-height:30px;border:solid 1px #CCC;font-weight:600;border-bottom: solid 1px #fff;}.g-tabs .tabs li span.link{cursor:pointer;}.g-tabs .tabs li .tab-close{cursor:pointer;position:absolute;right:0;top:0;font-family:Arial;color:#000;padding:0 12px;font-size:16px;}.g-tabs .tabs li .tab-title{vertical-align:central;cursor:default;display:inline-block;}.g-tabs .tabs li span.rgt{width:0px;float:left;}.g-tabs iframe{width:100%;height:100%;}.g-tabs .mask{position:absolute;left:1px;top:0;background:#f5f5f5;opacity:0.7;filter:alpha(opacity=70);z-index:898;}.g-tabs .frames,.ui-tabs .frames div.frame{height:100%;margin-bottom:0;}.g-tabs .frame { clear: both;visibility:hidden;}.g-tabs .frame:after{content:".";display:block;visibility:hidden;height:0;clear:both;}.g-tabs .current-frame,.g-tabs .current {visibility:inherit; }/** 旧代码结束**/.mod-mix-archive-lists li{position: relative;padding-left:90px;margin-top:15px;border-bottom:dashed 1px #CCC;padding-bottom:15px;}.mod-mix-archive-lists li:last-child{border:0;}.mod-mix-archive-lists img.thumbnail{width:75px;position: absolute;left:0;top:0;}.mod-mix-archive-lists .title{font-weight:400;font-size:1.2em;line-height:1em;display:block;padding-bottom:15px;letter-spacing:.5px;}.mod-mix-archive-lists .dt{position: absolute;right:0;top:0;line-height:1em;}.mod-mix-archive-lists p{height:3.6em;overflow:hidden;line-height:1.2em;color:#666;font-size:0.9em;}.high-light{color:#F00;font-weight:400}.g-mg5{margin:5px 0;}.mod-top-bar{background:#f5f5f5;line-height:2.5em;}.mod-top-bar .qr{position:relative;margin-left:1em;}.mod-top-bar .qr img{display: none;}.mod-top-bar .qr:hover img{display: block;position:absolute;left:55px;top:20px;max-width:80px;border:solid 1px #ddd;padding:2px;background:#FFF;z-index:10;z-index:300;}.mod-top-bar i.phone{background:url(img/hd-phone.png) 0 6px no-repeat;padding:10px;}.mod-top-bar ul{margin:0;list-style: none;}.mod-top-bar ul li{float:left;margin-left:10px;}.mod-header{background:#FFF;box-shadow:0 2px 6px #EEE;position:relative;z-index:1000;}.mod-header-logo,.mod-header .logo,header .logo{position:relative;float:left;vertical-align: middle;}.mod-header-logo a,.mod-header .logo a,header .logo a{position:absolute;top:0;bottom:0;margin:auto;display:block;width:100%;height: 100%;}.mod-header-logo .mask{position:absolute;left:0;top:0;margin:auto;display:block;background:none;width:100%;height: 100%;}.mod-header-search{padding:30px 0 0 60px;float:left;}.search-input{border:solid 1px #CCC;height:28px;line-height:28px;float:left;padding:0 5px;width:190px;border-right:none;font-weight: bold;vertical-align: middle;}.mod-header .search-btn{cursor:pointer;background:#666;padding:0 10px;border:none;height:30px;color:#FFF;vertical-align: middle;}.mod-header .mod-header-words{color:#666;font-weight: bold;margin:0.5em 0;display:none;}.mod-header .mod-header-words a{text-decoration:none;color:#666;margin:0 5px;font-weight:normal;}.mod-header-right{float:right;}.mod-navigator{z-index:200;}.mod-navigator-nav,.mod-navigator-left,.mod-navigator-right{padding-bottom:0px;margin-bottom:-0px;}.mod-navigator-left{float:left;width:10px;margin-right:-10px;}.mod-navigator-right{float:right;width:10px;margin-left:-10px;}.mod-navigator-nav{width:auto;margin:0 10px;}.mod-navigator-nav ul{margin:0;padding:0;list-style:none;}.mod-navigator-nav li.l1{float:left;position:relative;z-index: 200;}.mod-navigator-nav li.l1 a.l1{text-transform: uppercase;}.mod-navigator-nav li.parent:hover{background:#FAFAFA;padding:10px 16px;margin:-10px -1px;}.mod-navigator-nav li.parent:hover a.l1{color:#000;}.mod-navigator-nav li.parent a.l1:hover{color:#FFF;}.mod-navigator-nav li.parent .nav-arrow{border-left:solid 5px transparent;border-right:solid 5px transparent;border-top:solid 5px #FFF;}.mod-navigator-nav li.parent:hover .nav-arrow{border-top-color:#000}.mod-navigator-child{background:#FAFAFA;left:0;right:0;margin:auto;top:30px;position:absolute;display:none;z-index:201;box-shadow:3px 4px 6px rgba(0,0,0,0.2);}.mod-navigator-child .box {}.mod-navigator-nav li.drop .mod-navigator-child,.mod-navigator-nav li:hover .mod-navigator-child{display:block;}.mod-navigator-child .menu li.l2{padding:0;float:none;background:none;}.mod-navigator-child .menu li.first{border-top:none;}.mod-navigator-child .menu li.last{border-bottom:none;}.mod-navigator{margin:0 auto;height:auto; box-shadow:0 5px 10px #BF0000 inset;line-height:35px;}.mod-navigator-nav ul{}.mod-navigator-nav li.first{border-left:none;}.mod-navigator-nav li.last{background-image:none;}.mod-navigator-nav li.current{background-color:#EEE;margin:0;}.mod-navigator-nav li.last,.mod-navigator-nav li.last a{border:none;}.mod-navigator-nav li a.l1{text-decoration:none;text-align:center;display:block;}.mod-navigator-nav li.current a.l1{color:#FFF;border-bottom-color:transparent;}.mod-navigator-nav li.parent .child a.l2{color:#333;}.mod-navigator-nav li.parent .child a.l2:hover{color:#F00;}.mod-navigator-child{top:40px;min-width:300px;left:0px;right:0;margin:auto;z-index:600; background:#FFF;border:0;}.mod-navigator-child .menu li{border-bottom:dashed 1px #ddd;margin:0;font-size:80%;width:auto;}.mod-navigator-child .menu li a.l2{padding:0;color:#666;border:none;}.mod-navigator-child .menu li a.l2:hover{color:#000;text-decoration: none;}.mod-navigator .col{float:left;border-right:dashed 1px #DDD;}.mod-navigator .last-col{border:none;}.mod-navigator .col ul{margin:0 5px 0 40px;padding:0;list-style:none;width:110px;}.mod-navigator .col li{width:100%;border:none;text-align:left;float:left;}.mod-navigator .col li.tit{font-weight: bold;font-size:1.2em;margin-bottom:10px;position:relative;}.mod-navigator .col li.tit a{position:absolute;left:6em;top:0;font-size:12px;padding:0 5px;line-height:20px;}.mod-navigator .col li.tit a:hover{background:#333;}.mod-navigator .col li:hover{background:none;}.mod-navigator .col li a{line-height:25px;font-weight:normal;border:none;text-align:left;text-decoration:none;}.mod-navigator .col li a:hover{background:none;}.mod-navigator .child3{width:650px;}.mod-navigator .child10{width:580px;}.mod-navigator .child13{width:580px;}.mod-navigator .category-col ul{width:120px;}.mod-navigator .category-col li{}.mod-navigator .category-col li.tit{width:100%;}.mod-navigator .category-col li.more{padding-left:60px;width:50px;}.mod-navigator .category-col li.more a{display:block;color:#666;text-align:center;line-height:1.6em;}.mod-navigator .category-col .c5,.page-navigator .category-col .c6,.page-navigator .category-col .c7,.mod-navigator .category-col .c8{display:none;}.mod-navigator .brands-col .tit{width:100%;}.mod-navigator .brands-col ul{width:150px;}.mod-navigator .brands-col li{font-weight:normal;}.mod-navigator .brands-col li img{border:solid 1px #ddd;margin-right:10px;width:100px;}.mod-navigator .img{position:absolute;right:2em;top:3em;}.mod-navigator div.outline{font-weight: normal;padding:0 1em;margin-left:160px;text-indent:2em;line-height:1.8em;color:#333;text-shadow:0 1px 0 #EEE;}.mod-navigator div.outline a{font-weight:bold;}.mod-navigator div.outline a:hover{color:#666;}.mod-flash-banner{position: relative;max-width:1440px;margin:0px auto;}.mod-flash-banner .flash-pager{position:absolute;right:10px;bottom:2em;width:200px;left: auto;}.mod-flash-banner .flash-pager a{width:22px;height:22px;margin-right:10px;line-height:22px;font-size:1.2em;}.mod-flash-banner .top{display:none;position:absolute;left:0;right:0;margin:auto;width:100%;height:100%;background-size:100% 100%;}.mod-flash-banner li{position:relative;}.mod-flash-banner li div.panel{position:absolute;left:0;right:0;margin:auto;}.mod-flash-banner li div.g,.mod-flash-banner li div.p{position:absolute;width:300px;height:220px;padding:20px;left:0;top:5em;}.mod-flash-banner li div.g{opacity:0.9;background:#EEE;}.mod-flash-banner li div.p{font-size:1.4em;color:#FFF;top:3.8em;width:320px;}.mod-flash-banner li div.p h2{font-size:1.2em;border-left:solid 8px #D50000;color:#FFF;padding-left:0.5em;margin:0;line-height:2em;background:#333;}.mod-flash-banner li div.p p{margin:1em 20px 1em 0;text-indent:1em;line-height:1.7em;color:#000;}.mod-lang-drop{padding-bottom:30px;}.mod-lang-drop .list{position:absolute;right:0;left:0;background:#FFF;box-shadow:0 0 5px rgba(0,0,0,0.3);padding:15px;display:none;}.mod-lang-drop .arrow-t{position:absolute;border-width:10px;top:-10px;left:0;right:0;margin:0 auto;}.mod-lang-drop:hover .mod-lang-drop-list{display:inherit;}.mod-crumb{line-height:3em;background:#F5F5F5;color:#333;padding-left:1em;text-shadow:0px 0px 0 #FFF;position:relative;}.mod-crumb a{color:#333;text-decoration: none;margin:0 5px;}.mod-crumb .rgt{position: absolute;right:1em;top:5px;}.mod-nav-side {}.mod-nav-border .tit {background: #CCC;line-height: 3em;padding: 0 1em;margin-bottom: 0;color: #FFF; font-weight: bold;}.mod-nav-border .content{}.mod-nav-border .archive-list{margin: 1em}.mod-nav-border .archive-list li { height: 2em;line-height: 2em;overflow: hidden;}.mod-cat-list{padding:0;margin:0;list-style:none;}.mod-cat-list a{text-decoration:none;color:#666;}.mod-cat-list li{padding:0 1em;line-height:2.5em;}.mod-cat-list li.current{background:url(tit-bar-03-no-r.png) no-repeat;background-position:0 -36px;}.mod-cat-list li.current a{color:#FFF;font-weight:bold;display:block;}.mod-friend-link{font-size:12px;}.mod-friend-link i{padding-right:10px;color:#CCC;}/** 反馈 */.mod-feedback{}.mod-feedback .container{background-size:cover;padding:30px;}.mod-feedback-tit,.mod-feedback-sub-tit{color:#FFF;padding-left:15px;}.mod-feedback-tit{font-size:18px;font-weight: bold;}.mod-feedback-sub-tit{margin-bottom:30px;}.mod-feedback-form{padding:15px;box-shadow:0 0 15px rgba(0,0,0,0.1);border-radius:3px;}.mod-feedback .wx{text-align:center;color:#FFF;font-weight:bold;}.mod-feedback .wx img{background:#FFF;width:80%;padding:15px;}.mod-feedback-form label{padding-top:15px;display:block;}.mod-feedback-button{text-align:right;padding-top:15px;padding-bottom:15px;}/** 即时聊天 */.mod-instant-chat{position:fixed;top:70%;right:30px;border:solid 3px #707070;border-radius:50px;display:block;width:60px;height:60px;background:#FFF;background-size:50%;cursor:pointer;}.mod-instant-chat .g-pop{position:absolute;top:-60px;left:-20px;right:-20px;text-align:center;display:none}.mod-instant-chat:hover .g-pop{display:inherit;}.mod-gallery-play .slick-prev,.mod-gallery-play .slick-next{left:0;z-index:10;width:60px;height:60px;}.mod-gallery-play .slick-prev,.mod-gallery-play .slick-next,.mod-gallery-play .slick-prev:hover,.mod-gallery-play .slick-next:hover{background:#AAA !important;}.mod-gallery-play .slick-next{right:0;left:auto;}.mod-gallery-play .slick-prev:before,.mod-gallery-play .slick-next:before{font-size:40px;}.auto-fit{position:relative;padding-top:60px;text-align:center;}.auto-fit img{max-width:100%;max-height:100%;position: absolute;left:0;top:0;right:0;bottom:0;margin:auto;} \ No newline at end of file +body{font-family:Helvetica,Tahoma,sans-serif;margin:0;}a{outline:none;}table{border-collapse:collapse;border:none;}a:link,a:visited{color:#0066ff;}a:hover{color:#0000cc;}.mask{background:url(/public/assets/images/mask.gif);opacity:0.2;filter:alpha(opacity=20);position:absolute;top:0;left:0;bottom: 0;right: 0;}p,td,blockquote,pre{ word-break: break-all;word-wrap: break-word;}/** 作废,使用col-*代替 *//** 作废 */.center{text-align:center;}.clear,.clear-fix,.clearfix{clear:both;margin-bottom:0;}.overflow{overflow:hidden;}.clearfix{clear:both;}.nom{margin:auto;}div.line{border-top:solid 1px #ddd;border-bottom:solid 1px #fff;height:0px;overflow:hidden;}.high-light,.search-high-light{color:#F00;}img.full{width:100%;}*:required {-moz-box-shadow: none; }.pt-30{padding-top:30px;}.pt-60{padding-top:60px;}.pt-90{padding-top:90px;}.pb-30{padding-bottom:30px;}.pb-60{padding-bottom:60px;}.pb-90{padding-bottom:90px;}.mt-30{margin-top:30px;}.mt-60{margin-top:60px;}.mb-30{margin-bottom:30px;}.mb-60{margin-bottom:60px;}.g-section-title>h1{font-size:2.4rem;}.g-section-title>p{padding:0.5em 0 1em;font-size:1.4rem;font-weight:400;color:#333;}.g-suited-img-65{padding-bottom:65%;}.g-suited-img-75{padding-bottom:75%;}.g-suited-img-100{padding-bottom:100%}.g-primary-btn{display: inline-block;font-size: 15px;font-weight: 500;line-height: 48px;background-color: #6147f0;border: 2px solid #6147f0;color: #fff;padding: 0 34px;border-radius: 50px;-webkit-box-shadow: 0 6px 12px 0 rgba(97,71,240,0.34);box-shadow: 0 6px 12px 0 rgba(97,71,240,0.34);-webkit-transition: all 0.4s linear;transition: all 0.4s linear;cursor: pointer;}.g-primary-btn:hover{color: #999;background-color: transparent;border-color: #999;-webkit-box-shadow: none;box-shadow: none;}.g-second-btn{color: #999;background-color: transparent;border-color: #999;-webkit-box-shadow: none;box-shadow: none;}.g-second-btn:hover{background-color: #6147f0;border-color: #6147f0;-webkit-box-shadow: 0 6px 12px 0 rgba(97,71,240,0.34);box-shadow: 0 6px 12px 0 rgba(97,71,240,0.34);color: #fff;}.mod-flash-p{margin: 0;}.mod-flash-p .top{position:absolute;left:0;right:0;margin:auto;width:100%;height:100%;background-size: cover;}.mod-flash-p ul{list-style:none;margin:0;padding:0;height: 100%;}.mod-flash-p li{ height: 100%;margin: 0;padding: 0;}.mod-flash-p .item{height:100%;background:#F5F5F5 center top no-repeat;width: 100%;}.mod-flash-p .flash-pager{position:absolute;bottom:5px;left:0;right:0;margin:0 auto;width:100px;}.mod-flash-p .flash-pager a{width:18px;line-height:18px;text-align:center;display:inline-block;background:#666;margin:0 2px;border-radius:3px;text-decoration:none;outline:none;}.panel-archives ul{margin:0;padding:0;}.panel-archives p.outline{text-indent:2em;margin:0;padding:10px 0;border:none;}.panel-archives li{clear:both;border-bottom:solid 1px #ddd;}.panel-archives img.thumbnail{float:left;margin-right:20px;}.panel-archives strong{font-size:120%;line-height:150%;}.panel-archives-hor ul{margin:0;list-style:none;}.panel-archives-hor li{position:relative;float:left;width:24%;margin:10px 0.5% 10px 0.5%;text-align:center;}.panel-archives-hor img{width:100%;border-radius: 5px;}.panel-archives-hor li:hover mask,.panel-archives-hor a:hover mask{display: none}.g-dropdown{position:relative;}.g-dropdown>div{position:absolute;left:0;z-index:9999;height:0px;overflow:hidden;transition:all .1s;}.g-dropdown:hover>div{height:auto;transition:all .3s;}.auto-fit{position:relative;padding-top:60px;text-align:center;}.auto-fit img{max-width:100%;max-height:100%;position: absolute;left:0;top:0;right:0;bottom:0;margin:auto;}.center{text-align:center;}.inline{display:inline-block;}.hidden{display:none;}a{text-decoration:none;outline:0;background:transparent;}a.f{color:#6E6E6E;}.auto-fit{position:relative;padding-top:60px;text-align:center;}.auto-fit img{max-width:100%;max-height:100%;position: absolute;left:0;top:0;right:0;bottom:0;margin:auto;}.mg5{margin:5px;}.pd5{padding:5px;}.load-box{position:fixed;top:0;left:0;right:0;bottom:0;margin:auto;background:#FFF;color:#ff3600;width:80px;height:50px;z-index:100;border-radius:5px;box-shadow:0 0 1px #DDD;padding:10px;text-align:center;font-size: 12px;}.load-box .icon{font-size:1.8em;display:block;line-height:1.5em;}.loading-large{padding:1em 0;text-align:center;}.loading-large .icon{font-size:2em;text-align:center;color:#AAA}.loading .icon{position: relative;-webkit-animation: anim_loading 1s linear infinite;-moz-animation: anim_loading 2s linear infinite;-o-animation: anim_loading 1s linear infinite;animation: anim_loading 1s linear infinite;}@-webkit-keyframes anim_loading {from { -webkit-transform: rotateZ(0deg); }50% { -webkit-transform: rotateZ(180deg); }to { -webkit-transform: rotateZ(360deg); }}@-moz-keyframes anim_loading {from { -moz-transform: rotateZ(0deg); }50% { -moz-transform: rotateZ(180deg); }to { -moz-transform: rotateZ(360deg); }}@-ms-keyframes anim_loading {from { -ms-transform: rotateZ(0deg); }50% { -ms-transform: rotateZ(180deg); }to { -ms-transform: rotateZ(360deg); }}@-o-keyframes anim_loading {from { -o-transform: rotateZ(0deg); }50% { -o-transform: rotateZ(180deg); }to { -o-transform: rotateZ(360deg); }}@keyframes anim_loading {from { transform: rotateZ(0deg); }50% { transform: rotateZ(180deg); }to { transform: rotateZ(360deg); }}/** 分页 **/.mod-pagination{line-height:2.4em;text-align:center;}.mod-pagination .it{margin:0 5px 0 0;vertical-align:middle;user-select:none;display:inline-block;}.mod-pagination a{display:inline-block;text-decoration:none !important;}@media(max-width:575px){.mod-pagination{margin:0 auto}.mod-pagination .pagination-info{display:none;}}.g-drop{position: relative;padding:0;}.g-drop em{display:none;}.g-drop-label{padding:0 25px 0 10px;border:solid 1px transparent;display:block;}.g-drop-layer{position:absolute;left:0;top:30px;background:#FFF;z-index:52;display:none;}.g-drop-layer .b{padding:10px;font-weight: normal;}.g-drop-icon{position:absolute;right:12px;top:25%;}.g-drop:hover .g-drop-label,.g-drop-down .g-drop-label{background:#FFF;border-bottom:solid 1px #fff;}.g-drop:hover .g-drop-layer,.g-drop-down .g-drop-layer{display:inherit;}.g-drop:hover em,.g-drop-down em{display:none;}.g-hr{border-top:solid 1px #ddd;}.g-toolbar{line-height: 30px;margin-bottom:1em;}.g-toolbar-right{float:right;}.g-toolbar-top{margin-top:1em;}.g-dashed-box{background: #FFF;padding: 5px 1em;border: dashed 1px #CCC;}.g-tabs{position:relative;height:100%;}.g-tabs .tabs {height:35px;border-bottom:solid 1px #CCC;line-height:30px;background:#FFF;}.g-tabs .tabs ul{list-style:none;padding:0;margin:0;}.g-tabs .tabs li{float:left;position:relative;text-align:center;width:60px;padding:2px 10px;}.g-tabs .tabs li a{display:block;font-size:14px;}.g-tabs .tabs li.current{color:#038fdd;line-height:30px;border:solid 1px #CCC;font-weight:600;border-bottom: solid 1px #fff;}.g-tabs .tabs li span.link{cursor:pointer;}.g-tabs .tabs li .tab-close{cursor:pointer;position:absolute;right:0;top:0;font-family:Arial;color:#000;padding:0 12px;font-size:16px;}.g-tabs .tabs li .tab-title{vertical-align:central;cursor:default;display:inline-block;}.g-tabs .tabs li span.rgt{width:0px;float:left;}.g-tabs iframe{width:100%;height:100%;}.g-tabs .mask{position:absolute;left:1px;top:0;background:#f5f5f5;opacity:0.7;filter:alpha(opacity=70);z-index:898;}.g-tabs .frames,.ui-tabs .frames div.frame{height:100%;margin-bottom:0;}.g-tabs .frame { clear: both;visibility:hidden;}.g-tabs .frame:after{content:".";display:block;visibility:hidden;height:0;clear:both;}.g-tabs .current-frame,.g-tabs .current {visibility:inherit; }/** 旧代码结束**/.mod-mix-archive-lists li{position: relative;padding-left:90px;margin-top:15px;border-bottom:dashed 1px #CCC;padding-bottom:15px;}.mod-mix-archive-lists li:last-child{border:0;}.mod-mix-archive-lists img.thumbnail{width:75px;position: absolute;left:0;top:0;}.mod-mix-archive-lists .title{font-weight:400;font-size:1.2em;line-height:1em;display:block;padding-bottom:15px;letter-spacing:.5px;}.mod-mix-archive-lists .dt{position: absolute;right:0;top:0;line-height:1em;}.mod-mix-archive-lists p{height:3.6em;overflow:hidden;line-height:1.2em;color:#666;font-size:0.9em;}.high-light{color:#F00;font-weight:400}.g-mg5{margin:5px 0;}.mod-top-bar{background:#f5f5f5;line-height:2.5em;}.mod-top-bar .qr{position:relative;margin-left:1em;}.mod-top-bar .qr img{display: none;}.mod-top-bar .qr:hover img{display: block;position:absolute;left:55px;top:20px;max-width:80px;border:solid 1px #ddd;padding:2px;background:#FFF;z-index:10;z-index:300;}.mod-top-bar i.phone{background:url(img/hd-phone.png) 0 6px no-repeat;padding:10px;}.mod-top-bar ul{margin:0;list-style: none;}.mod-top-bar ul li{float:left;margin-left:10px;}.mod-header{background:#FFF;box-shadow:0 2px 6px #EEE;position:relative;z-index:1000;}.mod-header-logo,.mod-header .logo,header .logo{position:relative;float:left;vertical-align: middle;}.mod-header-logo a,.mod-header .logo a,header .logo a{position:absolute;top:0;bottom:0;margin:auto;display:block;width:100%;height: 100%;}.mod-header-logo .mask{position:absolute;left:0;top:0;margin:auto;display:block;background:none;width:100%;height: 100%;}.mod-header-search{padding:30px 0 0 60px;float:left;}.search-input{border:solid 1px #CCC;height:28px;line-height:28px;float:left;padding:0 5px;width:190px;border-right:none;font-weight: bold;vertical-align: middle;}.mod-header .search-btn{cursor:pointer;background:#666;padding:0 10px;border:none;height:30px;color:#FFF;vertical-align: middle;}.mod-header .mod-header-words{color:#666;font-weight: bold;margin:0.5em 0;display:none;}.mod-header .mod-header-words a{text-decoration:none;color:#666;margin:0 5px;font-weight:normal;}.mod-header-right{float:right;}.mod-navigator{z-index:200;}.mod-navigator-nav,.mod-navigator-left,.mod-navigator-right{padding-bottom:0px;margin-bottom:-0px;}.mod-navigator-left{float:left;width:10px;margin-right:-10px;}.mod-navigator-right{float:right;width:10px;margin-left:-10px;}.mod-navigator-nav{width:auto;margin:0 10px;}.mod-navigator-nav ul{margin:0;padding:0;list-style:none;}.mod-navigator-nav li.l1{float:left;position:relative;z-index: 200;}.mod-navigator-nav li.l1 a.l1{text-transform: uppercase;}.mod-navigator-nav li.parent:hover{background:#FAFAFA;padding:10px 16px;margin:-10px -1px;}.mod-navigator-nav li.parent:hover a.l1{color:#000;}.mod-navigator-nav li.parent a.l1:hover{color:#FFF;}.mod-navigator-nav li.parent .nav-arrow{border-left:solid 5px transparent;border-right:solid 5px transparent;border-top:solid 5px #FFF;}.mod-navigator-nav li.parent:hover .nav-arrow{border-top-color:#000}.mod-navigator-child{background:#FAFAFA;left:0;right:0;margin:auto;top:30px;position:absolute;display:none;z-index:201;box-shadow:3px 4px 6px rgba(0,0,0,0.2);}.mod-navigator-child .box {}.mod-navigator-nav li.drop .mod-navigator-child,.mod-navigator-nav li:hover .mod-navigator-child{display:block;}.mod-navigator-child .menu li.l2{padding:0;float:none;background:none;}.mod-navigator-child .menu li.first{border-top:none;}.mod-navigator-child .menu li.last{border-bottom:none;}.mod-navigator{margin:0 auto;height:auto; box-shadow:0 5px 10px #BF0000 inset;line-height:35px;}.mod-navigator-nav ul{}.mod-navigator-nav li.first{border-left:none;}.mod-navigator-nav li.last{background-image:none;}.mod-navigator-nav li.current{background-color:#EEE;margin:0;}.mod-navigator-nav li.last,.mod-navigator-nav li.last a{border:none;}.mod-navigator-nav li a.l1{text-decoration:none;text-align:center;display:block;}.mod-navigator-nav li.current a.l1{color:#FFF;border-bottom-color:transparent;}.mod-navigator-nav li.parent .child a.l2{color:#333;}.mod-navigator-nav li.parent .child a.l2:hover{color:#F00;}.mod-navigator-child{top:40px;min-width:300px;left:0px;right:0;margin:auto;z-index:600; background:#FFF;border:0;}.mod-navigator-child .menu li{border-bottom:dashed 1px #ddd;margin:0;font-size:80%;width:auto;}.mod-navigator-child .menu li a.l2{padding:0;color:#666;border:none;}.mod-navigator-child .menu li a.l2:hover{color:#000;text-decoration: none;}.mod-navigator .col{float:left;border-right:dashed 1px #DDD;}.mod-navigator .last-col{border:none;}.mod-navigator .col ul{margin:0 5px 0 40px;padding:0;list-style:none;width:110px;}.mod-navigator .col li{width:100%;border:none;text-align:left;float:left;}.mod-navigator .col li.tit{font-weight: bold;font-size:1.2em;margin-bottom:10px;position:relative;}.mod-navigator .col li.tit a{position:absolute;left:6em;top:0;font-size:12px;padding:0 5px;line-height:20px;}.mod-navigator .col li.tit a:hover{background:#333;}.mod-navigator .col li:hover{background:none;}.mod-navigator .col li a{line-height:25px;font-weight:normal;border:none;text-align:left;text-decoration:none;}.mod-navigator .col li a:hover{background:none;}.mod-navigator .child3{width:650px;}.mod-navigator .child10{width:580px;}.mod-navigator .child13{width:580px;}.mod-navigator .category-col ul{width:120px;}.mod-navigator .category-col li{}.mod-navigator .category-col li.tit{width:100%;}.mod-navigator .category-col li.more{padding-left:60px;width:50px;}.mod-navigator .category-col li.more a{display:block;color:#666;text-align:center;line-height:1.6em;}.mod-navigator .category-col .c5,.page-navigator .category-col .c6,.page-navigator .category-col .c7,.mod-navigator .category-col .c8{display:none;}.mod-navigator .brands-col .tit{width:100%;}.mod-navigator .brands-col ul{width:150px;}.mod-navigator .brands-col li{font-weight:normal;}.mod-navigator .brands-col li img{border:solid 1px #ddd;margin-right:10px;width:100px;}.mod-navigator .img{position:absolute;right:2em;top:3em;}.mod-navigator div.outline{font-weight: normal;padding:0 1em;margin-left:160px;text-indent:2em;line-height:1.8em;color:#333;text-shadow:0 1px 0 #EEE;}.mod-navigator div.outline a{font-weight:bold;}.mod-navigator div.outline a:hover{color:#666;}.mod-flash-banner{position: relative;max-width:1440px;margin:0px auto;}.mod-flash-banner .flash-pager{position:absolute;right:10px;bottom:2em;width:200px;left: auto;}.mod-flash-banner .flash-pager a{width:22px;height:22px;margin-right:10px;line-height:22px;font-size:1.2em;}.mod-flash-banner .top{display:none;position:absolute;left:0;right:0;margin:auto;width:100%;height:100%;background-size:100% 100%;}.mod-flash-banner li{position:relative;}.mod-flash-banner li div.panel{position:absolute;left:0;right:0;margin:auto;}.mod-flash-banner li div.g,.mod-flash-banner li div.p{position:absolute;width:300px;height:220px;padding:20px;left:0;top:5em;}.mod-flash-banner li div.g{opacity:0.9;background:#EEE;}.mod-flash-banner li div.p{font-size:1.4em;color:#FFF;top:3.8em;width:320px;}.mod-flash-banner li div.p h2{font-size:1.2em;border-left:solid 8px #D50000;color:#FFF;padding-left:0.5em;margin:0;line-height:2em;background:#333;}.mod-flash-banner li div.p p{margin:1em 20px 1em 0;text-indent:1em;line-height:1.7em;color:#000;}.mod-lang-drop{padding-bottom:30px;}.mod-lang-drop .list{position:absolute;right:0;left:0;background:#FFF;box-shadow:0 0 5px rgba(0,0,0,0.3);padding:15px;display:none;}.mod-lang-drop .arrow-t{position:absolute;border-width:10px;top:-10px;left:0;right:0;margin:0 auto;}.mod-lang-drop:hover .mod-lang-drop-list{display:inherit;}.mod-crumb{line-height:3em;color:#999;position:relative;font-size:1.2rem;}.mod-crumb>.rgt{position: absolute;right:1em;top:5px;}.mod-crumb a,.mod-crumb a:visited{color:#999;text-decoration: none;margin:0 5px;}.mod-nav-side {}.mod-nav-border .tit {background: #CCC;line-height: 3em;padding: 0 1em;margin-bottom: 0;color: #FFF; font-weight: bold;}.mod-nav-border .content{}.mod-nav-border .archive-list{margin: 1em}.mod-nav-border .archive-list li { height: 2em;line-height: 2em;overflow: hidden;}.mod-cat-list{padding:0;margin:0;list-style:none;}.mod-cat-list a{text-decoration:none;color:#666;}.mod-cat-list li{padding:0 1em;line-height:2.5em;}.mod-cat-list li.current{background:url(tit-bar-03-no-r.png) no-repeat;background-position:0 -36px;}.mod-cat-list li.current a{color:#FFF;font-weight:bold;display:block;}.mod-friend-link{font-size:12px;}.mod-friend-link i{padding-right:10px;color:#CCC;}/** 反馈 */.mod-feedback{}.mod-feedback .container{background-size:cover;padding:30px;}.mod-feedback-tit,.mod-feedback-sub-tit{color:#FFF;padding-left:15px;}.mod-feedback-tit{font-size:18px;font-weight: bold;}.mod-feedback-sub-tit{margin-bottom:30px;}.mod-feedback-form{padding:15px;box-shadow:0 0 15px rgba(0,0,0,0.1);border-radius:3px;}.mod-feedback .wx{text-align:center;color:#FFF;font-weight:bold;}.mod-feedback .wx img{background:#FFF;width:80%;padding:15px;}.mod-feedback-form label{padding-top:15px;display:block;}.mod-feedback-button{text-align:right;padding-top:15px;padding-bottom:15px;}/** 即时聊天 */.mod-instant-chat{position:fixed;top:70%;right:30px;border:solid 3px #707070;border-radius:50px;display:block;width:60px;height:60px;background:#FFF;background-size:50%;cursor:pointer;}.mod-instant-chat .g-pop{position:absolute;top:-60px;left:-20px;right:-20px;text-align:center;display:none}.mod-instant-chat:hover .g-pop{display:inherit;}.mod-gallery-play .slick-prev,.mod-gallery-play .slick-next{left:0;z-index:10;width:60px;height:60px;}.mod-gallery-play .slick-prev,.mod-gallery-play .slick-next,.mod-gallery-play .slick-prev:hover,.mod-gallery-play .slick-next:hover{background:#AAA !important;}.mod-gallery-play .slick-next{right:0;left:auto;}.mod-gallery-play .slick-prev:before,.mod-gallery-play .slick-next:before{font-size:40px;}.auto-fit{position:relative;padding-top:60px;text-align:center;}.auto-fit img{max-width:100%;max-height:100%;position: absolute;left:0;top:0;right:0;bottom:0;margin:auto;}.mod-art-details{background:#FFF;padding:3em 4em;}.mod-art-details>h1{font-size:3rem;}.mod-art-details>.info{color:#666;line-height:4em;font-size:1.4rem;}.mod-art-details>.info em{font-style:normal;margin:0 5px;}.mod-art-details>.info .share a{margin-left:10px;}.mod-art-details>.details{line-height:2em;}.mod-art-details>.details h1,.mod-art-details>.details h2{line-height:2.4em;padding-top:1em;}.mod-art-details>.details p{text-indent:2.4em;}.mod-art-details>.details img{margin:0 auto;max-width:80%;}.mod-art-details>.details .copyright{font-size:1.4rem;line-height:4rem;}.mod-art-details .art-rel{font-size:1.4rem;border-top:dashed 1px #ddd;padding-top:4rem;}@media(max-width:575px){.mod-art-details{padding:1em 15px;text-align:center;}.mod-art-details>h1{font-size:2rem;}.mod-art-details>.details{text-align:left;font-size:1.4rem;line-height:1.8em;padding-top:0 !important;}.mod-art-details .art-rel{text-align:left;padding-top:1em;}.mod-art-details .art-rel .g-align-right{justify-content:flex-start !important;}} \ No newline at end of file diff --git a/src/JR.Cms.App/public/assets/bshare/README.md b/src/JR.Cms.App/public/assets/bshare/README.md new file mode 100644 index 000000000..47b59c8b0 --- /dev/null +++ b/src/JR.Cms.App/public/assets/bshare/README.md @@ -0,0 +1,14 @@ +百度分享用法: +``` + + + +``` \ No newline at end of file diff --git a/src/JR.Cms.App/public/assets/bshare/bshareC0.js b/src/JR.Cms.App/public/assets/bshare/bshareC0.js new file mode 100644 index 000000000..4f3e01bee --- /dev/null +++ b/src/JR.Cms.App/public/assets/bshare/bshareC0.js @@ -0,0 +1,8 @@ +(function(){function C(){var g=".bshare-custom{font-size:13px;line-height:16px !important;}.bshare-custom.icon-medium{font-size:14px;line-height:20px !important;}.bshare-custom.icon-medium-plus,.bshare-custom.icon-large{font-size:16px;line-height:26px !important;}.bshare-custom.icon-large{line-height:44px !important;}.bshare-custom a{padding-left:19px;height:16px;_height:18px;text-decoration:none;display:none;zoom:1;vertical-align:middle;cursor:pointer;color:#333;margin-right:3px;-moz-opacity:1;-khtml-opacity:1;opacity:1;}.bshare-custom a:hover{text-decoration:underline;-moz-opacity:0.75;-khtml-opacity:0.75;opacity:0.75;}.bshare-custom.icon-medium a{padding-left:27px;height:24px;}.bshare-custom.icon-medium-plus a{padding-left:35px;height:32px;}.bshare-custom.icon-large a{padding-left:53px;height:50px;}.bshare-custom .bshare-more{padding-left:0 !important;color:#333 !important;"+ + c+".bshare-custom #bshare-shareto{color:#333;text-decoration:none;font-weight:bold;margin-right:8px;"+c;for(b in d.pnMap)a=d.topMap[b],g+=".bshare-custom .bshare-"+b+'{background:url("'+p+(a?l:b)+q+'")'+(a?" no-repeat 0 "+a*D+"px;"+c:m)+".bshare-custom.icon-medium .bshare-"+b+'{background:url("'+r+(a?l:b)+'.gif")'+(a?" no-repeat 0 "+a*E+"px;"+c:m)+".bshare-custom.icon-medium-plus .bshare-"+b+'{background:url("'+s+(a?l:b)+'.gif")'+(a?" no-repeat 0 "+a*F+"px;"+c:m)+".bshare-custom.icon-large .bshare-"+ + b+'{background:url("'+t+(a?l:b)+'.gif")'+(a?" no-repeat 0 "+a*G+"px;"+c:m);g+='.bshare-custom #bshare-more-icon,.bshare-custom .bshare-more-icon{background:url("'+p+"more"+q+'") no-repeat;padding-left:19px !important;}.bshare-custom.icon-medium #bshare-more-icon,.bshare-custom.icon-medium .bshare-more-icon{background:url("'+r+'more.gif") no-repeat;padding-left:27px !important;}.bshare-custom.icon-medium-plus #bshare-more-icon,.bshare-custom.icon-medium-plus .bshare-more-icon{background:url("'+s+'more.gif") no-repeat;padding-left:35px !important;}.bshare-custom.icon-large #bshare-more-icon,.bshare-custom.icon-large .bshare-more-icon{background:url("'+ + t+'more.gif") no-repeat;padding-left:53px !important;}';for(b in y)e=H+y[b],g+=".bshare-custom .bshare-more."+e+"{background:url("+p+e+q+") no-repeat;}.bshare-custom.icon-medium a.bshare-more."+e+"{background:url("+r+e+".gif) no-repeat;}.bshare-custom.icon-medium-plus a.bshare-more."+e+"{background:url("+s+e+".gif) no-repeat;}.bshare-custom.icon-large a.bshare-more."+e+"{background:url("+t+e+".gif) no-repeat;}";g+=".bshare-custom .bshare-share-count{width:41px;background:transparent url("+h+"counter_box_18.gif) no-repeat;height:18px;line-height:18px !important;color:#333;text-align:center;font:bold 11px Arial,\u5b8b\u4f53,sans-serif;zoom:1;_padding-top:2px;"+ + c+".bshare-custom.icon-medium .bshare-share-count{width:45px;padding:0 0 0 2px;vertical-align:bottom;background:transparent url("+h+"counter_box_24.gif) no-repeat;height:24px;color:#444;line-height:24px !important;text-align:center;font:bold 12px Arial,\u5b8b\u4f53,sans-serif;zoom:1;_padding-top:5px;"+c+".bshare-custom.icon-medium-plus .bshare-share-count{width:60px !important;padding:0 0 0 3px;vertical-align:bottom;background:transparent url("+h+"counter_box_32.gif) no-repeat;height:32px;line-height:32px !important;text-align:center;color:#444;font:normal 18px Arial,\u5b8b\u4f53,sans-serif;zoom:1;_padding-top:6px;"+ + c+".bshare-custom.icon-large .bshare-share-count{width:94px !important;padding:0 0 0 5px;vertical-align:bottom;background:transparent url("+h+"counter_box_50.gif) no-repeat;height:50px;line-height:50px !important;text-align:center;color:#444;font:normal 22px Arial,\u5b8b\u4f53,sans-serif;zoom:1;_padding-top:12px;"+c;j.loadStyle(g);if(!d.anchorsBinded){d.anchorsBinded=!0;var u,v,z,k,g=function(a){if(!a)a=w.event;if(u=a.target||a.srcElement){v=u.className.split(" ");z=u.buttonIndex;for(f=0;f=0&&a.left>=0&&a.bottom<=(e.innerHeight||l.clientHeight)&&a.right<=(e.innerWidth||l.clientWidth);for(var b=a.offsetTop,c=a.offsetLeft,f=a.offsetWidth,k=a.offsetHeight;a.offsetParent;)a=a.offsetParent,b+=a.offsetTop,c+=a.offsetLeft;return b>=e.pageYOffset&&c>=e.pageXOffset&&b+k<=e.pageYOffset+e.innerHeight&&c+f<=e.pageXOffset+e.innerWidth},getElemById:function(a){return g.getElementById(a)},createElement:function(a,b,c,f,k){a=g.createElement(a);if(b)a.id=b;if(c)a.className= +c;if(f)a.style.cssText=f;if(k)a.innerHTML=k;return a},formatParam:function(a,b){return typeof a=="number"?+b:typeof a=="boolean"?/^true$/i.test(b):b},isUndefined:function(a){return typeof a=="undefined"},arrayContains:function(a,b,c){for(var f=a.length;f--;)if(!h.isUndefined(b)&&a[f]===b||!h.isUndefined(c)&&c.test(a[f]))return!0;return!1},loadScript:function(a,b){var c=h.requestedScripts;if(!h.arrayContains(c,a))/(bsMore|bshareS887)(Org)?\.js/.test(a)&&c.push(a),b=b||function(){},c=h.createElement("script"), +c.src=a,c.type="text/javascript",c.charset="utf-8",c.onload=b,c.onreadystatechange=function(){/complete|loaded/.test(this.readyState)&&b()},g.getElementsByTagName("head")[0].appendChild(c)},loadStyle:function(a){var b=h.createElement("style");b.type="text/css";b.styleSheet?b.styleSheet.cssText=a:b.appendChild(g.createTextNode(a));g.getElementsByTagName("head")[0].appendChild(b)},getOffset:function(a){for(var b={x:a.offsetLeft,y:a.offsetTop,h:a.offsetHeight,w:a.offsetWidth};a=a.offsetParent;b.x+=a.offsetLeft, +b.y+=a.offsetTop);return b},getElem:function(a,b,c,f){for(var a=a.getElementsByTagName(b),b=[],k=0,d=0,e=a.length;k=0&&/bshare.(cn|com|me)|static.(local|dev)/i.test(d)&&c.push(b[f])}return c},parseOptions:function(a,b){var c={};if(a=/\?(.*)|#(.*)/.exec(a))for(var a=a[0].slice(1).replace("+"," "),f=a.split(/[&;]/g),k=0,d=f.length;kbShare'};for(var f in c.defaultConfig)c.config[f]=c.defaultConfig[f];c.imageBasePath=c.shost+"/frame/images/";c.jsBasePath=c.shost+"/b/";c.addEntry=function(a){if(typeof c.counters=="number")c.counters=[];c.entries.push(a);c.counters.push(0)};return e[a]},parseBuzzOptions:function(a,b,c,f,k){var i;i=(a=h.getScript(b)[a])?h.parseOptions(a.src):{},a=i;k&&(a=k(a));for(var d in a)if(!h.isUndefined(a[d])&& +!(a[d]===null||typeof c[d]=="number"&&a[d]===""))h.isUndefined(c[d])?h.isUndefined(f[d])||(f[d]=h.formatParam(f[d],a[d])):c[d]=h.formatParam(c[d],a[d])}}}})(window,document);(function(e,g,l){var d=g.bShareUtil,h=g.bShareControl;if(!(h.count>0)){var a=d.createBuzzObject(e,{lang:"zh",height:0,width:0,image:"",bgc:"none",fgc:"#333",poptxtc:"#666",popbgc:"#f2f2f2",sn:!1,logo:!0,style:1,fs:0,inline:!1,beta:!1,popjs:"",popHCol:2,pop:0,mdiv:0,poph:"auto",bps:"",bps2:"",showShareCount:!0,icon:!0,text:null,promote:!1}),b=a.config,c=a.params;a.boxConfig={position:0,boxHeight:408,boxWidth:548,closeTop:8,closeRight:20,hasTop:!0,hasFrame:!0,hasMore:!0};a.boxConfigEC={position:0,boxHeight:404, +boxWidth:650,closeTop:10,closeRight:16,hasFrame:!0};a.boxConfigWX={id:"bsWXBox",position:0,boxHeight:245,boxWidth:220,closeTop:8,closeRight:20,hasTop:!0};a.customization={};a.loadOptions=function(){d.parseBuzzOptions(0,/button(Lite)?(Org)?\.js|bshare_load/,b,c,function(b){if(!d.isUndefined(g.bShareOpt))for(var c in g.bShareOpt)b[c]=g.bShareOpt[c];if(!d.arrayContains(a.langs,b.lang))b.lang="zh";if(b.h&&b.w&&b.img)b.height=b.h,b.width=b.w,b.image=b.img;b.bgc=b.bgcolor||void 0;b.fgc=b.textcolor||void 0; +b.logo=!(b.logo&&/^false$/i.test(b.logo));b.popHCol=b.pophcol||void 0;if(b.style)b.style=/^(-1|0|1|2|3|4|5|10|11|999)$/.test(b.style)?+b.style:void 0;if(b.bp)b.style&&b.style==2?b.bps2=b.bp.split(","):b.bps=b.bp.split(",");b.showShareCount=b.style&&/3|4|5/.test(b.style)?!1:!(b.ssc&&/^false$/i.test(b.ssc.toString()));b.type=g.BSHARE_BUTTON_TYPE||b.type;b.publisherUuid=b.uuid||void 0;return b});for(var f in a.defaultConfig)a.defaultConfig[f]!==b[f]&&(a.customization[f]=b[f]);if(c.type!=15)c.popcss= +"";if(g.location.href.indexOf(a.whost+"/moreStyles")<0)b.promote=!1};a.writeButton=function(){var c="",e={0:0,1:[110,85],10:[90,51],11:[82,82]},g={0:16,1:24,10:21,11:49},h=a.imageBasePath,i=b.style,m=b.image,o=b.showShareCount,n=b.width,p=b.height;/^(3|4|5)$/.test(i)||(c='
');i>1&&i<6?a.writeBshareDiv(c):i==-1?(d.getElem(l,"div","bshare-custom",function(b){if(!b.childNodes[0].className||b.childNodes[0].className.indexOf("bsPromo")<0){var c=d.createElement("div", +"","bsPromo bsPromo"+(a.isLite?2:1));b.insertBefore(c,b.childNodes[0])}}),(b.beta||b.popjs)&&a.writeBshareDiv('
'+b.text+"
","")):i>=0&&(i!=999&&(m=h+"logo_square_s.gif",i!=0&&(m=h+"button_custom"+i+"-"+(b.lang=="en"?"en":"zh"),o&&(m+="-c"),i==10&&(n=/Blue|Red|Green|Grey|Orange/.test(b.bgc)?b.bgc:"Orange",m+="-"+n),m+=".gif"),n=e[i][o?0:1],p=g[i]),c+='
'+(b.text===null?"\u5206\u4eab":b.text)+"
",o&&(c+='
 
')):(c+=";background:transparent url("+ +m+") no-repeat;text-align:center;width:"+n+'px;">',o&&i!=999&&(c+=''),c+=""),c+='
',a.writeBshareDiv(c,"font-size:12px;height:"+p+"px;width:"+n+"px;"))};a.more=function(){return typeof a.moreDiv=="function"?(a.moreDiv(),!0):!1};a.load=function(f){if(!f){if(b.mdiv<0)return;var e=0,q=setInterval(function(){a.more()||e>=30?clearInterval(q):++e},100);return!1}c.target= +f||"";a.click();a.disappear();a.prepare();if(!a.loadPlus||!a.loadPlus()){var j;if(f=="bsharesync")j=[a.whost,"/bsyncShare?site=",f].join(""),a.updateCounter(),a.shareStats(f),d.submitForm(j,c,"_blank");else if(f=="email")j=[a.bhost,"/bshareEmail"].join(""),a.shareStats(f),d.submitForm(j,c,"_blank");else if(f=="clipboard")d.copy2Clipboard(),a.shareStats(f);else if(f=="favorite")d.add2Bookmark(),a.shareStats(f);else if(f=="printer")d.add2Printer(),a.shareStats(f);else if(f=="weixin"){j=a.bhost+"/barCode?site=weixin"; +for(var i in c)!/content|target/.test(i)&&typeof c[i]!="function"&&(j+="&"+i+"="+d.encode(c[i]));l.getElementById("bsWXBox")||a.createBox(a.boxConfigWX);a.getFrame(a.boxConfigWX).innerHTML='';a.display(!1,a.boxConfigWX)}else{if(h.bShareLoad)for(i in j=a.bhost+"/bshare_redirect?site="+f,c)!/content|target/.test(i)&&typeof c[i]!="function"&&(j+="&"+i+"="+d.encode(c[i]));else(j=g.BS_PURL_MAP[f])||alert(a.iL8n.loadFailed), +f=="gmw"?j=d.replaceParam("${URL}",c.url.replace("https://",""),j):c.url&&(j=d.replaceParam("${URL}",c.url,j)),j=d.replaceParam("${TITLE}",c.title,j),j=d.replaceParam("${CONTENT}",c.summary,j),j=d.replaceParam("${IMG}",c.pic,j),j=d.replaceParam("${VIDEO}",c.video,j);g.open(j,"","height=600,width=800,top=100,left=100,screenX=100,screenY=100,scrollbars=yes,resizable=yes")}}};a.show=function(){a.load()};a.onLoad=function(){d.getElem(l,"a","bshareDiv",function(b,c){d.getElem(b,"div","buzzButton",function(b){b.onclick= +function(b){return function(c){a.more(c,b);return!1}}(c)})});var c=b.showShareCount;if(b.style==0){var e=d.getElem(l,"div","buzzButton")[0].offsetWidth;c&&(e+=41);d.getElem(l,"a","bshareDiv",function(a){a.style.width=e+"px"})}var h=a.entries.length;if(c&&h>0){for(var c="",j=0;j2E3)break;c!=""&&(c+="|");c+=i.url}}c!=""&&(c+="|");c+=g.location.href;a.count(c)}};a.renderButton=function(){d.loadStyle("a.bshareDiv,#bsPanel,#bsMorePanel,#bshareF{border:none;background:none;padding:0;margin:0;font:12px Helvetica,Calibri,Tahoma,Arial,\u5b8b\u4f53,sans-serif;line-height:14px;}#bsPanel div,#bsMorePanel div,#bshareF div{display:block;}.bsRlogo .bsPopupAwd,.bsRlogoSel .bsPopupAwd,.bsLogo .bsPopupAwd,.bsLogoSel .bsPopupAwd{line-height:16px !important;}a.bshareDiv div,#bsFloatTab div{*display:inline;zoom:1;display:inline-block;}a.bshareDiv img,a.bshareDiv div,a.bshareDiv span,a.bshareDiv a,#bshareF table,#bshareF tr,#bshareF td{text-decoration:none;background:none;margin:0;padding:0;border:none;line-height:1.2}a.bshareDiv span{display:inline;float:none;}div.buzzButton{cursor:pointer;font-weight:bold;}.buzzButton .shareCount a{color:#333}.bsStyle1 .shareCount a{color:#fff}span.bshareText{white-space:nowrap;}span.bshareText:hover{text-decoration:underline;}a.bshareDiv .bsPromo,div.bshare-custom .bsPromo{display:none;position:absolute;z-index:100;}a.bshareDiv .bsPromo.bsPromo1,div.bshare-custom .bsPromo.bsPromo1{width:51px;height:18px;top:-18px;left:0;line-height:16px;font-size:12px !important;font-weight:normal !important;color:#fff;text-align:center;background:url("+ +a.imageBasePath+"bshare_box_sprite2.gif) no-repeat 0 -606px;}div.bshare-custom .bsPromo.bsPromo2{background:url("+a.imageBasePath+"bshare_promo_sprite.gif) no-repeat;cursor:pointer;}");a.writeButton();c.type==15&&a.filterECPlats()};a.loadButtonStyle=function(){if(c.type!=15){var f,e=b.style;if(b.beta)f=a.jsBasePath+"styles/bshareS888.js?v=20150603";else if(b.popjs)f=b.popjs;else if(b.style!=-1&&(f=a.jsBasePath+"styles/bshareS"+(e>1&&e<6?e:1)+".js?v=20150603",b.pop==-1&&(e<=1||e>=6)))f="";f&&d.loadScript(f)}};a.international= +function(c){b.lang=="zh"?c():d.loadScript(a.jsBasePath+"langs/bs-lang-"+b.lang+".js?v=20150603",c)};a.start=function(){d.loadEngine&&(d.loadEngine(e),a.loadOptions(),a.international(function(){if(!a.completed){if(d.isUndefined(b.text)||b.text===null)b.text=b.style==0?a.iL8n.shareTextShort:a.iL8n.shareText;c.type!=1&&a.renderButton();d.createShareBox(e);if(c.type==15)a.boxConfig=a.boxConfigEC;a.createBox();b.mdiv>=0&&c.type!=15&&d.loadScript(a.jsBasePath+"components/bsMore.js?v=20150603");if(c.type==1)return a.load(), +!1;a.loadButtonStyle();a.onLoad();a.prepare(0);setTimeout(function(){h.viewed||a.view();setTimeout(function(){h.bShareLoad||d.loadScript(a.jsBasePath+"components/bsPlatforms.js?v=20150603")},3E3)},3E3);a.completed=!0}}))};a.init=function(){if(!a.isReady)a.isReady=!0,d.loadScript(a.jsBasePath+"engines/bs-engine.js?v=20150603",a.start)};d.loadScript(a.jsBasePath+"components/bsStatic.js?v=20150603")}})("bShare",window,document);(function(e,g,l){if(!(g.bShareControl.count>0)){g.bShareControl.count+=1;var d=g.bShareUtil,e=g[e],h=e.config;e.isLite=!0;e.customization.type="lite";e.writeBshareDiv=function(a,b){d.getElem(l,"a","bshareDiv",function(c){if(a)c.innerHTML=a;else if(c.innerHTML.length<24)c.innerHTML="";c.onclick=function(){return!1};c.style.cssText=(h.inline?"":"display:block;")+"text-decoration:none;padding:0;margin:0;"+b||""})};d.ready(e.init)}})("bShare",window,document);(function(){var e=window.bShare;if(!e)e=window.bShare={};e.pnMap={115:["115\u6536\u85cf\u5939",0],"139mail":["139\u90ae\u7bb1",2],"9dian":["\u8c46\u74e39\u70b9",6],baiducang:["\u767e\u5ea6\u641c\u85cf",7],baiduhi:["\u767e\u5ea6\u7a7a\u95f4",8],bgoogle:["Google\u4e66\u7b7e",10],bsharesync:["\u4e00\u952e\u901a",16],caimi:["\u8d22\u8ff7",17],cfol:["\u4e2d\u91d1\u5fae\u535a",18],chouti:["\u62bd\u5c49",20],clipboard:["\u590d\u5236\u7f51\u5740",21],cyolbbs:["\u4e2d\u9752\u8bba\u575b",22],cyzone:["\u521b\u4e1a\u5427",23],delicious:["\u7f8e\u5473\u4e66\u7b7e",24],dig24:["\u9012\u5ba2\u7f51",25],digg:["Digg",26],diglog:["\u5947\u5ba2\u53d1\u73b0",27],diigo:["Diigo",29],douban:["\u8c46\u74e3\u7f51",30],dream:["\u68a6\u5e7b\u4eba\u751f",31],duitang:["\u5806\u7cd6",32],eastdaymb:["\u4e1c\u65b9\u5fae\u535a",33],email:["\u7535\u5b50\u90ae\u4ef6", +34],evernote:["Evernote",35],facebook:["Facebook",36],fanfou:["\u996d\u5426",37],favorite:["\u6536\u85cf\u5939",38],feixin:["\u98de\u4fe1",39],friendfeed:["FriendFeed",40],fwisp:["Fwisp",42],ganniu:["\u8d76\u725b\u5fae\u535a",43],gmail:["Gmail",44],gmw:["\u5149\u660e\u7f51",45],gtranslate:["\u8c37\u6b4c\u7ffb\u8bd1",46],hemidemi:["\u9ed1\u7c73\u4e66\u7b7e",47],hexunmb:["\u548c\u8baf\u5fae\u535a",48],huaban:["\u82b1\u74e3",49],ifengkb:["\u51e4\u51f0\u5feb\u535a",50],ifengmb:["\u51e4\u51f0\u5fae\u535a",51],ifensi:["\u7c89\u4e1d\u7f51",52],instapaper:["Instapaper",53],itieba:["i\u8d34\u5427",54],joinwish:["\u597d\u613f\u7f51",55],kaixin001:["\u5f00\u5fc3\u7f51",56],laodao:["\u5520\u53e8\u7f51",57],leihou:["\u96f7\u7334",58],leshou:["\u4e50\u6536",59],linkedin:["LinkedIn", +60],livespace:["MS Livespace",61],mala:["\u9ebb\u8fa3\u5fae\u535a",63],masar:["\u739b\u6492\u7f51",65],meilishuo:["\u7f8e\u4e3d\u8bf4",66],miliao:["\u7c73\u804a",67],mister_wong:["Mister Wong",68],mogujie:["\u8611\u83c7\u8857",69],moptk:["\u732b\u6251\u63a8\u5ba2",70],msn:["MSN",71],myshare:["MyShare",72],myspace:["MySpace",73],neteasemb:["\u7f51\u6613\u5fae\u535a",74],netvibes:["Netvibes",75],peoplemb:["\u4eba\u6c11\u5fae\u535a",76],pinterest:["Pinterest",79],poco:["Poco\u7f51",81],printer:["\u6253\u5370",82],printf:["Print Friendly",83],qqmb:["\u817e\u8baf\u5fae\u535a",84],qqshuqian:["QQ\u4e66\u7b7e",85],qqxiaoyou:["\u670b\u53cb\u7f51",86],qzone:["QQ\u7a7a\u95f4",87],readitlater:["ReadItLater",88], +reddit:["Reddit",89],redmb:["\u7ea2\u5fae\u535a",90],renjian:["\u4eba\u95f4\u7f51",91],renmaiku:["\u4eba\u8109\u5e93",92],renren:["\u4eba\u4eba\u7f51",93],shouji:["\u624b\u673a",95],sinaminiblog:["\u65b0\u6d6a\u5fae\u535a",96],sinaqing:["\u65b0\u6d6aQing",97],sinavivi:["\u65b0\u6d6aVivi",98],sohubai:["\u641c\u72d0\u767d\u793e\u4f1a",99],sohuminiblog:["\u641c\u72d0\u5fae\u535a",100],southmb:["\u5357\u65b9\u5fae\u535a",101],stumbleupon:["StumbleUpon",102],szone:["\u5b88\u682a\u7f51",103],taojianghu:["\u6dd8\u6c5f\u6e56",104],tianya:["\u5929\u6daf",105],tongxue:["\u540c\u5b66\u5fae\u535a",106],tuita:["\u63a8\u4ed6",107],tumblr:["Tumblr",108],twitter:["Twitter",109],ushi:["\u4f18\u58eb\u7f51",110],waakee:["\u6316\u5ba2",112],wealink:["\u82e5\u90bb\u7f51",113],woshao:["\u6211\u70e7\u7f51",115],xianguo:["\u9c9c\u679c\u7f51", +116],xiaomeisns:["\u6821\u5a92\u91c7\u901a",117],xinminmb:["\u65b0\u6c11\u5fae\u535a",118],xyweibo:["\u5fae\u535a\u6821\u56ed",119],yaolanmb:["\u6447\u7bee\u5fae\u535a",120],yijee:["\u6613\u96c6\u7f51",121],youdao:["\u6709\u9053\u4e66\u7b7e",122],zjol:["\u6d59\u6c5f\u5fae\u535a",124],xinhuamb:["\u65b0\u534e\u5fae\u535a"],szmb:["\u6df1\u5733\u5fae\u535a"],changshamb:["\u5fae\u957f\u6c99"],hefeimb:["\u5408\u80a5\u5fae\u535a"],wansha:["\u73a9\u5565e\u65cf"],"189share":["\u624b\u673a\u5feb\u4f20"],diandian:["\u70b9\u70b9\u7f51"],tianji:["\u5929\u9645\u7f51"],jipin:["\u5f00\u5fc3\u96c6\u54c1"],chezhumb:["\u8f66\u4e3b\u5fae\u535a"],gplus:["Google+"],yidongweibo:["\u79fb\u52a8\u5fae\u535a"],youdaonote:["\u6709\u9053\u7b14\u8bb0"],jschina:["\u5fae\u6c5f\u82cf"],mingdao:["\u660e\u9053"],jxcn:["\u6c5f\u897f\u5fae\u535a"],qileke:["\u5947\u4e50\u6536\u85cf"],sohukan:["\u641c\u72d0\u968f\u8eab\u770b"],maikunote:["\u9ea6\u5e93\u8bb0\u4e8b"],lezhimark:["\u4e50\u77e5\u4e66\u7b7e"],"189mail":["189\u90ae\u7bb1"], +wo:["WO+\u5206\u4eab"],gmweibo:["\u5149\u660e\u5fae\u535a"],jianweibo:["\u5409\u5b89\u5fae\u535a"],qingbiji:["\u8f7b\u7b14\u8bb0"],duankou:["\u7aef\u53e3\u7f51"],qqim:["QQ\u597d\u53cb"],kdweibo:["\u4e91\u4e4b\u5bb6"],xueqiu:["\u96ea\u7403"],weixin:["\u5fae\u4fe1"]};e.iL8n={promoteHot:"\u70ed",promoteNew:"\u65b0",promoteRec:"\u63a8\u8350",rtnTxt:"\u9009\u62e9\u5176\u4ed6\u5e73\u53f0 >>",shareText:"\u5206\u4eab\u5230",shareTextShort:"\u5206\u4eab",shareTextPromote:"\u5206\u4eab\u6709\u793c",morePlats:"\u66f4\u591a\u5e73\u53f0...",morePlatsShort:"\u66f4\u591a...",whatsThis:"\u8fd9\u662f\u4ec0\u4e48\u5de5\u5177\uff1f",promote:"\u5206\u4eab\u6709\u793c",promoteShort:"\u5956",searchHint:"\u8f93\u5165\u5e73\u53f0\u5173\u952e\u5b57\u67e5\u8be2",closeHint:"30\u5206\u949f\u5185\u4e0d\u518d\u51fa\u73b0\u6b64\u5206\u4eab\u6846",loadFailed:"\u7f51\u7edc\u592a\u6162\u65e0\u6cd5\u52a0\u8f7d\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\u3002",loadFailed2:"\u5f88\u62b1\u6b49\uff0c\u65e0\u6cd5\u8fde\u63a5\u670d\u52a1\u5668\u3002\u8bf7\u7a0d\u540e\u91cd\u8bd5\uff01",notSupport:"\u4e0d\u652f\u6301\uff01",copySuccess:"\u590d\u5236\u6210\u529f\uff01\u60a8\u53ef\u4ee5\u7c98\u8d34\u5230QQ/MSN\u4e0a\u5206\u4eab\u7ed9\u60a8\u7684\u597d\u53cb\uff01", +copyTip:"\u8bf7\u6309Ctrl+C\u590d\u5236\uff0c\u7136\u540e\u60a8\u53ef\u4ee5\u7c98\u8d34\u5230QQ/MSN\u4e0a\u5206\u4eab\u7ed9\u60a8\u7684\u597d\u53cb\uff01",bookmarkTip:"\u6309\u4e86OK\u4ee5\u540e\uff0c\u8bf7\u6309Ctrl+D\uff08Macs\u7528Command+D\uff09\u3002",confirmClose:"\u5173\u95ed\u540e\uff0c\u8be5\u5206\u4eab\u6309\u94ae30\u5206\u949f\u5c06\u4e0d\u518d\u51fa\u73b0\uff0c\u60a8\u4e5f\u65e0\u6cd5\u4f7f\u7528\u5206\u4eab\u529f\u80fd\uff0c\u786e\u5b9a\u5417\uff1f"}})(); diff --git a/src/JR.Cms.App/public/mui/html/plugin/plugin_dashboard.html b/src/JR.Cms.App/public/mui/html/plugin/plugin_dashboard.html index 94f5b55fd..2573a36a5 100755 --- a/src/JR.Cms.App/public/mui/html/plugin/plugin_dashboard.html +++ b/src/JR.Cms.App/public/mui/html/plugin/plugin_dashboard.html @@ -183,7 +183,7 @@ descript= p.descript==''?'无说明': p.descript; var html = '

' + p.name + '

' + - '

' + descript + '

作者:' + author_id + '  版本:' + + '

' + descript + '

作者:' + author_id + '  版本:' + version + '
' + '' + (state == '1' ? '停用' : '启用') + ''; diff --git a/src/JR.Cms.App/public/mui/html/template/template_setting.html b/src/JR.Cms.App/public/mui/html/template/template_setting.html index b341f2237..4b02f7b9f 100755 --- a/src/JR.Cms.App/public/mui/html/template/template_setting.html +++ b/src/JR.Cms.App/public/mui/html/template/template_setting.html @@ -41,7 +41,7 @@
*站点地图分割符:
- +
diff --git a/src/JR.Cms.App/templates/default/archive.html b/src/JR.Cms.App/templates/default/archive.html index 219c373ff..250695cce 100755 --- a/src/JR.Cms.App/templates/default/archive.html +++ b/src/JR.Cms.App/templates/default/archive.html @@ -1,5 +1,5 @@ $require('${archive.id}') - + ${page.title} diff --git a/src/JR.Cms.App/templates/default/css/default/page.css b/src/JR.Cms.App/templates/default/css/default/page.css index 2c26e9167..92c9aca6e 100755 --- a/src/JR.Cms.App/templates/default/css/default/page.css +++ b/src/JR.Cms.App/templates/default/css/default/page.css @@ -412,7 +412,7 @@ div.palist a.title{padding-left:10px;background:url(images/ico.png) 0 center no- .page-search .list h2 a:link,.page-search .list h2:visited{color:#333;text-decoration:none;} .page-search .list li div.meta{margin:10px 0;color:#AAA;font-weight: bold;} .page-search .list li p.outline{color:#666;} -.page-search .list .search_hightlight{color:#D50000;} +.page-search .list .search-high-light{color:#D50000;} /** 品牌页 **/ .page-brands .top{border:solid 1px #ddd;padding:1em 2em;font-size:1.2em;line-height:2em;border-bottom:0;background:#FFE; diff --git a/src/JR.Cms.App/templates/default/index.html b/src/JR.Cms.App/templates/default/index.html index 9b11f5fbc..d9dc79a2e 100755 --- a/src/JR.Cms.App/templates/default/index.html +++ b/src/JR.Cms.App/templates/default/index.html @@ -2,8 +2,8 @@ ${page.title} - - + + diff --git a/src/JR.Cms.AspNet/Mvc/Routes.cs b/src/JR.Cms.AspNet/Mvc/Routes.cs index 398eaec79..03055813d 100755 --- a/src/JR.Cms.AspNet/Mvc/Routes.cs +++ b/src/JR.Cms.AspNet/Mvc/Routes.cs @@ -77,7 +77,7 @@ private static void RegisterInstalledCmsRoutes(RouteCollection routes, Type cmsH dict.Add(UrlRulePageKeys.Tag, new[] {"cms_tag", routePrefix + "tag", urlPrefix + "tag?t={0}"}); dict.Add(UrlRulePageKeys.TagPager, new[] {null, null, urlPrefix + "tag?t={0}&p={1}"}); - dict.Add(UrlRulePageKeys.Category, new[] {"cms_category", routePrefix + "{*all_cate}", urlPrefix + "{0}/"}); + dict.Add(UrlRulePageKeys.Category, new[] {"cms_category", routePrefix + "{*all_cate}", urlPrefix + "{0}"}); dict.Add(UrlRulePageKeys.CategoryPager, new[] {null, null, urlPrefix + "{0}/list_{1}.html"}); dict.Add(UrlRulePageKeys.Archive, diff --git a/src/JR.Cms/Cms.cs b/src/JR.Cms/Cms.cs index e85e9e792..93c1214bf 100755 --- a/src/JR.Cms/Cms.cs +++ b/src/JR.Cms/Cms.cs @@ -16,14 +16,12 @@ using JR.Cms.Library.CacheProvider; using JR.Cms.Library.CacheProvider.CacheComponent; using JR.Cms.Library.DataAccess.DB; -using JR.Cms.ServiceDto; +using JR.Stand.Abstracts; using JR.Stand.Core; -using JR.Stand.Core.Framework.IO; -using JR.Stand.Core.Framework.Web; +using JR.Stand.Core.Cache; using JR.Stand.Core.Framework.Web.UI; using JR.Stand.Core.PluginKernel; using JR.Stand.Core.Template.Impl; -using JR.Stand.Core.Utils; using JR.Stand.Core.Web; using JR.Stand.Core.Web.Cache; @@ -288,7 +286,7 @@ public static void Init(BootFlag flag, string confPath) // 初始化模板 Template = new CmsTemplate(_cache, TemplateNames.FileName); // 注册模板 - Template.Register("/" + CmsVariables.TEMPLATE_PATH); + Template.Register(CmsVariables.TEMPLATE_PATH); // 模板管理器 _templateManager = new TemplateManager(PhysicPath + CmsVariables.TEMPLATE_PATH); diff --git a/src/JR.Cms/Conf/Configuration.cs b/src/JR.Cms/Conf/Configuration.cs index 63d5aa51f..1fa2e6e81 100755 --- a/src/JR.Cms/Conf/Configuration.cs +++ b/src/JR.Cms/Conf/Configuration.cs @@ -56,7 +56,7 @@ public static void Configure() /// /// 文件路径 /// 返回加载消息,如成功返回空 - private static string Load(string filePath) + private static void Load(string filePath) { cmsConfFile = filePath; //从配置文件中加载 @@ -182,7 +182,6 @@ private static string Load(string filePath) } if (settingChanged) sf.Flush(); - return String.Empty; } private static int GetInt(SettingFile s, string key) @@ -383,7 +382,7 @@ internal static void LoadCmsConfig(String confPath) FileEncoder.DecodeFile(confPath, confPath, CmsVariables.FileEncodeHeader, CmsVariables.FileEncodeToken); } - Configuration.Load(confPath); + Load(confPath); if (isEncoded || Settings.SYS_ENCODE_CONF_FILE) { FileEncoder.EncodeFile(confPath, confPath, CmsVariables.FileEncodeHeader, diff --git a/src/JR.Cms/Conf/LangReader.cs b/src/JR.Cms/Conf/LangReader.cs index c535383b3..5373724fb 100755 --- a/src/JR.Cms/Conf/LangReader.cs +++ b/src/JR.Cms/Conf/LangReader.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Web; using System.Xml; +using JR.Stand.Abstracts; using JR.Stand.Core.Utils; using JR.Stand.Core.Web.Cache; diff --git a/src/JR.Cms/Conf/Settings.cs b/src/JR.Cms/Conf/Settings.cs index 433d2992f..659eeeb10 100755 --- a/src/JR.Cms/Conf/Settings.cs +++ b/src/JR.Cms/Conf/Settings.cs @@ -19,6 +19,9 @@ namespace JR.Cms.Conf { + /// + /// + /// public struct Settings { static Settings() diff --git a/src/JR.Cms/Core/CmsTemplate.cs b/src/JR.Cms/Core/CmsTemplate.cs index 337babb6f..c51d00bab 100755 --- a/src/JR.Cms/Core/CmsTemplate.cs +++ b/src/JR.Cms/Core/CmsTemplate.cs @@ -15,6 +15,7 @@ using System.Collections.Generic; using System.Text.RegularExpressions; using JR.Cms.Conf; +using JR.Stand.Abstracts; using JR.Stand.Abstracts.Web; using JR.Stand.Core.Framework.Web; using JR.Stand.Core.Template.Impl; @@ -124,10 +125,10 @@ public CmsTemplate(IMemoryCacheWrapper cache, TemplateNames names) { EnabledCompress = Settings.TPL_USE_COMPRESS, // 非正式环境关闭模板缓存 - EnabledCache = !Cms.OfficialEnvironment && Settings.TPL_USE_CACHE, + EnabledCache = Cms.OfficialEnvironment && Settings.TPL_USE_CACHE, UrlQueryShared = true, HttpItemShared = true, - Names = names, + Names = names }; registry = new TemplateRegistry(CreateContainer(), opt); } @@ -237,6 +238,14 @@ public void Reload() registry.Reload(); } + /// + /// 清理页面缓存 + /// + public void CleanPageCache() + { + Cms.Cache.RemoveKeys("site:page"); + } + /// /// /// diff --git a/src/JR.Cms/Core/TemplateSettings.cs b/src/JR.Cms/Core/TemplateSettings.cs index 5b9bd1e9b..e29866894 100755 --- a/src/JR.Cms/Core/TemplateSettings.cs +++ b/src/JR.Cms/Core/TemplateSettings.cs @@ -17,16 +17,15 @@ public class ContainSetting : Attribute /// public class TemplateSetting { - private SettingFile sf; - private string tplName; + private readonly string _tplName; private bool _cfgShowError = true; - private int _cfgOutlineLength = 80; - private string _cfgSitemapSplit = ">"; + private int _cfgOutlineLength = 50; + private string _cfgSiteMapSplit = ">"; private string _cfgArchiveTagsFormat = "{text}"; - private string _cfgNavigatorLinkFormat = "{text}"; - private string _cfgNavigatorChildFormat = "{text}"; + private string _cfgNavigatorLinkFormat = "{text}"; + private string _cfgNavigatorChildFormat = "{text}"; private int _cfgFriendShowNum = 50; - private string _cfgFriendLinkFormat = "{text}"; + private string _cfgFriendLinkFormat = "{text}"; private string _cfgTrafficFormat = "今日IP:{todayip},今日PV:{todaypv},历史PV:{totalpv},历史IP:{totalip}"; private string _cfgCommentEditorHtml = string.Empty; @@ -42,15 +41,20 @@ public class TemplateSetting private string _cfgCategoryLinkFormat = "
  • {title}
  • "; private bool _cfgAllowAmousComment = true; private bool _cfgEnabledMobiPage = false; - private string _tplDirName; + private readonly string _tplDirName; + /// + /// + /// + /// + /// public TemplateSetting(string tplName, string confPath) { _tplDirName = tplName; - this.tplName = tplName; - sf = new SettingFile(confPath); - if (sf.Contains("TPL_NAME")) this.tplName = sf.Get("TPL_NAME"); + this._tplName = tplName; + var sf = new SettingFile(confPath); + if (sf.Contains("TPL_NAME")) this._tplName = sf.Get("TPL_NAME"); #region 获取设置 @@ -58,7 +62,7 @@ public TemplateSetting(string tplName, string confPath) if (sf.Contains("CFG_EnabledMobiPage")) _cfgEnabledMobiPage = sf["CFG_EnabledMobiPage"] == "true"; - if (sf.Contains("CFG_SitemapSplit")) _cfgSitemapSplit = sf["CFG_SitemapSplit"]; + if (sf.Contains("CFG_SitemapSplit")) _cfgSiteMapSplit = sf["CFG_SitemapSplit"]; if (sf.Contains("CFG_ArchiveTagsFormat")) _cfgArchiveTagsFormat = sf["CFG_ArchiveTagsFormat"]; if (sf.Contains("CFG_NavigatorLinkFormat")) _cfgNavigatorLinkFormat = sf["CFG_NavigatorLinkFormat"]; if (sf.Contains("CFG_NavigatorChildFormat")) _cfgNavigatorChildFormat = sf["CFG_NavigatorChildFormat"]; @@ -111,8 +115,8 @@ public int CfgOutlineLength /// public string CFG_SitemapSplit { - get => _cfgSitemapSplit; - set => _cfgSitemapSplit = value; + get => _cfgSiteMapSplit; + set => _cfgSiteMapSplit = value; } /// @@ -237,9 +241,9 @@ public void Save() var sf = new SettingFile(string.Format("{0}templates/{1}/tpl.conf", Cms.PhysicPath, _tplDirName)); /**************** 模板设置 ****************/ - sf.Set("TPL_NAME", tplName); + sf.Set("TPL_NAME", _tplName); sf.Set("CFG_ShowErrror", CfgShowError ? "true" : "false"); - sf.Set("CFG_SitemapSplit", _cfgSitemapSplit); + sf.Set("CFG_SitemapSplit", _cfgSiteMapSplit); sf.Set("CFG_ArchiveTagsFormat", _cfgArchiveTagsFormat); sf.Set("CFG_NavigatorLinkFormat", _cfgNavigatorLinkFormat); sf.Set("CFG_NavigatorChildFormat", _cfgNavigatorChildFormat); diff --git a/src/JR.Cms/Domain/Content/ContentContainer.cs b/src/JR.Cms/Domain/Content/ContentContainer.cs index 7e3264207..1c29be827 100755 --- a/src/JR.Cms/Domain/Content/ContentContainer.cs +++ b/src/JR.Cms/Domain/Content/ContentContainer.cs @@ -79,7 +79,7 @@ public IEnumerable GetArchivesByCategoryPath(string catPath, bool incl private int[] GetCatArrayByPath(ICategory ic) { if (ic == null) return new int[] { }; - IList list = ic.Childs.Select(a => a.GetDomainId()).ToList(); + IList list = ic.Children.Select(a => a.GetDomainId()).ToList(); list.Insert(0, ic.GetDomainId()); return list.ToArray(); } diff --git a/src/JR.Cms/Domain/Interface/Site/Category/ICategory.cs b/src/JR.Cms/Domain/Interface/Site/Category/ICategory.cs index 354828cec..7ef08ee07 100755 --- a/src/JR.Cms/Domain/Interface/Site/Category/ICategory.cs +++ b/src/JR.Cms/Domain/Interface/Site/Category/ICategory.cs @@ -83,12 +83,12 @@ public interface ICategory : IDomain /// /// 子栏目 /// - IEnumerable Childs { get; } + IEnumerable Children { get; } /// /// 下一级子栏目 /// - IEnumerable NextLevelChilds { get; } + IEnumerable NextLevelChildren { get; } /// diff --git a/src/JR.Cms/Domain/Interface/Site/Category/ICategoryRepository.cs b/src/JR.Cms/Domain/Interface/Site/Category/ICategoryRepository.cs index 115f93924..16274c39a 100755 --- a/src/JR.Cms/Domain/Interface/Site/Category/ICategoryRepository.cs +++ b/src/JR.Cms/Domain/Interface/Site/Category/ICategoryRepository.cs @@ -65,9 +65,19 @@ public interface ICategoryRepo /// /// /// - IEnumerable GetNextLevelChilds(ICategory category); + IEnumerable GetNextLevelChildren(ICategory category); + /// + /// + /// + /// + /// void SaveCategorySortNumber(int id, int sortNumber); + /// + /// + /// + /// + /// int GetMaxSortNumber(int siteId); /// diff --git a/src/JR.Cms/Domain/Site/Category/Category.cs b/src/JR.Cms/Domain/Site/Category/Category.cs index fe6bb0de1..769f2803f 100755 --- a/src/JR.Cms/Domain/Site/Category/Category.cs +++ b/src/JR.Cms/Domain/Site/Category/Category.cs @@ -117,7 +117,7 @@ public Error Save() // 更新子栏目的Tag if (pathRenew) { - foreach (var ic in NextLevelChilds)ic.ForceUpdatePath(); + foreach (var ic in NextLevelChildren)ic.ForceUpdatePath(); // 替换文档路径 _repo.ReplaceArchivePath(value.SiteId, _oldPath, value.Path); } @@ -175,8 +175,8 @@ private void SetAutoSortNumber() return; } - if (Parent.Childs != null && Parent.Childs.Any()) - value.SortNumber = Parent.Childs.Max(a => a.Get().SortNumber) + 1; + if (Parent.Children != null && Parent.Children.Any()) + value.SortNumber = Parent.Children.Max(a => a.Get().SortNumber) + 1; else value.SortNumber = 1; } @@ -277,7 +277,7 @@ public ICategory Parent set => _parent = value; } - public IEnumerable Childs + public IEnumerable Children { get { @@ -286,13 +286,18 @@ public IEnumerable Childs } } - public IEnumerable NextLevelChilds + /// + public IEnumerable NextLevelChildren { get { - if (_nextLevelChilds == null) - _nextLevelChilds = _repo.GetNextLevelChilds(this).OrderBy(a => a.Get().SortNumber); - return _nextLevelChilds; + if (this._nextLevelChilds == null) + { + this._nextLevelChilds = _repo.GetNextLevelChildren(this) + .OrderBy(a => a.Get().SortNumber); + } + + return this._nextLevelChilds; } } @@ -304,7 +309,7 @@ public IEnumerable NextLevelChilds public void ClearSelf() { - foreach (var category in Childs) category.ClearSelf(); + foreach (var category in Children) category.ClearSelf(); _childs = null; _parent = null; @@ -322,7 +327,7 @@ public void MoveSortUp() { if (Parent != null) { - var list = Parent.Childs.OrderBy(a => a.Get().SortNumber).ToArray(); + var list = Parent.Children.OrderBy(a => a.Get().SortNumber).ToArray(); for (var i = 0; i < list.Length; i++) if (list[i].GetDomainId() == GetDomainId() && i != 0) { @@ -339,7 +344,7 @@ public void MoveSortDown() { if (Parent != null) { - var list = Parent.Childs.OrderBy(a => a.Get().SortNumber).ToArray(); + var list = Parent.Children.OrderBy(a => a.Get().SortNumber).ToArray(); for (var i = 0; i < list.Length; i++) if (list[i].GetDomainId() == GetDomainId() && i < list.Length - 1) { @@ -462,7 +467,7 @@ public void ForceUpdatePath() var err = Save(); if (err == null) { - foreach (var ic in NextLevelChilds) + foreach (var ic in NextLevelChildren) { ic.ForceUpdatePath(); } diff --git a/src/JR.Cms/Domain/Site/Site.cs b/src/JR.Cms/Domain/Site/Site.cs index 4739e29a1..490357220 100755 --- a/src/JR.Cms/Domain/Site/Site.cs +++ b/src/JR.Cms/Domain/Site/Site.cs @@ -234,7 +234,7 @@ public Error DeleteCategory(int catId) { var category = GetCategory(catId); if (category == null) return new Error("栏目不存在!"); - if (category.Childs.Count() != 0) return new Error("栏目包含子栏目!"); + if (category.Children.Count() != 0) return new Error("栏目包含子栏目!"); if (_categoryRep.GetArchiveCount(GetAggregateRootId(), category.Get().Path) != 0) return new Error("栏目包含文档!"); foreach (var bind in category.GetTemplates()) _tempRep.RemoveBind(category.GetDomainId(), bind.BindType); @@ -399,7 +399,7 @@ private string GetCategoryNodeValue(ICategory cat) private void ItrNodeTree(TreeNode node, ICategory root) { - IEnumerable list = root.NextLevelChilds.OrderBy(a => a.Get().SortNumber); + IEnumerable list = root.NextLevelChildren.OrderBy(a => a.Get().SortNumber); foreach (var c in list) { var nodeValue = GetCategoryNodeValue(c); @@ -424,7 +424,7 @@ public void HandleCategoryTree(int parentId, CategoryTreeHandler treeHandler) private void ItrCategoryTree(ICategory root, int level, bool isLast, CategoryTreeHandler handler) { if (root.GetDomainId() != 0) handler(root, level, isLast); - IEnumerable list = root.NextLevelChilds.OrderBy(a => a.Get().SortNumber); + IEnumerable list = root.NextLevelChildren.OrderBy(a => a.Get().SortNumber); var len = list.Count(); if (len > 0) { diff --git a/src/JR.Cms/Library/CacheProvider/CacheComponent/BuiltCacheResultHandler.cs b/src/JR.Cms/Library/CacheProvider/CacheComponent/BuiltCacheResultHandler.cs index 15f867430..96de0a78f 100755 --- a/src/JR.Cms/Library/CacheProvider/CacheComponent/BuiltCacheResultHandler.cs +++ b/src/JR.Cms/Library/CacheProvider/CacheComponent/BuiltCacheResultHandler.cs @@ -13,5 +13,5 @@ namespace JR.Cms.Library.CacheProvider.CacheComponent /// 创建缓存数据结果事件 /// /// - public delegate T BuiltCacheResultHandler(); + public delegate T BuiltCacheResultHandler(); } \ No newline at end of file diff --git a/src/JR.Cms/Library/CacheProvider/CacheComponent/CmsCache.cs b/src/JR.Cms/Library/CacheProvider/CacheComponent/CmsCache.cs index 3202b15c7..58f4ea1eb 100755 --- a/src/JR.Cms/Library/CacheProvider/CacheComponent/CmsCache.cs +++ b/src/JR.Cms/Library/CacheProvider/CacheComponent/CmsCache.cs @@ -12,6 +12,7 @@ using System.IO; using System.Text; using JR.Cms.Infrastructure; +using JR.Stand.Abstracts; using JR.Stand.Abstracts.Web; using JR.Stand.Core.Framework; using JR.Stand.Core.Framework.Web.Cache; @@ -47,10 +48,14 @@ public override void Insert(string key, object value, string filename) public override void Clear(string keySign) { - if (keySign != null) - foreach (var key in cache.GetCacheKeys()) - if (key.StartsWith(keySign)) - cache.Remove(key); + if (keySign == null) return; + foreach (var key in cache.GetCacheKeys()) + { + if (key.StartsWith(keySign)) + { + cache.Remove(key); + } + } } public override object Get(string key) @@ -99,6 +104,19 @@ public override int GetInt(string key) { return this.cache.GetInt(key); } + + /// + /// 删除指定前缀的键 + /// + /// + public override void RemoveKeys(string prefix) + { + var list = this.cache.SearchKeys("^" + prefix); + foreach (var l in list) + { + this.cache.Remove(l); + } + } } @@ -182,11 +200,20 @@ public void Insert(string key, object value) _dependCache.Insert(key, value); } + /// + /// + /// + /// public void Clear(string keySign) { _dependCache.Clear(keySign); } + /// + /// + /// + /// + /// public object Get(string cacheKey) { return _dependCache.Get(cacheKey); @@ -204,5 +231,10 @@ public int GetInt(string key) { return this._dependCache.GetInt(key); } + + public void RemoveKeys(string prefix) + { + this._dependCache.RemoveKeys(prefix); + } } } \ No newline at end of file diff --git a/src/JR.Cms/Library/CacheProvider/CacheComponent/CmsCacheBase.cs b/src/JR.Cms/Library/CacheProvider/CacheComponent/CmsCacheBase.cs index 6f8944bc5..b38086a49 100755 --- a/src/JR.Cms/Library/CacheProvider/CacheComponent/CmsCacheBase.cs +++ b/src/JR.Cms/Library/CacheProvider/CacheComponent/CmsCacheBase.cs @@ -54,6 +54,7 @@ public virtual string Rebuilt() } public abstract int GetInt(string key); + public abstract void RemoveKeys(string prefix); /// diff --git a/src/JR.Cms/Library/CacheProvider/CacheComponent/CmsCacheUtility.cs b/src/JR.Cms/Library/CacheProvider/CacheComponent/CmsCacheUtility.cs index f073c7ad1..c1af3967b 100755 --- a/src/JR.Cms/Library/CacheProvider/CacheComponent/CmsCacheUtility.cs +++ b/src/JR.Cms/Library/CacheProvider/CacheComponent/CmsCacheUtility.cs @@ -9,18 +9,25 @@ using System; using System.Reflection; +using JR.Stand.Abstracts.Cache; namespace JR.Cms.Library.CacheProvider.CacheComponent { /// /// Description of CmsCacheUtility. /// - public class CmsCacheUtility + public static class CmsCacheUtility { - public static void EvalCacheUpdate(MethodInfo method) where T : Attribute, ICacheUpdatePolicy + /// + /// + /// + /// + /// + public static void EvalCacheUpdate(MethodInfo method) where T : Attribute, ICachePolicy { var attrs = method.GetCustomAttributes(typeof(T), false); - if (attrs.Length != 0) (attrs[0] as ICacheUpdatePolicy).Clear(); + if (attrs.Length == 0) return; + (attrs[0] as ICachePolicy)?.Clean(); } } } \ No newline at end of file diff --git a/src/JR.Cms/Library/CacheProvider/CacheComponent/ICmsCache.cs b/src/JR.Cms/Library/CacheProvider/CacheComponent/ICmsCache.cs index 2e3e28521..864b8ca5c 100755 --- a/src/JR.Cms/Library/CacheProvider/CacheComponent/ICmsCache.cs +++ b/src/JR.Cms/Library/CacheProvider/CacheComponent/ICmsCache.cs @@ -48,5 +48,11 @@ public interface ICmsCache /// 键 /// int GetInt(string key); + + /// + /// 移出指定前缀的缓存 + /// + /// + void RemoveKeys(string prefix); } } \ No newline at end of file diff --git a/src/JR.Cms/Library/CacheProvider/CacheUpdateAttribute.cs b/src/JR.Cms/Library/CacheProvider/CacheUpdateAttribute.cs index 988649de0..34971882e 100755 --- a/src/JR.Cms/Library/CacheProvider/CacheUpdateAttribute.cs +++ b/src/JR.Cms/Library/CacheProvider/CacheUpdateAttribute.cs @@ -9,6 +9,7 @@ using System; using JR.Cms.Library.CacheProvider.CacheComponent; +using JR.Stand.Abstracts.Cache; namespace JR.Cms.Library.CacheProvider { @@ -16,14 +17,14 @@ namespace JR.Cms.Library.CacheProvider /// Description of CacheUpdateAttribute. /// [AttributeUsage(AttributeTargets.Method)] - public class CacheUpdateAttribute : Attribute, ICacheUpdatePolicy + public class CacheAttribute : Attribute, ICachePolicy { - public CacheUpdateAttribute(string cacheKey) + public CacheAttribute(string cacheKey) { Key = cacheKey; } - public CacheUpdateAttribute(CacheSign sign) + public CacheAttribute(CacheSign sign) { Key = sign.ToString(); } @@ -31,7 +32,7 @@ public CacheUpdateAttribute(CacheSign sign) public string Key { get; private set; } - public void Clear() + public void Clean() { CmsCacheFactory.Singleton.Clear(Key); } diff --git a/src/JR.Cms/Library/CacheProvider/CmsCacheFactory.cs b/src/JR.Cms/Library/CacheProvider/CmsCacheFactory.cs index b22207666..589b6bee3 100755 --- a/src/JR.Cms/Library/CacheProvider/CmsCacheFactory.cs +++ b/src/JR.Cms/Library/CacheProvider/CmsCacheFactory.cs @@ -1,4 +1,5 @@ using JR.Cms.Library.CacheProvider.CacheComponent; +using JR.Stand.Abstracts; using JR.Stand.Core.Utils; namespace JR.Cms.Library.CacheProvider diff --git a/src/JR.Cms/Repository/CategoryRepository.cs b/src/JR.Cms/Repository/CategoryRepository.cs index c333e0bdd..adb4b92b8 100755 --- a/src/JR.Cms/Repository/CategoryRepository.cs +++ b/src/JR.Cms/Repository/CategoryRepository.cs @@ -108,14 +108,19 @@ public string catPathKey(int siteId, string path) } + /// + /// + /// + /// + /// + /// public ICategory GetCategoryByPath(int siteId, string path) { ChkPreload(); - IList list; if (Categories.ContainsKey(siteId)) { - list = GetCategories(siteId); - return list.FirstOrDefault(a => string.Compare(a.Get().Path, path) == 0); + var list = GetCategories(siteId); + return list.FirstOrDefault(a => String.CompareOrdinal(a.Get().Path, path) == 0); } return null; @@ -207,25 +212,33 @@ public IEnumerable GetChilds(int siteId, string catPath) } - public IEnumerable GetNextLevelChilds(ICategory category) + /// + /// + /// + /// + /// + public IEnumerable GetNextLevelChildren(ICategory category) { ChkPreload(); var catId = category.GetDomainId(); - var catgories = GetCategories(category.Get().SiteId); - return catgories.Where(a => a.Get().ParentId == catId); + var categories = GetCategories(category.Get().SiteId); + return categories.Where(a => a.Get().ParentId == catId); } + /// public void SaveCategorySortNumber(int id, int sortNumber) { categoryDal.SaveSortNumber(id, sortNumber); } + /// public int GetArchiveCount(int siteId, string catPath) { return categoryDal.GetCategoryArchivesCount(siteId, catPath); } + /// public void DeleteCategory(int siteId, int catId) { var result = categoryDal.DeleteSelfAndChildCategoy(siteId, catId); diff --git a/src/JR.Cms/ServiceImpl/ArchiveService.cs b/src/JR.Cms/ServiceImpl/ArchiveService.cs index c2a551329..4c15feabb 100755 --- a/src/JR.Cms/ServiceImpl/ArchiveService.cs +++ b/src/JR.Cms/ServiceImpl/ArchiveService.cs @@ -342,7 +342,7 @@ public DataTable GetPagedArchives( private int[] GetCatArrayByPath(ICategory ic) { if (ic == null) return new int[] { }; - IList list = ic.Childs.Select(a => a.GetDomainId()).ToList(); + IList list = ic.Children.Select(a => a.GetDomainId()).ToList(); list.Insert(0, ic.GetDomainId()); return list.ToArray(); } diff --git a/src/JR.Cms/ServiceImpl/SiteServiceImpl.cs b/src/JR.Cms/ServiceImpl/SiteServiceImpl.cs index a5837b184..9dfb908dc 100755 --- a/src/JR.Cms/ServiceImpl/SiteServiceImpl.cs +++ b/src/JR.Cms/ServiceImpl/SiteServiceImpl.cs @@ -178,13 +178,20 @@ public IEnumerable GetCategories(int siteId) foreach (var category in categories) yield return CategoryDto.ConvertFrom(category); } - public IEnumerable GetCategories( - int siteId, string catPath) + /// + /// + /// + /// + /// + /// + public IEnumerable GetCategories(int siteId, string catPath) { var site = _repo.GetSiteById(siteId); - var ic = _categoryRep.GetCategoryByPath(siteId, catPath); + ICategory ic = catPath == "root" || String.IsNullOrEmpty(catPath) + ? this._categoryRep.CreateCategory(new CmsCategoryEntity {SiteId = siteId,ParentId = 0}) + : this._categoryRep.GetCategoryByPath(siteId, catPath); if (ic == null) yield break; - foreach (var category in ic.NextLevelChilds) yield return CategoryDto.ConvertFrom(category); + foreach (var category in ic.NextLevelChildren) yield return CategoryDto.ConvertFrom(category); } public Error DeleteCategory(int siteId, int catId) @@ -419,7 +426,7 @@ private void ItrCloneCate(ISite toSite, ICategory fromCate, int parentCateId, bo bool includeTemplateBind) { var newCategory = toSite.GetCategory(parentCateId); - foreach (var cate in fromCate.NextLevelChilds) + foreach (var cate in fromCate.NextLevelChildren) { var r = CloneCategoryDetails(toSite.GetAggregateRootId(), cate, newCategory.GetDomainId(), includeExtend, includeTemplateBind); diff --git a/src/JR.Cms/TemplateUrlRule.cs b/src/JR.Cms/TemplateUrlRule.cs index 6d4ff497a..50d4070e3 100755 --- a/src/JR.Cms/TemplateUrlRule.cs +++ b/src/JR.Cms/TemplateUrlRule.cs @@ -14,15 +14,21 @@ namespace JR.Cms { + /// + /// + /// public static class TemplateUrlRule { - public static string[,] urls; + private static readonly string[,] urls; + /// + /// + /// public static string[,] Urls => urls; static TemplateUrlRule() { - urls = new string[,] + urls = new[,] { // ID:0 自定义Url { @@ -36,8 +42,8 @@ static TemplateUrlRule() // ID:1 适用于MVC { - "admin/", - "{0}/", //栏目页面 + "admin", + "{0}", //栏目页面 "{0}/{1}/", //栏目分页 "{0.html", "{0}/{1}.html", //文档页面 @@ -62,12 +68,11 @@ static TemplateUrlRule() }; } - internal static int templateUrlRuleIndex = 1; + private static int templateUrlRuleIndex = 1; /// /// 设置模板URL方案 /// - /// public static void SetRule(UrlRuleType type) { templateUrlRuleIndex = (int) type; diff --git a/src/JR.Cms/Web/Editor/KindEditor.cs b/src/JR.Cms/Web/Editor/KindEditor.cs index b692f55d3..75c1f3c7f 100755 --- a/src/JR.Cms/Web/Editor/KindEditor.cs +++ b/src/JR.Cms/Web/Editor/KindEditor.cs @@ -69,7 +69,7 @@ public Task FileManagerRequest(ICompatibleHttpContext context) String currentDirPath = ""; String moveUpDirPath = ""; - String dirPath = EnvUtil.GetBaseDirectory()+this._rootPath; + String dirPath = EnvUtil.GetBaseDirectory() + this._rootPath; String dirName = context.Request.Query("dir"); if (!String.IsNullOrEmpty(dirName)) { @@ -199,7 +199,6 @@ public Task FileManagerRequest(ICompatibleHttpContext context) } - /// /// 处理上传 /// @@ -225,10 +224,10 @@ public Task UploadRequest(ICompatibleHttpContext context) ICompatiblePostedFile imgFile = context.Request.File("imgFile"); if (imgFile == null) { - return this.showError(context,"请选择文件。"); + return this.showError(context, "请选择文件。"); } - String dirPath = EnvUtil.GetBaseDirectory()+ this._rootPath; + String dirPath = EnvUtil.GetBaseDirectory() + this._rootPath; if (!Directory.Exists(dirPath)) { Directory.CreateDirectory(dirPath).Create(); @@ -243,7 +242,7 @@ public Task UploadRequest(ICompatibleHttpContext context) if (!extTable.ContainsKey(dirName)) { - return this.showError(context,"目录名不正确。"); + return this.showError(context, "目录名不正确。"); } String fileName = imgFile.GetFileName(); @@ -251,13 +250,13 @@ public Task UploadRequest(ICompatibleHttpContext context) if (imgFile.GetLength() > maxSize) { - return this.showError(context,"上传文件大小超过限制。"); + return this.showError(context, "上传文件大小超过限制。"); } if (String.IsNullOrEmpty(fileExt) || Array.IndexOf(((String) extTable[dirName]).Split(','), fileExt.Substring(1).ToLower()) == -1) { - return this.showError(context,"上传文件扩展名是不允许的扩展名。\n只允许" + ((String) extTable[dirName]) + "格式。"); + return this.showError(context, "上传文件扩展名是不允许的扩展名。\n只允许" + ((String) extTable[dirName]) + "格式。"); } //创建文件夹 @@ -290,11 +289,7 @@ public Task UploadRequest(ICompatibleHttpContext context) targetPath = dirPath + newFileName; } - using (FileStream fs = new FileStream(targetPath, FileMode.Create)) - { - imgFile.CopyToAsync(fs); - fs.Flush(); - } + SaveFile(imgFile, targetPath); String fileUrl = saveUrl + newFileName; @@ -304,12 +299,21 @@ public Task UploadRequest(ICompatibleHttpContext context) return context.Response.WriteAsync(JsonAnalyzer.ToJson(hash)); } - private Task showError(ICompatibleHttpContext context,string message) + private async void SaveFile(ICompatiblePostedFile imgFile, string targetPath) + { + using (FileStream fs = new FileStream(targetPath, FileMode.Create)) + { + await imgFile.CopyToAsync(fs); + fs.Flush(); + } + } + + private Task showError(ICompatibleHttpContext context, string message) { Hashtable hash = new Hashtable {["error"] = 1, ["message"] = message}; return context.Response.WriteAsync(JsonAnalyzer.ToJson(hash)); } - + public class NameSorter : IComparer { public int Compare(object x, object y) diff --git a/src/JR.Cms/Web/Manager/FileExplor.cs b/src/JR.Cms/Web/Manager/FileExplor.cs index 79265de25..ca74aaf30 100755 --- a/src/JR.Cms/Web/Manager/FileExplor.cs +++ b/src/JR.Cms/Web/Manager/FileExplor.cs @@ -147,7 +147,7 @@ internal static bool Delete(string dir, string file, bool isDir) if (string.CompareOrdinal(s, file) == 0) return false; Directory.Delete(path + "/"); //目录下有文件,不能删除 - CheckReloadTemplate(path, true); + Helper.CheckReloadTemplate(path, true); } else { @@ -157,7 +157,7 @@ internal static bool Delete(string dir, string file, bool isDir) return false; File.Delete(path); - CheckReloadTemplate(path, false); + Helper.CheckReloadTemplate(path, false); } return true; @@ -181,12 +181,12 @@ internal static bool Rename(string dir, string file, string newFile, bool isDir) if (isDir) { Directory.Move(path + "/", newPath + "/"); - CheckReloadTemplate(path, true); + Helper.CheckReloadTemplate(path, true); } else { File.Move(path, newPath); - CheckReloadTemplate(path, false); + Helper.CheckReloadTemplate(path, false); } return true; @@ -232,23 +232,11 @@ private static string CreateFile(string filePath) } File.Create(filePath).Dispose(); - CheckReloadTemplate(filePath, false); + Helper.CheckReloadTemplate(filePath, false); return "{}"; } - /// - /// 如果新增了模板文件,则重新加载模板 - /// - /// - /// - private static void CheckReloadTemplate(string filePath, bool isDir) - { - if (filePath.IndexOf("/templates/") == -1) return; - if (isDir || filePath.EndsWith(".html") || filePath.EndsWith(".html")) - { - Cms.Template.Reload(); - } - } + /// /// @@ -263,13 +251,19 @@ public static string Upload(string dir, ICompatiblePostedFile file) var filePath = dirPath + file.GetFileName(); if (File.Exists(filePath)) return "{\"error\":\"文件已经存在\"}"; + + SaveFile(file, filePath); + + return "{\"url\":\"" + dir + fileName + "\"}"; + } + + private static async void SaveFile(ICompatiblePostedFile file, string filePath) + { using (var fs = new FileStream(filePath, FileMode.Create)) { - file.CopyToAsync(fs); + await file.CopyToAsync(fs); fs.Flush(); } - - return "{\"url\":\"" + dir + fileName + "\"}"; } } } \ No newline at end of file diff --git a/src/JR.Cms/Web/Manager/Handle/ArchiveHandler.cs b/src/JR.Cms/Web/Manager/Handle/ArchiveHandler.cs index 76d96a9a8..e2eb70974 100755 --- a/src/JR.Cms/Web/Manager/Handle/ArchiveHandler.cs +++ b/src/JR.Cms/Web/Manager/Handle/ArchiveHandler.cs @@ -300,7 +300,7 @@ public void Update() }; RenderTemplate( - CompressHtml(ResourceMap.GetPageContent(ManagementPage.Archive_Update)), + ResourceMap.GetPageContent(ManagementPage.Archive_Update), data); } diff --git a/src/JR.Cms/Web/Manager/Handle/CategoryHandler.cs b/src/JR.Cms/Web/Manager/Handle/CategoryHandler.cs index 4ba9ec68c..2738fe799 100755 --- a/src/JR.Cms/Web/Manager/Handle/CategoryHandler.cs +++ b/src/JR.Cms/Web/Manager/Handle/CategoryHandler.cs @@ -115,12 +115,10 @@ public void Create() RenderTemplate(ResourceMap.GetPageContent(ManagementPage.Category_CreateCategory), data); } - [MCacheUpdate(CacheSign.Category | CacheSign.Link)] + [MCache(CacheSign.Category | CacheSign.Link)] public string Create_POST() { - - var parentId = 0; - int.TryParse(Request.Form("ParentId"), out parentId); + int.TryParse(Request.Form("ParentId"), out var parentId); var category = InitCategoryDtoFromHttpPost(Request, new CategoryDto()); @@ -264,7 +262,7 @@ public void Update() } - [MCacheUpdate(CacheSign.Category | CacheSign.Link)] + [MCache(CacheSign.Category | CacheSign.Link)] public string Update_POST() { var category = ServiceCall.Instance.SiteService.GetCategory( @@ -286,7 +284,7 @@ public string Update_POST() /// /// 删除栏目 /// - [MCacheUpdate(CacheSign.Category | CacheSign.Link)] + [MCache(CacheSign.Category | CacheSign.Link)] public string Delete_POST() { var categoryId = int.Parse(Request.Form("category_id")); diff --git a/src/JR.Cms/Web/Manager/Handle/LinkHandler.cs b/src/JR.Cms/Web/Manager/Handle/LinkHandler.cs index 71559aecc..7f70bc183 100755 --- a/src/JR.Cms/Web/Manager/Handle/LinkHandler.cs +++ b/src/JR.Cms/Web/Manager/Handle/LinkHandler.cs @@ -334,7 +334,7 @@ public string Edit() return RequireTemplate(resource); } - [MCacheUpdate(CacheSign.Link)] + [MCache(CacheSign.Link)] public string Save_POST() { var link = default(SiteLinkDto); @@ -374,7 +374,7 @@ public string Save_POST() /// /// 设置链接可见 /// - [MCacheUpdate(CacheSign.Link)] + [MCache(CacheSign.Link)] public string Set_visible_POST() { var linkId = int.Parse(Request.Form("link_id")); @@ -403,7 +403,7 @@ public void GetVisible_POST() /// /// 删除链接 /// - [MCacheUpdate(CacheSign.Link)] + [MCache(CacheSign.Link)] public void Delete_POST() { var linkId = int.Parse(Request.Form("link_id")); diff --git a/src/JR.Cms/Web/Manager/Handle/ResourceHandler.cs b/src/JR.Cms/Web/Manager/Handle/ResourceHandler.cs index b311aa2ef..7754b0ab5 100755 --- a/src/JR.Cms/Web/Manager/Handle/ResourceHandler.cs +++ b/src/JR.Cms/Web/Manager/Handle/ResourceHandler.cs @@ -172,10 +172,7 @@ public void Read() if (filename == "style") { - Response.WriteAsync( - ResourceUtility.CompressHtml( - ResourceMap.GetPageContent(ManagementPage.Css_Style) - )); + Response.WriteAsync(ResourceMap.GetPageContent(ManagementPage.Css_Style)); } else { @@ -209,7 +206,7 @@ public void Combine() { if (compress && (type == "js" || type == "css")) { - Response.WriteAsync(CompressHtml(File.ReadAllText(appDir + file))); + Response.WriteAsync(File.ReadAllText(appDir + file)); } else { diff --git a/src/JR.Cms/Web/Manager/Handle/SiteHandler.cs b/src/JR.Cms/Web/Manager/Handle/SiteHandler.cs index bf659e5d6..7e426d83d 100755 --- a/src/JR.Cms/Web/Manager/Handle/SiteHandler.cs +++ b/src/JR.Cms/Web/Manager/Handle/SiteHandler.cs @@ -122,7 +122,7 @@ public void Edit() }); } - [MCacheUpdate(CacheSign.Site | CacheSign.Link)] + [MCache(CacheSign.Site | CacheSign.Link)] public string Save_POST() { var entity =Request.ParseFormToEntity(); diff --git a/src/JR.Cms/Web/Manager/Handle/TemplateHandler.cs b/src/JR.Cms/Web/Manager/Handle/TemplateHandler.cs index 61001eb69..f3acd356c 100755 --- a/src/JR.Cms/Web/Manager/Handle/TemplateHandler.cs +++ b/src/JR.Cms/Web/Manager/Handle/TemplateHandler.cs @@ -26,6 +26,9 @@ namespace JR.Cms.Web.Manager.Handle { + /// + /// + /// public class TemplateHandler : BasePage { /// @@ -126,7 +129,7 @@ public string EditFile() ViewData["file"] = path; ViewData["path"] = path; - return RequireTemplate(CompressHtml(ResourceMap.GetPageContent(ManagementPage.Template_EditFile))); + return RequireTemplate(ResourceMap.GetPageContent(ManagementPage.Template_EditFile)); } /// @@ -172,6 +175,7 @@ public void EditFile_POST() fs.Write(data, 0, data.Length); fs.Flush(); fs.Dispose(); + Cms.Template.Reload(); Response.WriteAsync("保存成功!"); } else if (action == "restore") @@ -188,7 +192,7 @@ public void EditFile_POST() tmpFile.MoveTo(backFile); File.SetAttributes(filePath, file.Attributes & FileAttributes.Normal); } - + Cms.Template.Reload(); Response.WriteAsync("还原成功!"); } } @@ -201,32 +205,27 @@ public void EditFile_POST() public void CreateView_POST() { - var tplname = string.Format("templates/{0}/{1}.{2}", - CurrentSite.Tpl, - Request.Form("name"), - Request.Form("type") == "1" ? "part.html" : "html"); - - var tplPath = string.Format("{0}/{1}", - EnvUtil.GetBaseDirectory(), - tplname); - + var tplName = $"templates/{CurrentSite.Tpl}/{Request.Form("name")}.html"; + var tplPath = $"{EnvUtil.GetBaseDirectory()}/{tplName}"; if (File.Exists(tplPath)) + { Response.WriteAsync("文件已经存在!"); + } else + { try { //global::System.IO.Directory.CreateDirectory(tplPath).Create(); //创建目录 File.Create(tplPath).Dispose(); //创建文件 - Cms.Template.Reload(); //重新注册模板 - - Response.WriteAsync(tplname); + Response.WriteAsync(tplName); } catch (Exception e) { // Response.Write(e.Message); Response.WriteAsync("无权限创建文件,请设置视图目录(templates)可写权限!"); } + } } /// @@ -250,7 +249,7 @@ public void Settings() tpl_CFG_FriendShowNum = tplSetting.CFG_FriendShowNum, tpl_CFG_NavigatorLinkFormat = tplSetting.CFG_NavigatorLinkFormat, tpl_CFG_NavigatorChildFormat = tplSetting.CFG_NavigatorChildFormat, - tpl_CFG_SitemapSplit = tplSetting.CFG_SitemapSplit, + tpl_CFG_SiteMapSplit = tplSetting.CFG_SitemapSplit, tpl_CFG_TrafficFormat = tplSetting.CFG_TrafficFormat, tpl_CFG_Enabled_Mobi = tplSetting.CfgEnabledMobiPage ? "1" : "0", tpl_CFG_Show_Error = tplSetting.CfgShowError ? "1" : "0", @@ -288,12 +287,12 @@ public void Settings_POST() tplSetting.CFG_FriendShowNum = friendlinkNum; tplSetting.CFG_NavigatorLinkFormat = req.Form("tpl_CFG_NavigatorLinkFormat"); tplSetting.CFG_NavigatorChildFormat = req.Form("tpl_CFG_NavigatorChildFormat"); - tplSetting.CFG_SitemapSplit = req.Form("tpl_CFG_SitemapSplit"); + tplSetting.CFG_SitemapSplit = req.Form("tpl_CFG_SiteMapSplit"); tplSetting.CFG_TrafficFormat = req.Form("tpl_CFG_TrafficFormat"); tplSetting.CfgEnabledMobiPage = req.Form("tpl_CFG_Enabled_Mobi") == "1"; tplSetting.CfgShowError = req.Form("tpl_CFG_Show_Error") == "1"; tplSetting.Save(); - + Cms.Template.Reload(); RenderSuccess("修改成功!"); } @@ -317,28 +316,24 @@ public void Templates() } SettingFile sf; - string currentName = "", - currentThumbnail = "", - tplConfigFile, - tplName, - tplDescrpt, - tplThumbnail; + string currentName = ""; + string currentThumbnail = ""; var sb = new StringBuilder(); foreach (var tpl in tplList) { - tplName = tpl; - tplThumbnail = null; - tplDescrpt = null; + var tplName = tpl; + string tplThumbnail = null; + string tplDescrpt = null; - tplConfigFile = $"{tplRootPath}{tpl}/tpl.conf"; + var tplConfigFile = $"{tplRootPath}{tpl}/tpl.conf"; if (File.Exists(tplConfigFile)) { sf = new SettingFile(tplConfigFile); if (sf.Contains("name")) tplName = sf["name"]; if (sf.Contains("thumbnail")) tplThumbnail = sf["thumbnail"]; - if (sf.Contains("descript")) tplDescrpt = sf["descript"]; + if (sf.Contains("describe")) tplDescrpt = sf["describe"]; } if (string.CompareOrdinal(tpl, curTemplate) != 0) @@ -449,16 +444,18 @@ public void UploadInstall_POST() } if (entryCount == 0) + { resultMessage = "上传的模板不包含任何内容!"; + } else + { resultMessage = "模板安装成功!"; - + } handleOver: archive.Dispose(); File.Delete(tempTplPath); - //重新注册模板 Cms.Template.Reload(); @@ -510,14 +507,14 @@ public void BackupTemplate() string tpl = Request.Query("tpl"); //设置目录 - var dir = new DirectoryInfo(string.Format("{0}backups/templates/", Cms.PhysicPath)); + var dir = new DirectoryInfo($"{Cms.PhysicPath}backups/templates/"); if (!dir.Exists) Directory.CreateDirectory(dir.FullName).Create(); else Cms.Utility.SetDirCanWrite("backups/templates/"); - ZipHelper.ZipAndSave(string.Format("{0}/templates/{1}/", Cms.PhysicPath, tpl) - , string.Format("{0}/backups/templet/{1}_{2:yyyyMMddHHss}.zip", Cms.PhysicPath, tpl, DateTime.Now), + ZipHelper.ZipAndSave($"{Cms.PhysicPath}/templates/{tpl}/" + , $"{Cms.PhysicPath}/data/backups/template/{tpl}_{DateTime.Now:yyyyMMddHHss}.zip", tpl ); } diff --git a/src/JR.Cms/Web/Manager/Helper.cs b/src/JR.Cms/Web/Manager/Helper.cs index 53a9945f3..b1c7a152a 100755 --- a/src/JR.Cms/Web/Manager/Helper.cs +++ b/src/JR.Cms/Web/Manager/Helper.cs @@ -9,6 +9,7 @@ */ +using System; using System.Collections.Generic; using System.IO; using System.Text; @@ -48,7 +49,9 @@ internal static string BuildPagerInfo(string format, int pageIndex, int recordCo internal static string BuildJsonPagerInfo(string firstLinkFormat, string linkFormat, int pageIndex, int recordCount, int pages) { - var pagingGetter = new CustomPagingGetter(firstLinkFormat, linkFormat, "", "", "<<", ">>"); + var pagingGetter = new CustomPagingGetter( + firstLinkFormat, linkFormat, + "<<", ">>"); var pg = UrlPaging.NewPager(pageIndex, pages, pagingGetter); pg.RecordCount = recordCount; pg.LinkCount = 10; @@ -258,5 +261,19 @@ public static string GetCategoryIdSelector(int siteId, int categoryId) return sb.ToString(); } + + /// + /// 如果新增了模板文件,则重新加载模板 + /// + /// + /// + public static void CheckReloadTemplate(string filePath, bool isDir) + { + if (filePath.IndexOf("/templates/", StringComparison.Ordinal) == -1) return; + if (isDir || filePath.EndsWith(".html")) + { + Cms.Template.Reload(); + } + } } } \ No newline at end of file diff --git a/src/JR.Cms/Web/Manager/MCacheUpdateAttribute.cs b/src/JR.Cms/Web/Manager/MCacheUpdateAttribute.cs index e8d527751..2faf8fade 100755 --- a/src/JR.Cms/Web/Manager/MCacheUpdateAttribute.cs +++ b/src/JR.Cms/Web/Manager/MCacheUpdateAttribute.cs @@ -8,9 +8,9 @@ */ using System; -using JR.Cms.Library.CacheProvider; using JR.Cms.Library.CacheProvider.CacheComponent; using JR.Cms.Library.CacheService; +using JR.Stand.Abstracts.Cache; namespace JR.Cms.Web.Manager { @@ -18,36 +18,41 @@ namespace JR.Cms.Web.Manager /// Description of MCacheUpdateAttribute. /// [AttributeUsage(AttributeTargets.Method)] - public class MCacheUpdateAttribute : Attribute, ICacheUpdatePolicy + public class MCacheAttribute : Attribute, ICachePolicy { - private CacheSign sign; + private readonly CacheSign _sign; - public MCacheUpdateAttribute(string cacheKey) + /// + /// + /// + /// + public MCacheAttribute(string cacheKey) { - Key = cacheKey; } - public MCacheUpdateAttribute(CacheSign sign) + /// + /// + /// + /// + public MCacheAttribute(CacheSign sign) { - Key = sign.ToString(); - this.sign = sign; + this._sign = sign; } - public string Key { get; private set; } - - public void Clear(string cacheKey) + /// + /// + /// + public void Clean() { - CmsCacheFactory.Singleton.Clear(cacheKey); - } - public void Clear() - { + if (_sign == CacheSign.Unknown)return; var siteId = CmsWebMaster.CurrentManageSite.SiteId; - - if (sign != CacheSign.Unknown) - if ((sign & CacheSign.Link) != 0) - SiteLinkCache.ClearForSite(siteId); - CmsCacheFactory.Singleton.Clear(Key); + if ((_sign & CacheSign.Link) != 0) + { + SiteLinkCache.ClearForSite(siteId); + Cms.Template.CleanPageCache(); + } + //CmsCacheFactory.Singleton.Clear(Key); } } } \ No newline at end of file diff --git a/src/JR.Cms/Web/Manager/ManagerLogic.cs b/src/JR.Cms/Web/Manager/ManagerLogic.cs index 8c4098f29..4bfef166e 100755 --- a/src/JR.Cms/Web/Manager/ManagerLogic.cs +++ b/src/JR.Cms/Web/Manager/ManagerLogic.cs @@ -218,7 +218,7 @@ private static Task CallMethod(ICompatibleHttpContext context, Type typeName, st else if (method.ReturnType == typeof(void)) { method.Invoke(obj, null); - task = SafetyTask.CompletedTask; + task = SafetyTask.CompletedTask; } else { @@ -226,8 +226,10 @@ private static Task CallMethod(ICompatibleHttpContext context, Type typeName, st task = context.Response.WriteAsync(JsonConvert.SerializeObject(result)); } - if (requestMethod == "POST") CmsCacheUtility.EvalCacheUpdate(method); //清理缓存 - + if (requestMethod == "POST") + { + CmsCacheUtility.EvalCacheUpdate(method); //清理缓存 + } return task; } diff --git a/src/JR.Cms/Web/PageUtility.cs b/src/JR.Cms/Web/PageUtility.cs index 9ceda5de8..f24108c24 100755 --- a/src/JR.Cms/Web/PageUtility.cs +++ b/src/JR.Cms/Web/PageUtility.cs @@ -32,7 +32,7 @@ public static class PageUtility private static TemplateHandler _onPreRender; private const string CopyStr = - ""; + "\n"; private static readonly string CopyStr2019; diff --git a/src/JR.Cms/Web/Portal/Comm/PortalController.cs b/src/JR.Cms/Web/Portal/Comm/PortalController.cs index b8007eed8..237867df0 100755 --- a/src/JR.Cms/Web/Portal/Comm/PortalController.cs +++ b/src/JR.Cms/Web/Portal/Comm/PortalController.cs @@ -104,8 +104,8 @@ public Task Index(ICompatibleHttpContext context) private Task CheckStaticIndex(ICompatibleHttpContext context, int seconds) { - const string cacheKey = "site:index:cache"; - const string cacheUnixKey = "site:index:last-create"; + const string cacheKey = "site:page:index:cache"; + const string cacheUnixKey = "site:page:index:last-create"; String html; // 如果非首页访问, 则使用动态的站点首页 var req = context.Request; @@ -151,43 +151,6 @@ private static string GenerateCache(string cacheKey) return html; } - /// - /// 文档页 - /// - /// - public Task Archive(ICompatibleHttpContext context) - { - context.Response.ContentType("text/html;charset=utf-8"); - var path = context.Request.GetPath(); - var task = this.CheckStaticFile(context, path); - if (task != null) return task; - CmsContext ctx = Cms.Context; - //检测网站状态及其缓存 - if (ctx.CheckSiteState() && ctx.CheckAndSetClientCache()) - { - context.Response.ContentType("text/html;charset=utf-8"); - String archivePath = this.SubPath(path, ctx.SiteAppPath); - archivePath = archivePath.Substring(0, archivePath.LastIndexOf(".", StringComparison.Ordinal)); - DefaultWebOutput.RenderArchive(ctx, archivePath); - } - - return SafetyTask.CompletedTask; - - /* - bool eventResult = false; - if (OnArchiveRequest != null) - { - OnArchiveRequest(ctx, archivePath, ref eventResult); - } - - //如果返回false,则执行默认输出 - if (!eventResult) - { - DefaultWebOutput.RenderArchive(ctx, archivePath); - } - */ - } - /// /// 检查位于根目录和root下的静态文件是否存在 /// @@ -230,19 +193,18 @@ public Task Category(ICompatibleHttpContext context) { var path = context.Request.GetPath(); var sitePath = ctx.SiteAppPath; - // 验证是否为当前站点的首页 - if (path == sitePath) + // 如果为"/news/",跳转到"/news" + var pLen = path.Length; + if (path[pLen-1] == '/') { - return this.Index(context); - } - - // 如果为"/site/",跳转到"/site" - if (path == sitePath + "/") - { - context.Response.Redirect(path.Substring(0, path.Length - 1), false); + context.Response.StatusCode(301); + context.Response.AddHeader("Location",path.Substring(0, pLen-1)); return SafetyTask.CompletedTask; } + // 验证是否为当前站点的首页 + if (path == sitePath)return this.Index(context); + String catPath = this.SubPath(path, sitePath); int page = 1; //获取页码和tag @@ -274,5 +236,43 @@ public Task Category(ICompatibleHttpContext context) return SafetyTask.CompletedTask; } + + /// + /// 文档页 + /// + /// + public Task Archive(ICompatibleHttpContext context) + { + context.Response.ContentType("text/html;charset=utf-8"); + var path = context.Request.GetPath(); + var task = this.CheckStaticFile(context, path); + if (task != null) return task; + CmsContext ctx = Cms.Context; + //检测网站状态及其缓存 + if (ctx.CheckSiteState() && ctx.CheckAndSetClientCache()) + { + context.Response.ContentType("text/html;charset=utf-8"); + String archivePath = this.SubPath(path, ctx.SiteAppPath); + archivePath = archivePath.Substring(0, archivePath.LastIndexOf(".", StringComparison.Ordinal)); + DefaultWebOutput.RenderArchive(ctx, archivePath); + } + + return SafetyTask.CompletedTask; + + /* + bool eventResult = false; + if (OnArchiveRequest != null) + { + OnArchiveRequest(ctx, archivePath, ref eventResult); + } + + //如果返回false,则执行默认输出 + if (!eventResult) + { + DefaultWebOutput.RenderArchive(ctx, archivePath); + } + */ + } + } } \ No newline at end of file diff --git a/src/JR.Cms/Web/Portal/Initializer.cs b/src/JR.Cms/Web/Portal/Initializer.cs index 1bb8804d3..d10a13a15 100755 --- a/src/JR.Cms/Web/Portal/Initializer.cs +++ b/src/JR.Cms/Web/Portal/Initializer.cs @@ -1,6 +1,7 @@ using System; using JR.Cms.Conf; using JR.Cms.Web.Resource; +using JR.Stand.Core.Cache; using JR.Stand.Core.Utils; using Microsoft.AspNetCore.Builder; diff --git a/src/JR.Cms/Web/Portal/Template/Model/PageVariable.cs b/src/JR.Cms/Web/Portal/Template/Model/PageVariable.cs index 37ec270b1..b9786fc24 100755 --- a/src/JR.Cms/Web/Portal/Template/Model/PageVariable.cs +++ b/src/JR.Cms/Web/Portal/Template/Model/PageVariable.cs @@ -19,7 +19,7 @@ public class PageVariable private string _frameworkPath; private string _templatePath; private string _pluginRootPath; - private string _siteMap; + private string _siteMap; private readonly CmsContext _context; private string _resDomain; private static readonly string IeHtml5ShivTag; @@ -33,11 +33,10 @@ static PageVariable() //http://www.cnblogs.com/dayezi/p/4702038.html // // - IeHtml5ShivTag = @" - "; + IeHtml5ShivTag = @""; } /// @@ -48,8 +47,7 @@ public PageVariable() _context = Cms.Context; } - [TemplateVariableField("年")] - public string Year => DateTime.Now.Year.ToString(); + [TemplateVariableField("年")] public string Year => DateTime.Now.Year.ToString(); [TemplateVariableField("版本")] public string Version @@ -77,6 +75,7 @@ public string Lang { this._lang = Cms.Context.UserLanguage.ToString(); } + return _lang; } } @@ -95,7 +94,7 @@ public string Url return url; } - } + } [TemplateVariableField("随机变亮")] public string Spam diff --git a/src/JR.Cms/Web/Portal/Template/Rule/CmsTemplateCore.cs b/src/JR.Cms/Web/Portal/Template/Rule/CmsTemplateCore.cs index d6d733966..d391913e0 100755 --- a/src/JR.Cms/Web/Portal/Template/Rule/CmsTemplateCore.cs +++ b/src/JR.Cms/Web/Portal/Template/Rule/CmsTemplateCore.cs @@ -90,7 +90,7 @@ protected TemplateSetting GetSetting() /// /// /// - public virtual string FormatPageUrl(UrlRulePageKeys key, string[] data) + public virtual string FormatPageUrl(UrlRulePageKeys key, object[] data) { var url = TemplateUrlRule.Urls[TemplateUrlRule.RuleIndex, (int) key]; if (data != null) url = string.Format(url, data); @@ -103,16 +103,12 @@ public virtual string FormatPageUrl(UrlRulePageKeys key, string[] data) /// /// /// - public virtual string ConcatUrl(string url) + protected string ConcatUrl(string url) { - if (url.IndexOf("//", StringComparison.Ordinal) != -1 - || url.IndexOf("javascript:", StringComparison.Ordinal) != -1) - return url; - - if (!string.IsNullOrEmpty(url) && url[0] != '/') url = string.Concat("/", url); - + if (url.IndexOf("//", StringComparison.Ordinal) != -1)return url; + if(url.StartsWith("javascript:", StringComparison.Ordinal))return url; + if (!string.IsNullOrEmpty(url) && url[0] != '/')url = string.Concat("/", url); if (Settings.TPL_FULL_URL_PATH) return string.Concat(Cms.Context.SiteDomain, url); - return url; } @@ -154,13 +150,17 @@ private string GetLocationUrl(string location) /// /// /// - public virtual string GetCategoryUrl(CategoryDto category, int pageIndex) + protected string GetCategoryUrl(CategoryDto category, int pageIndex) { if (!string.IsNullOrEmpty(category.Location)) return ConcatUrl(category.Location); if (pageIndex < 2) - return FormatPageUrl(UrlRulePageKeys.Category, new[] {category.Path}); + { + return ConcatUrl(category.Path); + } else - return FormatPageUrl(UrlRulePageKeys.CategoryPager, new[] {category.Path, pageIndex.ToString()}); + { + return FormatPageUrl(UrlRulePageKeys.CategoryPager, new object[] {category.Path, pageIndex.ToString()}); + } } #region 分页 @@ -195,8 +195,6 @@ public virtual void SetPager(int pageIndex, int pageCount, int recordCount, stri firstLink, link, Cms.Language.Get(LanguagePackageKey.PAGER_PrePageText), - Cms.Language.Get(LanguagePackageKey.PAGER_NextPageText), - Cms.Language.Get(LanguagePackageKey.PAGER_PrePageText), Cms.Language.Get(LanguagePackageKey.PAGER_NextPageText) ); @@ -711,8 +709,6 @@ function submitComment(){ return string.Empty; }); - - if (Settings.TPL_USE_COMPRESS)return TemplateUtils.CompressHtml(content); return content; } @@ -831,8 +827,6 @@ protected string Comment(string format, string asc, string usePager) } })); } - - if (Settings.TPL_USE_COMPRESS)return TemplateUtils.CompressHtml(sb.ToString()); return sb.ToString(); } @@ -1012,6 +1006,7 @@ protected string Navigator(string format, string childFormat, string index) case "url": return this.ConcatUrl(string.IsNullOrEmpty(link.Bind) ? link.Uri : GetBingLinkUrl(link.Bind)); + case "target": return string.IsNullOrEmpty(link.Target) ? "_self" : link.Target; case "text": return link.Text; case "img_url": return link.ImgUrl; } @@ -1124,6 +1119,7 @@ protected string NextArchive(string id, string format) /// /// 栏目链接列表 /// + /// /// /// protected string CategoryList(string catPath, string format) @@ -1156,8 +1152,10 @@ protected string CategoryList(string catPath, string format) var isModule = false; if (!isModule) + { categories = new List(ServiceCall.Instance.SiteService .GetCategories(SiteId, catPath)); + } //如果没有下级了,则获取当前级 //if (categories.Count == 0) @@ -2119,15 +2117,14 @@ protected string TagArchives(string tag, string pageIndex, string pageSize, stri var sb = new StringBuilder(1000); - string alias, - title, - content, - title_hightlight; + string alias; + string content; + string titleHightLight; var i = 0; - var C_LENGTH = GetSetting().CfgOutlineLength; + var cLength = GetSetting().CfgOutlineLength; var searchArchives = ServiceCall.Instance.ArchiveService .SearchArchives(SiteId, "", false, tag, _pageSize, _pageIndex, @@ -2152,12 +2149,12 @@ protected string TagArchives(string tag, string pageIndex, string pageSize, stri #region 处理关键词 alias = string.IsNullOrEmpty(archive.Alias) ? archive.StrId : archive.Alias; - title = title_hightlight = archive.Title; + titleHightLight = archive.Title; content = RegexHelper.FilterHtml(archive.Content); - if (keyRegex.IsMatch(title_hightlight)) - title_hightlight = - keyRegex.Replace(title_hightlight, "$0"); + if (keyRegex.IsMatch(titleHightLight)) + titleHightLight = + keyRegex.Replace(titleHightLight, "$0"); //关键词前数字索引算法 var contentLength = content.Length; @@ -2166,27 +2163,27 @@ protected string TagArchives(string tag, string pageIndex, string pageSize, stri if (keyRegex.IsMatch(content)) { var match = keyRegex.Match(content); - if (contentLength > C_LENGTH) + if (contentLength > cLength) { if (match.Index > firstSplitIndex) { //如果截取包含关键词的长度仍大于内容长度时 - if (contentLength - match.Index > C_LENGTH) - content = content.Substring(match.Index - firstSplitIndex, C_LENGTH - firstSplitIndex); + if (contentLength - match.Index > cLength) + content = content.Substring(match.Index - firstSplitIndex, cLength - firstSplitIndex); else content = content.Substring(match.Index - firstSplitIndex); } else { - content = content.Remove(C_LENGTH); + content = content.Remove(cLength); } } - content = keyRegex.Replace(content, "$0") + "..."; + content = keyRegex.Replace(content, "$0") + "..."; } else { - if (contentLength > C_LENGTH) content = content.Substring(0, C_LENGTH) + "..."; + if (contentLength > cLength) content = content.Substring(0, cLength) + "..."; } #endregion @@ -2201,7 +2198,7 @@ protected string TagArchives(string tag, string pageIndex, string pageSize, stri case "id": return archive.Id.ToString(); case "str_id": return alias; - case "title": return title_hightlight; + case "title": return titleHightLight; case "raw_title": return archive.Title; case "small_title": return archive.SmallTitle; case "author_id": return archive.PublisherId.ToString(); diff --git a/src/JR.Cms/Web/Resource/ManageResources/plugin/plugin_dash.html b/src/JR.Cms/Web/Resource/ManageResources/plugin/plugin_dash.html index 266ee26ea..15c5a7c0c 100755 --- a/src/JR.Cms/Web/Resource/ManageResources/plugin/plugin_dash.html +++ b/src/JR.Cms/Web/Resource/ManageResources/plugin/plugin_dash.html @@ -183,7 +183,7 @@ descript= p.descript==''?'无说明': p.descript; var html = '

    ' + p.name + '

    ' + - '

    ' + descript + '

    作者:' + author + '  版本:' + + '

    ' + descript + '

    作者:' + author + '  版本:' + version + '
    ' + '' + (state == '1' ? '停用' : '启用') + ''; diff --git a/src/JR.Cms/Web/Resource/SiteResources/site-base.css b/src/JR.Cms/Web/Resource/SiteResources/site-base.css index a66579fae..e1c465f31 100755 --- a/src/JR.Cms/Web/Resource/SiteResources/site-base.css +++ b/src/JR.Cms/Web/Resource/SiteResources/site-base.css @@ -37,10 +37,11 @@ img{max-width:100%;border:0} /* Response Layout, 12 Columns */ .container,.container-fluid{padding-right:15px;padding-left:15px;margin:0 auto} .row{display:flex;flex-wrap:wrap;margin-left:-15px;margin-right:-15px;} +.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, -.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { +.col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12 { padding-left: 15px;padding-right: 15px; position: relative;width:100%;min-height: 1px;} /* xs */ .col-1{flex:0 0 8.333333%;max-width:8.333333%} @@ -213,6 +214,8 @@ img{max-width:100%;border:0} .g-align-center{align-content:center !important;align-items: center !important;} /** 内容右对齐 */ .g-align-right{display:flex;justify-content: flex-end;} +/** 元素垂直居中 */ +.g-align-middle *{vertical-align: middle} /* g-flex-boxes div垂直水平居中 */ .g-flex{display:flex;} .g-flex-boxes>*{display:flex;justify-content:center;align-items:center} diff --git a/src/JR.Cms/Web/Resource/SiteResources/site-page.css b/src/JR.Cms/Web/Resource/SiteResources/site-page.css index 6d253eb03..84067ace4 100755 --- a/src/JR.Cms/Web/Resource/SiteResources/site-page.css +++ b/src/JR.Cms/Web/Resource/SiteResources/site-page.css @@ -8,7 +8,11 @@ a:hover{color:#0000cc;} p,td,blockquote,pre{ word-break: break-all;word-wrap: break-word;} /** 作废,使用col-*代替 */ + +/* @media(max-width:575px){ + .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { + padding-left: 15px;padding-right: 15px; position: relative;width:100%;min-height: 1px;} .hidden-xs{display:none !important;} .col-xs-1{flex:0 0 8.333333%;max-width:8.333333%} .col-xs-2{flex:0 0 16.666666%;max-width:16.666666%} @@ -22,8 +26,8 @@ p,td,blockquote,pre{ word-break: break-all;word-wrap: break-word;} .col-xs-10{flex:0 0 83.333333%;max-width:83.333333%} .col-xs-11{flex:0 0 91.666666%;max-width:91.666666%} .col-xs-12{flex:0 0 100%;max-width:100%} - /*.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}*/ } +*/ /** 作废 */ @@ -39,7 +43,7 @@ p,td,blockquote,pre{ word-break: break-all;word-wrap: break-word;} .nom{margin:auto;} div.line{border-top:solid 1px #ddd;border-bottom:solid 1px #fff;height:0px;overflow:hidden;} /* 高亮显示 */ -.hight_light,.search_hightlight,.special{color:Red;} +.high-light,.search-high-light{color:#F00;} img.full{width:100%;} *:required { /* insert your own styles for invalid form input */ -moz-box-shadow: none; } @@ -54,7 +58,9 @@ header .logo a,.page-header .logo a{position:absolute;left:0;top:0;margin:auto; display:block;width:100%;height: 100%;} */ -.pt-30{padding-top:30px;}.pt-60{padding-top:60px;}.pt-90{padding-top:90px;}.pb-90{padding-bottom:90px;}.mt-30{margin-top:30px;}.mt-60{margin-top:60px;} +.pt-30{padding-top:30px;}.pt-60{padding-top:60px;}.pt-90{padding-top:90px;} +.pb-30{padding-bottom:30px;}.pb-60{padding-bottom:60px;}.pb-90{padding-bottom:90px;} +.mt-30{margin-top:30px;}.mt-60{margin-top:60px;}.mb-30{margin-bottom:30px;}.mb-60{margin-bottom:60px;} .g-section-title>h1{font-size:2.4rem;} .g-section-title>p{padding:0.5em 0 1em;font-size:1.4rem;font-weight:400;color:#333;} .g-suited-img-65{padding-bottom:65%;}.g-suited-img-75{padding-bottom:75%;}.g-suited-img-100{padding-bottom:100%} @@ -121,15 +127,7 @@ header .logo a,.page-header .logo a{position:absolute;left:0;top:0;margin:auto; .panel-archives-hor img{width:100%;border-radius: 5px;} .panel-archives-hor li:hover mask,.panel-archives-hor a:hover mask{display: none} -/* 文档页面,待整理 */ -.panel-archive div.meta{padding:0 10px;} -.panel-archive{padding:0 10px;} -.panel-archive div.outline{border:solid 1px #d686cb;background:#ffccff;padding:10px;line-height:22px;margin:30px 10px 20px 10px; - text-indent: 2em;} -.panel-archive div.content{font-size:120%;line-height:2em;padding:10px;} -.panel-archive div.content p{margin-top:0;margin-bottom: 20px} -.panel-archive div.meta{border-top:dotted 1px #ddd;padding-top:10px;margin-top:10px;text-align:left;line-height:40px;} -.panel-archive div.relation{} + /* DropDown */ .g-dropdown{position:relative;} @@ -196,11 +194,13 @@ a.f{color:#6E6E6E;} } /** 分页 **/ -.mod-pagination{line-height:1.6em;text-align:center;} -.mod-pagination .it{margin:5px 0 5px 5px;vertical-align:middle;user-select:none;display:inline-block;padding:0 5px;} -.mod-pagination .page{padding-left:0 !important;padding-right:0 !important;} -.mod-pagination .page a{display:inline-block;padding:0 5px;} -@media(min-width:320px){.ui-pagination .info{display:none;}} +.mod-pagination{line-height:2.4em;text-align:center;} +.mod-pagination .it{margin:0 5px 0 0;vertical-align:middle;user-select:none;display:inline-block;} +.mod-pagination a{display:inline-block;text-decoration:none !important;} +@media(max-width:575px){ + .mod-pagination{margin:0 auto} + .mod-pagination .pagination-info{display:none;} +} /* ---------- 公共元素 ---------- */ @@ -426,10 +426,9 @@ right:0;left:auto;border:solid 1px #D5D5D5;} /* mod-crumb 面包屑 */ -.mod-crumb{line-height:3em;background:#F5F5F5;color:#333;padding-left:1em; - text-shadow:0px 0px 0 #FFF;position:relative;} -.mod-crumb a{color:#333;text-decoration: none;margin:0 5px;} -.mod-crumb .rgt{position: absolute;right:1em;top:5px;} +.mod-crumb{line-height:3em;color:#999;position:relative;font-size:1.2rem;} +.mod-crumb>.rgt{position: absolute;right:1em;top:5px;} +.mod-crumb a,.mod-crumb a:visited{color:#999;text-decoration: none;margin:0 5px;} /* mod-nav-side 边栏 */ .mod-nav-side {} @@ -501,3 +500,81 @@ right:0;left:auto;border:solid 1px #D5D5D5;} .auto-fit{position:relative;padding-top:60px;text-align:center;} .auto-fit img{max-width:100%;max-height:100%;position: absolute;left:0;top:0;right:0;bottom:0;margin:auto;} + +/* 文档详情 */ +/* +
    +

    ${archive.title}

    +
    +
    + $lang(date):${archive.publish} +    + $lang(click):${archive.count}次 +
    + +
    +
    + ${archive.content} + +
    + + + + + + +
    + + +
    +
    + */ +.mod-art-details{background:#FFF;padding:3em 4em;} +.mod-art-details>h1{font-size:3rem;} +.mod-art-details>.info{color:#666;line-height:4em;font-size:1.4rem;} +.mod-art-details>.info em{font-style:normal;margin:0 5px;} +.mod-art-details>.info .share a{margin-left:10px;} +.mod-art-details>.details{line-height:2em;} +.mod-art-details>.details h1,.mod-art-details>.details h2{line-height:2.4em;padding-top:1em;} +.mod-art-details>.details p{text-indent:2.4em;} +.mod-art-details>.details img{margin:0 auto;max-width:80%;} +.mod-art-details>.details .copyright{font-size:1.4rem;line-height:4rem;} +.mod-art-details .art-rel{font-size:1.4rem;border-top:dashed 1px #ddd;padding-top:4rem;} +@media(max-width:575px){ + .mod-art-details{padding:1em 15px;text-align:center;} + .mod-art-details>h1{font-size:2rem;} + .mod-art-details>.details{text-align:left;font-size:1.4rem;line-height:1.8em;padding-top:0 !important;} + .mod-art-details .art-rel{text-align:left;padding-top:1em;} + .mod-art-details .art-rel .g-align-right{justify-content:flex-start !important;} +} \ No newline at end of file diff --git a/src/JR.Cms/Library/CacheProvider/CacheComponent/ICacheUpdatePolicy.cs b/src/JR.Stand.Abstractions/Cache/ICachePolicy.cs similarity index 74% rename from src/JR.Cms/Library/CacheProvider/CacheComponent/ICacheUpdatePolicy.cs rename to src/JR.Stand.Abstractions/Cache/ICachePolicy.cs index 30fa38df4..abccf1300 100755 --- a/src/JR.Cms/Library/CacheProvider/CacheComponent/ICacheUpdatePolicy.cs +++ b/src/JR.Stand.Abstractions/Cache/ICachePolicy.cs @@ -7,16 +7,16 @@ * To change this template use Tools | Options | Coding | Edit Standard Headers. */ -namespace JR.Cms.Library.CacheProvider.CacheComponent +namespace JR.Stand.Abstracts.Cache { /// /// Description of ICacheUpdatePolicy. /// - public interface ICacheUpdatePolicy + public interface ICachePolicy { /// /// 清理缓存 /// - void Clear(); + void Clean(); } } \ No newline at end of file diff --git a/src/JR.Stand.Abstractions/IMemoryCacheWrapper.cs b/src/JR.Stand.Abstractions/IMemoryCacheWrapper.cs index c38cb3e85..2e1caaffa 100755 --- a/src/JR.Stand.Abstractions/IMemoryCacheWrapper.cs +++ b/src/JR.Stand.Abstractions/IMemoryCacheWrapper.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace JR.Stand.Core.Utils +namespace JR.Stand.Abstracts { public interface IMemoryCacheWrapper { @@ -62,7 +62,13 @@ public interface IMemoryCacheWrapper /// /// List GetCacheKeys(); - + + /// + /// 搜索 匹配到的缓存 + /// + /// 模式,正则表达式 + /// + IList SearchKeys(string pattern); /// /// 获取Int类型的缓存,如果缓存不存在或类型不匹配,返回-1 diff --git a/src/JR.Stand.Abstractions/Web/ICompatiablePostedFile.cs b/src/JR.Stand.Abstractions/Web/ICompatiablePostedFile.cs index ce488b098..69c1189d9 100755 --- a/src/JR.Stand.Abstractions/Web/ICompatiablePostedFile.cs +++ b/src/JR.Stand.Abstractions/Web/ICompatiablePostedFile.cs @@ -1,4 +1,5 @@ using System.IO; +using System.Threading.Tasks; namespace JR.Stand.Abstracts.Web { @@ -11,7 +12,7 @@ public interface ICompatiblePostedFile /// /// void Save(string path); - void CopyToAsync(FileStream fs); + Task CopyToAsync(FileStream fs); long GetLength(); Stream OpenReadStream(); string GetContentType(); diff --git a/src/JR.Stand.Core.AspNet/AspNetCacheWrapper.cs b/src/JR.Stand.Core.AspNet/AspNetCacheWrapper.cs index 3fcbef2a3..3b25df1a8 100755 --- a/src/JR.Stand.Core.AspNet/AspNetCacheWrapper.cs +++ b/src/JR.Stand.Core.AspNet/AspNetCacheWrapper.cs @@ -1,8 +1,9 @@ using System; -using System.Collections; using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; using System.Web; -using System.Web.Caching; +using JR.Stand.Abstracts; using JR.Stand.Core.Utils; namespace JR.Stand.Core.AspNet @@ -15,7 +16,7 @@ public bool Exists(string key) var cacheEnum = cache.GetEnumerator(); while (cacheEnum.MoveNext()) { - if (cacheEnum.Key.ToString().Equals(key,StringComparison.OrdinalIgnoreCase)) + if (cacheEnum.Key != null && cacheEnum.Key.ToString().Equals(key,StringComparison.OrdinalIgnoreCase)) { return true; } @@ -60,7 +61,10 @@ public void Reset() var cacheEnum = cache.GetEnumerator(); while (cacheEnum.MoveNext()) { - cache.Remove(cacheEnum.Key.ToString()); + if (cacheEnum.Key != null) + { + cache.Remove(cacheEnum.Key.ToString()); + } } } @@ -72,11 +76,27 @@ public List GetCacheKeys() var cacheEnum = cache.GetEnumerator(); while (cacheEnum.MoveNext()) { - list.Add(cacheEnum.Key.ToString()); + if (cacheEnum.Key != null) + { + list.Add(cacheEnum.Key.ToString()); + } } return list; } + /// + /// 搜索 匹配到的缓存 + /// + /// + /// + public IList SearchKeys(string pattern) + { + var cacheKeys = GetCacheKeys(); + var l = cacheKeys.Where(k => Regex.IsMatch(k, pattern)).ToList(); + return l.AsReadOnly(); + } + + public int GetInt(string key) { return TypesConv.SafeParseInt(this.Get(key),-1); diff --git a/src/JR.Stand.Core.AspNet/AspNetPostedFileImpl.cs b/src/JR.Stand.Core.AspNet/AspNetPostedFileImpl.cs index 247b4a18e..969e25aa9 100755 --- a/src/JR.Stand.Core.AspNet/AspNetPostedFileImpl.cs +++ b/src/JR.Stand.Core.AspNet/AspNetPostedFileImpl.cs @@ -1,4 +1,5 @@ using System.IO; +using System.Threading.Tasks; using System.Web; using JR.Stand.Abstracts.Web; @@ -27,9 +28,9 @@ public void Save(string path) } } - public void CopyToAsync(FileStream fs) + public Task CopyToAsync(FileStream fs) { - this._file.InputStream.CopyToAsync(fs); + return this._file.InputStream.CopyToAsync(fs); } public long GetLength() diff --git a/src/JR.Stand.Core/Cache/MemoryCacheWrapper.cs b/src/JR.Stand.Core/Cache/MemoryCacheWrapper.cs index aed1e5bf5..194f25fba 100755 --- a/src/JR.Stand.Core/Cache/MemoryCacheWrapper.cs +++ b/src/JR.Stand.Core/Cache/MemoryCacheWrapper.cs @@ -4,9 +4,11 @@ using System.Linq; using System.Reflection; using System.Text.RegularExpressions; +using JR.Stand.Abstracts; +using JR.Stand.Core.Utils; using Microsoft.Extensions.Caching.Memory; -namespace JR.Stand.Core.Utils +namespace JR.Stand.Core.Cache { public class MemoryCacheWrapper : IMemoryCacheWrapper { @@ -136,7 +138,7 @@ public void Reset() /// private void RemoveCacheRegex(string pattern) { - IList l = SearchCacheRegex(pattern); + IList l = this.SearchKeys(pattern); foreach (var s in l) { Remove(s); @@ -148,7 +150,7 @@ private void RemoveCacheRegex(string pattern) /// /// /// - private IList SearchCacheRegex(string pattern) + public IList SearchKeys(string pattern) { var cacheKeys = GetCacheKeys(); var l = cacheKeys.Where(k => Regex.IsMatch(k, pattern)).ToList(); diff --git a/src/JR.Stand.Core/Framework/Web/UI/UrlPager.cs b/src/JR.Stand.Core/Framework/Web/UI/UrlPager.cs index 020caa979..cead27a2a 100755 --- a/src/JR.Stand.Core/Framework/Web/UI/UrlPager.cs +++ b/src/JR.Stand.Core/Framework/Web/UI/UrlPager.cs @@ -14,6 +14,7 @@ namespace JR.Stand.Core.Framework.Web.UI { + [Flags] public enum PagingFlag { Control = 1, @@ -27,17 +28,15 @@ public interface IPagingGetter string Get(int page, int total, int nowPage, PagingFlag flag, out string text); } - internal class DefaultPageingGetter : IPagingGetter + internal class DefaultPagingGetter : IPagingGetter { - private static readonly CustomPagingGetter getter; + private static readonly CustomPagingGetter Getter; - static DefaultPageingGetter() + static DefaultPagingGetter() { - getter = new CustomPagingGetter( + Getter = new CustomPagingGetter( "", "?page=%d", - "第一页", - "最末页", "上一页", "下一页" ); @@ -45,35 +44,27 @@ static DefaultPageingGetter() public string Get(int page, int total, int nowPage, PagingFlag flag, out string text) { - return getter.Get(page, total, nowPage, flag, out text); + return Getter.Get(page, total, nowPage, flag, out text); } } public class CustomPagingGetter : IPagingGetter { - private int pagerLinkCount; - private string firstPageText; - private string lastPageText; - private string nextPageText; - private string previousPageText; - private string pagerLinkFormat; - private string firstLinkFormat; + private readonly string _nextPageText; + private readonly string _previousPageText; + private readonly string _pagerLinkFormat; + private readonly string _firstLinkFormat; public CustomPagingGetter( string firstLinkFormat, string pagerLinkFormat, - string firstPageText, - string lastPageText, string previousPageText, - string nextPageText - ) + string nextPageText) { - this.firstLinkFormat = firstLinkFormat; - this.pagerLinkFormat = pagerLinkFormat; - this.firstPageText = firstPageText; - this.lastPageText = lastPageText; - this.nextPageText = nextPageText; - this.previousPageText = previousPageText; + this._firstLinkFormat = firstLinkFormat; + this._pagerLinkFormat = pagerLinkFormat; + this._nextPageText = nextPageText; + this._previousPageText = previousPageText; } public string Get(int page, int total, int nowPage, PagingFlag flag, out string text) @@ -82,7 +73,7 @@ public string Get(int page, int total, int nowPage, PagingFlag flag, out string { if ((flag & PagingFlag.Previous) != 0) { - text = this.previousPageText; + text = this._previousPageText; if (page == 1) { return "javascript:;"; @@ -91,31 +82,31 @@ public string Get(int page, int total, int nowPage, PagingFlag flag, out string { if (nowPage == 1) { - return this.firstLinkFormat; + return this._firstLinkFormat; } - return String.Format(this.pagerLinkFormat, nowPage); + return String.Format(this._pagerLinkFormat, nowPage); } } else if ((flag & PagingFlag.Next) != 0) { - text = this.nextPageText; + text = this._nextPageText; if (page == total) { return "javascript:;"; } else { - return String.Format(this.pagerLinkFormat, nowPage); + return String.Format(this._pagerLinkFormat, nowPage); } } } text = nowPage.ToString(); - if (nowPage == 1 && this.firstLinkFormat.Length != 0) + if (nowPage == 1 && this._firstLinkFormat.Length != 0) { - return this.firstLinkFormat; + return this._firstLinkFormat; } - return String.Format(this.pagerLinkFormat, nowPage); + return String.Format(this._pagerLinkFormat, nowPage); } } @@ -123,27 +114,24 @@ public string Get(int page, int total, int nowPage, PagingFlag flag, out string public class UrlPager { private int _linkCount; + - - internal UrlPager() - { - } - - internal UrlPager(int currentPageIndex, int pageCount) + internal UrlPager(int currentPageIndex, int pageCount, bool enableSelect) { CurrentPageIndex = currentPageIndex; PageCount = pageCount; + EnableSelect = enableSelect; } /// /// 当前页面索引(从1开始) /// - public int CurrentPageIndex { get; set; } + private int CurrentPageIndex { get; set; } /// /// 页面总数 /// - public int PageCount { get; set; } + private int PageCount { get; set; } //获取分页数据 public IPagingGetter Getter { get; set; } @@ -188,7 +176,7 @@ public int LinkCount /// /// 使用选页 /// - public bool EnableSelect { get; set; } + private bool EnableSelect { get; } /// /// 分页详细记录,如果为空字符则用默认,为空则不显示 @@ -199,18 +187,16 @@ public int LinkCount /// /// 输入分页链接HTML代码 /// - /// 例如:?domain=ops.cc&page={0},{0}将会被解析成页码 - /// /// public string Pager() { string cls; - string linkText = String.Empty; + string linkText; string linkUrl; StringBuilder sb = new StringBuilder(); - string _pageCount = (this.PageCount == 0 ? 1 : this.PageCount).ToString(); + string pageCount = (this.PageCount == 0 ? 1 : this.PageCount).ToString(); //Div Wrap sb.Append("
    "); @@ -241,8 +227,6 @@ public string Pager() int c = this.LinkCount; int startPage = (CurrentPageIndex - 1)/c*c + 1; - bool _gotoPrevious = false; //是否上一栏分页 - for (int i = 1, j = startPage; i <= c && j <= PageCount; i++, j = (CurrentPageIndex%c == 0 ? CurrentPageIndex - 1 : CurrentPageIndex)/c*c + i) @@ -250,23 +234,24 @@ public string Pager() //输出页面 if (j == CurrentPageIndex) { - _gotoPrevious = j != 1 && j%c == 1; - - if (_gotoPrevious) + var gotoPrevious = j != 1 && j%c == 1; //是否上一栏分页 + if (gotoPrevious) { linkUrl = this.Getter.Get(this.CurrentPageIndex, this.PageCount, j - 1, 0, out linkText); - sb.Append(String.Format(@"{2}", + sb.Append(String.Format(@"{2}", cls, linkUrl, "...")); } //如果为页码为当前页 - sb.Append("").Append(j.ToString()).Append(""); + sb.Append("") + .Append(j.ToString()) + .Append(""); //如果为最后一个页码,则显示下一栏 - if (!_gotoPrevious && j%c == 0 && j != PageCount) + if (!gotoPrevious && j%c == 0 && j != PageCount) { linkUrl = this.Getter.Get(this.CurrentPageIndex, this.PageCount, j + 1, 0, out linkText); @@ -282,8 +267,7 @@ public string Pager() linkUrl = this.Getter.Get(this.CurrentPageIndex, this.PageCount, j, 0, out linkText); - sb.Append(String.Format("{1}", - linkUrl, linkText)); + sb.Append($"{linkText}"); } } @@ -305,8 +289,7 @@ public string Pager() linkUrl = this.Getter.Get(this.CurrentPageIndex, this.PageCount, this.CurrentPageIndex, PagingFlag.Control | PagingFlag.Next, out linkText); } - sb.Append(String.Format(@"{2}" - , cls, linkUrl, linkText)); + sb.Append($@"{linkText}"); //显示下拉选页框 @@ -341,7 +324,7 @@ public string Pager() //设置下拉框HTML格式 if (String.IsNullOrEmpty(this.SelectPageText)) this.SelectPageText = "{0}"; - else if (this.SelectPageText.IndexOf("{0}") == -1) this.SelectPageText += "{0}"; + else if (this.SelectPageText.IndexOf("{0}", StringComparison.Ordinal) == -1) this.SelectPageText += "{0}"; //将选页框添加到内容中 sb.Append(String.Format(String.Concat("", this.SelectPageText, ""), @@ -352,17 +335,15 @@ public string Pager() //显示信息 if (this.PagerTotal != null) { - const string _pagerTotalFormat = @" 第{0}/{1}页,共{2}条。"; - string _pagerTotal = this.PagerTotal; - if (_pagerTotal == String.Empty) + const string pagerTotalFormat = @" 第{0}/{1}页,共{2}条。"; + string pagerTotal = this.PagerTotal; + if (pagerTotal == String.Empty) { - _pagerTotal = _pagerTotalFormat; + pagerTotal = pagerTotalFormat; } - sb.Append(String.Format(_pagerTotal, - CurrentPageIndex.ToString(), - _pageCount.ToString(), - this.RecordCount.ToString() - )); + sb.Append(String.Format(pagerTotal, + CurrentPageIndex.ToString(), pageCount, + this.RecordCount.ToString())); } //Wrap Close @@ -374,14 +355,14 @@ public string Pager() public static class UrlPaging { - public static IPagingGetter DefaultGetter = new DefaultPageingGetter(); + private static readonly IPagingGetter DefaultGetter = new DefaultPagingGetter(); public static UrlPager NewPager(int page, int pageCount, IPagingGetter pg) { if (pageCount == 0) pageCount = 1; if (page == 0) page = 1; - UrlPager p = new UrlPager(page, pageCount); + UrlPager p = new UrlPager(page, pageCount,false); if (pg == null) { pg = DefaultGetter; @@ -397,19 +378,18 @@ public static UrlPager NewPager(int page, int pageCount, IPagingGetter pg) /// /// 创建分页信息 /// - /// + /// /// /// /// + /// /// - public static string PagerHtml(string firstFormat, string format, int currentPageIndex, int recordCount, - int pageCount) + public static string PagerHtml(string firstFormat, string format, + int currentPageIndex, int recordCount, int pageCount) { IPagingGetter pg = new CustomPagingGetter( firstFormat, format, - "第一页", - "最末页", "<<上一页", ">>下一页" ); diff --git a/src/JR.Stand.Core/Framework/Web/Utils/FileUpload.cs b/src/JR.Stand.Core/Framework/Web/Utils/FileUpload.cs index 874209729..2d9ac2a2a 100755 --- a/src/JR.Stand.Core/Framework/Web/Utils/FileUpload.cs +++ b/src/JR.Stand.Core/Framework/Web/Utils/FileUpload.cs @@ -95,7 +95,7 @@ private static void InitUplDirectory(String baseDir, String absDir) } } - private void SaveStream(Stream stream, string path) + private async void SaveStream(Stream stream, string path) { const int bufferSize = 100; //缓冲区大小 byte[] buffer = new byte[bufferSize]; //缓冲区 @@ -104,7 +104,7 @@ private void SaveStream(Stream stream, string path) { while (true) { - var bytes = stream.Read(buffer, 0, bufferSize); //从流中读取的值 + var bytes = await stream.ReadAsync(buffer, 0, bufferSize); //从流中读取的值 if (bytes == 0) { break; diff --git a/src/JR.Stand.Core/Framework/Xml/AutoObject/AutoObjectXml.cs b/src/JR.Stand.Core/Framework/Xml/AutoObject/AutoObjectXml.cs index 35c2e30a5..d1183482b 100755 --- a/src/JR.Stand.Core/Framework/Xml/AutoObject/AutoObjectXml.cs +++ b/src/JR.Stand.Core/Framework/Xml/AutoObject/AutoObjectXml.cs @@ -269,7 +269,7 @@ private XmlNode __GetObjectsNode() ///
    /// /// - /// + /// /// /// public bool InsertObjectNode(string key, string name, string descript, params XmlObjectProperty[] properties) @@ -289,7 +289,7 @@ public bool InsertObjectNode(string key, string name, string descript, params Xm node.Attributes.Append(attr); //add Descript - tempNode = xd.CreateElement("descript"); + tempNode = xd.CreateElement("describe"); XmlCDataSection cdd = xd.CreateCDataSection(descript); tempNode.AppendChild(cdd); node.AppendChild(tempNode); @@ -446,7 +446,7 @@ public XmlObject GetObject(string objectKey) IList prolist = new List(); XmlObject obj = new XmlObject(node.Attributes["key"].Value, node.Attributes["name"].Value, - node.SelectSingleNode("descript").InnerText); + node.SelectSingleNode("describe").InnerText); XmlNodeList proNodes = node.SelectNodes("properties/property"); foreach (XmlNode n in proNodes) { @@ -475,7 +475,7 @@ public IEnumerable GetObjects() foreach (XmlNode node in nodes) { obj = new XmlObject(node.Attributes["key"].Value, node.Attributes["name"].Value, - node.SelectSingleNode("descript").InnerText); + node.SelectSingleNode("describe").InnerText); proNodes = node.SelectNodes("properties/property"); prolist.Clear(); diff --git a/src/JR.Stand.Core/Framework/Xml/AutoObject/XmlObjectDoc.cs b/src/JR.Stand.Core/Framework/Xml/AutoObject/XmlObjectDoc.cs index d2bc48fe1..a91202c1b 100755 --- a/src/JR.Stand.Core/Framework/Xml/AutoObject/XmlObjectDoc.cs +++ b/src/JR.Stand.Core/Framework/Xml/AutoObject/XmlObjectDoc.cs @@ -18,10 +18,10 @@ public static string GetGrid(XmlObject obj, int index) { const string tpl = @"

    %object.index%%object.name%(%object.key%)

    -

    描述:%object.descript%

    +

    描述:%object.descript%

    - + %object.prop%
    属性键:属性名称:备注:
    属性键:属性名称:备注:

    diff --git a/src/JR.Stand.Core/PluginKernel/PluginInfoAttribute.cs b/src/JR.Stand.Core/PluginKernel/PluginInfoAttribute.cs index b90752cf3..8f99d02dd 100755 --- a/src/JR.Stand.Core/PluginKernel/PluginInfoAttribute.cs +++ b/src/JR.Stand.Core/PluginKernel/PluginInfoAttribute.cs @@ -22,7 +22,7 @@ public PluginInfoAttribute() /// /// /// - /// + /// [Obsolete] public PluginInfoAttribute(string name, string author, string webpage, string descript) { diff --git a/src/JR.Stand.Core/Template/Impl/TemplateCache.cs b/src/JR.Stand.Core/Template/Impl/TemplateCache.cs index 963f493b8..005a6ec97 100755 --- a/src/JR.Stand.Core/Template/Impl/TemplateCache.cs +++ b/src/JR.Stand.Core/Template/Impl/TemplateCache.cs @@ -18,7 +18,7 @@ static class TemplateCache /// /// 模板编号列表 /// - internal static readonly IDictionary TemplateDictionary = new Dictionary(); + internal static IDictionary TemplateDictionary = new Dictionary(); /// /// 标签词典 @@ -80,6 +80,11 @@ internal static bool Exists(String templatePath) return TemplateDictionary.ContainsKey(templatePath); } + internal static void Reset() + { + TemplateDictionary = new Dictionary(); + } + /// /// 获取模板的实际路径 /// diff --git a/src/JR.Stand.Core/Template/Impl/TemplatePage.cs b/src/JR.Stand.Core/Template/Impl/TemplatePage.cs index 497f0e1c6..057621c07 100755 --- a/src/JR.Stand.Core/Template/Impl/TemplatePage.cs +++ b/src/JR.Stand.Core/Template/Impl/TemplatePage.cs @@ -196,7 +196,7 @@ private string ReplaceDefinedVariables(string templateHtml) /// 压缩后的字符 /// /// - public string ToCompressedString() + private string ToCompressedString() { return TemplateUtils.CompressHtml(ToString()); } @@ -208,7 +208,7 @@ public string ToCompressedString() /// /// /// - public void SaveToFile(string fileName, Encoding coder, bool compressed, out string html) + private void SaveToFile(string fileName, Encoding coder, bool compressed, out string html) { string filePath = EnvUtil.GetBaseDirectory()+"/" + fileName; diff --git a/src/JR.Stand.Core/Template/Impl/TemplateRegistry.cs b/src/JR.Stand.Core/Template/Impl/TemplateRegistry.cs index 37d7ec403..0e1c24ef8 100755 --- a/src/JR.Stand.Core/Template/Impl/TemplateRegistry.cs +++ b/src/JR.Stand.Core/Template/Impl/TemplateRegistry.cs @@ -20,7 +20,7 @@ public class TemplateRegistry private readonly Options _options; private readonly IDataContainer _container; private readonly IList _directories = new List(); - + private readonly object _locker = new object(); public TemplateRegistry(IDataContainer container,Options options) { this._options = options ?? new Options(); @@ -32,14 +32,21 @@ public TemplateRegistry(IDataContainer container,Options options) /// public void Register(string directory) { - var dir = new DirectoryInfo(EnvUtil.GetBaseDirectory()+"/" + directory); + var dir = new DirectoryInfo(EnvUtil.GetBaseDirectory() + directory); if (!dir.Exists) throw new DirectoryNotFoundException("模版文件夹不存在!"); // 添加到目录数组,用于重新加载模板 if(!this._directories.Contains(directory))this._directories.Add(directory); + // 重置模板缓存 + this.ResetCaches(); //注册模板 RegisterTemplates(dir, this._options); } + private void ResetCaches() + { + lock(this._locker) TemplateCache.Reset(); + } + /// /// 是否存在模板 /// @@ -53,11 +60,9 @@ public static bool Exists(String templatePath) //递归方式注册模板 private static void RegisterTemplates(DirectoryInfo dir, Options options) { - // tml 为模板文件,防止可以被直接浏览 - Regex allowExt = new Regex("(.html|.html)$", RegexOptions.IgnoreCase); foreach (FileInfo file in dir.GetFiles()) { - if (allowExt.IsMatch(file.Extension)) + if (file.Extension.EndsWith(".html")) { // Console.WriteLine("---" + file.FullName); TemplateCache.RegisterTemplate(TemplateUtility.GetTemplateId( diff --git a/src/JR.Stand.Core/Web/Cache/CacheFactory.cs b/src/JR.Stand.Core/Web/Cache/CacheFactory.cs index 39c68ec89..c293e749b 100755 --- a/src/JR.Stand.Core/Web/Cache/CacheFactory.cs +++ b/src/JR.Stand.Core/Web/Cache/CacheFactory.cs @@ -1,4 +1,5 @@ -using JR.Stand.Core.Utils; +using JR.Stand.Abstracts; +using JR.Stand.Core.Utils; using JR.Stand.Core.Web.Cache.Component; namespace JR.Stand.Core.Web.Cache diff --git a/src/JR.Stand.Core/Web/Cache/Component/BasicCache.cs b/src/JR.Stand.Core/Web/Cache/Component/BasicCache.cs index 0fae5b544..581de9409 100755 --- a/src/JR.Stand.Core/Web/Cache/Component/BasicCache.cs +++ b/src/JR.Stand.Core/Web/Cache/Component/BasicCache.cs @@ -10,6 +10,7 @@ */ using System; +using JR.Stand.Abstracts; using JR.Stand.Core.Framework; using JR.Stand.Core.Utils; using Microsoft.AspNetCore.Http; diff --git a/src/JR.Stand.Core/Web/Cache/Component/CacheBase.cs b/src/JR.Stand.Core/Web/Cache/Component/CacheBase.cs index d7d59b373..74b41ba65 100755 --- a/src/JR.Stand.Core/Web/Cache/Component/CacheBase.cs +++ b/src/JR.Stand.Core/Web/Cache/Component/CacheBase.cs @@ -8,6 +8,7 @@ */ using System; +using JR.Stand.Abstracts; using JR.Stand.Core.Utils; namespace JR.Stand.Core.Web.Cache.Component diff --git a/src/JR.Stand.Core/Web/Cache/Component/DependCache.cs b/src/JR.Stand.Core/Web/Cache/Component/DependCache.cs index 59e0a0da6..732f43f3f 100755 --- a/src/JR.Stand.Core/Web/Cache/Component/DependCache.cs +++ b/src/JR.Stand.Core/Web/Cache/Component/DependCache.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Text; +using JR.Stand.Abstracts; using JR.Stand.Core.Utils; namespace JR.Stand.Core.Web.Cache.Component diff --git a/src/JR.Stand.Core/Web/Cache/Component/ICache.cs b/src/JR.Stand.Core/Web/Cache/Component/ICache.cs index 2c6775d17..f9058a9bc 100755 --- a/src/JR.Stand.Core/Web/Cache/Component/ICache.cs +++ b/src/JR.Stand.Core/Web/Cache/Component/ICache.cs @@ -8,6 +8,7 @@ */ using System; +using JR.Stand.Abstracts; using JR.Stand.Core.Utils; namespace JR.Stand.Core.Web.Cache.Component diff --git a/src/JR.Stand.Core/Web/PostedFileImpl.cs b/src/JR.Stand.Core/Web/PostedFileImpl.cs index 640ea5e67..d3a0a5da3 100755 --- a/src/JR.Stand.Core/Web/PostedFileImpl.cs +++ b/src/JR.Stand.Core/Web/PostedFileImpl.cs @@ -1,4 +1,5 @@ using System.IO; +using System.Threading.Tasks; using JR.Stand.Abstracts.Web; using Microsoft.AspNetCore.Http; @@ -27,9 +28,9 @@ public void Save(string path) } } - public void CopyToAsync(FileStream fs) + public Task CopyToAsync(FileStream fs) { - this._file.CopyToAsync(fs); + return this._file.CopyToAsync(fs); } public long GetLength()