update:智控台可设置允许用户自由注册 (#809)

* update:修复默认模型没有修改到模版配置的bug

* update:智控台可设置允许用户自由注册
This commit is contained in:
hrz
2025-04-15 13:03:29 +08:00
committed by GitHub
parent 4bf950574c
commit e00da5d8d2
18 changed files with 186 additions and 147 deletions
+14
View File
@@ -82,12 +82,18 @@
import Api from '@/apis/api';
import VersionFooter from '@/components/VersionFooter.vue';
import { getUUID, goToPage, showDanger, showSuccess } from '@/utils';
import { mapState } from 'vuex';
export default {
name: 'register',
components: {
VersionFooter
},
computed: {
...mapState({
allowUserRegister: state => state.pubConfig.allowUserRegister
})
},
data() {
return {
form: {
@@ -101,6 +107,14 @@ export default {
}
},
mounted() {
this.$store.dispatch('fetchPubConfig').then(() => {
if (!this.allowUserRegister) {
showDanger('当前不允许普通用户注册');
setTimeout(() => {
goToPage('/login');
}, 1500);
}
});
this.fetchCaptcha();
},
methods: {