You've already forked CasaOS
mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-07-12 23:50:14 +02:00
update web
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vee_validate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vee-validate */ \"./node_modules/vee-validate/dist/vee-validate.esm.js\");\n/* harmony import */ var _plugins_vee_validate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/plugins/vee-validate */ \"./src/plugins/vee-validate.js\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"Login\",\n data: function data() {\n return {\n username: '',\n password: '',\n isLoading: true,\n message: \"\",\n notificationShow: false,\n isInit: false\n };\n },\n components: {\n ValidationObserver: vee_validate__WEBPACK_IMPORTED_MODULE_0__[\"ValidationObserver\"],\n ValidationProvider: vee_validate__WEBPACK_IMPORTED_MODULE_0__[\"ValidationProvider\"]\n },\n mounted: function mounted() {\n var _this = this;\n\n this.$api.info.guideCheck().then(function (res) {\n if (res.data.success == 200 && res.data.data.need_init_user) {\n _this.isLoading = false;\n } else {\n _this.isLoading = true;\n }\n });\n this.$api.user.getUserInfo().then(function (user) {\n _this.username = user.data.data.user_name;\n });\n },\n methods: {\n login: function login() {\n var _this2 = this;\n\n this.$api.user.login({\n username: this.username,\n pwd: this.password\n }).then(function (res) {\n if (res.data.success == 200) {\n localStorage.setItem(\"user_token\", res.data.data.token);\n localStorage.setItem(\"version\", res.data.data.version);\n\n _this2.$store.commit('setToken', res.data.data.token);\n\n _this2.$api.user.getUserInfo().then(function (res) {\n if (res.data.success == 200) {\n _this2.$store.commit('changeUserInfo', res.data.data);\n\n _this2.$router.push('/');\n }\n });\n } else {\n _this2.notificationShow = true;\n _this2.message = _this2.$t(\"Password error!\");\n }\n });\n }\n }\n});\n\n//# sourceURL=webpack:///./src/views/Login.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
|
||||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vee_validate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vee-validate */ \"./node_modules/vee-validate/dist/vee-validate.esm.js\");\n/* harmony import */ var _plugins_vee_validate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/plugins/vee-validate */ \"./src/plugins/vee-validate.js\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"Login\",\n data: function data() {\n return {\n username: '',\n password: '',\n isLoading: false,\n message: \"\",\n notificationShow: false,\n isInit: false\n };\n },\n components: {\n ValidationObserver: vee_validate__WEBPACK_IMPORTED_MODULE_0__[\"ValidationObserver\"],\n ValidationProvider: vee_validate__WEBPACK_IMPORTED_MODULE_0__[\"ValidationProvider\"]\n },\n created: function created() {\n this.isInit = !this.$store.state.needInitialization;\n\n if (!this.isInit) {\n this.$router.push(\"/welcome\");\n }\n },\n mounted: function mounted() {\n var _this = this;\n\n this.$api.user.getUserInfo().then(function (user) {\n _this.username = user.data.data.user_name;\n });\n },\n watch: {\n // Watch System Initialization\n '$store.state.needInitialization': {\n handler: function handler(data) {\n this.isInit = !data;\n\n if (!this.isInit) {\n this.$router.push(\"/welcome\");\n }\n },\n deep: true\n }\n },\n methods: {\n login: function login() {\n var _this2 = this;\n\n this.$api.user.login({\n username: this.username,\n pwd: this.password\n }).then(function (res) {\n if (res.data.success == 200) {\n localStorage.setItem(\"user_token\", res.data.data.token);\n localStorage.setItem(\"version\", res.data.data.version);\n\n _this2.$store.commit('setToken', res.data.data.token);\n\n _this2.$api.user.getUserInfo().then(function (res) {\n if (res.data.success == 200) {\n _this2.$store.commit('changeUserInfo', res.data.data);\n\n _this2.$router.push('/');\n }\n });\n } else {\n _this2.notificationShow = true;\n _this2.message = _this2.$t(\"Password error!\");\n }\n });\n }\n }\n});\n\n//# sourceURL=webpack:///./src/views/Login.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
|
||||
|
||||
/***/ }),
|
||||
|
||||
|
Reference in New Issue
Block a user