1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- {template 'common/header'}
- <ul class="we7-page-tab">
- {loop $active_sub_permission $active_menu}
- {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']))}
- <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>
- {/if}
- {/loop}
- </ul>
- <div id="js-statistics-setting" ng-controller="statisticsSettingCtrl" ng-cloak>
- <table class="table we7-table table-hover table-form">
- <col />
- <col width="100px"/>
- <tr>
- <th class="text-left" colspan="2">每天最高访问次数</th>
- </tr>
- <tr>
- <td ng-if="setting"><span ng-bind="setting"></span><span class="color-gray"> 次 / 天</span></td>
- <td ng-if="!setting">不限次数</span></td>
- <td >
- <div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#edit-setting" ng-click="editInfo('visit', setting)">修改</a></div>
- </td>
- </tr>
- </table>
- <div class="modal fade" id="edit-setting" tabindex="-1" role="dialog" aria-hidden="true">
- <div class="we7-modal-dialog modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
- <div class="modal-title">每天最高访问次数</div>
- </div>
- <div class="modal-body">
- <div class="form-group">
- <input type="number" ng-model="newVisitVal" step="1" class="form-control">
- <span class="help-block">设置为0,表示每天最高访问次数在创始人设置的每月该公众号访问总次数内;</span>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="saveSetting('visit')">确定</button>
- <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
- </div>
- </div>
- </div>
- </div>
- <table class="table we7-table table-hover table-form">
- <col />
- <col width="100px" />
- <tr>
- <th class="text-left" colspan="2">检测时间间隔(单位:秒)</th>
- </tr>
- <tr>
- <td ng-if="interval"><span ng-bind="interval"></span><span class="color-gray"> 秒</span></td>
- <td ng-if="!interval">无间隔</span></td>
- <td >
- <div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#edit-setting-time" ng-click="editInfo('interval', interval)">修改</a></div>
- </td>
- </tr>
- </table>
- <div class="modal fade" id="edit-setting-time" tabindex="-1" role="dialog" aria-hidden="true">
- <div class="we7-modal-dialog modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
- <div class="modal-title">检测时间间隔(单位:秒)</div>
- </div>
- <div class="modal-body">
- <div class="form-group">
- <input type="number" ng-model="newInterval" step="1" class="form-control">
- <span class="help-block">
- 设置为0,表示每次访问都要判断是否超过设定值(精确限制访问量,但会增加服务器压力);<br>
- 建议值:600,即每10分钟进行一次检测(模糊限制访问量,与设定值会存在一定误差,但服务器压力小)。
- </span>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="saveSetting('interval')">确定</button>
- <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- angular.module('statisticsApp').value('config', {
- 'highest_visit': {php echo !empty($highest_visit) ? json_encode($highest_visit) : 'null'},
- 'interval': {php echo !empty($interval) ? json_encode($interval) : 'null'},
- 'links': {
- 'editSetting': "{php echo url('statistics/setting/edit_setting')}",
- },
- });
- angular.bootstrap($('#js-statistics-setting'), ['statisticsApp']);
- </script>
- {template 'common/footer'}
|