diff --git a/CoreCms.Net.Configuration/SystemSettingDictionary.cs b/CoreCms.Net.Configuration/SystemSettingDictionary.cs
index d0d6d742..f6263f60 100644
--- a/CoreCms.Net.Configuration/SystemSettingDictionary.cs
+++ b/CoreCms.Net.Configuration/SystemSettingDictionary.cs
@@ -60,6 +60,8 @@ namespace CoreCms.Net.Configuration
di.Add(SystemSettingConstVars.ShowCustomForm, new DictionaryKeyValues() { sKey = "显示自定义表单按钮", sValue = "2" });
di.Add(SystemSettingConstVars.ShowIndexPopupWindow, new DictionaryKeyValues() { sKey = "显示首页弹窗", sValue = "2" });
+ di.Add(SystemSettingConstVars.IndexPopupWindowImageUrl, new DictionaryKeyValues() { sKey = "图片地址", sValue = "" });
+ di.Add(SystemSettingConstVars.IndexPopupWindowHrefUrl, new DictionaryKeyValues() { sKey = "链接地址", sValue = "" });
//搜索发现关键字
diff --git a/CoreCms.Net.Uni-App/CoreShop/components/coreshop-modal-img/coreshop-modal-img.vue b/CoreCms.Net.Uni-App/CoreShop/components/coreshop-modal-img/coreshop-modal-img.vue
index da2cf2d7..d38b99d8 100644
--- a/CoreCms.Net.Uni-App/CoreShop/components/coreshop-modal-img/coreshop-modal-img.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/components/coreshop-modal-img/coreshop-modal-img.vue
@@ -1,10 +1,10 @@
-
-
-
+
+
+
diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/index/default/default.vue b/CoreCms.Net.Uni-App/CoreShop/pages/index/default/default.vue
index c6105d44..6ac3303e 100644
--- a/CoreCms.Net.Uni-App/CoreShop/pages/index/default/default.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/pages/index/default/default.vue
@@ -25,7 +25,7 @@
-
+
@@ -46,7 +46,10 @@
shareUrl: this.$globalConstVars.shareUrl,
isScorll: false,
homeTitle: '',
- modalShow: false
+ modalShow: false,
+ indexPopupWindowHrefUrl: '',
+ indexPopupWindowImageUrl: '',
+
};
},
updated() {
@@ -54,6 +57,8 @@
},
mounted() {
this.modalShow = this.$store.state.config.showIndexPopupWindow == 1;
+ this.indexPopupWindowHrefUrl = this.$store.state.config.indexPopupWindowHrefUrl;
+ this.indexPopupWindowImageUrl = this.$store.state.config.indexPopupWindowImageUrl;
},
computed: {
...mapState({
@@ -91,7 +96,25 @@
methods: {
imgTap() {
this.modalShow = false;
- this.$refs.uToast.show({ message: "你点了海报了。", type: 'success', back: false });
+ var val = this.indexPopupWindowHrefUrl;
+ if (this.indexPopupWindowHrefUrl.indexOf('http') != -1) {
+ // #ifdef APP-PLUS || APP-PLUS-NVUE || MP
+ this.$u.route('/pages/webview/webview', { src: val });
+ // #endif
+ } else {
+ // #ifdef APP-PLUS || APP-PLUS-NVUE || MP
+ if (val == '/pages/index/default/default' || val == '/pages/category/index/index' || val == '/pages/index/cart/cart' || val == '/pages/index/member/member') {
+ this.$u.route({ type: 'switchTab', url: val });
+ return;
+ } else if (val.indexOf('/pages/coupon/coupon?id=') > -1) {
+ var id = val.replace('/pages/coupon/coupon?id=', "");
+ this.receiveCoupon(id)
+ } else {
+ this.$u.route(val);
+ return;
+ }
+ // #endif
+ }
},
closeTap() {
this.modalShow = false;
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 1c3e5927..89259302 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/shop/setting/index.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/shop/setting/index.html
@@ -77,6 +77,30 @@
+
+
+
+
+
控制个人中心面板是否显示以下组件按钮
@@ -922,7 +946,7 @@
//开启调试情况下获取接口赋值数据
if (debug) { console.log(d); }
indexData = d.data;
- layui.use(['admin', 'form', 'coreHelper', 'element', 'table', 'util', 'view', 'table', 'cropperImg'], function () {
+ layui.use(['admin', 'form', 'coreHelper', 'element', 'table', 'util', 'view', 'table', 'cropperImg', 'upload'], function () {
var $ = layui.$
, setter = layui.setter
, admin = layui.admin
@@ -932,6 +956,7 @@
, table = layui.table
, util = layui.util
, view = layui.view
+ , upload = layui.upload
, cropperImg = layui.cropperImg
, router = layui.router()
, search = router.search;
@@ -1001,6 +1026,26 @@
}
});
});
+ //首页弹窗广告图片
+ upload.render({
+ elem: '#upIndexPopupWindowImageUrlBtn'
+ , url: layui.setter.apiUrl + 'Api/Tools/UploadFiles'
+ , done: function (res) {
+ if (res.code > 0) {
+ return layer.msg('上传失败');
+ }
+ layer.msg('上传成功');
+ $('#viewIndexPopupWindowImageUrlImgBox').attr('src', res.data.fileUrl);
+ $("#indexPopupWindowImageUrl").val(res.data.fileUrl);
+ }
+ , error: function () {
+ var viewTextBox = $('#viewTextBox');
+ viewTextBox.html('上传失败 重试');
+ viewTextBox.find('.demo-reload').on('click', function () {
+ uploadInst.upload();
+ });
+ }
+ });
//退货区域显示处理
var reshipAreaId = 0;
diff --git a/CoreCms.Net.Web.WebApi/Controllers/CommonController.cs b/CoreCms.Net.Web.WebApi/Controllers/CommonController.cs
index 2ab8a4f1..392da125 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/CommonController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/CommonController.cs
@@ -109,7 +109,11 @@ namespace CoreCms.Net.Web.WebApi.Controllers
var showGroupBuying = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShowGroupBuying).ObjectToInt(2); //显示团购按钮
var showSolitaire = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShowSolitaire).ObjectToInt(2); //显示接龙按钮
var showCalendar = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShowCalendar).ObjectToInt(2); //显示签到按钮
+
var showIndexPopupWindow = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShowIndexPopupWindow).ObjectToInt(2); //显示首页弹窗
+ var indexPopupWindowImageUrl = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.IndexPopupWindowImageUrl); //首页弹窗图片地址
+ var indexPopupWindowHrefUrl = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.IndexPopupWindowHrefUrl); //显示首页弹窗
+
var showCustomForm = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShowCustomForm).ObjectToInt(2); //显示自定义表单按钮
var imageMax = 5; //前端上传图片最多几张
@@ -243,6 +247,8 @@ namespace CoreCms.Net.Web.WebApi.Controllers
showSolitaire,
showCalendar,
showIndexPopupWindow,
+ indexPopupWindowImageUrl,
+ indexPopupWindowHrefUrl,
showCustomForm
};
jm.data = model;