diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss index da50f7ead..8c718e581 100644 --- a/nezha-fronted/src/assets/stylus/main.scss +++ b/nezha-fronted/src/assets/stylus/main.scss @@ -362,7 +362,7 @@ li{ .nz-btn-disabled { background-image: none; opacity: .6; - cursor: default; + cursor: default !important; } .nz-btn-group { border-radius: 2px; diff --git a/nezha-fronted/src/components/common/login.vue b/nezha-fronted/src/components/common/login.vue index ced938448..735721f93 100644 --- a/nezha-fronted/src/components/common/login.vue +++ b/nezha-fronted/src/components/common/login.vue @@ -14,7 +14,7 @@
- +
@@ -27,7 +27,7 @@
{{license.warnInfo}}
-
INSTALLATION ID:{{license.token}}
+
INSTALLATION ID: {{license.token}}
import { mapActions } from 'vuex' -import moment from 'moment-timezone' export default { name: 'login', data () { @@ -75,7 +74,7 @@ export default { methods: { ...mapActions(['loginSuccess']), login () { - if (this.loading) { + if (this.loading || !this.license.valid) { return } // if (this.license.valid && this.validateLogin() && (this.$route.path == '/' || this.$route.path == '/login')) { @@ -112,9 +111,12 @@ export default { return true } }, - licenseStat: function () { + licenseStat () { + /*this.license.valid = false + this.license.warnInfo = 'hehehe' + this.license.token = 'dRqrWja/PzI8FrWVJeGqLw=='*/ this.$get('/sys/license/state').then(response => { - if (response.code === 200) { + if (response.code && response.code === 200) { this.license.warnInfo = '' this.license.valid = true } else { @@ -124,7 +126,7 @@ export default { this.license.token = response.token }) }, - handleChange: function (file, fileList) { + handleChange (file, fileList) { if (fileList.length > 0) { this.uploadFileList = [fileList[fileList.length - 1]] } @@ -144,7 +146,7 @@ export default { } }, watch: { - /* 'loginData.username': function(n, o) { + /* 'loginData.username'(n, o) { let lang = localStorage.getItem('nz-language-' + n); if (lang) { this.lang = lang; @@ -168,9 +170,13 @@ export default {