diff --git a/build/dev-server.js b/build/dev-server.js index 86398d43..34c32b3c 100644 --- a/build/dev-server.js +++ b/build/dev-server.js @@ -1,8 +1,7 @@ require('./check-versions')(); // 检查 Node 和 npm 版本 var config = require('../config'); if (!process.env.NODE_ENV) { - process.env.NODE_ENV = config.dev.env; - // process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV) + process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV) } var opn = require('opn') diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index 986604bf..64fe3303 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -6,14 +6,7 @@ var vueLoaderConfig = require('./vue-loader.conf'); function resolve(dir) { return path.join(__dirname, '..', dir) } - var src = path.resolve(__dirname, '../src'); -var env = process.env.NODE_ENV -// check env & config/index.js to decide weither to enable CSS Sourcemaps for the -// various preprocessor loaders added to vue-loader at the end of this file -var cssSourceMapDev = (env === 'development' && config.dev.cssSourceMap) -var cssSourceMapProd = (env === 'production||sit' && config.build.productionSourceMap) -var useCssSourceMap = cssSourceMapDev || cssSourceMapProd module.exports = { entry: { @@ -22,7 +15,7 @@ module.exports = { output: { path: config.build.assetsRoot, filename: '[name].js', - publicPath: process.env.NODE_ENV === 'production||sit' ? config.build.assetsPublicPath : config.dev.assetsPublicPath + publicPath: process.env.NODE_ENV !== 'development' ? config.build.assetsPublicPath: config.dev.assetsPublicPath }, resolve: { extensions: ['.js', '.vue', '.json'], diff --git a/config/index.js b/config/index.js index 646df886..36bcd68b 100644 --- a/config/index.js +++ b/config/index.js @@ -8,8 +8,8 @@ module.exports = { index: path.resolve(__dirname, '../dist/index.html'), assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: '', - assetsPublicPath: '/', - staticPath:'', + assetsPublicPath: './', + staticPath:'./', productionSourceMap: true, // Gzip off by default as many popular static hosts such as // Surge or Netlify already gzip all static assets for you. @@ -28,8 +28,8 @@ module.exports = { port: 9527, autoOpenBrowser: true, assetsSubDirectory: 'static', - staticPath:'/static', assetsPublicPath: '/', + staticPath:'/static/', proxyTable: {}, // CSS Sourcemaps off by default because relative paths are "buggy" // with this option, according to the CSS-Loader README diff --git a/config/prod.env.js b/config/prod.env.js index a3c11bd6..cc935b9a 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,5 +1,5 @@ module.exports = { NODE_ENV: '"production"', - BASE_API: '"https://api-prod', + BASE_API: '"https://api-prod"', APP_ORIGIN: '"https://wallstreetcn.com"' }; diff --git a/index.html b/index.html index a8105edf..447e855f 100644 --- a/index.html +++ b/index.html @@ -8,8 +8,8 @@ Juicy - - + +
diff --git a/src/router/index.js b/src/router/index.js index 0550c5b9..305d12de 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -67,7 +67,7 @@ const Form2 = resolve => require(['../views/example/form2'], resolve); Vue.use(Router); export default new Router({ - mode: 'history', + // mode: 'history', //后端支持可开 scrollBehavior: () => ({ y: 0 }), routes: [ { path: '/login', component: Login, hidden: true }, diff --git a/src/views/components/mixin.vue b/src/views/components/mixin.vue index 4c7278c5..f8d8d5e0 100644 --- a/src/views/components/mixin.vue +++ b/src/views/components/mixin.vue @@ -2,17 +2,23 @@
- 标题 + 标题 Material Design 的input
- + 上海花裤衩 - - 图片hover效果 + + 图片hover效果
+ +
+ 水波纹效果 + 水波纹 v-directive +
+