From d8fc647ccbfd574ca27d989aa9f79d3628a20e96 Mon Sep 17 00:00:00 2001 From: JianWeie Date: Thu, 13 Oct 2022 16:28:22 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E3=80=90=E4=B8=87=E8=83=BD=E8=A1=A8=E5=8D=95=E3=80=91=E5=85=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E5=B9=B6=E5=8F=AF=E4=BB=A5=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=BC=80=E5=90=AF=E6=88=96=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SystemSettingConstVars.cs | 6 + .../SystemSettingDictionary.cs | 1 + .../CoreShop/common/request/http.api.js | 6 +- CoreCms.Net.Uni-App/CoreShop/pages.json | 9 +- .../CoreShop/pages/form/list/list.vue | 110 ++++++++++++++++++ .../CoreShop/pages/index/member/member.vue | 9 +- .../wwwroot/views/shop/setting/index.html | 7 ++ .../Controllers/CommonController.cs | 6 +- .../Controllers/FormController.cs | 21 +++- 9 files changed, 169 insertions(+), 6 deletions(-) create mode 100644 CoreCms.Net.Uni-App/CoreShop/pages/form/list/list.vue 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 万能表单/提交表单============================================================================= /// /// 万能表单/提交表单