forked from github/dataease
feat: 前端调整
This commit is contained in:
parent
5f6ab3c8fa
commit
ee6e220b01
8
frontend/.env.development
Normal file
8
frontend/.env.development
Normal file
@ -0,0 +1,8 @@
|
||||
ENV = 'development'
|
||||
|
||||
# 接口地址
|
||||
VUE_APP_BASE_API = 'http://localhost:8081'
|
||||
VUE_APP_WS_API = 'ws://localhost:8000'
|
||||
|
||||
# 是否启用 babel-plugin-dynamic-import-node插件
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
7
frontend/.env.production
Normal file
7
frontend/.env.production
Normal file
@ -0,0 +1,7 @@
|
||||
ENV = 'production'
|
||||
|
||||
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
|
||||
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
|
||||
VUE_APP_BASE_API = 'https://el-admin.xin'
|
||||
# 如果接口是 http 形式, wss 需要改为 ws
|
||||
VUE_APP_WS_API = 'wss://el-admin.xin'
|
53
frontend/src/settings.js
Normal file
53
frontend/src/settings.js
Normal file
@ -0,0 +1,53 @@
|
||||
module.exports = {
|
||||
/**
|
||||
* @description 网站标题
|
||||
*/
|
||||
title: 'DATA-EASE',
|
||||
/**
|
||||
* @description 是否显示 tagsView
|
||||
*/
|
||||
tagsView: false,
|
||||
|
||||
showSettings: true,
|
||||
/**
|
||||
* @description 固定头部
|
||||
*/
|
||||
fixedHeader: true,
|
||||
/**
|
||||
* @description 记住密码状态下的token在Cookie中存储的天数,默认1天
|
||||
*/
|
||||
tokenCookieExpires: 1,
|
||||
/**
|
||||
* @description 记住密码状态下的密码在Cookie中存储的天数,默认1天s
|
||||
*/
|
||||
passCookieExpires: 1,
|
||||
/**
|
||||
* @description 是否只保持一个子菜单的展开
|
||||
*/
|
||||
uniqueOpened: true,
|
||||
/**
|
||||
* @description token key
|
||||
*/
|
||||
TokenKey: 'EL-ADMIN-TOEKN',
|
||||
/**
|
||||
* @description 请求超时时间,毫秒(默认2分钟)
|
||||
*/
|
||||
timeout: 1200000,
|
||||
/**
|
||||
* @description 是否显示logo
|
||||
*/
|
||||
sidebarLogo: false,
|
||||
/**
|
||||
* 是否显示设置的底部信息
|
||||
*/
|
||||
showFooter: true,
|
||||
/**
|
||||
* 底部文字,支持html语法
|
||||
*/
|
||||
footerTxt: '© 2019 Zheng Jie <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License 2.0</a>',
|
||||
/**
|
||||
* 备案号
|
||||
*/
|
||||
caseNumber: '浙ICP备18005431号'
|
||||
}
|
||||
|
@ -1,16 +1,18 @@
|
||||
const path = require('path')
|
||||
const defaultSettings = require('./src/settings.js')
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, dir)
|
||||
}
|
||||
|
||||
const name = defaultSettings.title // 网址标题
|
||||
const port = 8080
|
||||
module.exports = {
|
||||
productionSourceMap: true,
|
||||
devServer: {
|
||||
port: 8080,
|
||||
port: port,
|
||||
proxy: {
|
||||
['^(?!/login)']: {
|
||||
target: 'http://localhost:8081',
|
||||
target: process.env.VUE_APP_BASE_API,
|
||||
ws: true,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user