测试环境配置
This commit is contained in:
parent
4c329c3bf0
commit
279fa3578d
14
index.html
14
index.html
|
|
@ -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,10 @@
|
||||||
// 登录获取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 +246,4 @@
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
16
js/public.js
16
js/public.js
|
|
@ -1,11 +1,11 @@
|
||||||
const dataUrl = 'http://127.0.0.1:21522/gz_car/'; // 数据请求路径
|
// const dataUrl = 'http://127.0.0.1:21522/gz_car/'; // 数据请求路径
|
||||||
const fileUrl = 'http://127.0.0.1:21522/gz_car/statics'; // 文件路径
|
// const fileUrl = 'http://127.0.0.1:21522/gz_car/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:21522/gz-car/'; // 数据请求路径
|
||||||
const fileUrl = 'http://192.168.0.14:21999/statics'; // 文件路径
|
const fileUrl = 'http://192.168.0.16:21522/gz-car/statics'; // 文件路径
|
||||||
const signFileUrl = 'http://127.0.0.1:21995/statics'; // 签名文件路径
|
const signFileUrl = 'http://127.0.0.1:21995/statics'; // 签名文件路径
|
||||||
const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 */
|
const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件
|
||||||
|
|
||||||
/* 请求 */
|
/* 请求 */
|
||||||
function ajaxRequest(url, type, data, async, beforeFn, successFn, errorFn, contentType) {
|
function ajaxRequest(url, type, data, async, beforeFn, successFn, errorFn, contentType) {
|
||||||
|
|
@ -231,7 +231,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());
|
||||||
|
|
@ -544,4 +544,4 @@ function numToChinese(num) {
|
||||||
} else if (num === 36) {
|
} else if (num === 36) {
|
||||||
return '三十六';
|
return '三十六';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue