mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-28 01:53:53 +08:00
update:智控台可设置允许用户自由注册 (#809)
* update:修复默认模型没有修改到模版配置的bug * update:智控台可设置允许用户自由注册
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user