13d49825 by zhangmeng

报名

1 parent bcca2ea4
...@@ -521,7 +521,10 @@ function getGroupListByCptId() { ...@@ -521,7 +521,10 @@ function getGroupListByCptId() {
521 521
522 function changeMenu(menu, l) { 522 function changeMenu(menu, l) {
523 console.log(matchData.value.leagueId, l.name) 523 console.log(matchData.value.leagueId, l.name)
524 if (matchData.value.leagueId == '1778253367748993026' && (l.name == '成绩' || l.name == 'Achievement')) { 524 if (
525 matchData.value.leagueId == '1778253367748993026' &&
526 (l.name == '成绩' || l.name == 'Achievement')
527 ) {
525 window.open('http://www.cdsf.org.cn/h5/sscj.index?matchID=526') 528 window.open('http://www.cdsf.org.cn/h5/sscj.index?matchID=526')
526 } 529 }
527 for (const n of menu) { 530 for (const n of menu) {
...@@ -541,9 +544,11 @@ function choseSignType() { ...@@ -541,9 +544,11 @@ function choseSignType() {
541 // 判断signType,如1个人注册-报名; 544 // 判断signType,如1个人注册-报名;
542 switch (matchData.value.signType) { 545 switch (matchData.value.signType) {
543 case '0': 546 case '0':
547 // 注册
544 goGeren() 548 goGeren()
545 break 549 break
546 case '1': 550 case '1':
551 // 登录
547 goLogin() 552 goLogin()
548 break 553 break
549 case '2': 554 case '2':
...@@ -551,7 +556,9 @@ function choseSignType() { ...@@ -551,7 +556,9 @@ function choseSignType() {
551 break 556 break
552 } 557 }
553 } else { 558 } else {
559 // 获取已报名信息
554 checkIsSign().then(() => { 560 checkIsSign().then(() => {
561 // 报名
555 switchSignType() 562 switchSignType()
556 }) 563 })
557 } 564 }
...@@ -581,37 +588,74 @@ function goUpdatePersonal() { ...@@ -581,37 +588,74 @@ function goUpdatePersonal() {
581 function goTeamSign() { 588 function goTeamSign() {
582 if (matchData.value.languageSource == '100') { 589 if (matchData.value.languageSource == '100') {
583 // 国内 590 // 国内
584 if (group.type == '4') { 591 // if (group.type == '4') {
585 ElMessageBox.confirm( 592 // ElMessageBox.confirm(
586 language.value == 0 ? '您的团体类型不符合报名条件' : 'Your Team type does not meet the registration requirements', 593 // language.value == 0 ? '您的团体类型不符合报名条件' : 'Your Team type does not meet the registration requirements',
587 language.value == 0 ? '提示' : 'Warning', 594 // language.value == 0 ? '提示' : 'Warning',
588 { 595 // {
589 confirmButtonText: language.value == 1 ? 'OK' : '确定', 596 // confirmButtonText: language.value == 1 ? 'OK' : '确定',
590 cancelButtonText: language.value == 1 ? 'Cancel' : '取消', 597 // cancelButtonText: language.value == 1 ? 'Cancel' : '取消',
591 type: 'warning' 598 // type: 'warning'
592 } 599 // }
593 ) 600 // )
594 return 601 // return
602 // }
603 if (matchData.value.countryLimit == 1) {
604 // 国家协会账号报名
605 if (group && group.type == 4) {
606 handelPreCheckForGroup(goTeamSignCn)
607 } else {
608 return proxy.$modal.confirm(language.value == 0
609 ? '您的账号类型为团队,无法报名当前活动。请切换至国家协会类型的账号,或重新注册类型为国家协会的账号报名当前活动。'
610 : 'Your account type is "Team",which does not qualify for the current event.Please switch to a "National Association" type account or register a new account with this type to proceed.')
595 } 611 }
612 } else {
613 if (group && group.type == 4) {
614 return proxy.$modal.confirm(language.value == 0
615 ? '您的账号类型为团队(国家协会),无法报名当前活动。请切换至团队类型的账号,或重新注册类型为非国家协会的团队类型的账号,报名当前活动。'
616 : 'Your account type is "National Association Team"which does not qualify for the current event.Please switch to a "Team" type account or register a new account with this type to proceed.')
617 } else {
596 handelPreCheckForGroup(goTeamSignCn) 618 handelPreCheckForGroup(goTeamSignCn)
619 }
620 }
597 } else { 621 } else {
598 // 国际赛 622 // 国际赛
599 if (group?.type != '4' && matchData.value.countryLimit == '1') { 623 if (matchData.value.countryLimit == 1) {
600 ElMessageBox.confirm( 624 if (group && group.type == 4) {
601 language.value == 0 ? '您的团体类型不符合报名条件' : 'Your Team type does not meet the registration requirements', 625 handelPreCheckForGroup(goTamSign)
602 language.value == 0 ? '提示' : 'Warning', 626 } else {
603 { 627 return proxy.$modal.confirm(language.value == 0
604 confirmButtonText: language.value == 1 ? 'OK' : '确定', 628 ? '您的账号类型为团队,无法报名当前活动。请切换至国家协会类型的账号,或重新注册类型为国家协会的账号报名当前活动。'
605 cancelButtonText: language.value == 1 ? 'Cancel' : '取消', 629 : 'Your account type is "Team",which does not qualify for the current event.Please switch to a "National Association" type account or register a new account with this type to proceed.')
606 type: 'warning'
607 }
608 )
609 return
610 } 630 }
631 } else {
632 if (group && group.type == 4) {
633 return proxy.$modal.confirm(language.value == 0
634 ? '您的账号类型为团队(国家协会),无法报名当前活动。请切换至团队类型的账号,或重新注册类型为非国家协会的团队类型的账号,报名当前活动。'
635 : 'Your account type is "National Association Team"which does not qualify for the current event.Please switch to a "Team" type account or register a new account with this type to proceed.')
636 } else {
611 handelPreCheckForGroup(goTamSign) 637 handelPreCheckForGroup(goTamSign)
612 } 638 }
639 }
640
641
642 // if (group?.type != '4' && matchData.value.countryLimit == '1') {
643 // ElMessageBox.confirm(
644 // language.value == 0 ? '您的团体类型不符合报名条件' : 'Your Team type does not meet the registration requirements',
645 // language.value == 0 ? '提示' : 'Warning',
646 // {
647 // confirmButtonText: language.value == 1 ? 'OK' : '确定',
648 // cancelButtonText: language.value == 1 ? 'Cancel' : '取消',
649 // type: 'warning'
650 // }
651 // )
652 // return
653 // }
654 // handelPreCheckForGroup(goTamSign)
655 }
613 } 656 }
614 657
658 // 国际赛
615 function goTamSign() { 659 function goTamSign() {
616 router.push({ 660 router.push({
617 path: `${route.params.id}/teamSign`, 661 path: `${route.params.id}/teamSign`,
...@@ -625,6 +669,7 @@ function goTamSign() { ...@@ -625,6 +669,7 @@ function goTamSign() {
625 }) 669 })
626 } 670 }
627 671
672 // 国内赛
628 function goTeamSignCn() { 673 function goTeamSignCn() {
629 router.push({ 674 router.push({
630 path: `${route.params.id}/teamSignCn`, 675 path: `${route.params.id}/teamSignCn`,
...@@ -765,37 +810,25 @@ function reSign() { ...@@ -765,37 +810,25 @@ function reSign() {
765 810
766 function switchSignType() { 811 function switchSignType() {
767 switch (matchData.value.signType) { 812 switch (matchData.value.signType) {
768 case '0':// 个人 813 case '0':// 个人赛报名
769 if (user.utype == '1') { 814 if (user.utype == '1') {
770 handelGeRenNext() 815 handelGeRenNext()
771 } 816 }
772 if (user.utype == '2') { 817 if (user.utype == '2') {
773 ElMessageBox.confirm( 818 return proxy.$modal.confirm(language.value == 0
774 language.value == 0 ? '当前活动是个人活动,无法报名' : 'The current event is a personal event, cannot register', 819 ? '您的账号类型为:团队,无法报名当前活动。请切换至个人类型的账号,或重新注册类型为个人的账号,报名当前活动。'
775 language.value == 0 ? '提示' : 'Warning', 820 : 'Your account type is "Team",which does not qualify for the current race. Please switch to a "Individual" type account or register a new account with this type to proceed.')
776 {
777 confirmButtonText: language.value == 0 ? '好的' : 'OK',
778 cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
779 type: 'warning'
780 }
781 )
782 } 821 }
783 if (user.utype == '3') { 822 if (user.utype == '3') {
823 // 注册
784 goGeren() 824 goGeren()
785 } 825 }
786 break 826 break
787 case '1':// 团体 827 case '1':// 团体赛报名
788
789 if (user.utype == '1') { 828 if (user.utype == '1') {
790 ElMessageBox.confirm( 829 return proxy.$modal.confirm(language.value == 0
791 language.value == 0 ? '当前活动是团队活动,无法报名' : 'The current event is a team event, cannot register', 830 ? '您的账号类型为:个人,无法报名当前活动。请切换至团体类型账号报名。或者重新注册团体类型账号后再报名。'
792 language.value == 0 ? '提示' : 'Warning', 831 : 'Your account type is: Individual. which does not qualify for the current race.Please switch to a group type account to register. Or register with a group type account before signing up.')
793 {
794 confirmButtonText: language.value == 0 ? '好的' : 'OK',
795 cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
796 type: 'warning'
797 }
798 )
799 } 832 }
800 if (user.utype == '2') { 833 if (user.utype == '2') {
801 // match.preCheckForGroup(groupId.value).then(goTeamSign) 834 // match.preCheckForGroup(groupId.value).then(goTeamSign)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!