Commit 93212c7d0b09e05ce552f3417f6f42e1c112b131
1 parent
b89c8760
配置修改
Showing
4 changed files
with
127 additions
and
127 deletions
src/settings.js
| 1 | 1 | module.exports = { |
| 2 | 2 | |
| 3 | - title: '安第斯答题系统后台', | |
| 3 | + title: '面试考试系统后台', | |
| 4 | 4 | |
| 5 | - /** | |
| 6 | - * @type {boolean} true | false | |
| 7 | - * @description Whether fix the header | |
| 8 | - */ | |
| 9 | - fixedHeader: false, | |
| 5 | + /** | |
| 6 | + * @type {boolean} true | false | |
| 7 | + * @description Whether fix the header | |
| 8 | + */ | |
| 9 | + fixedHeader: false, | |
| 10 | 10 | |
| 11 | - /** | |
| 12 | - * @type {boolean} true | false | |
| 13 | - * @description Whether show the logo in sidebar | |
| 14 | - */ | |
| 15 | - sidebarLogo: false | |
| 16 | -} | |
| 11 | + /** | |
| 12 | + * @type {boolean} true | false | |
| 13 | + * @description Whether show the logo in sidebar | |
| 14 | + */ | |
| 15 | + sidebarLogo: false | |
| 16 | +} | |
| 17 | 17 | \ No newline at end of file | ... | ... |
src/views/dashboard/index.vue
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | <div class="dashboard-container"> |
| 3 | 3 | <div class="dashboard-text" |
| 4 | 4 | style="background-color: #334056;border-radius: 5px;color: #FFF;font-size: 16px;padding: 5px 5px 5px 15px;"> |
| 5 | - <div style="font-size: 20px;">欢迎使用安第斯答题软件</div> | |
| 5 | + <div style="font-size: 20px;">欢迎使用面试考试系统后台</div> | |
| 6 | 6 | </div> |
| 7 | 7 | <el-row :gutter="20"> |
| 8 | 8 | <el-col :span="6"> | ... | ... |
src/views/login/index.vue
vue.config.js
| ... | ... | @@ -3,7 +3,7 @@ const path = require('path') |
| 3 | 3 | const defaultSettings = require('./src/settings.js') |
| 4 | 4 | |
| 5 | 5 | function resolve(dir) { |
| 6 | - return path.join(__dirname, dir) | |
| 6 | + return path.join(__dirname, dir) | |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | const name = defaultSettings.title || '答题后台' // page title |
| ... | ... | @@ -17,118 +17,118 @@ const port = process.env.port || process.env.npm_config_port || 9528 // dev port |
| 17 | 17 | |
| 18 | 18 | // All configuration item explanations can be find in https://cli.vuejs.org/config/ |
| 19 | 19 | module.exports = { |
| 20 | - /** | |
| 21 | - * You will need to set publicPath if you plan to deploy your site under a sub path, | |
| 22 | - * for example GitHub Pages. If you plan to deploy your site to https://foo.github.io/bar/, | |
| 23 | - * then publicPath should be set to "/bar/". | |
| 24 | - * In most cases please use '/' !!! | |
| 25 | - * Detail: https://cli.vuejs.org/config/#publicpath | |
| 26 | - */ | |
| 27 | - publicPath: '/', | |
| 28 | - outputDir: 'dist', | |
| 29 | - assetsDir: 'static', | |
| 30 | - lintOnSave: process.env.NODE_ENV === 'development', | |
| 31 | - productionSourceMap: false, | |
| 32 | - devServer: { | |
| 33 | - port: port, | |
| 34 | - open: true, | |
| 35 | - overlay: { | |
| 36 | - warnings: false, | |
| 37 | - errors: true | |
| 38 | - }, | |
| 39 | - proxy: { | |
| 40 | - '/development': { | |
| 41 | - target: `https://app.cehuimi.com/`, //后台服务地址 | |
| 42 | - changeOrigin: true, | |
| 43 | - pathRewrite: { | |
| 44 | - '^/development': '' | |
| 45 | - } | |
| 46 | - }, | |
| 47 | - '/api': { | |
| 48 | - target: `https://app.cehuimi.com/`, //后台服务地址 | |
| 49 | - changeOrigin: true, | |
| 50 | - pathRewrite: {} | |
| 51 | - } | |
| 52 | - }, | |
| 53 | - }, | |
| 54 | - configureWebpack: { | |
| 55 | - // provide the app's title in webpack's name field, so that | |
| 56 | - // it can be accessed in index.html to inject the correct title. | |
| 57 | - name: name, | |
| 58 | - resolve: { | |
| 59 | - alias: { | |
| 60 | - '@': resolve('src') | |
| 61 | - } | |
| 62 | - } | |
| 63 | - }, | |
| 64 | - chainWebpack(config) { | |
| 65 | - // it can improve the speed of the first screen, it is recommended to turn on preload | |
| 66 | - config.plugin('preload').tap(() => [{ | |
| 67 | - rel: 'preload', | |
| 68 | - // to ignore runtime.js | |
| 69 | - // https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171 | |
| 70 | - fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/], | |
| 71 | - include: 'initial' | |
| 72 | - }]) | |
| 20 | + /** | |
| 21 | + * You will need to set publicPath if you plan to deploy your site under a sub path, | |
| 22 | + * for example GitHub Pages. If you plan to deploy your site to https://foo.github.io/bar/, | |
| 23 | + * then publicPath should be set to "/bar/". | |
| 24 | + * In most cases please use '/' !!! | |
| 25 | + * Detail: https://cli.vuejs.org/config/#publicpath | |
| 26 | + */ | |
| 27 | + publicPath: '/', | |
| 28 | + outputDir: 'dist', | |
| 29 | + assetsDir: 'static', | |
| 30 | + lintOnSave: process.env.NODE_ENV === 'development', | |
| 31 | + productionSourceMap: false, | |
| 32 | + devServer: { | |
| 33 | + port: port, | |
| 34 | + open: true, | |
| 35 | + overlay: { | |
| 36 | + warnings: false, | |
| 37 | + errors: true | |
| 38 | + }, | |
| 39 | + proxy: { | |
| 40 | + '/development': { | |
| 41 | + target: `http://inteview.t1j2.com/`, //后台服务地址 | |
| 42 | + changeOrigin: true, | |
| 43 | + pathRewrite: { | |
| 44 | + '^/development': '' | |
| 45 | + } | |
| 46 | + }, | |
| 47 | + '/api': { | |
| 48 | + target: `http://inteview.t1j2.com/`, //后台服务地址 | |
| 49 | + changeOrigin: true, | |
| 50 | + pathRewrite: {} | |
| 51 | + } | |
| 52 | + }, | |
| 53 | + }, | |
| 54 | + configureWebpack: { | |
| 55 | + // provide the app's title in webpack's name field, so that | |
| 56 | + // it can be accessed in index.html to inject the correct title. | |
| 57 | + name: name, | |
| 58 | + resolve: { | |
| 59 | + alias: { | |
| 60 | + '@': resolve('src') | |
| 61 | + } | |
| 62 | + } | |
| 63 | + }, | |
| 64 | + chainWebpack(config) { | |
| 65 | + // it can improve the speed of the first screen, it is recommended to turn on preload | |
| 66 | + config.plugin('preload').tap(() => [{ | |
| 67 | + rel: 'preload', | |
| 68 | + // to ignore runtime.js | |
| 69 | + // https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171 | |
| 70 | + fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/], | |
| 71 | + include: 'initial' | |
| 72 | + }]) | |
| 73 | 73 | |
| 74 | - // when there are many pages, it will cause too many meaningless requests | |
| 75 | - config.plugins.delete('prefetch') | |
| 74 | + // when there are many pages, it will cause too many meaningless requests | |
| 75 | + config.plugins.delete('prefetch') | |
| 76 | 76 | |
| 77 | - // set svg-sprite-loader | |
| 78 | - config.module | |
| 79 | - .rule('svg') | |
| 80 | - .exclude.add(resolve('src/icons')) | |
| 81 | - .end() | |
| 82 | - config.module | |
| 83 | - .rule('icons') | |
| 84 | - .test(/\.svg$/) | |
| 85 | - .include.add(resolve('src/icons')) | |
| 86 | - .end() | |
| 87 | - .use('svg-sprite-loader') | |
| 88 | - .loader('svg-sprite-loader') | |
| 89 | - .options({ | |
| 90 | - symbolId: 'icon-[name]' | |
| 91 | - }) | |
| 92 | - .end() | |
| 77 | + // set svg-sprite-loader | |
| 78 | + config.module | |
| 79 | + .rule('svg') | |
| 80 | + .exclude.add(resolve('src/icons')) | |
| 81 | + .end() | |
| 82 | + config.module | |
| 83 | + .rule('icons') | |
| 84 | + .test(/\.svg$/) | |
| 85 | + .include.add(resolve('src/icons')) | |
| 86 | + .end() | |
| 87 | + .use('svg-sprite-loader') | |
| 88 | + .loader('svg-sprite-loader') | |
| 89 | + .options({ | |
| 90 | + symbolId: 'icon-[name]' | |
| 91 | + }) | |
| 92 | + .end() | |
| 93 | 93 | |
| 94 | - config | |
| 95 | - .when(process.env.NODE_ENV !== 'development', | |
| 96 | - config => { | |
| 97 | - config | |
| 98 | - .plugin('ScriptExtHtmlWebpackPlugin') | |
| 99 | - .after('html') | |
| 100 | - .use('script-ext-html-webpack-plugin', [{ | |
| 101 | - // `runtime` must same as runtimeChunk name. default is `runtime` | |
| 102 | - inline: /runtime\..*\.js$/ | |
| 103 | - }]) | |
| 104 | - .end() | |
| 105 | - config | |
| 106 | - .optimization.splitChunks({ | |
| 107 | - chunks: 'all', | |
| 108 | - cacheGroups: { | |
| 109 | - libs: { | |
| 110 | - name: 'chunk-libs', | |
| 111 | - test: /[\\/]node_modules[\\/]/, | |
| 112 | - priority: 10, | |
| 113 | - chunks: 'initial' // only package third parties that are initially dependent | |
| 114 | - }, | |
| 115 | - elementUI: { | |
| 116 | - name: 'chunk-elementUI', // split elementUI into a single package | |
| 117 | - priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app | |
| 118 | - test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm | |
| 119 | - }, | |
| 120 | - commons: { | |
| 121 | - name: 'chunk-commons', | |
| 122 | - test: resolve('src/components'), // can customize your rules | |
| 123 | - minChunks: 3, // minimum common number | |
| 124 | - priority: 5, | |
| 125 | - reuseExistingChunk: true | |
| 126 | - } | |
| 127 | - } | |
| 128 | - }) | |
| 129 | - // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk | |
| 130 | - config.optimization.runtimeChunk('single') | |
| 131 | - } | |
| 132 | - ) | |
| 133 | - } | |
| 134 | -} | |
| 94 | + config | |
| 95 | + .when(process.env.NODE_ENV !== 'development', | |
| 96 | + config => { | |
| 97 | + config | |
| 98 | + .plugin('ScriptExtHtmlWebpackPlugin') | |
| 99 | + .after('html') | |
| 100 | + .use('script-ext-html-webpack-plugin', [{ | |
| 101 | + // `runtime` must same as runtimeChunk name. default is `runtime` | |
| 102 | + inline: /runtime\..*\.js$/ | |
| 103 | + }]) | |
| 104 | + .end() | |
| 105 | + config | |
| 106 | + .optimization.splitChunks({ | |
| 107 | + chunks: 'all', | |
| 108 | + cacheGroups: { | |
| 109 | + libs: { | |
| 110 | + name: 'chunk-libs', | |
| 111 | + test: /[\\/]node_modules[\\/]/, | |
| 112 | + priority: 10, | |
| 113 | + chunks: 'initial' // only package third parties that are initially dependent | |
| 114 | + }, | |
| 115 | + elementUI: { | |
| 116 | + name: 'chunk-elementUI', // split elementUI into a single package | |
| 117 | + priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app | |
| 118 | + test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm | |
| 119 | + }, | |
| 120 | + commons: { | |
| 121 | + name: 'chunk-commons', | |
| 122 | + test: resolve('src/components'), // can customize your rules | |
| 123 | + minChunks: 3, // minimum common number | |
| 124 | + priority: 5, | |
| 125 | + reuseExistingChunk: true | |
| 126 | + } | |
| 127 | + } | |
| 128 | + }) | |
| 129 | + // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk | |
| 130 | + config.optimization.runtimeChunk('single') | |
| 131 | + } | |
| 132 | + ) | |
| 133 | + } | |
| 134 | +} | |
| 135 | 135 | \ No newline at end of file | ... | ... |