调整竞赛系统登录流程,调整接口字段
This commit is contained in:
parent
f60d72aaf8
commit
f90514777a
@ -72,10 +72,11 @@ export function getIsSignUp(raceId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 分页查询竞赛报名人员 */
|
/** 分页查询竞赛报名人员 */
|
||||||
export function getRaceUserList(raceId) {
|
export function getRaceUserList(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/race/${raceId}/raceUser`,
|
url: `/api/race/${params.raceId}/raceUser`,
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,6 +47,10 @@ function getRouteInfo(to) {
|
|||||||
} else {
|
} else {
|
||||||
const whitePage = PermissionParam[current_session] ? PermissionParam[current_session].whitePage : '';
|
const whitePage = PermissionParam[current_session] ? PermissionParam[current_session].whitePage : '';
|
||||||
loginPath = whitePage || loginPage;
|
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')) {
|
if (current_session && current_session.startsWith('design')) {
|
||||||
removeToken();
|
removeToken();
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,11 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// 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.5:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.6: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.82:9000'; // 杜康
|
||||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
|
||||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {refereeGetCompetitionList, refereeEnterSimulation} from '@/api/competition';
|
import { refereeEnterSimulation } from '@/api/competition';
|
||||||
import {getPermissionJointNew} from '@/api/jointTraining';
|
import {getPermissionJointNew} from '@/api/jointTraining';
|
||||||
import { getRaceUserList } from '@/api/competition';
|
import { getRaceUserList } from '@/api/competition';
|
||||||
// import QuestionList from './questionList';
|
// import QuestionList from './questionList';
|
||||||
@ -144,9 +144,9 @@ export default {
|
|||||||
// 查询函数
|
// 查询函数
|
||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
if (this.$route.query.raceId) {
|
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) {
|
handleClick(row) {
|
||||||
const group = row.room.group;
|
const group = row.room.group;
|
||||||
|
@ -339,6 +339,7 @@ export default {
|
|||||||
if (this.$route.path.includes('jsxt/login')) {
|
if (this.$route.path.includes('jsxt/login')) {
|
||||||
getIsSignUp(this.$route.query.raceId).then(res => {
|
getIsSignUp(this.$route.query.raceId).then(res => {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
|
setSessionStorage('raceId', this.$route.query.raceId);
|
||||||
this.$router.push({ path: this.path, query:{ raceId:this.$route.query.raceId } });
|
this.$router.push({ path: this.path, query:{ raceId:this.$route.query.raceId } });
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
|
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
|
||||||
@ -347,6 +348,7 @@ export default {
|
|||||||
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
|
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
setSessionStorage('raceId', this.$route.query.raceId);
|
||||||
this.$router.push({ path: this.path, query:{ 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')) {
|
} else if (!this.$route.path.includes('jsxt/login') && !this.$route.path.includes('refereeJsxt/login')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user