项目地址 \src\utils\config
const plchc_pre_url = "plchc"; // 协同办案模块
const base_pre_url = "base"; // 基础管理模块
const plwp_pre_url = "plwp"; // 门户展示接口平台模块
const basic_service_pre_url = "basic-service"; // 大数据服务平台模块
let url_config,
home_url,
dce_admin_url_api,
plchc_url,
plea_url,
dce_admin_url,
// if (process.env.NODE_ENV === "development") {
// // 开发环境
// } else {
// 生产环境
url_config = window.SITE_CONFIG.url_config; // 门户接口地址
dce_admin_url_api = window.SITE_CONFIG.dce_admin_url_api; // 共享交换平台地址 接口地址
home_url = window.SITE_CONFIG.home_url; // 政法门户地址前台web地址
plchc_url = window.SITE_CONFIG.plchc_url; // 协同办案服务系统平台地址
dce_admin_url = window.SITE_CONFIG.dce_admin_url; // 共享交换平台页面地址
// }
export {
url_config,
home_url,
plchc_pre_url,
base_pre_url,
plwp_pre_url,
basic_service_pre_url,
dce_admin_url,
dce_admin_url_api
};
项目地址 \public\static\config
/**
* 全局配置
*/
(function() {
window.SITE_CONFIG = {};
window.SITE_CONFIG["url_config"] = "http://192.168.0.12:9201"; // 门户 接口地址
window.SITE_CONFIG["home_url"] = "http://192.168.0.12:8089/"; // 政法门户地址前台web
window.SITE_CONFIG["plchc_url"] = "http://192.168.0.161:8190/"; // 协同办案服务系统平台地址
window.SITE_CONFIG["plea_url"] = "http://192.168.0.161:8189/"; // 电子卷宗档案管理系统平台地址
window.SITE_CONFIG["dce_admin_url"] = "http://192.168.0.11:9100/"; // 共享交换平台页面地址
})();
项目地址 \public\index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>陕西省政法大数据协同办案门户</title>
<% if (process.env.NODE_ENV === 'production') { %>
<!-- 生产环境 -->
<script>document.write('<script src="./static/config/index.js?t=' + new Date().getTime() + '"><\/script>');</script>
<% }else { %>
<!-- 开发环境 -->
<!--<link rel="shortcut icon" type="image/x-icon" href="./static/img/favicon.ico">-->
<script src="./static/config/index.js"></script>
<% } %>
</head>
<body>
<noscript>
<strong>We're sorry but vue-zfw doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
js 引用 方式
import { url_config } from "@/utils/config";
网友评论