|
@@ -382,7 +382,7 @@ async function initialize() {
|
|
|
//获取license展示信息
|
|
|
function fetchApplications(page, size) {
|
|
|
|
|
|
- fetch(`http://10.28.20.105:8080/api/admin/GetAllLicenseInfo?page=${page}&pageSize=${size}`, {
|
|
|
+ fetch(`http://127.0.0.1:8080/api/admin/GetAllLicenseInfo?page=${page}&pageSize=${size}`, {
|
|
|
method: 'GET',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -845,7 +845,7 @@ function confirmGenerateLicense(id, isParentRow) {
|
|
|
function generateLicense(id, isParentRow) {
|
|
|
const payload = isParentRow ? { oa_request_id: id } : { uniqueID: id };
|
|
|
|
|
|
- fetch('http://10.28.20.105:8080/api/admin/GenerateLicense', {
|
|
|
+ fetch('http://127.0.0.1:8080/api/admin/GenerateLicense', {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -901,7 +901,7 @@ function CaptureLicenseOncefunc() {
|
|
|
});
|
|
|
|
|
|
// 发起 GET 请求的 Promise
|
|
|
- const fetchPromise = fetch('http://10.28.20.105:8080/api/admin/GetCaptureLicenseOnce', {
|
|
|
+ const fetchPromise = fetch('http://127.0.0.1:8080/api/admin/GetCaptureLicenseOnce', {
|
|
|
method: 'GET',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -1116,7 +1116,7 @@ function openUserActionModal(event, data, modalId) {
|
|
|
|
|
|
// 为用户管理界面的每一行添加点击和右键事件监听器
|
|
|
function fetchUsers() {
|
|
|
- fetch('http://10.28.20.105:8080/api/admin/userInfoAll', {
|
|
|
+ fetch('http://127.0.0.1:8080/api/admin/userInfoAll', {
|
|
|
method: 'GET',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -1161,7 +1161,7 @@ function fetchUsers() {
|
|
|
|
|
|
//查看用户lic历史
|
|
|
function showUserLicenseHistory() {
|
|
|
- fetch(`http://10.28.20.105:8080/api/admin/GetlicenseRecordInfoByUser`, {
|
|
|
+ fetch(`http://127.0.0.1:8080/api/admin/GetlicenseRecordInfoByUser`, {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -1316,7 +1316,7 @@ function confirmDelete() {
|
|
|
}
|
|
|
|
|
|
function deleteRow() {
|
|
|
- fetch(`http://10.28.20.105:8080/api/admin/deleteLicRow`, {
|
|
|
+ fetch(`http://127.0.0.1:8080/api/admin/deleteLicRow`, {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -1391,7 +1391,7 @@ function saveNewUser() {
|
|
|
Email: email
|
|
|
};
|
|
|
|
|
|
- fetch('http://10.28.20.105:8080/api/register', { // 修改为实际的API路径
|
|
|
+ fetch('http://127.0.0.1:8080/api/register', { // 修改为实际的API路径
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -1417,7 +1417,7 @@ function saveNewUser() {
|
|
|
|
|
|
|
|
|
function deleteUser(uniqueID) {
|
|
|
- fetch('http://10.28.20.105:8080/api/admin/deleteUser', {
|
|
|
+ fetch('http://127.0.0.1:8080/api/admin/deleteUser', {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -1455,7 +1455,7 @@ function distributeLicense(oa_id,supportEmail, salesEmail, uniqueID,oa_request_i
|
|
|
showLoadingModal('正在分发...');
|
|
|
|
|
|
// 将数据作为查询参数传递给 GET 请求
|
|
|
- const url = `http://10.28.20.105:8080/api/admin/GetDistributeButtenCheckController?oa_request_id=${oa_id}`;
|
|
|
+ const url = `http://127.0.0.1:8080/api/admin/GetDistributeButtenCheckController?oa_request_id=${oa_id}`;
|
|
|
|
|
|
// 向后端发送 GET 请求
|
|
|
fetch(url, {
|
|
@@ -1504,7 +1504,7 @@ function showEmailModal(supportEmail, salesEmail, uniqueID,oa_request_id) {
|
|
|
document.getElementById('userInputs').innerHTML = ''; // 清空用户输入
|
|
|
|
|
|
// 获取用户信息并填充第一个用户输入框
|
|
|
- fetch('http://10.28.20.105:8080/api/admin/distributeLicenseByUserInfo', {
|
|
|
+ fetch('http://127.0.0.1:8080/api/admin/distributeLicenseByUserInfo', {
|
|
|
method: 'GET',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -1597,7 +1597,7 @@ function addUserInput() {
|
|
|
.map(select => select.value);
|
|
|
|
|
|
// 获取用户列表并填充到选择框中
|
|
|
- fetch('http://10.28.20.105:8080/api/admin/distributeLicenseByUserInfo', {
|
|
|
+ fetch('http://127.0.0.1:8080/api/admin/distributeLicenseByUserInfo', {
|
|
|
method: 'GET',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -1656,7 +1656,7 @@ function updateUserOptions() {
|
|
|
defaultOption.textContent = '请选择用户';
|
|
|
select.appendChild(defaultOption);
|
|
|
|
|
|
- fetch('http://10.28.20.105:8080/api/admin/userInfoAll', {
|
|
|
+ fetch('http://127.0.0.1:8080/api/admin/userInfoAll', {
|
|
|
method: 'GET',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -1723,7 +1723,7 @@ function saveLicenseChanges() {
|
|
|
NodeCount: parseInt(form.nodeCount.value, 10), // 将 NodeCount 转换为整数
|
|
|
};
|
|
|
|
|
|
- fetch(`http://10.28.20.105:8080/api/admin/UpdateLicense`, {
|
|
|
+ fetch(`http://127.0.0.1:8080/api/admin/UpdateLicense`, {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -1757,7 +1757,7 @@ function updateUserOptions() {
|
|
|
const currentValue = select.value; // 保留当前选择值
|
|
|
select.innerHTML = ''; // 清空现有选项
|
|
|
|
|
|
- fetch('http://10.28.20.105:8080/api/admin/distributeLicenseByUserInfo', {
|
|
|
+ fetch('http://127.0.0.1:8080/api/admin/distributeLicenseByUserInfo', {
|
|
|
method: 'GET',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -1857,7 +1857,7 @@ function sendEmail() {
|
|
|
};
|
|
|
console.log('requestData:', requestData);
|
|
|
|
|
|
- fetch('http://10.28.20.105:8080/api/admin/distributeLicense', {
|
|
|
+ fetch('http://127.0.0.1:8080/api/admin/distributeLicense', {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -1898,7 +1898,7 @@ function sendEmail() {
|
|
|
|
|
|
|
|
|
function showDistributionHistory() {
|
|
|
- fetch('http://10.28.20.105:8080/api/admin/GetlicenseRecord', {
|
|
|
+ fetch('http://127.0.0.1:8080/api/admin/GetlicenseRecord', {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -2082,7 +2082,7 @@ function showRoleManagement() {
|
|
|
}
|
|
|
|
|
|
function fetchRoles() {
|
|
|
- fetch('http://10.28.20.105:8080/api/admin/GetRoles', {
|
|
|
+ fetch('http://127.0.0.1:8080/api/admin/GetRoles', {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -2424,7 +2424,7 @@ function getCheckboxOptions(selectedPermissions) {
|
|
|
function fetchRoleInfo(roleName, callback) {
|
|
|
console.log(`fetchRoleInfo called with roleName: ${roleName}`);
|
|
|
|
|
|
- fetch('http://10.28.20.105:8080/api/admin/GetRoles', {
|
|
|
+ fetch('http://127.0.0.1:8080/api/admin/GetRoles', {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -2498,7 +2498,7 @@ function saveRoleChanges(roleId) {
|
|
|
Permissions: selectedPermissions
|
|
|
};
|
|
|
|
|
|
- fetch('http://10.28.20.105:8080/api/admin/UpdateRole', {
|
|
|
+ fetch('http://127.0.0.1:8080/api/admin/UpdateRole', {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -2527,7 +2527,7 @@ function deleteRole(roleName) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- fetch('http://10.28.20.105:8080/api/admin/DeleteRole', {
|
|
|
+ fetch('http://127.0.0.1:8080/api/admin/DeleteRole', {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -2637,7 +2637,7 @@ function createNewRole() {
|
|
|
Permissions: selectedPermissions
|
|
|
};
|
|
|
|
|
|
- fetch('http://10.28.20.105:8080/api/admin/CreateRole', {
|
|
|
+ fetch('http://127.0.0.1:8080/api/admin/CreateRole', {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -2697,7 +2697,7 @@ function showEditUserForm() {
|
|
|
form.appendChild(roleSelectDiv);
|
|
|
|
|
|
// 获取角色列表并填充到选择框中
|
|
|
- fetch('http://10.28.20.105:8080/api/admin/GetRoleNames', {
|
|
|
+ fetch('http://127.0.0.1:8080/api/admin/GetRoleNames', {
|
|
|
method: 'GET',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -2743,7 +2743,7 @@ function saveUserChanges() {
|
|
|
Role: formData.get('role')
|
|
|
};
|
|
|
|
|
|
- fetch(`http://10.28.20.105:8080/api/admin/updateUser`, {
|
|
|
+ fetch(`http://127.0.0.1:8080/api/admin/updateUser`, {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -2772,7 +2772,7 @@ function toggleUserInfo() {
|
|
|
const windowWidth = window.innerWidth; // 浏览器窗口的宽度
|
|
|
|
|
|
if (userModal.style.display === 'none' || userModal.style.display === '') {
|
|
|
- fetch(`http://10.28.20.105:8080/api/admin/userInfo`, {
|
|
|
+ fetch(`http://127.0.0.1:8080/api/admin/userInfo`, {
|
|
|
method: 'GET',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -2925,7 +2925,7 @@ function toggleSidebar() {
|
|
|
|
|
|
|
|
|
function fetchUsername() {
|
|
|
- fetch(`http://10.28.20.105:8080/api/admin/userInfo`, {
|
|
|
+ fetch(`http://127.0.0.1:8080/api/admin/userInfo`, {
|
|
|
method: 'GET',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|
|
@@ -2965,7 +2965,7 @@ function toggleSidebar() {
|
|
|
}
|
|
|
|
|
|
function fetchPermissionsByRole(role) {
|
|
|
- return fetch(`http://10.28.20.105:8080/api/admin/GetSelfRoles`, {
|
|
|
+ return fetch(`http://127.0.0.1:8080/api/admin/GetSelfRoles`, {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Authorization': `Bearer ${token}`,
|