zs %!s(int64=2) %!d(string=hai) anos
pai
achega
8ca5c86840
Modificáronse 4 ficheiros con 45 adicións e 27 borrados
  1. 23 7
      pages/match/sign.js
  2. 1 0
      pages/match/sign.less
  3. 20 20
      pages/match/sign.wxml
  4. 1 0
      pages/match/sign.wxss

+ 23 - 7
pages/match/sign.js

@@ -6,7 +6,7 @@ Page({
      * 页面的初始数据
      */
     data: {
-        frameStyle: { useTop: true, name: '组队信息审核', leftArrow: true, useBar: false },
+        frameStyle: { useTop: true, name: '报名管理', leftArrow: true, useBar: false },
         //查询条件
         searchName: '',
         list: [],
@@ -28,8 +28,12 @@ Page({
     toView: async function (e) {
         const that = this;
         const { id } = e.currentTarget.dataset;
-        const arr = await app.$get(`/newCourt/api/user/${id}`);
+        const arr = await app.$get(`/newCourt/api/enroll/${id}`);
         if (arr.errcode == '0') {
+            const aee = await app.$get(`/newCourt/api/user/${arr.data.openid}`);
+            if (aee.errcode == '0') arr.data.name = aee.data.name
+            const ass = await app.$get(`/newCourt/api/match/${arr.data.match_id}`);
+            if (ass.errcode == '0') arr.data.title = ass.data.name
             that.setData({ info: arr.data })
             that.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
         }
@@ -38,7 +42,7 @@ Page({
     toCheck: async function (e) {
         const that = this;
         let { id } = e.currentTarget.dataset;
-        const arr = await app.$get(`/newCourt/api/user/${id}`);
+        const arr = await app.$get(`/newCourt/api/enroll/${id}`);
         if (arr.errcode == '0') {
             that.setData({ info: arr.data })
             that.setData({ dialog: { title: '信息审核', show: true, type: '2' } })
@@ -62,10 +66,22 @@ Page({
         wx.getStorage({
             key: 'user',
             success: async res => {
-                let info = {};
-                if (that.data.searchName) info.name = that.data.searchName;
-                const arr = await app.$get(`/newCourt/api/user/`, { ...info });
-                // if (arr.errcode == '0') { that.setData({ list: arr.data }) }
+                const arr = await app.$get(`/newCourt/api/enroll/`);
+                if (arr.errcode == '0') {
+                    for (const val of arr.data) {
+                        const aee = await app.$get(`/newCourt/api/user/${val.openid}`);
+                        if (aee.errcode == '0') val.name = aee.data.name
+                        aee = await app.$get(`/newCourt/api/match/${val.match_id}`);
+                        if (aee.errcode == '0') val.title = aee.data.name
+                    }
+                    if (that.data.searchName) {
+                        let list = arr.data.filter((i) => i.name == that.data.searchName);
+                        if (list) that.setData({ list: list })
+                        else that.setData({ list: [] })
+                    } else {
+                        that.setData({ list: arr.data })
+                    }
+                }
             },
             fail: res => {
                 wx.redirectTo({ url: '/pages/index/index', })

+ 1 - 0
pages/match/sign.less

@@ -88,6 +88,7 @@
         .text1 {
             font-size: 14px;
             color: #000;
+            max-width: 50vw;
         }
 
         .image {

+ 20 - 20
pages/match/sign.wxml

@@ -1,21 +1,21 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="container main">
         <view class="one">
-            <van-search value="{{ searchName }}" bind:search="onSearch" placeholder="请输入组队名称" />
+            <van-search value="{{ searchName }}" bind:search="onSearch" placeholder="请输入用户姓名" />
         </view>
         <view class="two">
             <scroll-view scroll-y="true" class="scroll-view">
                 <view class="list-scroll-view">
                     <view class="list" wx:for="{{list}}" wx:key="item">
-                        <view class="name textOver">{{item.name||'暂无'}}</view>
+                        <view class="name ">{{item.name||'暂无'}}</view>
                         <view class="other">
-                            <view class="other_1"><text>用户类型:</text><text>{{item.type=='-1'?'管理员':item.type=='0'?'个人用户':item.type=='1'?'裁判用户':'暂无'}}</text></view>
+                            <view class="other_1 textOver"><text>赛事名称:</text><text>{{item.title}}</text></view>
                             <view class="other_1"><text>是否转发了朋友圈:</text><text>{{item.has_turn=='0'?'未转发':'已转发'}}</text></view>
                             <view class="other_1"><text>支付状态:</text><text>{{item.pay_status=='0'?'待支付':item.pay_status=='1'?'已支付':'支付失败'}}</text></view>
                         </view>
                         <view class="btn">
                             <button size="mini" type="primary" bindtap="toView" data-id="{{item._id}}">详情</button>
-                            <button size="mini" type="primary" bindtap="toCheck" data-id="{{item._id}}">审核</button>
+                            <button size="mini" type="primary" bindtap="toCheck" data-id="{{item._id}}">维护</button>
                         </view>
                     </view>
                 </view>
@@ -27,34 +27,34 @@
     <view slot="info">
         <view class="dialog_one" wx:if="{{dialog.type=='1'}}">
             <view class="one_1">
-                <text class="text">头像:</text>
-                <image class="image" src="{{info.icon[0].url}}"></image>
-            </view>
-            <view class="one_1">
-                <text class="text">用户名:</text>
+                <text class="text">报名用户:</text>
                 <text class="text1">{{info.name||'暂无昵称'}}</text>
             </view>
             <view class="one_1">
-                <text class="text">电话:</text>
-                <text class="text1">{{info.phone||'暂无'}}</text>
-            </view>
-            <view class="one_1">
-                <text class="text">性别:</text>
-                <text class="text1">{{info.gender||'暂无'}}</text>
+                <text class="text">赛事名称:</text>
+                <text class="text1">{{info.title||'暂无'}}</text>
             </view>
             <view class="one_1">
-                <text class="text">身份证号:</text>
-                <text class="text1">{{info.card||'暂无'}}</text>
+                <text class="text">是否转发了朋友圈:</text>
+                <text class="text1">{{info.has_turn=='0'?'未转发':'已转发'}}</text>
             </view>
             <view class="one_1">
-                <text class="text">状态:</text>
-                <text class="text1">{{info.pay_status=='0'?'待支付':info.status=='1'?'已支付':'支付失败'}}</text>
+                <text class="text">支付状态:</text>
+                <text class="text1">{{info.pay_status=='0'?'待支付':info.pay_status=='1'?'已支付':'支付失败'}}</text>
             </view>
         </view>
         <view class="dialog_two" wx:elif="{{dialog.type=='2'}}">
             <form bindsubmit="onSubmit">
                 <view class="content">
-                    <view class="label textOver">状态</view>
+                    <view class="label textOver">赛事分组</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="statusChange" name="status" value="{{info.status}}" range-key="label" range="{{statusList}}">
+                            <view class="input">{{info.pay_status=='0'?'待支付':info.status=='1'?'已支付':'支付失败'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label textOver">组内项目</view>
                     <view class="value">
                         <picker mode="selector" bindchange="statusChange" name="status" value="{{info.status}}" range-key="label" range="{{statusList}}">
                             <view class="input">{{info.pay_status=='0'?'待支付':info.status=='1'?'已支付':'支付失败'}}</view>

+ 1 - 0
pages/match/sign.wxss

@@ -75,6 +75,7 @@
 .dialog_one .one_1 .text1 {
   font-size: 14px;
   color: #000;
+  max-width: 50vw;
 }
 .dialog_one .one_1 .image {
   width: 15vw;