demo20230512/Browser_Local/js/Module/SetCulture.js

22 lines
679 B
JavaScript
Raw Normal View History

2023-05-12 10:20:28 +08:00
$(document).ready(function () {
var arr = window.location.href.split("/");
if (arr[3].indexOf('app') == 0)
baseUrl = '';
else if (arr[3].indexOf('account') == 0)
baseUrl = '';
else if (arr[3].indexOf('Certification') == 0)
baseUrl = '';
else if (arr[3].indexOf('admin') == 0)
baseUrl = '';
else
baseUrl = '/' + arr[3];
//console.log('SetCulture.js', baseUrl);
$("#setculture").click(function (event) {
$.ajax({
type: 'POST',
url: baseUrl+'/api/setculture/' + event.target.lastChild.value
}).done(function () {
location.reload();
});
});
});