guhongwei 2 years ago
parent
commit
05f8df9ab8

+ 1 - 1
pagesMatch/match/info.wxml

@@ -6,7 +6,7 @@
         <view class="two">
             <view wx:if="{{tabs.active=='a'}}" class="a">
                 <match-1 info="{{info}}"></match-1>
-                <view class="inMatch" wx:if="{{user.type=='0'||user.type=='3'}}">
+                <view class="inMatch" wx:if="{{user.type=='0'||user.type=='3'&&info.status=='1'}}">
                     <text class="btn" bindtap="toSign" data-item="{{info}}">比赛报名</text>
                 </view>
             </view>

+ 3 - 3
pagesMatch/matchAdmin/mtgroup/add.js

@@ -51,7 +51,7 @@ Page({
         const that = this;
         let data = that.data.projectList[e.detail.value];
         if (data) {
-            that.setData({ 'form.project_id': data._id, 'form.project_name': data.name, 'form.person_type': data.type == '0' ? 'User' : 'TeamApply' })
+            that.setData({ 'form.project_id': data._id, 'form.project_name': data.name, 'form.person_type': data.type == '0' ? 'Race.User' : 'Race.TeamApply' })
         }
         that.searchUser();
     },
@@ -133,10 +133,10 @@ Page({
                         const sign = await app.$get(`/matchTeamGroup/fgps?project_id=${arr.data.project_id}&person_type=${arr.data.person_type}&team_id=${that.data.id}`, {}, 'race');
                         if (sign.errcode == '0') {
                             for (const val of sign.data) {
-                                if (arr.data.person_type == 'TeamApply') {
+                                if (arr.data.person_type == 'Race.TeamApply') {
                                     let user_name = arr.data.person.find(i => i.id == val._id);
                                     if (user_name) val.checked = true;
-                                } else if (arr.data.person_type == 'User') {
+                                } else if (arr.data.person_type == 'Race.User') {
                                     let user_name = arr.data.person.find(i => i.id == val.user_id);
                                     if (user_name) val.checked = true;
                                 }

+ 4 - 4
pagesMatch/matchAdmin/mtschedule/add.js

@@ -69,8 +69,8 @@ Page({
             that.setData({ 'form.team_id': data._id, 'form.team_id_name': data.name });
             const arr = await app.$get(`/matchTeamGroup/${data._id}`, {}, 'race');
             if (arr.errcode == '0') {
-                if (arr.data.person_type == 'User') { that.setData({ 'form.player_type': 'User', 'form.type_name': '单打' }) }
-                if (arr.data.person_type == 'TeamApply') { that.setData({ 'form.player_type': 'TeamApply', 'form.type_name': '双打' }) }
+                if (arr.data.person_type == 'Race.User') { that.setData({ 'form.player_type': 'Race.User', 'form.type_name': '单打' }) }
+                if (arr.data.person_type == 'Race.TeamApply') { that.setData({ 'form.player_type': 'Race.TeamApply', 'form.type_name': '双打' }) }
                 that.setData({ memberList: arr.data.person });
             }
 
@@ -186,8 +186,8 @@ Page({
                         // 状态
                         let status = that.data.statusList.find(i => i.value == arr.data.status)
                         if (status) arr.data.zhStatus = status.label;
-                        if (arr.data.player_type == 'User') { arr.data.type_name = '单打' }
-                        if (arr.data.player_type == 'TeamApply') { arr.data.type_name = '双打' }
+                        if (arr.data.player_type == 'Race.User') { arr.data.type_name = '单打' }
+                        if (arr.data.player_type == 'Race.TeamApply') { arr.data.type_name = '双打' }
                         that.setData({ form: arr.data })
                     } else {
                         wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })