setting.html 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. {template 'common/header'}
  2. <ul class="we7-page-tab">
  3. {loop $active_sub_permission $active_menu}
  4. {if permission_check_account_user($active_menu['permission_name'], false) && (empty($active_menu['is_display']) || is_array($active_menu['is_display']) && in_array($_W['account']['type'], $active_menu['is_display']))}
  5. <li {if $action == $active_menu['active']}class="active"{/if}><a href="{php echo $active_menu['url'] . 'version_id=' . $_GPC['version_id']}">{$active_menu['title']}</a></li>
  6. {/if}
  7. {/loop}
  8. </ul>
  9. <div id="js-statistics-setting" ng-controller="statisticsSettingCtrl" ng-cloak>
  10. <table class="table we7-table table-hover table-form">
  11. <col />
  12. <col width="100px"/>
  13. <tr>
  14. <th class="text-left" colspan="2">每天最高访问次数</th>
  15. </tr>
  16. <tr>
  17. <td ng-if="setting"><span ng-bind="setting"></span><span class="color-gray"> 次 / 天</span></td>
  18. <td ng-if="!setting">不限次数</span></td>
  19. <td >
  20. <div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#edit-setting" ng-click="editInfo('visit', setting)">修改</a></div>
  21. </td>
  22. </tr>
  23. </table>
  24. <div class="modal fade" id="edit-setting" tabindex="-1" role="dialog" aria-hidden="true">
  25. <div class="we7-modal-dialog modal-dialog">
  26. <div class="modal-content">
  27. <div class="modal-header">
  28. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  29. <div class="modal-title">每天最高访问次数</div>
  30. </div>
  31. <div class="modal-body">
  32. <div class="form-group">
  33. <input type="number" ng-model="newVisitVal" step="1" class="form-control">
  34. <span class="help-block">设置为0,表示每天最高访问次数在创始人设置的每月该公众号访问总次数内;</span>
  35. </div>
  36. </div>
  37. <div class="modal-footer">
  38. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="saveSetting('visit')">确定</button>
  39. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. <table class="table we7-table table-hover table-form">
  45. <col />
  46. <col width="100px" />
  47. <tr>
  48. <th class="text-left" colspan="2">检测时间间隔(单位:秒)</th>
  49. </tr>
  50. <tr>
  51. <td ng-if="interval"><span ng-bind="interval"></span><span class="color-gray"> 秒</span></td>
  52. <td ng-if="!interval">无间隔</span></td>
  53. <td >
  54. <div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#edit-setting-time" ng-click="editInfo('interval', interval)">修改</a></div>
  55. </td>
  56. </tr>
  57. </table>
  58. <div class="modal fade" id="edit-setting-time" tabindex="-1" role="dialog" aria-hidden="true">
  59. <div class="we7-modal-dialog modal-dialog">
  60. <div class="modal-content">
  61. <div class="modal-header">
  62. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  63. <div class="modal-title">检测时间间隔(单位:秒)</div>
  64. </div>
  65. <div class="modal-body">
  66. <div class="form-group">
  67. <input type="number" ng-model="newInterval" step="1" class="form-control">
  68. <span class="help-block">
  69. 设置为0,表示每次访问都要判断是否超过设定值(精确限制访问量,但会增加服务器压力);<br>
  70. 建议值:600,即每10分钟进行一次检测(模糊限制访问量,与设定值会存在一定误差,但服务器压力小)。
  71. </span>
  72. </div>
  73. </div>
  74. <div class="modal-footer">
  75. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="saveSetting('interval')">确定</button>
  76. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <script>
  83. angular.module('statisticsApp').value('config', {
  84. 'highest_visit': {php echo !empty($highest_visit) ? json_encode($highest_visit) : 'null'},
  85. 'interval': {php echo !empty($interval) ? json_encode($interval) : 'null'},
  86. 'links': {
  87. 'editSetting': "{php echo url('statistics/setting/edit_setting')}",
  88. },
  89. });
  90. angular.bootstrap($('#js-statistics-setting'), ['statisticsApp']);
  91. </script>
  92. {template 'common/footer'}