代码调整

This commit is contained in:
joylink_cuiweidong 2022-10-12 16:33:45 +08:00
parent 29216e6fbb
commit a3e908d1c2
3 changed files with 10 additions and 5 deletions

View File

@ -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 };

View File

@ -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:" ICP2021039716"
// baseDevelopment
// :

View File

@ -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);
}