1、baseurl
This commit is contained in:
@ -1,6 +1,15 @@
|
||||
|
||||
let NAV_MENU_STATUS = false;
|
||||
const requestApi = 'http://proxy.apiapl.com/api/v1';
|
||||
let requestApi;
|
||||
|
||||
if (window.location.protocol === "file:") {
|
||||
// 本地打开 index.html(file://),默认指向本地开发服务
|
||||
requestApi = "http://192.168.2.22:8086/api/v1";
|
||||
} else {
|
||||
// 部署到服务器时自动适配
|
||||
requestApi = `${window.location.protocol}//${window.location.host}/api/v1`;
|
||||
}
|
||||
|
||||
let kwdValue = new URLSearchParams(window.location.search).get('kwd');
|
||||
let invitCode = new URLSearchParams(window.location.search).get('code');
|
||||
if (kwdValue) {
|
||||
@ -10,7 +19,7 @@ if(invitCode){
|
||||
localStorage.setItem("invitCode", invitCode);
|
||||
}
|
||||
// const $POST_P = async (u, d) => $.post(_payApi + u, { ...d,session: localStorage.getItem("session") || "" });
|
||||
// const requestApi = 'http://proxy.apiapl.com/api/v1';
|
||||
// const requestApi = `${window.location.protocol}//${window.location.host}`;
|
||||
const loading = async (v) =>{
|
||||
if (typeof v == "undefined" || v) {
|
||||
if ($(".lo_loading").length) {
|
||||
|
||||
Reference in New Issue
Block a user