Jelajahi Sumber

我的报名

zs 2 tahun lalu
induk
melakukan
9dc47a8ec3

+ 0 - 6
pages/usermysign/index.js

@@ -39,7 +39,6 @@ Page({
     toPay: async function (e) {
         const that = this;
         const enroll_id = e.currentTarget.dataset?.item?.enroll_id;
-        debugger
         wx.getStorage({
             key: 'user',
             success: async (res) => {
@@ -104,11 +103,6 @@ Page({
                 if (searchInfo && searchInfo.name) info.match_name = searchInfo.name;
                 const arr = await app.$get(`/newCourt/api/view/myMatchList/`, { openid: res.data.openid, ...info });
                 if (arr.errcode == '0') {
-                    for (const val of arr.data) {
-                        // 赛事信息
-                        const match = await app.$get(`/newCourt/api/match/${val.match_id}`);
-                        if (match.errcode = '0') { val.match_name = match.data.name };
-                    }
                     that.setData({ list: arr.data })
                     console.log(arr.data);
                 }

+ 15 - 0
pages/usermysign/index.less

@@ -101,5 +101,20 @@
         text:nth-child(1) {
             color: #000000;
         }
+
+        .list {
+            border: 1px solid #ccc;
+            font-size: 14px;
+            color: #858585;
+            padding: 2vw;
+            margin: 1vw 0 0 0;
+
+            .name {
+                text {
+                    color: #000000;
+                }
+            }
+
+        }
     }
 }

+ 18 - 3
pages/usermysign/index.wxml

@@ -1,7 +1,7 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="container main">
         <view class="zero one">
-            <input type="text" value="{{searchInfo.name}}" bindconfirm="search" placeholder="请输入关键词" />
+            <input type="text" value="{{searchInfo.name}}" bindconfirm="search" placeholder="请输入赛事名称" />
         </view>
         <view class="zero two">
             <scroll-view scroll-y="true" class="scroll-view">
@@ -13,11 +13,15 @@
                                 <text>是否支付报名费:</text>
                                 <text>{{item.pay_status=='0'?'待支付':item.pay_status=='1'?'已支付':'支付失败'}}</text>
                             </view>
+                            <view class="other_1">
+                                <text>比赛项目人数:</text>
+                                <text>{{item.project_num||0}}人</text>
+                            </view>
                         </view>
                         <view class="btn">
                             <button type="primary" size="mini" bindtap="toView" data-item="{{item}}">详细信息</button>
                             <button type="primary" size="mini" bindtap="toPay" data-item="{{item}}" wx:if="{{item.pay_status==='0'}}">支付</button>
-                            <button type="primary" size="mini" bindtap="toTeam" data-item="{{item}}" wx:if="{{item.pay_status=='1'&&item.needTeammate==true}}">组队申请</button>
+                            <button type="primary" size="mini" bindtap="toTeam" data-item="{{item}}" wx:if="{{item.pay_status=='1'&&item.project_name=='双打'}}">组队申请</button>
                             <button type="warn" size="mini" bindtap="toOut" data-item="{{item}}" wx:if="{{item.pay_status=='1'&&item.is_sign_end==false}}">退出比赛</button>
                         </view>
                     </view>
@@ -43,7 +47,18 @@
             </view>
             <view class="one_1">
                 <text>比赛项目人数:</text>
-                <text>{{info.num||0}}人</text>
+                <text>{{info.project_num||0}}人</text>
+            </view>
+            <view class="one_1">
+                <text>报名状态:</text>
+                <text>{{info.status=='0'?'报名':info.status=='1'?'参赛':'退赛'}}</text>
+            </view>
+            <view class="one_1" wx:if="{{info.has_teammate==true}}">
+                <text>组队成员:</text>
+                <view class="list" wx:for="{{info.teammates}}" wx:key="item">
+                    <view class="name"><text>申请组队用户姓名:</text>{{item.applyuser_name}}</view>
+                    <view class="name"><text>队友姓名:</text>{{item.teammate_name}}</view>
+                </view>
             </view>
             <view class="one_1">
                 <text>支付状态:</text>

+ 10 - 0
pages/usermysign/index.wxss

@@ -83,3 +83,13 @@
 .dialog_one .one_1 text:nth-child(1) {
   color: #000000;
 }
+.dialog_one .one_1 .list {
+  border: 1px solid #ccc;
+  font-size: 14px;
+  color: #858585;
+  padding: 2vw;
+  margin: 1vw 0 0 0;
+}
+.dialog_one .one_1 .list .name text {
+  color: #000000;
+}