fix: 登陆设置保存到数据库中

#Issue
link !32
This commit is contained in:
Argo Zhang 2019-09-22 10:21:45 +08:00
parent 413d0a4a32
commit e0d2f7bdf7
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
2 changed files with 11 additions and 1 deletions

View File

@ -116,7 +116,7 @@
</div>
</div>
<div class="modal-footer text-right">
<button data-method="LoginSettings" class="btn btn-secondary" type="button"><i class="fa fa-save"></i><span>保存</span></button>
<button data-method="loginSettings" class="btn btn-secondary" type="button"><i class="fa fa-save"></i><span>保存</span></button>
</div>
</div>
</div>

View File

@ -52,6 +52,16 @@ $(function () {
}
});
break;
case 'loginSettings':
var mobile = $('#mobile').prop('checked') ? "1" : "0";
$.bc({
url: Settings.url, data: { name: '短信验证码登录', code: mobile, category: '网站设置' }, method: "post"
});
var oauth = $('#oauth').prop('checked') ? "1" : "0";
$.bc({
url: Settings.url, data: { name: 'OAuth 认证登录', code: oauth, category: '网站设置' }, title: '登录设置', method: "post"
});
break;
case 'saveAutoLock':
var autoLock = $('#lockScreen').prop('checked') ? "1" : "0";
$.bc({