调整竞赛报名api
This commit is contained in:
parent
93b92ad36a
commit
801d420db8
@ -36,3 +36,21 @@ export function participantCompleteCompetition(id, group) {
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
|
||||
/** 竞赛报名 */
|
||||
export function postSignUp(id, data) {
|
||||
return request({
|
||||
url: `/api/race/${id}/signUp`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询用户是否已经报名该竞赛 */
|
||||
export function getIsSignUp(raceName) {
|
||||
return request({
|
||||
url: `/api/race/${raceName}/isSignUp`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -37,8 +37,7 @@ export default {
|
||||
{ label: '课程生成者', value: '03' },
|
||||
{ label: '系统管理员', value: '04' },
|
||||
{ label: '超级管理员', value: '05' },
|
||||
{ label: '销售用户', value: '06' },
|
||||
{ label: '裁判员', value: '07' }
|
||||
{ label: '销售用户', value: '06' }
|
||||
],
|
||||
|
||||
examResultList: [
|
||||
|
@ -34,7 +34,6 @@ function hasPermission(roles, route, parentsRoles) {
|
||||
* @param systemType 项目类型
|
||||
*/
|
||||
function resetAsyncRouter({ systemType }) {
|
||||
console.log(systemType);
|
||||
let list = publicAsyncRoute;
|
||||
if (systemType == projectTrain) {
|
||||
list = [...list, ...asyncRouter];
|
||||
|
@ -2,10 +2,10 @@ 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';
|
||||
|
@ -62,6 +62,7 @@ import md5 from 'js-md5';
|
||||
import Cookies from 'js-cookie';
|
||||
import QrcodeVue from 'qrcode.vue';
|
||||
import { getUserinfoMobileCode } from '@/api/management/user';
|
||||
import { postSignUp } from '@/api/competition';
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
@ -301,6 +302,20 @@ export default {
|
||||
handleApply() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
console.log(this.formModel, '内容');
|
||||
const param = {
|
||||
department: this.formModel.department,
|
||||
idNumber: this.formModel.numberId,
|
||||
mobile: this.formModel.phone,
|
||||
name: this.formModel.name,
|
||||
organization: this.formModel.company,
|
||||
position: this.formModel.job,
|
||||
vdCode: this.formModel.phoneCode
|
||||
};
|
||||
postSignUp(this.userId, param).then(res => {
|
||||
console.log(res);
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
async getTelCode() {
|
||||
|
@ -110,6 +110,7 @@ import { loginInfo, ProjectIcon, GenerateRouteProjectList} from '@/scripts/Proje
|
||||
import { removeToken } from '@/utils/auth';
|
||||
import LangStorage from '@/utils/lang';
|
||||
import FloatPart from './floatPart';
|
||||
import { getIsSignUp } from '@/api/competition';
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
@ -334,7 +335,19 @@ export default {
|
||||
this.loading = false;
|
||||
this.tipsMsg = '';
|
||||
removeSessionStorage('againEnter');
|
||||
this.$router.push({ path: this.path });
|
||||
console.log(this.$route.query, this.$route.query.name);
|
||||
if (this.$route.query.name) {
|
||||
getIsSignUp(this.$route.query.name).then(res => {
|
||||
this.$router.push({ path: this.path });
|
||||
}).catch(error => {
|
||||
console.log(error, '错误');
|
||||
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
|
||||
});
|
||||
} else if (!this.$route.path.includes('jsxt/login')) {
|
||||
this.$router.push({ path: this.path });
|
||||
} else {
|
||||
this.$messageBox('请调整路径参数');
|
||||
}
|
||||
},
|
||||
handleLanguage() {
|
||||
this.$i18n.locale = this.lang;
|
||||
|
@ -62,18 +62,6 @@ export default {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
// sortOrder:{
|
||||
// type: 'select',
|
||||
// label: this.$t('permission.sortType'),
|
||||
// default:'id desc',
|
||||
// noClearable:true,
|
||||
// config: {
|
||||
// data: [
|
||||
// {value:'id desc', label:'ID倒序'},
|
||||
// {value:'userName', label:'用户名正序'}
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
@ -192,31 +180,11 @@ export default {
|
||||
]
|
||||
}
|
||||
],
|
||||
// sortChange:function(data) {
|
||||
// switch (data.order) {
|
||||
// case 'ascending': {
|
||||
// this.data=[];
|
||||
// break;
|
||||
// }
|
||||
// case 'descending': {
|
||||
// break;
|
||||
// }
|
||||
// default: {
|
||||
// // sortOrder
|
||||
// debugger;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
actions: [
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.handleOriginalForm();
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
@ -224,17 +192,6 @@ export default {
|
||||
handleRoleVest(index, row) {
|
||||
this.$refs.detail.doShow(row.permissionId);
|
||||
},
|
||||
handleOriginalForm() {
|
||||
if (this.$route.query.distributeId) {
|
||||
const form = localStore.get(this.$route.path);
|
||||
form['distributeId'] = this.$route.query.distributeId;
|
||||
localStore.set(this.$route.path, form);
|
||||
} else {
|
||||
const form = localStore.get(this.$route.path);
|
||||
form['distributeId'] = '';
|
||||
localStore.set(this.$route.path, form);
|
||||
}
|
||||
},
|
||||
loadInitData() {
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
list.forEach(elem => {
|
||||
|
Loading…
Reference in New Issue
Block a user