mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-26 09:03:54 +08:00
update:智控台可设置允许用户自由注册 (#809)
* update:修复默认模型没有修改到模版配置的bug * update:智控台可设置允许用户自由注册
This commit is contained in:
@@ -5,33 +5,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Api from '@/apis/api';
|
||||
import { mapState } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'VersionFooter',
|
||||
data() {
|
||||
return {
|
||||
version: ''
|
||||
}
|
||||
computed: {
|
||||
...mapState({
|
||||
version: state => state.pubConfig.version
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
this.getSystemVersion();
|
||||
},
|
||||
methods: {
|
||||
getSystemVersion() {
|
||||
const storedVersion = sessionStorage.getItem('systemVersion');
|
||||
if (storedVersion) {
|
||||
this.version = storedVersion;
|
||||
return;
|
||||
}
|
||||
|
||||
Api.user.getPubConfig(({ data }) => {
|
||||
if (data.code === 0 && data.data.version) {
|
||||
this.version = data.data.version;
|
||||
sessionStorage.setItem('systemVersion', data.data.version);
|
||||
}
|
||||
});
|
||||
}
|
||||
this.$store.dispatch('fetchPubConfig');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user