Parcourir la source

调整通知间隔最大值

ellisran il y a 1 an
Parent
commit
518831747c
2 fichiers modifiés avec 18 ajouts et 18 suppressions
  1. 4 4
      app/const/project_setting.js
  2. 14 14
      app/view/setting/user_permission_modal.ejs

+ 4 - 4
app/const/project_setting.js

@@ -9,11 +9,11 @@
  */
 // 重新发送通知设置
 const notice_setting = {
-    fixed: 12, // 固定间隔
+    fixed: 72, // 固定间隔
     activity: { // 活动间隔
-        first: 12,
-        second: 6,
-        later: 3,
+        first: 72,
+        second: 48,
+        later: 24,
     },
     mode: 'fixed', // 默认模式
     shield_times: { // 屏蔽时间段

+ 14 - 14
app/view/setting/user_permission_modal.ejs

@@ -174,8 +174,8 @@
                 <div style="margin-left: 1.5rem;margin-top: .25rem; <% if (noticeSet.mode === 'activity') { %>display: none;<% } %>" id="wx_type_1">
                     <div class="w-100 d-inline-flex"><label class="right-duiqi">每间隔:</label>
                         <input id="fixed_time" style="width: 50px;" class="time-input form-control form-control-sm" type="number" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" min="0" step="1" max="24" value="<%- noticeSet.fixed %>">
-                        <div class="dropdown-menu">
-                            <% for (let i = 1; i <= 24;i++) { %>
+                        <div class="dropdown-menu" style="max-height: 500px;overflow: auto;">
+                            <% for (let i = 1; i <= 72;i++) { %>
                             <a class="dropdown-item change_time" href="javascript:void(0);" data-value="<%- i %>"><%- i %></a>
                             <% } %>
                         </div><label style="line-height: 25px;">&nbsp; 小时</label>
@@ -184,24 +184,24 @@
                 <div style="margin-left: 1.5rem;margin-top: .25rem; <% if (noticeSet.mode === 'fixed') { %>display: none;<% } %>" id="wx_type_2">
                     <div class="w-100 d-inline-flex"><label class="right-duiqi">第1次间隔:</label>
                         <input id="activity_first_time" style="width: 50px;" class="time-input form-control form-control-sm" type="number" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" min="0" step="1" max="24" value="<%- noticeSet.activity.first %>">
-                        <div class="dropdown-menu">
-                            <% for (let i = 1; i <= 24;i++) { %>
+                        <div class="dropdown-menu" style="max-height: 500px;overflow: auto;">
+                            <% for (let i = 1; i <= 72;i++) { %>
                                 <a class="dropdown-item change_time" href="javascript:void(0);" data-value="<%- i %>"><%- i %></a>
                             <% } %>
                         </div><label style="line-height: 25px;">&nbsp; 小时</label>
                     </div>
                     <div class="w-100 d-inline-flex"><label class="right-duiqi">第2次间隔:</label>
                         <input id="activity_second_time" style="width: 50px;" class="time-input form-control form-control-sm" type="number" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" min="0" step="1" max="24" value="<%- noticeSet.activity.second %>">
-                        <div class="dropdown-menu">
-                            <% for (let i = 1; i <= 24;i++) { %>
+                        <div class="dropdown-menu" style="max-height: 500px;overflow: auto;">
+                            <% for (let i = 1; i <= 72;i++) { %>
                                 <a class="dropdown-item change_time" href="javascript:void(0);" data-value="<%- i %>"><%- i %></a>
                             <% } %>
                         </div><label style="line-height: 25px;">&nbsp; 小时</label>
                     </div>
                     <div class="w-100 d-inline-flex"><label class="right-duiqi">往后间隔:</label>
                         <input id="activity_later_time" style="width: 50px;" class="time-input form-control form-control-sm" type="number" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" min="0" step="1" max="24" value="<%- noticeSet.activity.later %>">
-                        <div class="dropdown-menu">
-                            <% for (let i = 1; i <= 24;i++) { %>
+                        <div class="dropdown-menu" style="max-height: 500px;overflow: auto;">
+                            <% for (let i = 1; i <= 72;i++) { %>
                                 <a class="dropdown-item change_time" href="javascript:void(0);" data-value="<%- i %>"><%- i %></a>
                             <% } %>
                         </div><label style="line-height: 25px;">&nbsp; 小时</label>
@@ -275,18 +275,18 @@
                 _self.siblings('.dropdown-menu').hide();
                 let rate = parseFloat(_self.val());
                 if (_.isNaN(rate)) {
-                    toastr.error('请输入1-24之前的整数值');
-                    _self.val(6);
+                    toastr.error('请输入1-72之前的整数值');
+                    _self.val(72);
                     return;
                 }
                 // 如果是小数,自动转成整数
                 if (rate.toString().indexOf('.') !== -1) {
-                    toastr.warning('请输入1-24之前的整数值');
+                    toastr.warning('请输入1-72之前的整数值');
                 }
                 rate = parseInt(rate);
-                if(rate < 1 || rate > 24) {
-                    toastr.error('请输入1-24之前的整数值');
-                    _self.val(6);
+                if(rate < 1 || rate > 72) {
+                    toastr.error('请输入1-72之前的整数值');
+                    _self.val(72);
                     return;
                 }
                 _self.val(rate);