测试环境配置

This commit is contained in:
lSun 2025-03-28 14:23:02 +08:00
parent 8c2d1b20c4
commit 4d3d02c6f3
2 changed files with 15 additions and 14 deletions

View File

@ -163,7 +163,6 @@
window.history.pushState({}, 0, url); window.history.pushState({}, 0, url);
} }
initPage(miniAdmin); initPage(miniAdmin);
sessionStorage.setItem('us', JSON.stringify(result.data));
} else if (result.code === 401) { } else if (result.code === 401) {
closeWindowOpen(); closeWindowOpen();
} }
@ -172,8 +171,8 @@
}, null); }, null);
} else { } else {
// console.log('走的自己登录'); // console.log('走的自己登录');
// login(miniAdmin); login(miniAdmin);
window.location = 'page/401.html'; // window.location = 'page/401.html';
} }
/* var options = { /* var options = {
iniUrl: "api/init.json", // 初始化接口 iniUrl: "api/init.json", // 初始化接口
@ -225,9 +224,11 @@
// 登录获取token // 登录获取token
let login_url = dataUrl + 'login/userLogin' let login_url = dataUrl + 'login/userLogin'
const params = { const params = {
"username": 'sa', // "username": 'sa',
// "password": '3NBzZK7qxhMhrmvi63FnuQ==', // "password": 'ebbd6ea34bbab2b0813afcf59c8c9556',
"password": 'ebbd6ea34bbab2b0813afcf59c8c9556', "username": 'bns',
"password": '1769fb2837e10e9d22c1c25add76355a',
} }
ajaxRequest(login_url, "POST", params, true, function () { ajaxRequest(login_url, "POST", params, true, function () {
}, function (result) { }, function (result) {
@ -246,4 +247,4 @@
</script> </script>
</body> </body>
</html> </html>

View File

@ -1,10 +1,10 @@
/* const dataUrl = 'http://127.0.0.1:21995/'; // 数据请求路径 // const dataUrl = 'http://127.0.0.1:21521/'; // 数据请求路径
const fileUrl = 'http://127.0.0.1:21995/statics'; // 文件路径 // const fileUrl = 'http://127.0.0.1:21521/statics'; // 文件路径
const signFileUrl = 'http://127.0.0.1:21995/statics'; // 签名文件路径 // const signFileUrl = 'http://127.0.0.1:21521/statics'; // 签名文件路径
const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 */ // const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件
const dataUrl = 'http://192.168.0.14:21999/'; // 数据请求路径 const dataUrl = 'http://192.168.0.16:21999/'; // 数据请求路径
const fileUrl = 'http://192.168.0.14:21999/statics'; // 文件路径 const fileUrl = 'http://192.168.0.16:21999/statics'; // 文件路径
const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件
/* 请求 */ /* 请求 */
@ -187,7 +187,7 @@ function getUrlParam(key) {
// 预览文件 // 预览文件
function commonViewFile(params) { function commonViewFile(params) {
let path = fileUrl + params + '?auth=' + sessionStorage.getItem("gz-token"); let path = fileUrl + params + '?auth=' + sessionStorage.getItem("gz-token");
// path = fileUrl + params // path = fileUrl + params
console.log(path); console.log(path);
let encodePath = encodeURIComponent(useBase64.encode64(path)); let encodePath = encodeURIComponent(useBase64.encode64(path));
window.open(viewFileUrl + encodePath + '&token=' + generateToken()); window.open(viewFileUrl + encodePath + '&token=' + generateToken());