|
|
@@ -127,6 +127,20 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="form-group">
|
|
|
+ <div class="col-md-6">
|
|
|
+ <label for="is_forbid_china" class="col-md-3 control-label">阻止大陆访问</label>
|
|
|
+ <div class="col-md-9">
|
|
|
+ <input type="checkbox" class="make-switch" @if($is_forbid_china) checked @endif id="is_forbid_china" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-6">
|
|
|
+ <label for="is_forbid_oversea" class="col-md-3 control-label">阻止海外访问</label>
|
|
|
+ <div class="col-md-9">
|
|
|
+ <input type="checkbox" class="make-switch" @if($is_forbid_oversea) checked @endif id="is_forbid_oversea" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="form-group">
|
|
|
<div class="col-md-6">
|
|
|
<label for="is_forbid_robot" class="col-md-3 control-label">阻止机器人访问</label>
|
|
|
@@ -866,6 +880,36 @@
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ // 启用、禁用屏蔽大陆访问
|
|
|
+ $('#is_forbid_china').on({
|
|
|
+ 'switchChange.bootstrapSwitch': function(event, state) {
|
|
|
+ var is_forbid_china = state ? 1 : 0;
|
|
|
+
|
|
|
+ $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_forbid_china', value:is_forbid_china}, function (ret) {
|
|
|
+ layer.msg(ret.message, {time:1000}, function() {
|
|
|
+ if (ret.status == 'fail') {
|
|
|
+ window.location.reload();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 启用、禁用屏蔽海外访问
|
|
|
+ $('#is_forbid_oversea').on({
|
|
|
+ 'switchChange.bootstrapSwitch': function(event, state) {
|
|
|
+ var is_forbid_oversea = state ? 1 : 0;
|
|
|
+
|
|
|
+ $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_forbid_oversea', value:is_forbid_oversea}, function (ret) {
|
|
|
+ layer.msg(ret.message, {time:1000}, function() {
|
|
|
+ if (ret.status == 'fail') {
|
|
|
+ window.location.reload();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
// 启用、禁用机器人访问
|
|
|
$('#is_forbid_robot').on({
|
|
|
'switchChange.bootstrapSwitch': function(event, state) {
|