diff --git a/CoreCms.Net.Configuration/SystemSettingConstVars.cs b/CoreCms.Net.Configuration/SystemSettingConstVars.cs index 4156a47c..82cfac1a 100644 --- a/CoreCms.Net.Configuration/SystemSettingConstVars.cs +++ b/CoreCms.Net.Configuration/SystemSettingConstVars.cs @@ -584,6 +584,12 @@ namespace CoreCms.Net.Configuration /// public const string ShowCalendar = "showCalendar"; + /// + /// 显示自定义表单按钮 + /// + public const string ShowCustomForm = "showCustomForm"; + + /// /// 显示首页弹窗 /// diff --git a/CoreCms.Net.Configuration/SystemSettingDictionary.cs b/CoreCms.Net.Configuration/SystemSettingDictionary.cs index 91f434fc..d0d6d742 100644 --- a/CoreCms.Net.Configuration/SystemSettingDictionary.cs +++ b/CoreCms.Net.Configuration/SystemSettingDictionary.cs @@ -57,6 +57,7 @@ namespace CoreCms.Net.Configuration di.Add(SystemSettingConstVars.ShowGroupBuying, new DictionaryKeyValues() { sKey = "显示团购按钮", sValue = "2" }); di.Add(SystemSettingConstVars.ShowSolitaire, new DictionaryKeyValues() { sKey = "显示接龙按钮", sValue = "2" }); di.Add(SystemSettingConstVars.ShowCalendar, new DictionaryKeyValues() { sKey = "显示签到按钮", sValue = "2" }); + di.Add(SystemSettingConstVars.ShowCustomForm, new DictionaryKeyValues() { sKey = "显示自定义表单按钮", sValue = "2" }); di.Add(SystemSettingConstVars.ShowIndexPopupWindow, new DictionaryKeyValues() { sKey = "显示首页弹窗", sValue = "2" }); diff --git a/CoreCms.Net.Uni-App/CoreShop/common/request/http.api.js b/CoreCms.Net.Uni-App/CoreShop/common/request/http.api.js index 462fd715..c43a5ef2 100644 --- a/CoreCms.Net.Uni-App/CoreShop/common/request/http.api.js +++ b/CoreCms.Net.Uni-App/CoreShop/common/request/http.api.js @@ -328,7 +328,10 @@ const install = (Vue, vm) => { let getInviteQRCode = (params, config = {}) => http.post('/Api/Store/GetInviteQrCode', params, { custom: { methodName: 'store.getinviteqrcode', needToken: false } }); // 生成海报 let createPoster = (params, config = {}) => http.post('/Api/User/GetPoster', params, { custom: { methodName: 'user.getposter', needToken: false } }); - //============================================================//万能表单 + + //获取表单列表 + let getFormList = (params, config = {}) => http.post('/Api/Form/GetList', params, { custom: { methodName: 'form.getformdetial', needToken: false } }); + //获取表单详情 let getFormDetial = (params, config = {}) => http.post('/Api/Form/GetFormDetial', params, { custom: { methodName: 'form.getformdetial', needToken: false } }); //============================================================//提交表单 let addSubmitForm = (params, config = {}) => http.post('/Api/Form/AddSubmit', params, { custom: { methodName: 'form.addsubmit', needToken: false } }); @@ -571,6 +574,7 @@ const install = (Vue, vm) => { getInviteQRCode, createPoster, getFormDetial, + getFormList, addSubmitForm, lotteryConfig, lottery, diff --git a/CoreCms.Net.Uni-App/CoreShop/pages.json b/CoreCms.Net.Uni-App/CoreShop/pages.json index ecb73bfc..62026943 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages.json +++ b/CoreCms.Net.Uni-App/CoreShop/pages.json @@ -159,7 +159,14 @@ "path": "details/details", "style": { "navigationBarTextStyle": "black", - "navigationBarTitleText": "万能表单" + "navigationBarTitleText": "表单详情" + } + }, + { + "path": "list/list", + "style": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "表单列表" } } ] diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/form/list/list.vue b/CoreCms.Net.Uni-App/CoreShop/pages/form/list/list.vue new file mode 100644 index 00000000..ea13b313 --- /dev/null +++ b/CoreCms.Net.Uni-App/CoreShop/pages/form/list/list.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/index/member/member.vue b/CoreCms.Net.Uni-App/CoreShop/pages/index/member/member.vue index 416e03e6..fd6ba8c9 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages/index/member/member.vue +++ b/CoreCms.Net.Uni-App/CoreShop/pages/index/member/member.vue @@ -361,6 +361,12 @@ router: '/pages/activity/checkIn/checkIn/checkIn', showItem: false }, + customForm: { + name: '万能表单', + icon: 'file-text', + router: '/pages/form/list/list', + showItem: false + }, }, other: { invite: { @@ -499,9 +505,10 @@ _this.vas.solitaire.showItem = _this.config.showSolitaire == 1; //签到 _this.vas.calendar.showItem = _this.config.showCalendar == 1; + //自定义表单 + _this.vas.customForm.showItem = _this.config.showCustomForm == 1; //显示我的发票 _this.utilityMenus.myInvoice.showItem = _this.config.invoiceSwitch == 1; - //获取用户信息 _this.getUserInfo(); }, 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 02a41b54..4a855664 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/shop/setting/index.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/shop/setting/index.html @@ -144,6 +144,13 @@ +
+ +
+ + +
+
diff --git a/CoreCms.Net.Web.WebApi/Controllers/CommonController.cs b/CoreCms.Net.Web.WebApi/Controllers/CommonController.cs index a78cc994..2ab8a4f1 100644 --- a/CoreCms.Net.Web.WebApi/Controllers/CommonController.cs +++ b/CoreCms.Net.Web.WebApi/Controllers/CommonController.cs @@ -109,7 +109,8 @@ 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 showIndexPopupWindow = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShowIndexPopupWindow).ObjectToInt(2); //显示首页弹窗 + var showCustomForm = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShowCustomForm).ObjectToInt(2); //显示自定义表单按钮 var imageMax = 5; //前端上传图片最多几张 var storeSwitch = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.StoreSwitch).ObjectToInt(); //开启门店自提状态 @@ -241,7 +242,8 @@ namespace CoreCms.Net.Web.WebApi.Controllers showGroupBuying, showSolitaire, showCalendar, - showIndexPopupWindow + showIndexPopupWindow, + showCustomForm }; jm.data = model; return jm; diff --git a/CoreCms.Net.Web.WebApi/Controllers/FormController.cs b/CoreCms.Net.Web.WebApi/Controllers/FormController.cs index e0a5d08a..3243c34f 100644 --- a/CoreCms.Net.Web.WebApi/Controllers/FormController.cs +++ b/CoreCms.Net.Web.WebApi/Controllers/FormController.cs @@ -42,6 +42,26 @@ namespace CoreCms.Net.Web.WebApi.Controllers } + #region 获取表单列表 + /// + /// 获取表单列表 + /// + /// + [HttpPost] + public async Task GetList([FromBody] FMPageByIntId entity) + { + var jm = new WebApiCallBack(); + + var list = await _formServices.QueryPageAsync(p => p.endDateTime >= DateTime.Now, p => p.sort, OrderByType.Desc, entity.page, entity.limit); + jm.status = true; + jm.data = list; + + return jm; + } + + #endregion + + #region 万能表单/获取活动商品详情============================================================================= /// /// 万能表单/获取活动商品详情 @@ -56,7 +76,6 @@ namespace CoreCms.Net.Web.WebApi.Controllers } #endregion - #region 万能表单/提交表单============================================================================= /// /// 万能表单/提交表单