Browse Source

Merge branch 'master' of http://git.cc-lotus.info/ball-court/ball-applet

guhongwei 2 years ago
parent
commit
a3d3bcd29a

+ 3 - 0
commpents/pagesMatchs/match/match-3.less

@@ -1,3 +1,5 @@
+@import (css) "/app.wxss";
+
 .c {
     width: 96vw;
     display: flex;
@@ -67,6 +69,7 @@
                         width: 30vw;
                         text-align: center;
                         padding: 2vw;
+                        line-height: 28px;
                     }
 
                     .pk_2 {

+ 1 - 1
commpents/pagesMatchs/match/match-3.wxml

@@ -5,7 +5,7 @@
             <button type="primary" bindtap="orderChange" wx:if="{{cType=='0'}}" data-ctype="{{1}}">查看对阵表</button>
         </view>
         <view class="c_1inp">
-            <input type="text" value="{{cSearch.name}}" bindconfirm="cSearch" placeholder="{{cType=='0'?'请输入队友姓名':'请输入项目名称'}}" />
+            <input type="text" value="{{cSearch.name}}" bindinput="cSearch" placeholder="{{cType=='0'?'请输入队友姓名':'请输入项目名称'}}" />
         </view>
     </view>
     <view class="c_2">

+ 2 - 0
commpents/pagesMatchs/match/match-3.wxss

@@ -1,3 +1,4 @@
+@import "/app.wxss";
 .c {
   width: 96vw;
   display: flex;
@@ -59,6 +60,7 @@
   width: 30vw;
   text-align: center;
   padding: 2vw;
+  line-height: 28px;
 }
 .c .c_2 .cList .cList_0 .pk .pk_2 {
   text-align: center;

+ 1 - 1
commpents/pagesMatchs/match/match-5.js

@@ -4,7 +4,7 @@ Component({
      * 组件的属性列表
      */
     properties: {
-        raceteamList: { type: Array },
+        projectList: { type: Array },
     },
 
     /**

+ 2 - 2
commpents/pagesMatchs/match/match-5.wxml

@@ -1,7 +1,7 @@
 <view class="main">
     <view class="one">
-        <view class="title" wx:for="{{raceteamList}}" wx:key="item" bindtap="toCommon" data-item="{{item}}">
-            <view class="name">{{item.name}}</view>
+        <view class="title" wx:for="{{projectList}}" wx:key="item" bindtap="toCommon" data-item="{{item}}">
+            <view class="name">{{item.name}}({{item.age}}岁)</view>
             <view class="icon">
                 <text class="iconfont icon-jiantou_liebiaoxiangyou"></text>
             </view>

+ 14 - 5
pagesMatch/match/info.js

@@ -24,6 +24,8 @@ Page({
         },
         // 赛况列表
         matchList: [],
+        //成绩册项目列表
+        projectList: [],
         active: '',
         // 状态
         statusList: [],
@@ -126,6 +128,7 @@ Page({
         // 赛制列表
         arr = await app.$get(`/dict`, { code: "match_format" });
         if (arr.errcode == '0' && arr.total > 0) that.setData({ formatList: arr.data[0].list });
+        // 性别列表
         arr = await app.$get(`/dict`, { code: "gender" });
         if (arr.errcode == '0' && arr.total > 0) that.setData({ genderList: arr.data[0].list });
     },
@@ -162,6 +165,11 @@ Page({
                     let regular = arr.data.regular.replace(/\<img/gi, '<img style="width:100%;height:auto;margin: 5px 0"');
                     if (regular) arr.data.zhRegular = regular;
                     that.setData({ info: arr.data })
+                    // 选手
+                    let getAll = await app.$get(`/match/getAll/${arr.data._id}`, {}, 'race');
+                    if (getAll.errcode == '0') that.setData({ player: getAll.data })
+                    // 秩序册
+                    that.searchOrderBook();
                     // 场地
                     let address = await app.$get(`/matchAddress`, { is_use: '0', belong_id: arr.data.belong_id }, 'race');
                     if (address.errcode == '0') {
@@ -172,12 +180,13 @@ Page({
                         }
                         that.setData({ 'fieldtabs.menu': groundList })
                     }
+                    // 成绩册项目列表
+                    let project = await app.$get(`/matchProject`, { match_id: arr.data._id }, 'race');
+                    if (project.errcode == '0') {
+                        that.setData({ projectList: project.data })
+                    }
                 } else { wx.showToast({ title: `${res.errmsg}`, icon: 'fail', duration: 2000 }); }
-                // 选手
-                arr = await app.$get(`/match/getAll/${that.data.id}`, {}, 'race');
-                if (arr.errcode == '0') that.setData({ player: arr.data })
-                // 秩序册
-                that.searchOrderBook();
+
             },
             fail: async res => {
                 wx.redirectTo({ url: '/pages/index/index' })

+ 1 - 1
pagesMatch/match/info.wxml

@@ -43,7 +43,7 @@
                 5
                 <!-- <scroll-view scroll-y="true" class="scroll-view">
                     <view class="list-scroll-view">
-                        <match-5 raceteamList="{{raceteamList}}"></match-5>
+                        <match-5 projectList="{{projectList}}"></match-5>
                     </view>
                 </scroll-view> -->
             </view>

+ 1 - 1
pagesMatch/matchAdmin/project/add.js

@@ -81,7 +81,7 @@ Page({
      */
     onLoad: async function (options) {
         const that = this;
-        that.setData({ id: options && options.id || '631550dc2b3d626c68cc5b43' })
+        that.setData({ id: options && options.id || '' })
         //验证规则函数
         that.initValidate();
         // 查询其他信息