diff --git a/sso-auth-center-vue/.env.staging b/sso-auth-center-vue/.env.test similarity index 100% rename from sso-auth-center-vue/.env.staging rename to sso-auth-center-vue/.env.test diff --git a/sso-auth-center-vue/.travis.yml b/sso-auth-center-vue/.travis.yml deleted file mode 100755 index f4be7a0..0000000 --- a/sso-auth-center-vue/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: 10 -script: npm run test -notifications: - email: false diff --git a/sso-auth-center-vue/LICENSE b/sso-auth-center-vue/LICENSE deleted file mode 100755 index 6151575..0000000 --- a/sso-auth-center-vue/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017-present PanJiaChen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/sso-auth-center-vue/README-zh.md b/sso-auth-center-vue/README-zh.md deleted file mode 100755 index e69de29..0000000 diff --git a/sso-auth-center-vue/README.md b/sso-auth-center-vue/README.md index fb1310f..0169b6a 100755 --- a/sso-auth-center-vue/README.md +++ b/sso-auth-center-vue/README.md @@ -15,7 +15,7 @@ npm install --registry=https://registry.npm.taobao.org npm run dev ``` -浏览器访问 http://localhost:端口 +#浏览器访问 http://localhost:9528 ## 发布 @@ -24,5 +24,5 @@ npm run dev npm run build-test # 构建生产环境 -npm run build +npm run build-prod ``` diff --git a/sso-auth-center-vue/package.json b/sso-auth-center-vue/package.json index 5d9372d..ce32d75 100755 --- a/sso-auth-center-vue/package.json +++ b/sso-auth-center-vue/package.json @@ -1,12 +1,12 @@ { - "name": "vue-admin-template", + "name": "sso-auth-center-vue", "version": "4.4.0", - "description": "A vue admin template with Element UI & axios & iconfont & permission control & lint", - "author": "Pan ", + "description": "小强认证中心", + "author": "xqiang", "scripts": { "dev": "vue-cli-service serve", - "build:prod": "vue-cli-service build", - "build:stage": "vue-cli-service build --mode staging", + "build-prod": "vue-cli-service build", + "build-test": "vue-cli-service build --mode test", "preview": "node build/index.js --preview", "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml", "lint": "eslint --ext .js,.vue src", diff --git a/sso-auth-center-vue/src/main.js b/sso-auth-center-vue/src/main.js index 0dcb477..80ce2fb 100755 --- a/sso-auth-center-vue/src/main.js +++ b/sso-auth-center-vue/src/main.js @@ -6,7 +6,7 @@ import 'element-ui/lib/theme-chalk/index.css' import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n import Pagination from '@/components/Pagination' -import { handleTree, resetForm,hasSomePermission } from '@/utils/admin-util' +import { handleTree, resetForm } from '@/utils/admin-util' import '@/styles/index.scss' // global css import App from './App' @@ -29,23 +29,9 @@ Vue.prototype.msgInfo = function(msg) { this.$message.info(msg) } -/** - * If you don't want to use mock-server - * you want to use MockJs for mock api - * you can execute: mockXHR() - * - * Currently MockJs will be used in the production environment, - * please remove it before going online ! ! ! - */ -if (process.env.NODE_ENV === 'production') { - const { mockXHR } = require('../mock') - mockXHR() -} - // 全局方法挂载 Vue.prototype.handleTree = handleTree Vue.prototype.resetForm = resetForm -Vue.prototype.hasSomePermission = hasSomePermission // 全局组件挂载 Vue.component('Pagination', Pagination) diff --git a/sso-auth-center-vue/vue.config.js b/sso-auth-center-vue/vue.config.js index 01f90bf..e554af2 100755 --- a/sso-auth-center-vue/vue.config.js +++ b/sso-auth-center-vue/vue.config.js @@ -24,12 +24,16 @@ module.exports = { * In most cases please use '/' !!! * Detail: https://cli.vuejs.org/config/#publicpath */ - publicPath: '/', + publicPath: process.env.NODE_ENV === "production" ? "/" : "/", + // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) outputDir: 'dist', + // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) assetsDir: 'static', + // 是否开启eslint保存检测,有效值:ture | false | 'error' lintOnSave: process.env.NODE_ENV === 'development', productionSourceMap: false, devServer: { + host: '0.0.0.0', port: port, open: true, disableHostCheck: true,