mirror of
https://github.com/newnius/YAO-portal.git
synced 2025-06-07 15:41:56 +00:00
27 lines
584 B
JavaScript
27 lines
584 B
JavaScript
$(function () {
|
|
$("#btn-signout").click(function (e) {
|
|
e.preventDefault();
|
|
var ajax = $.ajax({
|
|
url: window.config.BASE_URL + "/service?action=user_signout",
|
|
type: 'POST',
|
|
data: {}
|
|
});
|
|
ajax.done(function (res) {
|
|
window.location.pathname = "/";
|
|
});
|
|
});
|
|
|
|
$("#btn-oauth-login").click(function (e) {
|
|
e.preventDefault();
|
|
var ajax = $.ajax({
|
|
url: window.config.BASE_URL + "/service?action=oauth_get_url",
|
|
type: 'POST',
|
|
data: {}
|
|
});
|
|
ajax.done(function (res) {
|
|
window.location.href = res['url'];
|
|
});
|
|
});
|
|
|
|
$('.date-picker').datetimepicker();
|
|
}); |