奇淼(piexlmax
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 588 additions and 467 deletions
-
8server/model/system/sys_user.go
-
8web/.env.development
-
8web/.env.production
-
15web/index.html
-
262web/package-lock.json
-
89web/package.json
-
2web/src/components/customPic/index.vue
-
2web/src/components/dashbordCharts/echartsLine.vue
-
2web/src/components/upload/image.vue
-
17web/src/core/gin-vue-admin.js
-
2web/src/directive/auth.js
-
4web/src/router/index.js
-
210web/src/style/login.scss
-
4web/src/style/newLogin.scss
-
3web/src/utils/_import.js
-
19web/src/utils/asyncRouter.js
-
174web/src/utils/request.js
-
2web/src/view/example/breakpoint/breakpoint.vue
-
2web/src/view/example/excel/excel.vue
-
4web/src/view/example/upload/upload.vue
-
2web/src/view/init/index.vue
-
4web/src/view/layout/aside/asideComponent/index.vue
-
2web/src/view/layout/aside/index.vue
-
14web/src/view/layout/index.vue
-
6web/src/view/person/person.vue
-
6web/src/view/superAdmin/authority/authority.vue
-
2web/src/view/superAdmin/menu/menu.vue
-
8web/src/view/superAdmin/user/user.vue
-
2web/src/view/systemTools/formCreate/index.vue
-
83web/vite.config.js
-
89web/vue.config.js
@ -1,6 +1,6 @@ |
|||
ENV = 'development' |
|||
|
|||
VUE_APP_CLI_PORT = 8080 |
|||
VUE_APP_SERVER_PORT = 8888 |
|||
VUE_APP_BASE_API = /api |
|||
VUE_APP_BASE_PATH = http://127.0.0.1 |
|||
VITE_CLI_PORT = 8080 |
|||
VITE_SERVER_PORT = 8888 |
|||
VITE_BASE_API = /api |
|||
VITE_BASE_PATH = http://127.0.0.1 |
@ -1,7 +1,7 @@ |
|||
ENV = 'production' |
|||
|
|||
VUE_APP_CLI_PORT = 8080 |
|||
VUE_APP_SERVER_PORT = 8888 |
|||
VUE_APP_BASE_API = /api |
|||
VITE_CLI_PORT = 8080 |
|||
VITE_SERVER_PORT = 8888 |
|||
VITE_BASE_API = /api |
|||
#下方修改为你的线上ip |
|||
VUE_APP_BASE_PATH = http://8.141.61.63 |
|||
VITE_BASE_PATH = http://8.141.61.63 |
@ -0,0 +1,15 @@ |
|||
|
|||
<!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="favicon.ico"> |
|||
<title></title> |
|||
</head> |
|||
<body> |
|||
<div id="app"></div> |
|||
<script type="module" src="./src/main.js"></script> |
|||
</body> |
|||
</html> |
@ -1,44 +1,49 @@ |
|||
{ |
|||
"name": "gin-vue-admin", |
|||
"version": "2.3.5", |
|||
"private": true, |
|||
"scripts": { |
|||
"serve": "node openDocument.js && vue-cli-service serve", |
|||
"build": "vue-cli-service build", |
|||
"lint": "vue-cli-service lint" |
|||
}, |
|||
"dependencies": { |
|||
"axios": "^0.19.2", |
|||
"core-js": "^3.6.5", |
|||
"echarts": "4.9.0", |
|||
"element-plus": "^1.1.0-beta.8", |
|||
"highlight.js": "^10.6.0", |
|||
"marked": "^2.0.0", |
|||
"mitt": "^3.0.0", |
|||
"path": "^0.12.7", |
|||
"qs": "^6.8.0", |
|||
"quill": "^1.3.7", |
|||
"screenfull": "^5.0.2", |
|||
"script-ext-html-webpack-plugin": "^2.1.4", |
|||
"spark-md5": "^3.0.1", |
|||
"vue": "^3.0.0", |
|||
"vue-particle-line": "^0.1.4", |
|||
"vue-router": "^4.0.0-0", |
|||
"vuex": "^4.0.0-0", |
|||
"vuex-persist": "^2.1.0" |
|||
}, |
|||
"devDependencies": { |
|||
"@vue/cli-plugin-babel": "~4.5.0", |
|||
"@vue/cli-plugin-eslint": "~4.5.0", |
|||
"@vue/cli-plugin-router": "~4.5.0", |
|||
"@vue/cli-plugin-vuex": "~4.5.0", |
|||
"@vue/cli-service": "~4.5.0", |
|||
"@vue/compiler-sfc": "^3.0.0", |
|||
"babel-eslint": "^10.1.0", |
|||
"babel-plugin-import": "^1.13.3", |
|||
"eslint": "^6.7.2", |
|||
"eslint-plugin-vue": "^7.0.0", |
|||
"sass": "^1.26.5", |
|||
"sass-loader": "^8.0.2" |
|||
} |
|||
"name": "gin-vue-admin", |
|||
"version": "2.3.5", |
|||
"private": true, |
|||
"scripts": { |
|||
"serve": "node openDocument.js && vite --host --mode development", |
|||
"build": "vite build --mode production", |
|||
"preview": "vite preview" |
|||
}, |
|||
"dependencies": { |
|||
"axios": "^0.19.2", |
|||
"core-js": "^3.6.5", |
|||
"echarts": "4.9.0", |
|||
"element-plus": "^1.1.0-beta.8", |
|||
"highlight.js": "^10.6.0", |
|||
"marked": "^2.0.0", |
|||
"mitt": "^3.0.0", |
|||
"path": "^0.12.7", |
|||
"qs": "^6.8.0", |
|||
"quill": "^1.3.7", |
|||
"screenfull": "^5.0.2", |
|||
"script-ext-html-webpack-plugin": "^2.1.4", |
|||
"spark-md5": "^3.0.1", |
|||
"vue": "^3.0.0", |
|||
"vue-particle-line": "^0.1.4", |
|||
"vue-router": "^4.0.0-0", |
|||
"vuex": "^4.0.0-0", |
|||
"vuex-persist": "^2.1.0" |
|||
}, |
|||
"devDependencies": { |
|||
"@vitejs/plugin-legacy": "^1.4.4", |
|||
"@vitejs/plugin-vue": "latest", |
|||
"@vue/cli-plugin-babel": "~4.5.0", |
|||
"@vue/cli-plugin-eslint": "~4.5.0", |
|||
"@vue/cli-plugin-router": "~4.5.0", |
|||
"@vue/cli-plugin-vuex": "~4.5.0", |
|||
"@vue/cli-service": "~4.5.0", |
|||
"@vue/compiler-sfc": "^3.1.5", |
|||
"babel-eslint": "^10.1.0", |
|||
"babel-plugin-import": "^1.13.3", |
|||
"dotenv": "^10.0.0", |
|||
"eslint": "^6.7.2", |
|||
"eslint-plugin-vue": "^7.0.0", |
|||
"sass": "^1.26.5", |
|||
"sass-loader": "^8.0.2", |
|||
"vite": "2", |
|||
"vite-plugin-importer": "^0.2.5" |
|||
} |
|||
} |
@ -1,19 +1,18 @@ |
|||
/* |
|||
* gin-vue-admin web框架组 |
|||
* |
|||
* */ |
|||
* gin-vue-admin web框架组 |
|||
* |
|||
* */ |
|||
// 加载网站配置文件夹
|
|||
import { register } from './global' |
|||
|
|||
export const run = function(app) { |
|||
register(app) |
|||
console.log(`
|
|||
register(app) |
|||
console.log(`
|
|||
欢迎使用 Gin-Vue-Admin |
|||
当前版本:V2.4.5 alpha |
|||
加群方式:微信:shouzi_1994 QQ群:622360840 |
|||
默认自动化文档地址:http://127.0.0.1:${process.env.VUE_APP_SERVER_PORT}/swagger/index.html
|
|||
默认前端文件运行地址:http://127.0.0.1:${process.env.VUE_APP_CLI_PORT}
|
|||
默认自动化文档地址:http://127.0.0.1:${import.meta.env.VITE_SERVER_PORT}/swagger/index.html
|
|||
默认前端文件运行地址:http://127.0.0.1:${import.meta.env.VITE_CLI_PORT}
|
|||
如果项目让您获得了收益,希望您能请团队喝杯可乐:https://www.gin-vue-admin.com/docs/coffee
|
|||
`)
|
|||
} |
|||
|
|||
} |
@ -1,134 +1,128 @@ |
|||
.login-register-box { |
|||
height: 100vh; |
|||
.login-box { |
|||
width: 40vw; |
|||
position: absolute; |
|||
left: 50%; |
|||
margin-left: -22vw; |
|||
top: 5vh; |
|||
.logo { |
|||
height: 35vh; |
|||
width: 35vh; |
|||
} |
|||
width: 40vw; |
|||
position: absolute; |
|||
left: 50%; |
|||
margin-left: -22vw; |
|||
top: 5vh; |
|||
.logo { |
|||
height: 35vh; |
|||
width: 35vh; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.link-icon { |
|||
} |
|||
|
|||
.link-icon { |
|||
width: 20px; |
|||
min-width: 20px; |
|||
height: 20px; |
|||
border-radius: 10px; |
|||
} |
|||
|
|||
.vPic { |
|||
} |
|||
|
|||
.vPic { |
|||
width: 33%; |
|||
height: 38px; |
|||
float: right !important; |
|||
background: #ccc; |
|||
img { |
|||
cursor: pointer; |
|||
vertical-align: middle; |
|||
cursor: pointer; |
|||
vertical-align: middle; |
|||
} |
|||
} |
|||
|
|||
.logo_login { |
|||
} |
|||
|
|||
.logo_login { |
|||
width: 100px; |
|||
} |
|||
|
|||
#userLayout.user-layout-wrapper { |
|||
} |
|||
|
|||
#userLayout.user-layout-wrapper { |
|||
height: 100%; |
|||
position: relative; |
|||
&.mobile { |
|||
.container { |
|||
.main { |
|||
max-width: 368px; |
|||
width: 98%; |
|||
.container { |
|||
.main { |
|||
max-width: 368px; |
|||
width: 98%; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.container { |
|||
position: relative; |
|||
overflow: auto; |
|||
width: 100%; |
|||
min-height: 100%; |
|||
background: #f0f2f5 url(~@/assets/background.svg) no-repeat 50%; |
|||
background-size: 100%; |
|||
padding: 110px 0 144px; |
|||
a { |
|||
text-decoration: none; |
|||
} |
|||
|
|||
.top { |
|||
text-align: center; |
|||
margin-top: -40px; |
|||
.header { |
|||
height: 44px; |
|||
line-height: 44px; |
|||
margin-bottom: 30px; |
|||
.badge { |
|||
position: absolute; |
|||
display: inline-block; |
|||
line-height: 1; |
|||
vertical-align: middle; |
|||
margin-left: -12px; |
|||
margin-top: -10px; |
|||
opacity: 0.8; |
|||
} |
|||
|
|||
.logo { |
|||
height: 44px; |
|||
vertical-align: top; |
|||
margin-right: 16px; |
|||
border-style: none; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 33px; |
|||
color: rgba(0, 0, 0, 0.85); |
|||
font-family: Avenir, "Helvetica Neue", Arial, Helvetica, sans-serif; |
|||
font-weight: 600; |
|||
position: relative; |
|||
top: 2px; |
|||
} |
|||
} |
|||
.desc { |
|||
font-size: 14px; |
|||
color: rgba(0, 0, 0, 0.45); |
|||
margin-top: 12px; |
|||
} |
|||
} |
|||
|
|||
.main { |
|||
min-width: 260px; |
|||
width: 368px; |
|||
margin: 0 auto; |
|||
} |
|||
|
|||
.footer { |
|||
position: relative; |
|||
overflow: auto; |
|||
width: 100%; |
|||
padding: 0 20px; |
|||
margin: 40px 0 10px; |
|||
text-align: center; |
|||
.links { |
|||
margin-bottom: 8px; |
|||
font-size: 14px; |
|||
width: 330px; |
|||
display: inline-flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
padding-right: 40px; |
|||
a { |
|||
color: rgba(0, 0, 0, 0.45); |
|||
transition: all 0.3s; |
|||
} |
|||
min-height: 100%; |
|||
background: #f0f2f5 url(@/assets/background.svg) no-repeat 50%; |
|||
background-size: 100%; |
|||
padding: 110px 0 144px; |
|||
a { |
|||
text-decoration: none; |
|||
} |
|||
.copyright { |
|||
color: rgba(0, 0, 0, 0.45); |
|||
font-size: 14px; |
|||
padding-right: 40px; |
|||
.top { |
|||
text-align: center; |
|||
margin-top: -40px; |
|||
.header { |
|||
height: 44px; |
|||
line-height: 44px; |
|||
margin-bottom: 30px; |
|||
.badge { |
|||
position: absolute; |
|||
display: inline-block; |
|||
line-height: 1; |
|||
vertical-align: middle; |
|||
margin-left: -12px; |
|||
margin-top: -10px; |
|||
opacity: 0.8; |
|||
} |
|||
.logo { |
|||
height: 44px; |
|||
vertical-align: top; |
|||
margin-right: 16px; |
|||
border-style: none; |
|||
} |
|||
.title { |
|||
font-size: 33px; |
|||
color: rgba(0, 0, 0, 0.85); |
|||
font-family: Avenir, "Helvetica Neue", Arial, Helvetica, sans-serif; |
|||
font-weight: 600; |
|||
position: relative; |
|||
top: 2px; |
|||
} |
|||
} |
|||
.desc { |
|||
font-size: 14px; |
|||
color: rgba(0, 0, 0, 0.45); |
|||
margin-top: 12px; |
|||
} |
|||
} |
|||
.main { |
|||
min-width: 260px; |
|||
width: 368px; |
|||
margin: 0 auto; |
|||
} |
|||
.footer { |
|||
position: relative; |
|||
width: 100%; |
|||
padding: 0 20px; |
|||
margin: 40px 0 10px; |
|||
text-align: center; |
|||
.links { |
|||
margin-bottom: 8px; |
|||
font-size: 14px; |
|||
width: 330px; |
|||
display: inline-flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
padding-right: 40px; |
|||
a { |
|||
color: rgba(0, 0, 0, 0.45); |
|||
transition: all 0.3s; |
|||
} |
|||
} |
|||
.copyright { |
|||
color: rgba(0, 0, 0, 0.45); |
|||
font-size: 14px; |
|||
padding-right: 40px; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
@ -1,3 +0,0 @@ |
|||
module.exports = file => () => { |
|||
return import ('@/' + file) |
|||
} |
@ -0,0 +1,83 @@ |
|||
/* eslint-disable */ |
|||
import legacyPlugin from '@vitejs/plugin-legacy'; |
|||
// import usePluginImport from 'vite-plugin-importer';
|
|||
import * as path from 'path'; |
|||
import * as dotenv from 'dotenv'; |
|||
import * as fs from 'fs'; |
|||
import vuePlugin from '@vitejs/plugin-vue'; |
|||
// @see https://cn.vitejs.dev/config/
|
|||
export default ({ |
|||
command, |
|||
mode |
|||
}) => { |
|||
let NODE_ENV = process.env.NODE_ENV || 'development' |
|||
let envFiles=[ |
|||
`.env.${NODE_ENV}` |
|||
] |
|||
for (const file of envFiles) { |
|||
const envConfig = dotenv.parse(fs.readFileSync(file)) |
|||
for (const k in envConfig) { |
|||
process.env[k] = envConfig[k] |
|||
} |
|||
} |
|||
|
|||
let rollupOptions = {}; |
|||
|
|||
|
|||
let optimizeDeps = {}; |
|||
|
|||
|
|||
let alias = { |
|||
'@': path.resolve(__dirname, './src'), |
|||
'vue$': 'vue/dist/vue.runtime.esm-bundler.js', |
|||
} |
|||
|
|||
let esbuild = {} |
|||
|
|||
return { |
|||
base: './', // index.html文件所在位置
|
|||
root: './', // js导入的资源路径,src
|
|||
resolve: { |
|||
alias, |
|||
}, |
|||
define: { |
|||
'process.env': {} |
|||
}, |
|||
server: { |
|||
open:true, |
|||
port: process.env.VITE_CLI_PORT, |
|||
proxy:{ |
|||
// 把key的路径代理到target位置
|
|||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
|||
[process.env.VITE_BASE_API]: { // 需要代理的路径 例如 '/api'
|
|||
target: `${process.env.VITE_BASE_PATH}:${process.env.VITE_SERVER_PORT}/`, // 代理到 目标路径
|
|||
changeOrigin: true, |
|||
rewrite: path => path.replace(new RegExp('^' + process.env.VITE_BASE_API), ''), |
|||
} |
|||
}, |
|||
}, |
|||
build: { |
|||
target: 'es2015', |
|||
minify: 'terser', // 是否进行压缩,boolean | 'terser' | 'esbuild',默认使用terser
|
|||
manifest: false, // 是否产出maifest.json
|
|||
sourcemap: false, // 是否产出soucemap.json
|
|||
outDir: 'dist', // 产出目录
|
|||
rollupOptions, |
|||
}, |
|||
esbuild, |
|||
optimizeDeps, |
|||
plugins: [ |
|||
legacyPlugin({ |
|||
targets: ['Android > 39', 'Chrome >= 60', 'Safari >= 10.1', 'iOS >= 10.3', 'Firefox >= 54', 'Edge >= 15'], |
|||
}), vuePlugin(), |
|||
], |
|||
css: { |
|||
preprocessorOptions: { |
|||
less: { |
|||
// 支持内联 JavaScript
|
|||
javascriptEnabled: true, |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
} |
@ -1,89 +0,0 @@ |
|||
'use strict' |
|||
|
|||
const path = require('path') |
|||
|
|||
function resolve(dir) { |
|||
return path.join(__dirname, dir) |
|||
} |
|||
module.exports = { |
|||
// 基础配置 详情看文档
|
|||
publicPath: './', |
|||
outputDir: 'dist', |
|||
assetsDir: 'static', |
|||
lintOnSave: process.env.NODE_ENV === 'development', |
|||
productionSourceMap: false, |
|||
devServer: { |
|||
port: process.env.VUE_APP_CLI_PORT, |
|||
open: true, |
|||
overlay: { |
|||
warnings: false, |
|||
errors: true |
|||
}, |
|||
proxy: { |
|||
// 把key的路径代理到target位置
|
|||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
|||
[process.env.VUE_APP_BASE_API]: { // 需要代理的路径 例如 '/api'
|
|||
target: `${process.env.VUE_APP_BASE_PATH}:${process.env.VUE_APP_SERVER_PORT}/`, // 代理到 目标路径
|
|||
changeOrigin: true, |
|||
pathRewrite: { // 修改路径数据
|
|||
['^' + process.env.VUE_APP_BASE_API]: '' // 举例 '^/api:""' 把路径中的/api字符串删除
|
|||
} |
|||
} |
|||
} |
|||
}, |
|||
configureWebpack: { |
|||
// @路径走src文件夹
|
|||
resolve: { |
|||
alias: { |
|||
'@': resolve('src') |
|||
} |
|||
} |
|||
}, |
|||
chainWebpack(config) { |
|||
config |
|||
// https://webpack.js.org/configuration/devtool/#development
|
|||
.when(process.env.NODE_ENV === 'development', |
|||
config => config.devtool('cheap-source-map') |
|||
) |
|||
|
|||
config |
|||
.when(process.env.NODE_ENV !== 'development', |
|||
config => { |
|||
config.plugin('html') |
|||
.tap(args => { |
|||
args[0].title = 'GIN-VUE-ADMIN' |
|||
return args |
|||
}) |
|||
|
|||
config |
|||
.plugin('ScriptExtHtmlWebpackPlugin') |
|||
.after('html') |
|||
.use('script-ext-html-webpack-plugin', [{ |
|||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
|||
inline: /single\..*\.js$/ |
|||
}]) |
|||
.end() |
|||
config |
|||
.optimization.splitChunks({ |
|||
chunks: 'all', |
|||
cacheGroups: { |
|||
libs: { |
|||
name: 'chunk-libs', |
|||
test: /[\\/]node_modules[\\/]/, |
|||
priority: 10, |
|||
chunks: 'initial' // only package third parties that are initially dependent
|
|||
}, |
|||
commons: { |
|||
name: 'chunk-commons', |
|||
test: resolve('src/components'), // can customize your rules
|
|||
minChunks: 3, // minimum common number
|
|||
priority: 5, |
|||
reuseExistingChunk: true |
|||
} |
|||
} |
|||
}) |
|||
config.optimization.runtimeChunk('single') |
|||
} |
|||
) |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue