diff --git a/build/dev-server.js b/build/dev-server.js index 86398d436178473d3cd4a43db548d17a30cef12d..34c32b3c348e710a917f8beb66d412bb3a18e350 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 986604bf7bf3248a4fe8060c76e4efd4870f311b..64fe3303af5319fe93973dea99e7bbaf84798af9 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 646df8863090cc61190600a4cfab73f45feeaa01..36bcd68b5d75f617c26ae8255a4eaef91959932d 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 a3c11bd654b655d9d979647de55cd200c5ebebdf..cc935b9a948457d2d332a4eb2569345478aab3e4 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 a8105edf95273c1147e3ae2194f93ab1d68b4cf0..447e855f0a811c814fed312b451cb02cf792d0be 100644 --- a/index.html +++ b/index.html @@ -8,8 +8,8 @@ <title>Juicy</title> </head> <body> -<script src=<%= htmlWebpackPlugin.options.path %>/jquery.min.js></script> -<script src=<%= htmlWebpackPlugin.options.path %>/tinymce1.3/tinymce.min.js></script> +<script src=<%= htmlWebpackPlugin.options.path %>jquery.min.js></script> +<script src=<%= htmlWebpackPlugin.options.path %>tinymce1.3/tinymce.min.js></script> <div id="app"></div> <!-- built files will be auto injected --> </body> diff --git a/src/router/index.js b/src/router/index.js index 0550c5b9fb11a0a918e11237c516c3eb46710749..305d12de52ce6128f89ca86cf4d7d05e517acefa 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 4c7278c53115d524c32d1479ff6fd1bf83b01142..f8d8d5e08dc1d8435dd76edf955e463b9001b882 100644 --- a/src/views/components/mixin.vue +++ b/src/views/components/mixin.vue @@ -2,17 +2,23 @@ <div class="components-container"> <div class='component-item'> <MDinput name="name" v-model="title" required :maxlength="100"> - æ ‡é¢˜ + æ ‡é¢˜ </MDinput> <code class='code-part'>Material Design çš„input</code> </div> <div class='component-item'> - <PanThumb image='https://wpimg.wallstcn.com/577965b9-bb9e-4e02-9f0c-095b41417191'> + <PanThumb image='https://wpimg.wallstcn.com/577965b9-bb9e-4e02-9f0c-095b41417191'> 上海花裤衩 - </PanThumb> - <code class='code-part'>图片hover效果</code> + </PanThumb> + <code class='code-part'>图片hover效果</code> </div> + + <div class='component-item'> + <el-button v-waves type="primary">水波纹效果</el-button> + <code class='code-part'>水波纹 v-directive</code> + </div> + </div> </template> <script> diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 86fd1163203eb93c26e4d51622c3c3f841ca16fb..82556d337770d28e685d44a6a5ed8bb83e8b9305 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -97,29 +97,29 @@ }); }, afterQRScan() { - const hash = window.location.hash.slice(1); - const hashObj = getQueryObject(hash); - const originUrl = window.location.origin; - history.replaceState({}, '', originUrl); - const codeMap = { - wechat: 'code', - tencent: 'code' - }; - const codeName = hashObj[codeMap[this.auth_type]]; - if (!codeName) { - alert('第三方登录失败'); - } else { - this.$store.dispatch('LoginByThirdparty', codeName).then(() => { - this.$router.push({ path: '/' }); - }); - } + // const hash = window.location.hash.slice(1); + // const hashObj = getQueryObject(hash); + // const originUrl = window.location.origin; + // history.replaceState({}, '', originUrl); + // const codeMap = { + // wechat: 'code', + // tencent: 'code' + // }; + // const codeName = hashObj[codeMap[this.auth_type]]; + // if (!codeName) { + // alert('第三方登录失败'); + // } else { + // this.$store.dispatch('LoginByThirdparty', codeName).then(() => { + // this.$router.push({ path: '/' }); + // }); + // } } }, created() { - window.addEventListener('hashchange', this.afterQRScan); + // window.addEventListener('hashchange', this.afterQRScan); }, destroyed() { - window.removeEventListener('hashchange', this.afterQRScan); + // window.removeEventListener('hashchange', this.afterQRScan); } } </script>