代码调整
This commit is contained in:
parent
29216e6fbb
commit
a3e908d1c2
@ -106,13 +106,14 @@ const user = {
|
||||
Login({ commit }, userInfo) {
|
||||
const username = userInfo.username.trim();
|
||||
const password = userInfo.password.trim();
|
||||
const type = userInfo.type;
|
||||
// const type = userInfo.type;
|
||||
const type = 'class';
|
||||
const project = userInfo.project;
|
||||
const deviceCode = userInfo.deviceCode;
|
||||
const teacherLogin = userInfo.teacherLogin;
|
||||
return new Promise((resolve, reject) => {
|
||||
// 登录系统
|
||||
const params = Object.assign({ account: username, password, project:project, deviceCode:deviceCode, teacherLogin:teacherLogin }, type == 'design' ? LoginParams.Design : LoginParams.LianKeTang);
|
||||
const params = Object.assign({ account: username, password, project:project, deviceCode:deviceCode, teacherLogin:teacherLogin }, LoginParams.LianKeTang);
|
||||
login(params).then(resp => {
|
||||
const token = resp.data;
|
||||
const header = { group: '', 'X-Token': token };
|
||||
|
@ -25,6 +25,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { setSessionStorage } from '@/utils/auth';
|
||||
import bgImg from '@/assets/bg1.jpg';
|
||||
import LangStorage from '@/utils/lang';
|
||||
import { getFrontProjectConfigByLogin} from '@/api/projectConfig';
|
||||
@ -82,7 +83,7 @@ export default {
|
||||
this.$store.dispatch('projectConfig/setLoginProLogo', this.loginProLogo);
|
||||
this.$store.dispatch('projectConfig/setHomeTitle', homeTitle);
|
||||
this.$store.dispatch('projectConfig/setCaseShow', caseShow);
|
||||
|
||||
setSessionStorage('project', this.project);
|
||||
// aboutSystem:"主体:北京玖琏科技有限公司 备案号:京ICP备2021039716号"
|
||||
// baseDevelopment
|
||||
// :
|
||||
|
@ -89,9 +89,12 @@ export default {
|
||||
// 获取后端项目列表,关联时使用
|
||||
getBackProjectConfigList().then(resp => {
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
this.projectMap['DEFAULT'] = {label:'默认', value:'DEFAULT'};
|
||||
resp.data.forEach(each=>{
|
||||
this.projectMap[each.value] = each;
|
||||
if (each.label == '') {
|
||||
this.projectMap[each.value] = {label:'默认', value:'DEFAULT'};
|
||||
} else {
|
||||
this.projectMap[each.value] = each;
|
||||
}
|
||||
});
|
||||
this.queryForm.queryObject.project.config.data = Object.values(this.projectMap);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user