forked from TALL/check-work
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.
57 lines
1.1 KiB
57 lines
1.1 KiB
<template>
|
|
<a-config-provider :locale="zh_CN">
|
|
<div id="app">
|
|
<router-view></router-view>
|
|
</div>
|
|
</a-config-provider>
|
|
</template>
|
|
|
|
<script>
|
|
import { mapActions, mapMutations } from 'vuex';
|
|
import zh_CN from 'ant-design-vue/lib/locale-provider/zh_CN';
|
|
|
|
export default {
|
|
name: 'App',
|
|
data() {
|
|
return { zh_CN };
|
|
},
|
|
|
|
async created() {
|
|
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 };
|
|
await this.getUserId(params);
|
|
await this.setRoleId(roleId);
|
|
this.setProjectId(projectId);
|
|
},
|
|
|
|
methods: {
|
|
...mapMutations('home', ['setProjectId', 'setMembers', 'setRoleId']),
|
|
...mapActions('user', ['getUserId']),
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style>
|
|
html,
|
|
body,
|
|
#app {
|
|
min-height: 100%;
|
|
width: 100%;
|
|
}
|
|
</style>
|
|
|