调整竞赛系统登录流程,调整接口字段

This commit is contained in:
zyy 2020-05-25 10:29:03 +08:00
parent f60d72aaf8
commit f90514777a
5 changed files with 17 additions and 11 deletions

View File

@ -72,10 +72,11 @@ export function getIsSignUp(raceId) {
}
/** 分页查询竞赛报名人员 */
export function getRaceUserList(raceId) {
export function getRaceUserList(params) {
return request({
url: `/api/race/${raceId}/raceUser`,
method: 'get'
url: `/api/race/${params.raceId}/raceUser`,
method: 'get',
params
});
}

View File

@ -47,6 +47,10 @@ function getRouteInfo(to) {
} else {
const whitePage = PermissionParam[current_session] ? PermissionParam[current_session].whitePage : '';
loginPath = whitePage || loginPage;
if (current_session && current_session.startsWith('jsxt') || current_session && current_session.startsWith('refereeJsxt')) {
const raceId = getSessionStorage('raceId'); // 登陆时候保存 竞赛id
loginPath = `${loginPath}?raceId=${raceId}`;
}
if (current_session && current_session.startsWith('design')) {
removeToken();
}

View File

@ -2,12 +2,11 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛

View File

@ -6,7 +6,7 @@
</template>
<script>
import {refereeGetCompetitionList, refereeEnterSimulation} from '@/api/competition';
import { refereeEnterSimulation } from '@/api/competition';
import {getPermissionJointNew} from '@/api/jointTraining';
import { getRaceUserList } from '@/api/competition';
// import QuestionList from './questionList';
@ -144,9 +144,9 @@ export default {
//
queryFunction(params) {
if (this.$route.query.raceId) {
params['id'] = this.$route.query.raceId;
params['raceId'] = this.$route.query.raceId;
}
return getRaceUserList(this.$route.query.raceId);
return getRaceUserList(params);
},
handleClick(row) {
const group = row.room.group;

View File

@ -339,7 +339,8 @@ export default {
if (this.$route.path.includes('jsxt/login')) {
getIsSignUp(this.$route.query.raceId).then(res => {
if (res.data) {
this.$router.push({ path: this.path, query:{raceId:this.$route.query.raceId} });
setSessionStorage('raceId', this.$route.query.raceId);
this.$router.push({ path: this.path, query:{ raceId:this.$route.query.raceId } });
} else {
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
}
@ -347,7 +348,8 @@ export default {
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
});
} else {
this.$router.push({ path: this.path, query:{raceId:this.$route.query.raceId} });
setSessionStorage('raceId', this.$route.query.raceId);
this.$router.push({ path: this.path, query:{ raceId:this.$route.query.raceId } });
}
} else if (!this.$route.path.includes('jsxt/login') && !this.$route.path.includes('refereeJsxt/login')) {
this.$router.push({ path: this.path });