work
This commit is contained in:
parent
466df90e7c
commit
ec128a13ac
File diff suppressed because it is too large
Load Diff
|
@ -1,14 +1,18 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.11.6",
|
||||
"@babel/preset-env": "^7.11.5",
|
||||
"@ryanburnette/html-remove-empty-lines": "^1.1.4",
|
||||
"@ryanburnette/spawn-in-parallel": "^1.0.1",
|
||||
"autoprefixer": "^8.6.5",
|
||||
"axios": "^0.20.0",
|
||||
"babel-loader": "^8.1.0",
|
||||
"bulma": "^0.9.0",
|
||||
"css-loader": "^3.5.3",
|
||||
"http-server": "^0.12.3",
|
||||
"jshint": "^2.12.0",
|
||||
"mini-css-extract-plugin": "^0.9.0",
|
||||
"mini-css-extract-plugin": "^0.11.2",
|
||||
"node-sass": "^4.14.1",
|
||||
"postcss-loader": "^4.0.2",
|
||||
"prettier": "^2.1.2",
|
||||
|
@ -17,12 +21,8 @@
|
|||
"style-loader": "^1.2.1",
|
||||
"vue": "^2.6.12",
|
||||
"vue-router": "^3.4.3",
|
||||
"webpack": "5.0.0-beta.31",
|
||||
"webpack": "v5.0.0-rc.0",
|
||||
"webpack-cli": "^3.3.12",
|
||||
"webpack-merge": "^5.1.4",
|
||||
"@babel/core": "^7.11.6",
|
||||
"@babel/preset-env": "^7.11.5",
|
||||
"babel-loader": "^8.1.0"
|
||||
},
|
||||
"devDependencies": {}
|
||||
"webpack-merge": "^5.1.4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <script src="/vendor.js"></script> -->
|
||||
<script src="/vendor.js"></script>
|
||||
<script src="/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -31,20 +31,23 @@ components.signin = Vue.component('signin', function (resolve, reject) {
|
|||
window.localStorage.setItem('token', _this.email);
|
||||
}
|
||||
},
|
||||
beforeMount: function () {
|
||||
console.log('beforeMount signin');
|
||||
},
|
||||
mounted: function () {
|
||||
var _this = this;
|
||||
var token = window.localStorage.getItem('token');
|
||||
if (token) {
|
||||
getMe().then(function (result) {
|
||||
if (result) {
|
||||
router.push('/');
|
||||
} else {
|
||||
_this.state = 'signingIn';
|
||||
}
|
||||
});
|
||||
} else {
|
||||
_this.state = 'signingIn';
|
||||
}
|
||||
// var _this = this;
|
||||
// var token = window.localStorage.getItem('token');
|
||||
// if (token) {
|
||||
// getMe().then(function (result) {
|
||||
// if (result) {
|
||||
// router.push('/');
|
||||
// } else {
|
||||
// _this.state = 'signingIn';
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// _this.state = 'signingIn';
|
||||
// }
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -7,10 +7,10 @@ var MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|||
module.exports = {
|
||||
context: path.resolve(__dirname, 'src'),
|
||||
entry: {
|
||||
// vendor: ['vue'],
|
||||
vendor: ['vue'],
|
||||
main: {
|
||||
import: './js/main.js'
|
||||
// dependOn: 'vendor'
|
||||
import: './js/main.js',
|
||||
dependOn: 'vendor'
|
||||
}
|
||||
},
|
||||
output: {
|
||||
|
|
Loading…
Reference in New Issue