You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.1 KiB

<template>
<a-config-provider :locale="zh_CN">
<div id="app">
<router-view></router-view>
</div>
</a-config-provider>
</template>
<script>
4 years ago
import { mapActions, mapMutations } from 'vuex';
5 years ago
import zh_CN from 'ant-design-vue/lib/locale-provider/zh_CN';
export default {
5 years ago
name: 'App',
data() {
return { zh_CN };
},
4 years ago
async created() {
4 years ago
var query = window.location.search.substring(1);
var vars = query.split('&');
let userId = '';
let roleId = '';
let projectId = '';
vars.forEach((item, index) => {
let items = item.split('=');
if (items[0] == 'uid') {
userId = items[1];
} else if (items[0] == 'pid') {
projectId = items[1];
} else if (items[0] == 'rid') {
roleId = items[1];
}
});
const params = { userId: userId };
4 years ago
await this.getUserId(params);
4 years ago
await this.setRoleId(roleId);
4 years ago
this.setProjectId(projectId);
4 years ago
},
methods: {
4 years ago
...mapMutations('home', ['setProjectId', 'setMembers', 'setRoleId']),
4 years ago
...mapActions('user', ['getUserId']),
},
5 years ago
};
</script>
<style>
5 years ago
html,
body,
#app {
min-height: 100%;
4 years ago
width: 100%;
5 years ago
}
</style>