diff --git a/CoreCms.Net.Configuration/SystemSettingConstVars.cs b/CoreCms.Net.Configuration/SystemSettingConstVars.cs
index 06aab04..8abbdcb 100644
--- a/CoreCms.Net.Configuration/SystemSettingConstVars.cs
+++ b/CoreCms.Net.Configuration/SystemSettingConstVars.cs
@@ -26,6 +26,11 @@ namespace CoreCms.Net.Configuration
///
public const string ShopDesc = "shopDesc";
+ ///
+ /// 首页公告栏
+ ///
+ public const string HomeAnnouncement = "homeAnnouncement";
+
///
/// 平台地址
///
@@ -461,6 +466,31 @@ namespace CoreCms.Net.Configuration
///
public const string ShareDesc = "shareDesc";
+ ///
+ /// 首页弹窗是否启用
+ ///
+ public const string PopupEnabled = "popupEnabled";
+
+ ///
+ /// 首页弹窗图片
+ ///
+ public const string PopupImage = "popupImage";
+
+ ///
+ /// 首页悬浮球是否启用
+ ///
+ public const string FloatEnabled = "floatEnabled";
+
+ ///
+ /// 首页悬浮球图片
+ ///
+ public const string FloatImage = "floatImage";
+
+ ///
+ /// 首页悬浮球弹窗图片
+ ///
+ public const string FloatPopupImage = "floatPopupImage";
+
///
/// 关于我们文章
///
diff --git a/CoreCms.Net.Configuration/SystemSettingDictionary.cs b/CoreCms.Net.Configuration/SystemSettingDictionary.cs
index 10145e9..9cd2e5e 100644
--- a/CoreCms.Net.Configuration/SystemSettingDictionary.cs
+++ b/CoreCms.Net.Configuration/SystemSettingDictionary.cs
@@ -30,6 +30,7 @@ namespace CoreCms.Net.Configuration
//平台设置
di.Add(SystemSettingConstVars.ShopName, new DictionaryKeyValues() { sKey = "平台名称", sValue = "核心内容管理系统" });
di.Add(SystemSettingConstVars.ShopDesc, new DictionaryKeyValues() { sKey = "平台描述", sValue = "平台描述会展示在前台及微信分享描述" });
+ di.Add(SystemSettingConstVars.HomeAnnouncement, new DictionaryKeyValues() { sKey = "首页公告栏", sValue = "" });
di.Add(SystemSettingConstVars.ShopAddress, new DictionaryKeyValues() { sKey = "平台地址", sValue = "我的平台地址" });
di.Add(SystemSettingConstVars.ShopBeiAn, new DictionaryKeyValues() { sKey = "备案信息", sValue = "网站备案信息" });
di.Add(SystemSettingConstVars.ShopLogo, new DictionaryKeyValues() { sKey = "平台logo", sValue = "" });
@@ -55,6 +56,13 @@ namespace CoreCms.Net.Configuration
di.Add(SystemSettingConstVars.ShareImage, new DictionaryKeyValues() { sKey = "分享图片", sValue = "" });
di.Add(SystemSettingConstVars.ShareTitle, new DictionaryKeyValues() { sKey = "分享标题", sValue = "优质好店邀您共享" });
di.Add(SystemSettingConstVars.ShareDesc, new DictionaryKeyValues() { sKey = "分享描述", sValue = "" });
+ //首页弹窗设置
+ di.Add(SystemSettingConstVars.PopupEnabled, new DictionaryKeyValues() { sKey = "首页弹窗启用", sValue = "0" });
+ di.Add(SystemSettingConstVars.PopupImage, new DictionaryKeyValues() { sKey = "首页弹窗图片", sValue = "" });
+ //首页悬浮球设置
+ di.Add(SystemSettingConstVars.FloatEnabled, new DictionaryKeyValues() { sKey = "首页悬浮球启用", sValue = "0" });
+ di.Add(SystemSettingConstVars.FloatImage, new DictionaryKeyValues() { sKey = "首页悬浮球图片", sValue = "" });
+ di.Add(SystemSettingConstVars.FloatPopupImage, new DictionaryKeyValues() { sKey = "首页悬浮球弹窗图片", sValue = "" });
//会员设置
di.Add(SystemSettingConstVars.ShopMobile, new DictionaryKeyValues() { sKey = "商家手机号", sValue = "" });
//1绑定,2不绑定-第三方的登陆的时候,是否需要绑定手机号码,强烈建议用户开启,除非只在微信小程序内使用
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/shop/setting/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/shop/setting/index.html
index 75f3d3a..4985b7e 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/shop/setting/index.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/shop/setting/index.html
@@ -62,6 +62,8 @@
平台设置
分享设置
+ 首页弹窗配置
+ 首页悬浮球配置
会员设置
提现设置
@@ -87,6 +89,13 @@
+
@@ -205,6 +214,84 @@
+
+
@@ -552,6 +639,69 @@
}
});
});
+ //弹窗图片
+ $('#upPopupImageBtn').click(function () {
+ cropperImg.cropImg({
+ aspectRatio: 1 / 1,
+ imgSrc: $('#viewPopupImgBox').attr('src'),
+ onCrop: function (data) {
+ var loadIndex = layer.load(2);
+ coreHelper.Post("api/Tools/UploadFilesFByBase64", { base64: data }, function (res) {
+ if (0 === res.code) {
+ $('#viewPopupImgBox').attr('src', res.data.fileUrl);
+ $("#popupImage").val(res.data.fileUrl);
+ layer.msg(res.msg);
+ layer.close(loadIndex);
+ } else {
+ layer.close(loadIndex);
+ layer.msg(res.msg, { icon: 2, anim: 6 });
+ }
+ });
+ }
+ });
+ });
+ //悬浮球图片
+ $('#upFloatImageBtn').click(function () {
+ cropperImg.cropImg({
+ aspectRatio: 1 / 1,
+ imgSrc: $('#viewFloatImgBox').attr('src'),
+ onCrop: function (data) {
+ var loadIndex = layer.load(2);
+ coreHelper.Post("api/Tools/UploadFilesFByBase64", { base64: data }, function (res) {
+ if (0 === res.code) {
+ $('#viewFloatImgBox').attr('src', res.data.fileUrl);
+ $("#floatImage").val(res.data.fileUrl);
+ layer.msg(res.msg);
+ layer.close(loadIndex);
+ } else {
+ layer.close(loadIndex);
+ layer.msg(res.msg, { icon: 2, anim: 6 });
+ }
+ });
+ }
+ });
+ });
+ //悬浮球弹窗图片
+ $('#upFloatPopupImageBtn').click(function () {
+ cropperImg.cropImg({
+ aspectRatio: 1 / 1,
+ imgSrc: $('#viewFloatPopupImgBox').attr('src'),
+ onCrop: function (data) {
+ var loadIndex = layer.load(2);
+ coreHelper.Post("api/Tools/UploadFilesFByBase64", { base64: data }, function (res) {
+ if (0 === res.code) {
+ $('#viewFloatPopupImgBox').attr('src', res.data.fileUrl);
+ $("#floatPopupImage").val(res.data.fileUrl);
+ layer.msg(res.msg);
+ layer.close(loadIndex);
+ } else {
+ layer.close(loadIndex);
+ layer.msg(res.msg, { icon: 2, anim: 6 });
+ }
+ });
+ }
+ });
+ });
//退货区域显示处理
var reshipAreaId = 0;
diff --git a/CoreCms.Net.Web.WebApi/Controllers/CommonController.cs b/CoreCms.Net.Web.WebApi/Controllers/CommonController.cs
index 7e47230..3abffd7 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/CommonController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/CommonController.cs
@@ -109,7 +109,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
#endregion
- #region 返回配置数据文件V2.0===============================================================
+ #region 返回配置数据文件==============================================================
///
/// 返回配置数据文件V2.0
///
@@ -130,6 +130,24 @@ namespace CoreCms.Net.Web.WebApi.Controllers
//var entId = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.EntId); //客服ID
var userAgreementId = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.UserAgreementId).ObjectToInt(3); //用户协议
var privacyPolicyId = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.PrivacyPolicyId).ObjectToInt(4); //隐私政策
+
+ //首页公告栏
+ var homeAnnouncement = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.HomeAnnouncement);
+
+ //首页弹窗配置
+ var popupConfig = new
+ {
+ enabled = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.PopupEnabled).ObjectToInt(0) == 1,
+ image = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.PopupImage)
+ };
+
+ //首页悬浮球配置
+ var floatConfig = new
+ {
+ enabled = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.FloatEnabled).ObjectToInt(0) == 1,
+ image = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.FloatImage),
+ popupImage = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.FloatPopupImage)
+ };
List