diff --git a/COMCMS.Common/Utils.cs b/COMCMS.Common/Utils.cs index 75fb6ac..d97724b 100644 --- a/COMCMS.Common/Utils.cs +++ b/COMCMS.Common/Utils.cs @@ -177,7 +177,7 @@ namespace COMCMS.Common { if (str.Length != 11) return false; - return Regex.IsMatch(str, @"^1[3|4|5|7|8][0-9]\d{4,8}$"); + return Regex.IsMatch(str, @"^1[3|4|5|7|8|9][0-9]\d{4,8}$"); } /// /// 是否为ip @@ -308,6 +308,19 @@ namespace COMCMS.Common #endregion #region 获取部分 + + /// + /// 获取配置 + /// + /// 路径,如:SystemSetting:COMCMSPrefixKey + /// + public static string GetSetting(string path) + { + string value = Configuration[path]; + + return value; + } + /// /// 返回字符串真实长度, 1个汉字长度为2 /// diff --git a/COMCMS.Web/Areas/AdminCP/Views/Article/AddArticle.cshtml b/COMCMS.Web/Areas/AdminCP/Views/Article/AddArticle.cshtml index a3d1aea..75cbdad 100644 --- a/COMCMS.Web/Areas/AdminCP/Views/Article/AddArticle.cshtml +++ b/COMCMS.Web/Areas/AdminCP/Views/Article/AddArticle.cshtml @@ -110,6 +110,9 @@
+ + +
diff --git a/COMCMS.Web/Areas/AdminCP/Views/Article/EditArticle.cshtml b/COMCMS.Web/Areas/AdminCP/Views/Article/EditArticle.cshtml index 61a7a4c..8b1632a 100644 --- a/COMCMS.Web/Areas/AdminCP/Views/Article/EditArticle.cshtml +++ b/COMCMS.Web/Areas/AdminCP/Views/Article/EditArticle.cshtml @@ -109,6 +109,9 @@
+ + +
diff --git a/COMCMS.Web/Areas/AdminCP/Views/Shared/_CommonLayout.cshtml b/COMCMS.Web/Areas/AdminCP/Views/Shared/_CommonLayout.cshtml index f55c23d..5a53f34 100644 --- a/COMCMS.Web/Areas/AdminCP/Views/Shared/_CommonLayout.cshtml +++ b/COMCMS.Web/Areas/AdminCP/Views/Shared/_CommonLayout.cshtml @@ -81,6 +81,30 @@ checkboxClass: 'icheckbox_square-green', radioClass: 'iradio_square-green', }); + $(".my-preview").click(function () { + var url = $(this).siblings(".upload-path").val(); + if (url) { + var data = { + "status": 1, + "msg": "", + "title": "预览图片", + "id": 1, + "start": 0, + "data": [ + { + "alt": "", + "pid": 1, + "src": url, + "thumb": "" + } + ] + }; + layer.photos({ + photos: data, + anim: 0 + }); + } + }) }) $("input").each(function (index, item) { if ($(this).attr("placeholder") && $(this).attr("placeholder") != "") {