Browse Source

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

lrf 2 years ago
parent
commit
50300e605c
100 changed files with 3847 additions and 399 deletions
  1. 27 4
      app.json
  2. 3 0
      app.wxss
  3. 61 59
      commpents/datetime-picker/index.js
  4. 2 2
      commpents/datetime-picker/index.wxml
  5. 2 1
      commpents/mobile-frame/top.less
  6. 1 1
      commpents/mobile-frame/top.wxml
  7. 2 1
      commpents/mobile-frame/top.wxss
  8. 23 0
      commpents/pagesMatchs/achieve/achieve-1.js
  9. 4 0
      commpents/pagesMatchs/achieve/achieve-1.json
  10. 21 0
      commpents/pagesMatchs/achieve/achieve-1.less
  11. 9 0
      commpents/pagesMatchs/achieve/achieve-1.wxml
  12. 16 0
      commpents/pagesMatchs/achieve/achieve-1.wxss
  13. 23 0
      commpents/pagesMatchs/achieve/achieve-2.js
  14. 4 0
      commpents/pagesMatchs/achieve/achieve-2.json
  15. 21 0
      commpents/pagesMatchs/achieve/achieve-2.less
  16. 9 0
      commpents/pagesMatchs/achieve/achieve-2.wxml
  17. 16 0
      commpents/pagesMatchs/achieve/achieve-2.wxss
  18. 23 0
      commpents/pagesMatchs/achieve/achieve-3.js
  19. 4 0
      commpents/pagesMatchs/achieve/achieve-3.json
  20. 93 0
      commpents/pagesMatchs/achieve/achieve-3.less
  21. 12 0
      commpents/pagesMatchs/achieve/achieve-3.wxml
  22. 59 0
      commpents/pagesMatchs/achieve/achieve-3.wxss
  23. 24 0
      commpents/pagesMatchs/match/match-1.js
  24. 4 0
      commpents/pagesMatchs/match/match-1.json
  25. 99 0
      commpents/pagesMatchs/match/match-1.less
  26. 64 0
      commpents/pagesMatchs/match/match-1.wxml
  27. 77 0
      commpents/pagesMatchs/match/match-1.wxss
  28. 33 0
      commpents/pagesMatchs/match/match-2.js
  29. 4 0
      commpents/pagesMatchs/match/match-2.json
  30. 81 0
      commpents/pagesMatchs/match/match-2.less
  31. 34 0
      commpents/pagesMatchs/match/match-2.wxml
  32. 57 0
      commpents/pagesMatchs/match/match-2.wxss
  33. 36 0
      commpents/pagesMatchs/match/match-3.js
  34. 4 0
      commpents/pagesMatchs/match/match-3.json
  35. 138 0
      commpents/pagesMatchs/match/match-3.less
  36. 56 0
      commpents/pagesMatchs/match/match-3.wxml
  37. 110 0
      commpents/pagesMatchs/match/match-3.wxss
  38. 28 0
      commpents/pagesMatchs/match/match-4.js
  39. 6 0
      commpents/pagesMatchs/match/match-4.json
  40. 82 0
      commpents/pagesMatchs/match/match-4.less
  41. 37 0
      commpents/pagesMatchs/match/match-4.wxml
  42. 65 0
      commpents/pagesMatchs/match/match-4.wxss
  43. 26 0
      commpents/pagesMatchs/match/match-5.js
  44. 4 0
      commpents/pagesMatchs/match/match-5.json
  45. 38 0
      commpents/pagesMatchs/match/match-5.less
  46. 17 0
      commpents/pagesMatchs/match/match-5.wxml
  47. 28 0
      commpents/pagesMatchs/match/match-5.wxss
  48. 1 1
      commpents/tabs/index.less
  49. 1 1
      commpents/tabs/index.wxss
  50. 15 4
      icon/icon.wxss
  51. 6 7
      pages/match/index.js
  52. 2 2
      pages/match/index.wxml
  53. 1 1
      pages/test/index.js
  54. 97 0
      pagesMatch/match/achieve.js
  55. 10 0
      pagesMatch/match/achieve.json
  56. 28 0
      pagesMatch/match/achieve.less
  57. 18 0
      pagesMatch/match/achieve.wxml
  58. 23 0
      pagesMatch/match/achieve.wxss
  59. 226 34
      pagesMatch/match/info.js
  60. 10 5
      pagesMatch/match/info.json
  61. 2 86
      pagesMatch/match/info.less
  62. 16 56
      pagesMatch/match/info.wxml
  63. 2 68
      pagesMatch/match/info.wxss
  64. 5 5
      pagesMatch/match/sign.js
  65. 119 0
      pagesMatch/matchAdmin/address/add.js
  66. 6 0
      pagesMatch/matchAdmin/address/add.json
  67. 35 0
      pagesMatch/matchAdmin/address/add.less
  68. 31 0
      pagesMatch/matchAdmin/address/add.wxml
  69. 27 0
      pagesMatch/matchAdmin/address/add.wxss
  70. 129 0
      pagesMatch/matchAdmin/address/list.js
  71. 6 0
      pagesMatch/matchAdmin/address/list.json
  72. 93 0
      pagesMatch/matchAdmin/address/list.less
  73. 37 0
      pagesMatch/matchAdmin/address/list.wxml
  74. 76 0
      pagesMatch/matchAdmin/address/list.wxss
  75. 66 0
      pagesMatch/matchAdmin/elimmatch/add.js
  76. 6 0
      pagesMatch/matchAdmin/elimmatch/add.json
  77. 23 0
      pagesMatch/matchAdmin/elimmatch/add.less
  78. 7 0
      pagesMatch/matchAdmin/elimmatch/add.wxml
  79. 19 0
      pagesMatch/matchAdmin/elimmatch/add.wxss
  80. 240 0
      pagesMatch/matchAdmin/elimmatch/edit.js
  81. 7 0
      pagesMatch/matchAdmin/elimmatch/edit.json
  82. 34 0
      pagesMatch/matchAdmin/elimmatch/edit.less
  83. 109 0
      pagesMatch/matchAdmin/elimmatch/edit.wxml
  84. 26 0
      pagesMatch/matchAdmin/elimmatch/edit.wxss
  85. 200 0
      pagesMatch/matchAdmin/elimmatch/list.js
  86. 7 0
      pagesMatch/matchAdmin/elimmatch/list.json
  87. 154 0
      pagesMatch/matchAdmin/elimmatch/list.less
  88. 89 0
      pagesMatch/matchAdmin/elimmatch/list.wxml
  89. 124 0
      pagesMatch/matchAdmin/elimmatch/list.wxss
  90. 13 21
      pagesMatch/matchAdmin/group/add.js
  91. 5 5
      pagesMatch/matchAdmin/group/add.wxml
  92. 32 8
      pagesMatch/matchAdmin/group/list.js
  93. 12 3
      pagesMatch/matchAdmin/group/list.less
  94. 8 1
      pagesMatch/matchAdmin/group/list.wxml
  95. 11 3
      pagesMatch/matchAdmin/group/list.wxss
  96. 25 10
      pagesMatch/matchAdmin/match/add.js
  97. 9 1
      pagesMatch/matchAdmin/match/add.wxml
  98. 6 6
      pagesMatch/matchAdmin/match/list.js
  99. 6 3
      pagesMatch/matchAdmin/match/list.less
  100. 0 0
      pagesMatch/matchAdmin/match/list.wxml

+ 27 - 4
app.json

@@ -98,25 +98,48 @@
             "root": "pagesMatch",
             "pages": [
                 "system/index",
+                "match/info",
+                "match/sign",
+                "match/achieve",
+                "matchAdmin/profit/list",
                 "matchAdmin/referee/list",
                 "matchAdmin/referee/info",
-                "matchAdmin/profit/list",
+                "matchAdmin/address/list",
+                "matchAdmin/address/add",
+                "matchAdmin/refund/list",
                 "matchAdmin/match/list",
                 "matchAdmin/match/add",
                 "matchAdmin/group/list",
                 "matchAdmin/group/add",
                 "matchAdmin/project/list",
                 "matchAdmin/project/add",
+                "matchAdmin/sign/list",
+                "matchAdmin/sign/add",
+                "matchAdmin/sign/info",
                 "matchAdmin/teamapply/list",
+                "matchAdmin/mtgroup/list",
+                "matchAdmin/mtgroup/add",
+                "matchAdmin/mtgroup/auto",
+                "matchAdmin/mtschedule/list",
+                "matchAdmin/mtschedule/add",
+                "matchAdmin/elimmatch/list",
+                "matchAdmin/elimmatch/add",
+                "matchAdmin/elimmatch/edit",
                 "userAdmin/sign/list",
                 "userAdmin/sign/info",
                 "userAdmin/team/list",
+                "userAdmin/team/add",
+                "userAdmin/team/info",
                 "userAdmin/schedule/list",
+                "userAdmin/schedule/sinfo",
+                "userAdmin/schedule/linfo",
                 "userAdmin/bill/list",
                 "userAdmin/bill/info",
-                "test/index",
-                "match/info",
-                "match/sign"
+                "refereeAdmin/mtschedule/list",
+                "refereeAdmin/mtschedule/info",
+                "refereeAdmin/outschedule/list",
+                "refereeAdmin/outschedule/info",
+                "test/index"
             ]
         }
     ],

+ 3 - 0
app.wxss

@@ -43,11 +43,14 @@ page {
     --font12Size: 12px;
     /* 颜色 */
     --f1Color: #f1f1f1;
+    --f2Color: #f2f2f2;
     --f9Color: #f9f9f9;
     --f85Color: #858585;
+    --f99Color: #999999;
     --fcColor: #cccccc;
     --blackColor: #000000;
     --whiteColor: #ffffff;
     --redColor: #ff0000;
     --blueColor: #0000ff;
+    --greenColor: #008000;
 }

+ 61 - 59
commpents/datetime-picker/index.js

@@ -1,86 +1,88 @@
-// commpents/datetime-picker/index.js
-const app = getApp()
+const App = getApp();
+const dateTimePicker = require('../../utils/datePicker');
 const moment = require("../../utils/moment.min");
 Component({
-    /**
-     * 组件的属性列表
-     */
-    options: { multipleSlots: true },
+    options: { addGlobalClass: true },
     properties: {
         datetime: { type: String, value: '' },
         name: { type: String, value: '' }
     },
-    // 生命周期函数,可以为函数,或一个在methods段中定义的方法名
-    attached: function () { }, // 此处attached的声明会被lifetimes字段中的声明覆盖
-    ready: function () { },
+    data: {
+        // 时间列表
+        dateTimeArray: null,
+        // 默认显示时间
+        valueDateTime: null,
+        // 开始时间
+        startDateTime: '',
+        // 结束时间
+        endDateTime: '',
+    },
     pageLifetimes: {
-        // 组件所在页面的生命周期函数
         show: function () {
             const that = this;
             that.search();
+
+            
         },
         hide: function () { },
-        resize: function () { },
-    },
-    /**
-     * 组件的初始数据
-     */
-    data: {
-        dateTimeArray: [],
-        // 计算日期
-        year: '',
-        moneh: '',
+        resize: function (size) { }
     },
     /**
      * 组件的方法列表
      */
     methods: {
-        // 查询时间
         search: function () {
             const that = this;
-            // 计算年份
-            let year = [];
-            let startYear = moment().format('YYYY');
-            let endYear = Number(startYear) + 100;
-            for (var i = startYear; i <= endYear; i++) { year.push(String(i)) }
-            // 数组数据, 年, 月, 日, 时, 分, 秒;
-            let dateTimeArray = [
-                [...year],
-                ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'],
-                ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'],
-                ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23'],
-                ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59'],
-                ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59'],
-            ]
-            that.setData({ dateTimeArray })
+            // 计算时间区间
+            let startDateTime = moment().format('YYYY-MM-DD HH:mm');
+            let endDateTime = moment().add(100, 'years').format('YYYY-MM-DD HH:mm');
+            that.setData({ startDateTime: startDateTime, endDateTime: endDateTime })
+            // 获取完整的年月日 时分秒,以及默认显示的数组
+            that.data.unit = ['年', '月', '日', '时', '分']
+            that.data.dateTimePicker = dateTimePicker.newDateTimePicker(startDateTime, endDateTime)
+            let obj = that.data.dateTimePicker.render();
+            let lastArray = obj.dateTimeArray;
+            let lastTime = obj.dateTime;
+            for (let i = 0; i < lastArray.length; i++) {
+                lastArray[i] = lastArray[i].map(m => m + this.data.unit[i])
+            }
+            that.setData({ dateTimeArray: lastArray, valueDateTime: lastTime })
         },
         // 确认选择
-        change: function (e) {
+        change(e) {
             const that = this;
-            let dateTimeArray = that.data.dateTimeArray;
-            let value = e.detail.value;
-            let datetime = dateTimeArray[0][value[0]] + '-' + dateTimeArray[1][value[1]] + '-' + dateTimeArray[2][value[2]] + ' ' + dateTimeArray[3][value[3]] + ':' + dateTimeArray[4][value[4]] + ':' + dateTimeArray[5][value[5]];
-            that.triggerEvent('datetimeChange', { datetime: datetime, name: that.properties.name })
+            const valueDateTime = that.data.valueDateTime;
+            const year = that.data.dateTimeArray[0][valueDateTime[0]].replace(/年/, '')
+            const month = that.data.dateTimeArray[1][valueDateTime[1]].replace(/月/, '')
+            const day = that.data.dateTimeArray[2][valueDateTime[2]].replace(/日/, '')
+            const hour = that.data.dateTimeArray[3][valueDateTime[3]].replace(/时/, '')
+            const minute = that.data.dateTimeArray[4][valueDateTime[4]].replace(/分/, '')
+            let dateTimeWhole = `${year}-${month}-${day} ${hour}:${minute}`;
+            that.triggerEvent('datetimeChange', { datetime: dateTimeWhole, name: that.properties.name })
         },
-        // 选择月份
+        // 选择时间
         columnChange: function (e) {
             const that = this;
-            const { column, value } = e.detail;
-            let dateTimeArray = that.data.dateTimeArray;
-            let year = '';
-            let month = '';
-            year = that.data.year || dateTimeArray[0][0];
-            month = that.data.month || dateTimeArray[1][0];
-            if (column == '0') year = dateTimeArray[0][value];
-            if (column == '1') month = dateTimeArray[1][value];
-            that.setData({ year: year, month: month });
-            // 计算当前选择年月所要显示的日期
-            let ym = that.data.year + '-' + that.data.month;
-            let test = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'];
-            let monthDay = moment(ym).daysInMonth();
-            let thr = test.splice(0, monthDay);
-            that.setData({ 'dateTimeArray[2]': thr })
+            // 时间列表
+            const dateTimeArray = that.data.dateTimeArray;
+            const { column, value } = e.detail
+            let dateTimeTemp = 'valueDateTime[' + column + ']'
+            that.setData({ [dateTimeTemp]: value })
+            // 当前选择的值
+            const valueDateTime = that.data.valueDateTime;
+            that.data.dateTimePicker.setValue({ dateTimeArray: dateTimeArray, dateTime: valueDateTime })
+            for (let i = 1; i < valueDateTime.length; i++) {
+                if (column == i - 1) {
+                    for (let j = i; j < valueDateTime.length; j++) {
+                        let temp = 'valueDateTime[' + j + ']'
+                        that.setData({ [temp]: 0 })
+                    }
+                }
+                let arr = that.data.dateTimePicker.dispatch(i).map(m => m + that.data.unit[i])
+                let temp1 = 'dateTimeArray[' + i + ']';
+                that.setData({ [temp1]: arr })
+            }
+            that.setData({ dateTimeArray: dateTimeArray, valueDateTime: valueDateTime })
         },
     }
-})
-
+})

+ 2 - 2
commpents/datetime-picker/index.wxml

@@ -1,3 +1,3 @@
-<picker mode="multiSelector" value="{{datetime}}" bindchange="change" bindcolumnchange="columnChange" range="{{dateTimeArray}}">
-    <view class="text">{{datetime||'选择日期时间'}}</view>
+<picker mode="multiSelector" value="{{valueDateTime}}" bindchange="change" bindcolumnchange="columnChange" range="{{dateTimeArray}}">
+    <view>{{datetime ||"请选择时间"}}</view>
 </picker>

+ 2 - 1
commpents/mobile-frame/top.less

@@ -1,3 +1,4 @@
+@import (css) "/app.wxss";
 .top {
     float: left;
     width: 100%;
@@ -20,7 +21,7 @@
 
     .cen {
         float: left;
-        width: 70%;
+        width: 60%;
         text-align: center;
         font-size: 36rpx;
         color: #000000;

+ 1 - 1
commpents/mobile-frame/top.wxml

@@ -2,6 +2,6 @@
     <view class="left" style='margin: {{client.getMenu.top}}px 0 0 0;'>
         <cover-image src='/image/back.png' mode='aspectFill' class="back" bindtap='_navback' wx:if="{{frameStyle.leftArrow}}"></cover-image>
     </view>
-    <view class="cen" style='margin: {{client.getMenu.top}}px 0 0 0;'>{{frameStyle.name}}</view>
+    <view class="cen textOver" style='margin: {{client.getMenu.top}}px 0 0 0;'>{{frameStyle.name}}</view>
     <view class="right" style="display: none">右侧</view>
 </view>

+ 2 - 1
commpents/mobile-frame/top.wxss

@@ -1,3 +1,4 @@
+@import "/app.wxss";
 .top {
   float: left;
   width: 100%;
@@ -16,7 +17,7 @@
 }
 .top .cen {
   float: left;
-  width: 70%;
+  width: 60%;
   text-align: center;
   font-size: 36rpx;
   color: #000000;

+ 23 - 0
commpents/pagesMatchs/achieve/achieve-1.js

@@ -0,0 +1,23 @@
+// commpents/pagesMatchs/achieve/achieve-1.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+
+    }
+})

+ 4 - 0
commpents/pagesMatchs/achieve/achieve-1.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 21 - 0
commpents/pagesMatchs/achieve/achieve-1.less

@@ -0,0 +1,21 @@
+@import (css) "/app.wxss";
+
+.main {
+    .one {
+        padding: 2vw;
+        background-color: var(--f1Color);
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 9 - 0
commpents/pagesMatchs/achieve/achieve-1.wxml

@@ -0,0 +1,9 @@
+<view class="main">
+    <scroll-view scroll-y="true" class="scroll-view">
+        <view class="list-scroll-view">
+            <view class="one">
+                小组赛
+            </view>
+        </view>
+    </scroll-view>
+</view>

+ 16 - 0
commpents/pagesMatchs/achieve/achieve-1.wxss

@@ -0,0 +1,16 @@
+@import "/app.wxss";
+.main .one {
+  padding: 2vw;
+  background-color: var(--f1Color);
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 23 - 0
commpents/pagesMatchs/achieve/achieve-2.js

@@ -0,0 +1,23 @@
+// commpents/pagesMatchs/achieve/achieve-2.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+
+    }
+})

+ 4 - 0
commpents/pagesMatchs/achieve/achieve-2.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 21 - 0
commpents/pagesMatchs/achieve/achieve-2.less

@@ -0,0 +1,21 @@
+@import (css) "/app.wxss";
+
+.main {
+    .one {
+        padding: 2vw;
+        background-color: var(--f1Color);
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 9 - 0
commpents/pagesMatchs/achieve/achieve-2.wxml

@@ -0,0 +1,9 @@
+<view class="main">
+    <scroll-view scroll-y="true" class="scroll-view">
+        <view class="list-scroll-view">
+            <view class="one">
+                淘汰赛
+            </view>
+        </view>
+    </scroll-view>
+</view>

+ 16 - 0
commpents/pagesMatchs/achieve/achieve-2.wxss

@@ -0,0 +1,16 @@
+@import "/app.wxss";
+.main .one {
+  padding: 2vw;
+  background-color: var(--f1Color);
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 23 - 0
commpents/pagesMatchs/achieve/achieve-3.js

@@ -0,0 +1,23 @@
+// commpents/pagesMatchs/achieve/achieve-3.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        cList: { typ: Array }
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+
+    }
+})

+ 4 - 0
commpents/pagesMatchs/achieve/achieve-3.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 93 - 0
commpents/pagesMatchs/achieve/achieve-3.less

@@ -0,0 +1,93 @@
+@import (css) "/app.wxss";
+
+.main {
+    .one {
+        padding: 2vw;
+        background-color: var(--f1Color);
+
+        .cList {
+            display: flex;
+            flex-direction: row;
+            background-color: var(--whiteColor);
+            margin: 0 0 2vw 0;
+            padding: 2vw;
+            border-radius: 5px;
+
+            .num {
+                text {
+                    display: inline-block;
+                    width: 12vw;
+                    height: 12vw;
+                    text-align: center;
+                    line-height: 12vw;
+                    border-radius: 50%;
+                    background-color: var(--f2Color);
+                    color: var(--f99Color);
+                    font-size: var(--font16Size);
+                    font-weight: bold;
+                    margin: 0 2vw 0;
+                }
+            }
+
+            .name {
+                text {
+                    display: inline-block;
+                    font-size: var(--font16Size);
+                    padding: 3vw 0;
+                }
+            }
+        }
+
+        .cList:nth-child(1),
+        .cList:nth-child(2),
+        .cList:nth-child(3) {
+            .num {
+                text {
+
+                    color: var(--whiteColor);
+                }
+            }
+        }
+
+        .cList:nth-child(1) {
+            .num {
+                text {
+                    background-color: #FACE30;
+                }
+            }
+        }
+
+        .cList:nth-child(2) {
+            .num {
+                text {
+                    background-color: #CAD0D7;
+                }
+            }
+        }
+
+        .cList:nth-child(3) {
+            .num {
+                text {
+                    background-color: #F9996E;
+                }
+            }
+        }
+
+        .cList:last-child {
+            margin: 0;
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 12 - 0
commpents/pagesMatchs/achieve/achieve-3.wxml

@@ -0,0 +1,12 @@
+<view class="main">
+    <scroll-view scroll-y="true" class="scroll-view">
+        <view class="list-scroll-view">
+            <view class="one">
+                <view class="cList" wx:for="{{cList}}" wx:key="item">
+                    <view class="num"><text>{{item.num}}</text></view>
+                    <view class="name"><text>{{item.name}}</text></view>
+                </view>
+            </view>
+        </view>
+    </scroll-view>
+</view>

+ 59 - 0
commpents/pagesMatchs/achieve/achieve-3.wxss

@@ -0,0 +1,59 @@
+@import "/app.wxss";
+.main .one {
+  padding: 2vw;
+  background-color: var(--f1Color);
+}
+.main .one .cList {
+  display: flex;
+  flex-direction: row;
+  background-color: var(--whiteColor);
+  margin: 0 0 2vw 0;
+  padding: 2vw;
+  border-radius: 5px;
+}
+.main .one .cList .num text {
+  display: inline-block;
+  width: 12vw;
+  height: 12vw;
+  text-align: center;
+  line-height: 12vw;
+  border-radius: 50%;
+  background-color: var(--f2Color);
+  color: var(--f99Color);
+  font-size: var(--font16Size);
+  font-weight: bold;
+  margin: 0 2vw 0;
+}
+.main .one .cList .name text {
+  display: inline-block;
+  font-size: var(--font16Size);
+  padding: 3vw 0;
+}
+.main .one .cList:nth-child(1) .num text,
+.main .one .cList:nth-child(2) .num text,
+.main .one .cList:nth-child(3) .num text {
+  color: var(--whiteColor);
+}
+.main .one .cList:nth-child(1) .num text {
+  background-color: #FACE30;
+}
+.main .one .cList:nth-child(2) .num text {
+  background-color: #CAD0D7;
+}
+.main .one .cList:nth-child(3) .num text {
+  background-color: #F9996E;
+}
+.main .one .cList:last-child {
+  margin: 0;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 24 - 0
commpents/pagesMatchs/match/match-1.js

@@ -0,0 +1,24 @@
+// commpents/pagesMatch/match/match-1.js
+const app = getApp()
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        info: { type: Object },
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+        fileUrl: app.globalData.fileUrl,
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+
+    }
+})

+ 4 - 0
commpents/pagesMatchs/match/match-1.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 99 - 0
commpents/pagesMatchs/match/match-1.less

@@ -0,0 +1,99 @@
+@import (css) "/app.wxss";
+
+.main {
+    .one {
+        padding: 2vw;
+        width: 96vw;
+
+        .image {
+            width: 100%;
+            height: 160px;
+        }
+    }
+
+    .two {
+        padding: 0 2vw;
+        width: 96vw;
+
+        .two_1 {
+            background-color: var(--mainColor);
+            margin: 0 0 3vw 0;
+            border-radius: 5px;
+            padding: 2vw;
+            box-shadow: 0 0 1vw var(--fcColor);
+
+            .name {
+                font-size: var(--font18Szie);
+                font-weight: bold;
+                margin: 0 0 2vw 0;
+            }
+
+            .status {
+                margin: 0 0 2vw 0;
+
+                text {
+                    display: inline-block;
+                    background-color: var(--redColor);
+                    color: var(--whiteColor);
+                    padding: 1vw 3vw;
+                    border-radius: 5px;
+                }
+            }
+
+            .other {
+                .other_1 {
+                    margin: 0 0 1vw 0;
+                    font-size: var(--font16Szie);
+                    color: var(--f85Color);
+                    padding: 0.5vw 0;
+
+                    .icon {
+                        margin: 0 2vw 0 0;
+                    }
+
+                    .money {
+                        color: var(--redColor) !important;
+                        font-weight: bold;
+                    }
+
+                    text:last-child {
+                        color: var(--blackColor);
+                    }
+
+                }
+            }
+        }
+
+        .two_2 {
+            margin: 0;
+
+            .two_2_1 {
+                margin: 0 0 1vw 0;
+
+                .txt {
+                    font-size: var(--font16Szie);
+                    margin: 0 0 1vw 0;
+                }
+
+                .cont {
+                    font-size: var(--font14Szie);
+                    color: var(--f85Color);
+                    text-indent: 1rem;
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 64 - 0
commpents/pagesMatchs/match/match-1.wxml

@@ -0,0 +1,64 @@
+
+<view class="main">
+    <scroll-view scroll-y="true" class="scroll-view">
+        <view class="list-scroll-view">
+            <view class="one">
+                <image class="image" src="{{fileUrl}}/files/court/elimg/20220729140648.png"></image>
+            </view>
+            <view class="two">
+                <view class="two_1">
+                    <view class="name">{{info.name||'暂无'}}</view>
+                    <view class="status"><text>{{info.zhStatus||'暂无'}}</text></view>
+                    <view class="other">
+                        <view class="other_1">
+                            <text>赛事类别:</text>
+                            <text>{{info.zhtype||'暂无'}}</text>
+                        </view>
+                        <view class="other_1">
+                            <text>比赛时间:</text>
+                            <text>{{info.start_time||'暂无'}}至{{info.end_time||'暂无'}}</text>
+                        </view>
+                        <view class="other_1">
+                            <text>赛事赛制:</text>
+                            <text>{{info.zhFormat||'暂无'}}</text>
+                        </view>
+                        <view class="other_1">
+                            <text>报名截止时间:</text>
+                            <text>{{info.sign_time||'暂无'}}</text>
+                        </view>
+                        <view class="other_1">
+                            <text>比赛地点:</text>
+                            <text>{{info.address||'暂无'}}</text>
+                        </view>
+                        <view class="other_1">
+                            <text>报名费用(元):</text>
+                            <text class="money">{{info.money||'暂无'}}</text>
+                        </view>
+                        <view class="other_1">
+                            <text>报名费用说明:</text>
+                            <text>{{info.money_remark||'暂无'}}</text>
+                        </view>
+                        <view class="other_1">
+                            <text>付款方式:</text>
+                            <text>{{info.money_mode||'暂无'}}</text>
+                        </view>
+                        <view class="other_1">
+                            <text>联系方式:</text>
+                            <text>{{info.contact||'暂无'}}</text>
+                        </view>
+                    </view>
+                </view>
+                <view class="two_1 two_2">
+                    <view class="two_2_1">
+                        <view class="txt">报名说明:</view>
+                        <view class="cont">{{info.explain||'暂无'}}</view>
+                    </view>
+                    <view class="two_2_1">
+                        <view class="txt">赛事规程:</view>
+                        <rich-text nodes="{{info.zhRegular||'暂无'}}"></rich-text>
+                    </view>
+                </view>
+            </view>
+        </view>
+    </scroll-view>
+</view>

+ 77 - 0
commpents/pagesMatchs/match/match-1.wxss

@@ -0,0 +1,77 @@
+@import "/app.wxss";
+.main .one {
+  padding: 2vw;
+  width: 96vw;
+}
+.main .one .image {
+  width: 100%;
+  height: 160px;
+}
+.main .two {
+  padding: 0 2vw;
+  width: 96vw;
+}
+.main .two .two_1 {
+  background-color: var(--mainColor);
+  margin: 0 0 3vw 0;
+  border-radius: 5px;
+  padding: 2vw;
+  box-shadow: 0 0 1vw var(--fcColor);
+}
+.main .two .two_1 .name {
+  font-size: var(--font18Szie);
+  font-weight: bold;
+  margin: 0 0 2vw 0;
+}
+.main .two .two_1 .status {
+  margin: 0 0 2vw 0;
+}
+.main .two .two_1 .status text {
+  display: inline-block;
+  background-color: var(--redColor);
+  color: var(--whiteColor);
+  padding: 1vw 3vw;
+  border-radius: 5px;
+}
+.main .two .two_1 .other .other_1 {
+  margin: 0 0 1vw 0;
+  font-size: var(--font16Szie);
+  color: var(--f85Color);
+  padding: 0.5vw 0;
+}
+.main .two .two_1 .other .other_1 .icon {
+  margin: 0 2vw 0 0;
+}
+.main .two .two_1 .other .other_1 .money {
+  color: var(--redColor) !important;
+  font-weight: bold;
+}
+.main .two .two_1 .other .other_1 text:last-child {
+  color: var(--blackColor);
+}
+.main .two .two_2 {
+  margin: 0;
+}
+.main .two .two_2 .two_2_1 {
+  margin: 0 0 1vw 0;
+}
+.main .two .two_2 .two_2_1 .txt {
+  font-size: var(--font16Szie);
+  margin: 0 0 1vw 0;
+}
+.main .two .two_2 .two_2_1 .cont {
+  font-size: var(--font14Szie);
+  color: var(--f85Color);
+  text-indent: 1rem;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 33 - 0
commpents/pagesMatchs/match/match-2.js

@@ -0,0 +1,33 @@
+// commpents/pagesMatchs/match/match-2.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        playerList: { type: Object },
+        playerIndex: { type: String },
+        playerIndexs: { type: String }
+    },
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        onePayer: function (e) {
+            const that = this;
+            let index = e.currentTarget.dataset.index;
+            that.triggerEvent('onePayer', index)
+        },
+        twoPayer: function (e) {
+            const that = this;
+            let index = e.currentTarget.dataset.index;
+            that.triggerEvent('twoPayer', index)
+        }
+    }
+})

+ 4 - 0
commpents/pagesMatchs/match/match-2.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 81 - 0
commpents/pagesMatchs/match/match-2.less

@@ -0,0 +1,81 @@
+@import (css) "/app.wxss";
+
+.main {
+    .one {
+        .list {
+            .list_1 {
+                display: flex;
+                justify-content: space-between;
+                padding: 2vw;
+                margin: 0 0 1vw 0;
+                background-color: var(--whiteColor);
+                border-bottom: 1px solid var(--f1Color);
+
+                .name {
+                    font-size: var(--font16Size);
+                }
+
+            }
+
+            .list_2 {
+                .project {
+                    .project_1 {
+                        display: flex;
+                        justify-content: space-between;
+                        padding: 2vw 4vw;
+                        margin: 0 0 1vw 0;
+                        background-color: var(--whiteColor);
+                        border-bottom: 1px solid var(--f1Color);
+
+                        .name {
+                            font-size: var(--font16Size);
+                        }
+                    }
+
+                    .project_2 {
+                        .personal {
+                            display: flex;
+                            flex-direction: row;
+                            justify-content: space-between;
+                            flex-wrap: wrap;
+
+                            .user {
+                                background-color: var(--f1Color);
+                                width: 21vw;
+                                text-align: center;
+                                margin: 0 2vw 2vw 2vw;
+                                border-radius: 4px;
+
+                                .icon {
+                                    width: 15vw;
+                                    height: 15vw;
+                                    margin: 2vw 0 1vw 0;
+                                    border-radius: 50%;
+
+                                }
+
+                                .name {
+                                    font-size: var(--font14Size);
+                                    padding: 0 0 2vw 0;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 34 - 0
commpents/pagesMatchs/match/match-2.wxml

@@ -0,0 +1,34 @@
+<view class="main">
+    <scroll-view scroll-y="true" class="scroll-view">
+        <view class="list-scroll-view">
+            <view class="one">
+                <view class="list" wx:for="{{playerList.group}}" wx:key="item">
+                    <view class="list_1" bindtap="onePayer" data-index="{{ index }}">
+                        <view class="name">{{item.name}}({{item.age}}岁)</view>
+                        <view class="icon">
+                            <text class="iconfont {{playerIndex == index ? 'icon-jiantou_liebiaozhankai' : 'icon-jiantou_liebiaoxiangyou'}}"></text>
+                        </view>
+                    </view>
+                    <view class="list_2" wx:if="{{playerIndex == index}}">
+                        <view class='project' wx:for="{{item.project}}" wx:key="item" bindtap="twoPayer" data-index="{{ index }}">
+                            <view class="project_1">
+                                <view class='name'>{{item.name}}( {{item.user.length||'0'}}人)</view>
+                                <view class="icon">
+                                    <text class="iconfont {{playerIndexs == index ? 'icon-jiantou_liebiaozhankai' : 'icon-jiantou_liebiaoxiangyou'}}"></text>
+                                </view>
+                            </view>
+                            <view class="project_2" wx:if="{{playerIndexs == index}}">
+                                <view class="personal">
+                                    <view class="user" wx:for="{{item.user}}" wx:key="item">
+                                        <image class="icon" src="{{item.icon&&item.icon.length>0?item.icon[0].url:''}}"></image>
+                                        <view class="name textOver">{{ item.name }}</view>
+                                    </view>
+                                </view>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </view>
+    </scroll-view>
+</view>

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

@@ -0,0 +1,57 @@
+@import "/app.wxss";
+.main .one .list .list_1 {
+  display: flex;
+  justify-content: space-between;
+  padding: 2vw;
+  margin: 0 0 1vw 0;
+  background-color: var(--whiteColor);
+  border-bottom: 1px solid var(--f1Color);
+}
+.main .one .list .list_1 .name {
+  font-size: var(--font16Size);
+}
+.main .one .list .list_2 .project .project_1 {
+  display: flex;
+  justify-content: space-between;
+  padding: 2vw 4vw;
+  margin: 0 0 1vw 0;
+  background-color: var(--whiteColor);
+  border-bottom: 1px solid var(--f1Color);
+}
+.main .one .list .list_2 .project .project_1 .name {
+  font-size: var(--font16Size);
+}
+.main .one .list .list_2 .project .project_2 .personal {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  flex-wrap: wrap;
+}
+.main .one .list .list_2 .project .project_2 .personal .user {
+  background-color: var(--f1Color);
+  width: 21vw;
+  text-align: center;
+  margin: 0 2vw 2vw 2vw;
+  border-radius: 4px;
+}
+.main .one .list .list_2 .project .project_2 .personal .user .icon {
+  width: 15vw;
+  height: 15vw;
+  margin: 2vw 0 1vw 0;
+  border-radius: 50%;
+}
+.main .one .list .list_2 .project .project_2 .personal .user .name {
+  font-size: var(--font14Size);
+  padding: 0 0 2vw 0;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 36 - 0
commpents/pagesMatchs/match/match-3.js

@@ -0,0 +1,36 @@
+// commpents/pagesMatchs/match/match-3.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        cType: { type: String },
+        cList: { type: Array },
+    },
+    /**
+     * 组件的初始数据
+     */
+    data: {
+    },
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        // 秩序册
+        cChange: function (e) {
+            const that = this;
+            const { ctype } = e.currentTarget.dataset;
+            that.triggerEvent('cChange', ctype)
+        },
+        cinputSearch: function (e) {
+            const that = this;
+            let name = e.detail.value
+            that.triggerEvent('cinputSearch', name)
+        },
+        toAchieve: function (e) {
+            const that = this;
+            const { item } = e.currentTarget.dataset;
+            that.triggerEvent('toAchieve', item)
+        },
+    }
+})

+ 4 - 0
commpents/pagesMatchs/match/match-3.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

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

@@ -0,0 +1,138 @@
+@import (css) "/app.wxss";
+
+.main {
+    .one {
+        display: flex;
+        width: 96vw;
+        padding: 2vw;
+        background: var(--f1Color);
+        margin: 0 0 1vw 0;
+
+        .one_1 {
+            width: 25vw;
+
+            button {
+                width: 100%;
+                padding: 2vw 1vw;
+                font-size: var(--font14Size);
+            }
+        }
+
+        .one_2 {
+            flex-grow: 1;
+
+            input {
+                width: 96%;
+                border: 1px solid var(--f85Color);
+                padding: 1.5vw 1vw;
+                border-radius: 5px;
+            }
+        }
+    }
+
+    .two {
+        flex-grow: 1;
+        width: 96vw;
+        height: 74.5vh;
+        position: relative;
+        margin: 0 2vw;
+
+        .list {
+            background-color: var(--greenColor);
+            margin: 0 0 2vw 0;
+            padding: 2vw;
+
+            .list_1 {
+                .name {
+                    color: var(--whiteColor);
+                    padding: 0 0 2vw 0;
+                    font-size: 16px;
+
+                    text {
+                        padding: 0 2vw 0 0;
+                    }
+                }
+
+                .pk {
+                    display: flex;
+                    flex-direction: row;
+                    justify-content: space-between;
+                    background-color: var(--whiteColor);
+
+
+                    .pk_1 {
+                        text-align: center;
+                        flex-grow: 1;
+                        padding: 2vw 0;
+                    }
+
+                    .pk_2 {
+                        width: 30vw;
+                        text-align: center;
+                        box-shadow: 0 0 5px var(--f1Color);
+
+                        .time {
+                            padding: 1vw 0;
+                            background-color: var(--greenColor);
+                            color: var(--whiteColor);
+                            font-size: var(--font14Size);
+                        }
+
+                        .score {
+                            padding: 2vw 0;
+                            font-size: var(--font16Size);
+                            font-weight: bold;
+                        }
+                    }
+                }
+            }
+
+            .list_2 {
+                .name {
+                    color: var(--whiteColor);
+                    padding: 0 0 2vw 0;
+                    font-size: var(--font16Size);
+
+                    text {
+                        padding: 0 2vw 0 0;
+                    }
+                }
+
+                .person {
+                    display: flex;
+                    justify-content: space-between;
+                    flex-wrap: wrap;
+                    padding: 2vw 2vw 0 2vw;
+                    background-color: var(--whiteColor);
+
+                    .personList {
+                        width: 23vw;
+                        padding: 1.5vw;
+                        margin: 0 0 2vw 0;
+                        text-align: center;
+                        box-shadow: 0 0 2px var(--f85Color);
+                        border-radius: 4px;
+
+                        .list_1 {
+                            color: var(--greenColor);
+                            font-weight: bold;
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 56 - 0
commpents/pagesMatchs/match/match-3.wxml

@@ -0,0 +1,56 @@
+<view class="main">
+    <view class="one">
+        <view class="one_1">
+            <button type="primary" bindtap="cChange" wx:if="{{cType=='1'}}" data-ctype="{{0}}">查看场次表</button>
+            <button type="primary" bindtap="cChange" wx:if="{{cType=='0'}}" data-ctype="{{1}}">查看对阵表</button>
+        </view>
+        <view class="one_2">
+            <input type="text" value="{{cSearch}}" bindinput="cinputSearch" placeholder="{{cType=='0'?'请输入队友姓名':'请输入项目名称'}}" />
+        </view>
+    </view>
+    <view class="two">
+        <scroll-view scroll-y="true" class="scroll-view">
+            <view class="list-scroll-view">
+                <view class="list" wx:for="{{cList}}" wx:key="item" data-item="{{item}}">
+                    <view class="list_1" wx:if="{{cType=='0'}}">
+                        <view class="name">
+                            <text>{{item.group_id_name}}</text>
+                            <text>{{item.project_id_name}}</text>
+                            <text>{{item.team_id_name}}</text>
+                            <text>{{item.address_id_name}}</text>
+                        </view>
+                        <view class="pk">
+                            <view class="pk_1">
+                                <view>{{item.one_one||''||item.player_one_name}}</view>
+                                <view>{{item.one_two||''}}</view>
+                            </view>
+                            <view class="pk_2">
+                                <view class="time">{{item.match_time}}</view>
+                                <view class="score"><text>{{item.player_one_score||0}}</text>-{{item.player_two_score||0}}</view>
+                            </view>
+                            <view class="pk_1">
+                                <view>{{item.two_one||''||item.player_two_name}}</view>
+                                <view>{{item.two_two||''}}</view>
+                            </view>
+                        </view>
+                    </view>
+                    <view class="list_2" wx:elif="{{cType=='1'}}">
+                        <view class="name" bindtap="toAchieve" data-item="{{item}}">
+                            <text>{{item.group_id_name}}({{item.age}}岁)</text>
+                            <text>{{item.project_id_name}}({{item.projectAge}},{{item.pojectGender}})</text>
+                            <text>{{item.name}}</text>
+                        </view>
+                        <view class="person">
+                            <view class="personList" wx:for="{{item.person}}" wx:key="item">
+                                <view class="list_1">
+                                    <view>{{item.one||''||item.name}}</view>
+                                    <view>{{item.two||''}}</view>
+                                </view>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </scroll-view>
+    </view>
+</view>

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

@@ -0,0 +1,110 @@
+@import "/app.wxss";
+.main .one {
+  display: flex;
+  width: 96vw;
+  padding: 2vw;
+  background: var(--f1Color);
+  margin: 0 0 1vw 0;
+}
+.main .one .one_1 {
+  width: 25vw;
+}
+.main .one .one_1 button {
+  width: 100%;
+  padding: 2vw 1vw;
+  font-size: var(--font14Size);
+}
+.main .one .one_2 {
+  flex-grow: 1;
+}
+.main .one .one_2 input {
+  width: 96%;
+  border: 1px solid var(--f85Color);
+  padding: 1.5vw 1vw;
+  border-radius: 5px;
+}
+.main .two {
+  flex-grow: 1;
+  width: 96vw;
+  height: 74.5vh;
+  position: relative;
+  margin: 0 2vw;
+}
+.main .two .list {
+  background-color: var(--greenColor);
+  margin: 0 0 2vw 0;
+  padding: 2vw;
+}
+.main .two .list .list_1 .name {
+  color: var(--whiteColor);
+  padding: 0 0 2vw 0;
+  font-size: 16px;
+}
+.main .two .list .list_1 .name text {
+  padding: 0 2vw 0 0;
+}
+.main .two .list .list_1 .pk {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  background-color: var(--whiteColor);
+}
+.main .two .list .list_1 .pk .pk_1 {
+  text-align: center;
+  flex-grow: 1;
+  padding: 2vw 0;
+}
+.main .two .list .list_1 .pk .pk_2 {
+  width: 30vw;
+  text-align: center;
+  box-shadow: 0 0 5px var(--f1Color);
+}
+.main .two .list .list_1 .pk .pk_2 .time {
+  padding: 1vw 0;
+  background-color: var(--greenColor);
+  color: var(--whiteColor);
+  font-size: var(--font14Size);
+}
+.main .two .list .list_1 .pk .pk_2 .score {
+  padding: 2vw 0;
+  font-size: var(--font16Size);
+  font-weight: bold;
+}
+.main .two .list .list_2 .name {
+  color: var(--whiteColor);
+  padding: 0 0 2vw 0;
+  font-size: var(--font16Size);
+}
+.main .two .list .list_2 .name text {
+  padding: 0 2vw 0 0;
+}
+.main .two .list .list_2 .person {
+  display: flex;
+  justify-content: space-between;
+  flex-wrap: wrap;
+  padding: 2vw 2vw 0 2vw;
+  background-color: var(--whiteColor);
+}
+.main .two .list .list_2 .person .personList {
+  width: 23vw;
+  padding: 1.5vw;
+  margin: 0 0 2vw 0;
+  text-align: center;
+  box-shadow: 0 0 2px var(--f85Color);
+  border-radius: 4px;
+}
+.main .two .list .list_2 .person .personList .list_1 {
+  color: var(--greenColor);
+  font-weight: bold;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 28 - 0
commpents/pagesMatchs/match/match-4.js

@@ -0,0 +1,28 @@
+// commpents/pagesMatchs/match/match-4.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        dTabs: { type: Object },
+        dList: { type: Array }
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        dtabsChange: function (e) {
+            const that = this;
+            const { active } = e.detail;
+            that.triggerEvent('dtabsChange', active)
+        },
+    }
+})

+ 6 - 0
commpents/pagesMatchs/match/match-4.json

@@ -0,0 +1,6 @@
+{
+    "component": true,
+    "usingComponents": {
+        "s-tab": "/commpents/tabs/index"
+    }
+}

+ 82 - 0
commpents/pagesMatchs/match/match-4.less

@@ -0,0 +1,82 @@
+@import (css) "/app.wxss";
+
+.main {
+    .one {
+        width: 100vw;
+        margin: 1vw 0;
+    }
+
+    .two {
+        width: 94vw;
+        position: relative;
+        flex-grow: 1;
+        height: 74.5vh;
+        margin: 0 2vw;
+
+        .list {
+            background-color: #328d26;
+            margin: 0 0 2vw 0;
+            padding: 2vw;
+
+            .list_0 {
+                .name {
+                    padding: 1vw 0;
+                    color: var(--whiteColor);
+                    margin: 0 0 1vw 0;
+
+                    text {
+                        padding: 0 2vw 0 0;
+                    }
+                }
+
+                .pk {
+                    display: flex;
+                    flex-direction: row;
+                    justify-content: space-around;
+                    background-color: var(--whiteColor);
+
+                    .pk_1 {
+                        width: 30vw;
+                        text-align: center;
+                        padding: 2vw;
+                    }
+
+                    .pk_2 {
+                        text-align: center;
+                        box-shadow: 0 0 5px var(--fcColor);
+
+                        .time {
+                            background-color: #328d26;
+                            color: var(--whiteColor);
+                            padding: 1vw 0;
+                            font-size: var(--font14Size);
+                        }
+
+                        .score {
+                            font-size: var(--font20Szie);
+                            padding: 1vw 0;
+                            font-weight: bold;
+                        }
+                    }
+                }
+            }
+        }
+
+        .list:last-child {
+            margin: 0;
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 37 - 0
commpents/pagesMatchs/match/match-4.wxml

@@ -0,0 +1,37 @@
+<view class="main">
+    <view class="one">
+        <s-tab tabs="{{dTabs}}" bind:tabsChange="dtabsChange"></s-tab>
+    </view>
+    <view class="two" wx:if="{{fieldtabs.active==active}}">
+        <scroll-view scroll-y="true" class="scroll-view">
+            <view class="list-scroll-view">
+                <view class="list" wx:for="{{dList}}" wx:key="item">
+                    <view class="list_0">
+                        <view class="name">
+                            <text>{{item.group_id_name}}</text>
+                            <text>{{item.project_id_name}}</text>
+                            <text>{{item.team_id_name}}</text>
+                            <text>{{item.address_id_name}}</text>
+                        </view>
+                        <view class="pk">
+                            <view class="pk_1">
+                                <text wx:if="{{item.is_change=='0'}}">{{item.player_one_name}}</text>
+                                <text wx:if="{{item.is_change=='1'}}">{{item.player_two_name}}</text>
+                            </view>
+                            <view class="pk_2">
+                                <view class="time">{{item.match_time}}</view>
+                                <view class="status">{{item.zhStatus}}</view>
+                                <view class="score" wx:if="{{item.is_change=='0'}}"><text>{{item.player_one_score||0}}</text>-{{item.player_two_score||0}}</view>
+                                <view class="score" wx:if="{{item.is_change=='1'}}"><text>{{item.player_two_score||0}}</text>-{{item.player_one_score||0}}</view>
+                            </view>
+                            <view class="pk_1">
+                                <text wx:if="{{item.is_change=='0'}}">{{item.player_two_name}}</text>
+                                <text wx:if="{{item.is_change=='1'}}">{{item.player_one_name}}</text>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </scroll-view>
+    </view>
+</view>

+ 65 - 0
commpents/pagesMatchs/match/match-4.wxss

@@ -0,0 +1,65 @@
+@import "/app.wxss";
+.main .one {
+  width: 100vw;
+  margin: 1vw 0;
+}
+.main .two {
+  width: 94vw;
+  position: relative;
+  flex-grow: 1;
+  height: 74.5vh;
+  margin: 0 2vw;
+}
+.main .two .list {
+  background-color: #328d26;
+  margin: 0 0 2vw 0;
+  padding: 2vw;
+}
+.main .two .list .list_0 .name {
+  padding: 1vw 0;
+  color: var(--whiteColor);
+  margin: 0 0 1vw 0;
+}
+.main .two .list .list_0 .name text {
+  padding: 0 2vw 0 0;
+}
+.main .two .list .list_0 .pk {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+  background-color: var(--whiteColor);
+}
+.main .two .list .list_0 .pk .pk_1 {
+  width: 30vw;
+  text-align: center;
+  padding: 2vw;
+}
+.main .two .list .list_0 .pk .pk_2 {
+  text-align: center;
+  box-shadow: 0 0 5px var(--fcColor);
+}
+.main .two .list .list_0 .pk .pk_2 .time {
+  background-color: #328d26;
+  color: var(--whiteColor);
+  padding: 1vw 0;
+  font-size: var(--font14Size);
+}
+.main .two .list .list_0 .pk .pk_2 .score {
+  font-size: var(--font20Szie);
+  padding: 1vw 0;
+  font-weight: bold;
+}
+.main .two .list:last-child {
+  margin: 0;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 26 - 0
commpents/pagesMatchs/match/match-5.js

@@ -0,0 +1,26 @@
+// commpents/pagesMatchs/match/match-5.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        achieveList: { type: Array },
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        toAchieve: function (e) {
+            const that = this;
+            const { item } = e.currentTarget.dataset;
+            that.triggerEvent('toAchieve', item)
+        },
+    }
+})

+ 4 - 0
commpents/pagesMatchs/match/match-5.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 38 - 0
commpents/pagesMatchs/match/match-5.less

@@ -0,0 +1,38 @@
+@import (css) "/app.wxss";
+
+.main {
+    .one {
+        width: 100vw;
+        background-color: var(--whiteColor);
+
+        .list {
+            display: flex;
+            flex-direction: row;
+            justify-content: space-between;
+            padding: 2vw;
+            background-color: var(--f1Color);
+            border-bottom: 1px solid var(--whiteColor);
+
+            .name {
+                text {
+                    font-size: var(--font16Size);
+                    padding: 0 2vw 0 0;
+                }
+            }
+
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 17 - 0
commpents/pagesMatchs/match/match-5.wxml

@@ -0,0 +1,17 @@
+<view class="main">
+    <scroll-view scroll-y="true" class="scroll-view">
+        <view class="list-scroll-view">
+            <view class="one">
+                <view class="list" wx:for="{{achieveList}}" wx:key="item" bindtap="toAchieve" data-item="{{item}}">
+                    <view class="name">
+                        <text>{{item.group_id_name}}</text>
+                        <text>{{item.name}}</text>
+                    </view>
+                    <view class="icon">
+                        <text class="iconfont icon-jiantou_liebiaoxiangyou"></text>
+                    </view>
+                </view>
+            </view>
+        </view>
+    </scroll-view>
+</view>

+ 28 - 0
commpents/pagesMatchs/match/match-5.wxss

@@ -0,0 +1,28 @@
+@import "/app.wxss";
+.main .one {
+  width: 100vw;
+  background-color: var(--whiteColor);
+}
+.main .one .list {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  padding: 2vw;
+  background-color: var(--f1Color);
+  border-bottom: 1px solid var(--whiteColor);
+}
+.main .one .list .name text {
+  font-size: var(--font16Size);
+  padding: 0 2vw 0 0;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 1 - 1
commpents/tabs/index.less

@@ -10,7 +10,7 @@
 
         .list_1 {
             padding: 3vw 0;
-            font-size: var(--font16Size);
+            font-size: var(--font15Size);
 
         }
     }

+ 1 - 1
commpents/tabs/index.wxss

@@ -10,7 +10,7 @@
 }
 .main .list .list_1 {
   padding: 3vw 0;
-  font-size: var(--font16Size);
+  font-size: var(--font15Size);
 }
 .main .active {
   border-bottom: 2px solid var(--blackColor);

File diff suppressed because it is too large
+ 15 - 4
icon/icon.wxss


+ 6 - 7
pages/match/index.js

@@ -33,7 +33,6 @@ Page({
                         wx.navigateTo({ url: `/pagesMatch/system/index` })
                     } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }); }
                 }
-
             },
             fail: async res => {
                 wx.redirectTo({ url: '/pages/index/index' })
@@ -50,7 +49,7 @@ Page({
     typeChange: function (e) {
         const that = this;
         let data = that.data.typeList[e.detail.value];
-        if (data) that.setData({ 'searchInfo.type': data.value })
+        if (data) that.setData({ 'searchInfo.type': data.value, 'searchInfo.zhType': data.label })
         that.setData({ skip: 0, page: 0, list: [] })
         that.watchLogin();
     },
@@ -58,7 +57,7 @@ Page({
     statusChange: function (e) {
         const that = this;
         let data = that.data.statusList[e.detail.value];
-        that.setData({ 'searchInfo.status': data.value });
+        that.setData({ 'searchInfo.status': data.value, 'searchInfo.zhStatus': data.label });
         that.setData({ skip: 0, page: 0, list: [] })
         that.watchLogin();
     },
@@ -102,14 +101,14 @@ Page({
         arr = await app.$get(`/dict`, { code: "match_status" });
         if (arr.errcode == '0' && arr.total > 0) {
             let list = arr.data[0].list;
-            list.push({ label: '全部', value: '' });
+            list.unshift({ label: '全部', value: '100' });
             that.setData({ statusList: list });
         }
         // 赛事类别
         arr = await app.$get(`/dict`, { code: "match_type" });
         if (arr.errcode == '0' && arr.total > 0) {
             let list = arr.data[0].list;
-            list.push({ label: '全部', value: '' });
+            list.unshift({ label: '全部', value: '100' });
             that.setData({ typeList: list });
         }
     },
@@ -124,8 +123,8 @@ Page({
             success: async res => {
                 that.setData({ user: res.data })
                 let info = { skip: that.data.skip, limit: that.data.limit };
-                if (searchInfo.status) info.status = searchInfo.status;
-                if (searchInfo.type) info.type = searchInfo.type;
+                if (searchInfo.status && searchInfo.status != '100') info.status = searchInfo.status;
+                if (searchInfo.type && searchInfo.type != '100') info.type = searchInfo.type;
                 const arr = await app.$get(`/match`, { ...info }, 'race');
                 if (arr.errcode == '0') {
                     for (const val of arr.data) {

+ 2 - 2
pages/match/index.wxml

@@ -12,12 +12,12 @@
             <view class="one_2">
                 <view class="one_2_1">
                     <picker mode="selector" bindchange="typeChange" value="{{searchInfo.type}}" name="type" range-key='label' range="{{typeList}}">
-                        <view class="input">{{typeList[searchInfo.type].label||'请选择赛事类别'}}</view>
+                        <view class="input">{{searchInfo.zhType||'请选择赛事类别'}}</view>
                     </picker>
                 </view>
                 <view class="one_2_2">
                     <picker mode="selector" bindchange="statusChange" value="{{searchInfo.status}}" name="status" range-key='label' range="{{statusList}}">
-                        <view class="input">{{statusList[searchInfo.status].label||'请选择比赛状态'}}</view>
+                        <view class="input">{{searchInfo.zhStatus||'请选择比赛状态'}}</view>
                     </picker>
                 </view>
             </view>

+ 1 - 1
pages/test/index.js

@@ -13,7 +13,7 @@ Page({
         img_url: [],
         // dialog弹框
         dialog: { title: '弹框标题', show: false, type: '1' },
-        form: {}
+        form: {},
     },
     initValidate() {
         const rules = { start_time: { required: true } }

+ 97 - 0
pagesMatch/match/achieve.js

@@ -0,0 +1,97 @@
+const app = getApp();
+Page({
+    data: {
+        frameStyle: { useTop: true, name: '赛事信息', leftArrow: true, useBar: false },
+        options: {},
+        // 选项卡
+        tabs: {
+            active: 'a',
+            menu: [
+                { title: '小组赛', active: 'a' },
+                { title: '淘汰赛', active: 'b' },
+                { title: '名次', active: 'c' },
+            ],
+        },
+        // 赛事信息
+        info: {},
+        // 名次
+        cList: [
+            { num: 1, name: '顾红伟' },
+            { num: 2, name: '顾红伟' },
+            { num: 3, name: '顾红伟' },
+            { num: 4, name: '顾红伟' },
+        ]
+    },
+    // 返回
+    back: function () { wx.navigateBack({ delta: 1 }) },
+    // 选项卡
+    tabsChange: function (e) {
+        const that = this;
+        that.setData({ 'tabs.active': e.detail.active });
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: async function (options) {
+        const that = this;
+        that.setData({ options: { match_id: options && options.match_id || '', group_id: options && options.group_id || '', project_id: options && options.project_id || '' } });
+        // 监听用户是否登录
+        await that.watchLogin();
+    },
+    watchLogin: async function () {
+        const that = this;
+        const { match_id, group_id, project_id } = that.data.options
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                // 赛事信息
+                let arr = await app.$get(`/match/${match_id}`, {}, 'race');
+                if (arr.errcode == '0') {
+                    that.setData({ info: arr.data });
+                    that.setData({ 'frameStyle.name': arr.data.name })
+                }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () { },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 10 - 0
pagesMatch/match/achieve.json

@@ -0,0 +1,10 @@
+{
+    "component": true,
+    "usingComponents": {
+        "mobile-main": "/commpents/mobile-frame/index",
+        "achieve-1": "/commpents/pagesMatchs/achieve/achieve-1",
+        "achieve-2": "/commpents/pagesMatchs/achieve/achieve-2",
+        "achieve-3": "/commpents/pagesMatchs/achieve/achieve-3",
+        "s-tab": "/commpents/tabs/index"
+    }
+}

+ 28 - 0
pagesMatch/match/achieve.less

@@ -0,0 +1,28 @@
+@import (css) "/app.wxss";
+
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        width: 100vw;
+    }
+
+    .two {
+        position: relative;
+        flex-grow: 1;
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 18 - 0
pagesMatch/match/achieve.wxml

@@ -0,0 +1,18 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <s-tab tabs="{{tabs}}" bind:tabsChange="tabsChange"></s-tab>
+        </view>
+        <view class="two">
+            <view wx:if="{{tabs.active=='a'}}" class="a">
+                <achieve-1></achieve-1>
+            </view>
+            <view wx:elif="{{tabs.active=='b'}}" class="a b">
+                <achieve-2></achieve-2>
+            </view>
+            <view wx:elif="{{tabs.active=='c'}}" class="a c">
+                <achieve-3 cList="{{cList}}"></achieve-3>
+            </view>
+        </view>
+    </view>
+</mobile-main>

+ 23 - 0
pagesMatch/match/achieve.wxss

@@ -0,0 +1,23 @@
+@import "/app.wxss";
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  width: 100vw;
+}
+.main .two {
+  position: relative;
+  flex-grow: 1;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 226 - 34
pagesMatch/match/info.js

@@ -2,10 +2,6 @@ const app = getApp();
 Page({
     data: {
         frameStyle: { useTop: true, name: '赛事信息', leftArrow: true, useBar: false },
-        fileUrl: app.globalData.fileUrl,
-        id: '',
-        info: {},
-        user: {},
         // 选项卡
         tabs: {
             active: 'a',
@@ -17,37 +13,142 @@ Page({
                 { title: '成绩册', active: 'e' },
             ],
         },
-        // 状态
-        statusList: []
+        // 用户信息
+        user: {},
+        // 赛事id
+        id: '',
+        // 赛事信息
+        info: {},
+        // 赛事选手
+        playerList: [],
+        // 第一层手风琴
+        playerIndex: 99999,
+        // 第二层手风琴
+        playerIndexs: 99999,
+        // 秩序册
+        cType: '0',
+        cList: [],
+        cSearchname: '',
+        raceteamList: [],
+        raceList: [],
+        // 赛况
+        dTabs: { active: '0', menu: [] },
+        dList: [],
+        // 成绩册
+        achieveList: [],
+        //赛事状态
+        statusList: [],
+        //赛事类别
+        typeList: [],
+        //赛制列表
+        formatList: [],
+        //性别列表
+        genderList: [],
     },
     // 返回
     back: function () { wx.navigateBack({ delta: 1 }) },
+    //比赛报名
+    toSign: function (e) {
+        const { item } = e.currentTarget.dataset;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                if (res.data.type == '10') {
+                    wx.showModal({ title: '提示', content: '游客不能进入比赛系统,请注册成为正式用户' })
+                } else {
+                    const arr = await app.$post(`/user/login`, { openid: res.data.openid }, 'race');
+                    if (arr.errcode == '0') {
+                        wx.setStorageSync('raceuser', arr.data);
+                        wx.navigateTo({ url: `/pagesMatch/match/sign?id=${item._id}` })
+                    } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }); }
+                }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    // 赛事项目详细信息
+    toAchieve: function (e) {
+        const { match_id, group_id } = e.detail;
+        let project_id = e.detail.project_id || e.detail._id;
+        wx.navigateTo({ url: `/pagesMatch/match/achieve?match_id=${match_id}&group_id=${group_id}&project_id=${project_id}` })
+    },
     // 选项卡
     tabsChange: function (e) {
         const that = this;
-        that.setData({ 'tabs.active': e.detail.active });
+        let { active } = e.detail;
+        let info = that.data.info;
+        if (info.status == '0') {
+            if (active == 'a') {
+                that.setData({ 'tabs.active': active });
+            } else {
+                wx.showToast({ title: `暂无开放`, icon: 'error', duration: 2000 });
+            }
+        } else if (info.status == '1') {
+            if (active == 'a' || active == 'b') {
+                that.setData({ 'tabs.active': active });
+            } else {
+                wx.showToast({ title: `暂无开放`, icon: 'error', duration: 2000 });
+            }
+        } else if (info.status == '2' || info.status == '3') {
+            if (active == 'a' || active == 'b') {
+                that.setData({ 'tabs.active': active });
+            } else {
+                wx.showToast({ title: `暂无开放`, icon: 'error', duration: 2000 });
+            }
+        } else if (info.status == '4') {
+            if (active == 'a' || active == 'b' || active == 'c') {
+                that.setData({ 'tabs.active': active });
+            } else {
+                wx.showToast({ title: `暂无开放`, icon: 'error', duration: 2000 });
+            }
+        } else if (info.status == '5' || info.status == '6') {
+            that.setData({ 'tabs.active': active });
+        }
     },
-    //比赛报名
-    toSign: function (e) {
-        const { item } = e.currentTarget.dataset;
-        wx.navigateTo({ url: `/pagesMatch/match/sign?id=${item._id}` })
+    // 第一层手风琴
+    onePayer: function (e) {
+        const that = this;
+        if (e.detail != that.data.playerIndex) that.setData({ playerIndex: e.detail })
+        else that.setData({ playerIndex: 99999 })
     },
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad: function (options) {
+    // 第二层手风琴
+    twoPayer: function (e) {
         const that = this;
-        that.setData({ id: options.id || '' });
+        if (e.detail != that.data.playerIndexs) that.setData({ playerIndexs: e.detail })
+        else that.setData({ playerIndexs: 99999 })
+    },
+    // 秩序册选择
+    cChange: function (e) {
+        const that = this;
+        const ctype = e.detail;
+        that.setData({ cType: ctype })
+        that.setData({ cList: that.data.cType == '0' ? that.data.raceList : that.data.raceteamList })
+    },
+    // 秩序册查询
+    cinputSearch: function (e) {
+        const that = this;
+        that.setData({ 'cSearchname': e.detail });
+        that.searchOrderBook();
+    },
+    // 赛况场地选择
+    dtabsChange: function (e) {
+        const that = this;
+        let raceList = that.data.raceList;
+        let data = that.data.dTabs.menu[e.detail];
+        let list = []
+        if (data._id) list = raceList.filter(i => i.address_id == data._id);
+        else list = raceList;
+        that.setData({ dList: list })
+        that.setData({ 'dTabs.active': e.detail })
     },
     /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () { },
-    /**
-     * 生命周期函数--监听页面显示
+     * 生命周期函数--监听页面加载
      */
-    onShow: async function () {
+    onLoad: async function (options) {
         const that = this;
+        that.setData({ id: options && options.id || '630ec4700a92b0a015ccfd14' });
         // 查询其他信息
         await that.searchOther();
         // 监听用户是否登录
@@ -56,37 +157,128 @@ Page({
     searchOther: async function () {
         const that = this;
         let arr;
-        // 状态
+        // 赛事状态
         arr = await app.$get(`/dict`, { code: "match_status" });
-        if (arr.errcode == '0' && arr.total > 0) { that.setData({ statusList: arr.data[0].list }); }
+        if (arr.errcode == '0' && arr.total > 0) that.setData({ statusList: arr.data[0].list });
+        // 赛事类别
+        arr = await app.$get(`/dict`, { code: "match_type" });
+        if (arr.errcode == '0' && arr.total > 0) that.setData({ typeList: arr.data[0].list });
+        // 赛制列表
+        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 });
     },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: async function () { },
     // 监听用户是否登录
     watchLogin: async function () {
         const that = this;
         const statusList = that.data.statusList;
+        const typeList = that.data.typeList;
+        const formatList = that.data.formatList;
         wx.getStorage({
-            key: 'raceuser',
+            key: 'user',
             success: async res => {
                 that.setData({ user: res.data })
                 let arr;
-                // 赛信息
+                // 赛信息
                 arr = await app.$get(`/match/${that.data.id}`, {}, 'race');
                 if (arr.errcode == '0') {
-                    let status = statusList.find(i => i.value == arr.data.status)
-                    if (status) arr.data.zhStatus = status.label;
+                    let info = arr.data;
+                    // 赛事状态
+                    let status = statusList.find(i => i.value == info.status)
+                    if (status) info.zhStatus = status.label;
+                    // 赛事类别
+                    let type = typeList.find(i => i.value == info.type)
+                    if (type) info.zhtype = type.label;
+                    // 赛事赛制
+                    let format = formatList.find(i => i.value == info.format)
+                    if (format) info.zhFormat = format.label;
                     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 })
-                } else { wx.showToast({ title: `${res.errmsg}`, icon: 'fail', duration: 2000 }); }
+                    if (regular) info.zhRegular = regular;
+                    that.setData({ info })
+                } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'fail', duration: 2000 }); }
+                // 赛事选手
+                arr = await app.$get(`/match/getAll/${arr.data._id}`, {}, 'race');
+                if (arr.errcode == '0') that.setData({ playerList: arr.data })
+                // 秩序册
+                that.searchOrderBook();
+                // 场地
+                arr = await app.$get(`/matchAddress`, { is_use: '0', belong_id: that.data.info.belong_id }, 'race');
+                if (arr.errcode == '0') {
+                    let addressList = []
+                    arr.data.unshift({ _id: '', title: '全部场地', active: 0 });
+                    for (const [index, val] of arr.data.entries()) {
+                        addressList.push({ _id: val._id, title: val.title || val.name, active: index })
+                    }
+                    that.setData({ 'dTabs.menu': addressList })
+                }
+                // 成绩册列表
+                arr = await app.$get(`/matchProject`, { match_id: that.data.info._id }, 'race');
+                if (arr.errcode == '0') { that.setData({ achieveList: arr.data }) }
+
             },
             fail: async res => {
                 wx.redirectTo({ url: '/pages/index/index' })
             }
         })
     },
-    /**
-     * 页面上拉触底事件的处理函数
-     */
+    // 查询秩序册
+    searchOrderBook: async function (e) {
+        const that = this;
+        let genderList = that.data.genderList;
+        let type = that.data.cType;
+        let match = that.data.info;
+        let cSearch = that.data.cSearchname;
+        let info = { match_id: match._id };
+        if (type == '0') { if (cSearch) info.user_name = cSearch; }
+        else { if (cSearch) info.project_name = cSearch; }
+        let arr;
+        //小组赛组--场次表
+        arr = await app.$get(`/matchTeamGroup`, { ...info }, 'race');
+        if (arr.errcode == '0') {
+            let list = arr.data;
+            for (const val of list) {
+                // 查询组
+                const group = await app.$get(`/matchGroup/${val.group_id}`, {}, 'race');
+                if (group.errcode == '0') { val.age = group.data.age; }
+                // 查询项目
+                const project = await app.$get(`/matchProject/${val.project_id}`, {}, 'race');
+                if (project.errcode == '0') {
+                    val.projectAge = project.data.age;
+                    let gender = genderList.find(i => i.value == project.data.gender)
+                    if (gender) val.pojectGender = gender.label;
+                }
+                // 名字分割
+                for (const p1 of val.person) { p1.one = p1.name.split("-")[0]; p1.two = p1.name.split("-")[1]; }
+            }
+            that.setData({ raceteamList: list })
+        }
+        //小组赛赛程--对阵表
+        arr = await app.$get(`/msgs`, { ...info }, 'race');
+        if (arr.errcode == '0') {
+            for (const val of arr.data) {
+                if (val.player_type == 'Race.TeamApply') {
+                    val.one_one = val.player_one_name.split("-")[0];
+                    val.one_two = val.player_one_name.split("-")[1];
+                    val.two_one = val.player_two_name.split("-")[0];
+                    val.two_two = val.player_two_name.split("-")[1];
+                }
+            }
+            that.setData({ raceList: arr.data });
+            that.setData({ dList: that.data.raceList })
+        }
+        that.setData({ cList: that.data.cType == '0' ? that.data.raceList : that.data.raceteamList })
+    },
+
     /**
      * 生命周期函数--监听页面隐藏
      */

+ 10 - 5
pagesMatch/match/info.json

@@ -1,7 +1,12 @@
 {
-  "component": true,
-  "usingComponents": {
-    "mobile-main": "/commpents/mobile-frame/index",
-    "s-tab": "/commpents/tabs/index"
-  }
+    "component": true,
+    "usingComponents": {
+        "mobile-main": "/commpents/mobile-frame/index",
+        "match-1": "/commpents/pagesMatchs/match/match-1",
+        "match-2": "/commpents/pagesMatchs/match/match-2",
+        "match-3": "/commpents/pagesMatchs/match/match-3",
+        "match-4": "/commpents/pagesMatchs/match/match-4",
+        "match-5": "/commpents/pagesMatchs/match/match-5",
+        "s-tab": "/commpents/tabs/index"
+    }
 }

+ 2 - 86
pagesMatch/match/info.less

@@ -11,90 +11,6 @@
     .two {
         position: relative;
         flex-grow: 1;
-
-        .a {
-            height: 83vh;
-
-            .a_1 {
-                width: 96vw;
-                display: flex;
-                flex-direction: column;
-                background-color: var(--mainColor);
-                position: relative;
-                margin: 2vw;
-
-                .image {
-                    width: 96vw;
-                    height: 160px;
-                }
-
-                .a_1_info {
-                    position: absolute;
-                    top: 30vw;
-                    width: 92vw;
-                    margin: 0 2vw;
-
-                    .a_1_1 {
-                        background-color: var(--mainColor);
-                        margin: 0 0 3vw 0;
-                        border-radius: 5px;
-                        padding: 2vw;
-                        box-shadow: 0 0 1vw var(--fcColor);
-
-                        .name {
-                            font-size: var(--font18Szie);
-                            font-weight: bold;
-                            margin: 0 0 2vw 0;
-                        }
-
-                        .status {
-                            margin: 0 0 2vw 0;
-
-                            text {
-                                display: inline-block;
-                                background-color: var(--redColor);
-                                color: var(--whiteColor);
-                                padding: 1vw 3vw;
-                                border-radius: 5px;
-                            }
-                        }
-
-                        .other {
-                            .other_1 {
-                                margin: 0 0 1vw 0;
-                                font-size: var(--font16Szie);
-                                color: var(--f85Color);
-
-                                .icon {
-                                    margin: 0 2vw 0 0;
-                                }
-
-                                text:nth-child(3) {
-                                    color: var(--blackColor);
-                                }
-                            }
-                        }
-                    }
-
-                    .a_1_2 {
-                        .a_1_2t {
-                            margin: 0 0 1vw 0;
-
-                            .txt {
-                                font-size: var(--font16Szie);
-                                margin: 0 0 1vw 0;
-                            }
-
-                            .cont {
-                                font-size: var(--font14Szie);
-                                color: var(--f85Color);
-                                text-indent: 1rem;
-                            }
-                        }
-                    }
-                }
-            }
-        }
     }
 }
 
@@ -115,7 +31,7 @@
     position: fixed;
     width: 96vw;
     bottom: 8vh;
-    right: 2vw;
+    right: 4vw;
     text-align: right;
 
     .btn {
@@ -123,7 +39,7 @@
         width: 10vw;
         padding: 1vw;
         text-align: center;
-        background-color: green;
+        background-color: var(--greenColor);
         color: var(--whiteColor);
         font-size: var(--font14Size);
         border-radius: 5px;

+ 16 - 56
pagesMatch/match/info.wxml

@@ -5,63 +5,23 @@
         </view>
         <view class="two">
             <view wx:if="{{tabs.active=='a'}}" class="a">
-                <scroll-view scroll-y="true" class="scroll-view">
-                    <view class="list-scroll-view">
-                        <view class="a_1">
-                            <image class="image" src="{{fileUrl}}/files/court/elimg/20220729140648.png"></image>
-                            <view class="a_1_info">
-                                <view class="a_1_1">
-                                    <view class="name">{{info.name||'暂无'}}</view>
-                                    <view class="status"><text>{{info.zhStatus||'暂无'}}</text></view>
-                                    <view class="other">
-                                        <view class="other_1">
-                                            <text>报名截止时间:</text>
-                                            <text>{{info.sign_time||'暂无'}}</text>
-                                        </view>
-                                        <view class="other_1">
-                                            <text>比赛时间:</text>
-                                            <text>{{info.start_time||'暂无'}}-{{info.end_time||'暂无'}}</text>
-                                        </view>
-                                        <view class="other_1">
-                                            <text>比赛地点:</text>
-                                            <text>{{info.address||'暂无'}}</text>
-                                        </view>
-                                        <view class="other_1">
-                                            <text>报名费用说明:</text>
-                                            <text>{{info.money_remark||'暂无'}}</text>
-                                        </view>
-                                        <view class="other_1">
-                                            <text>付款方式:</text>
-                                            <text>{{info.money_mode||'暂无'}}</text>
-                                        </view>
-                                        <view class="other_1">
-                                            <text>报名费用(元):</text>
-                                            <text>{{info.money||'暂无'}}</text>
-                                        </view>
-                                    </view>
-                                </view>
-                                <view class="a_1_1 a_1_2">
-                                    <view class="a_1_2t">
-                                        <view class="txt">报名说明:</view>
-                                        <view class="cont">{{info.explain||'暂无'}}</view>
-                                    </view>
-                                    <view class="a_1_2t">
-                                        <view class="txt">赛事规程:</view>
-                                        <rich-text nodes="{{info.zhRegular||'暂无'}}"></rich-text>
-                                    </view>
-                                </view>
-                            </view>
-                        </view>
-                        <view class="inMatch" wx:if="{{user.type=='0'}}">
-                            <text class="btn" bindtap="toSign" data-item="{{info}}">比赛报名</text>
-                        </view>
-                    </view>
-                </scroll-view>
+                <match-1 info="{{info}}"></match-1>
+                <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>
+            <view wx:if="{{tabs.active=='b'}}" class="b">
+                <match-2 playerList="{{playerList}}" playerIndex="{{playerIndex}}" bind:onePayer="onePayer" playerIndexs="{{playerIndexs}}" bind:twoPayer="twoPayer"></match-2>
+            </view>
+            <view wx:if="{{tabs.active=='c'}}" class="c">
+                <match-3 cType="{{cType}}" cList="{{cList}}" bind:cChange="cChange" bind:cinputSearch="cinputSearch" bind:toAchieve="toAchieve"></match-3>
+            </view>
+            <view wx:if="{{tabs.active=='d'}}" class="d">
+                <match-4 dTabs="{{dTabs}}" dList="{{dList}}" bind:dtabsChange="dtabsChange"></match-4>
+            </view>
+            <view wx:if="{{tabs.active=='e'}}" class="e">
+                <match-5 achieveList="{{achieveList}}" bind:toAchieve="toAchieve"></match-5>
             </view>
-            <view wx:if="{{tabs.active=='b'}}" class="b">选手</view>
-            <view wx:if="{{tabs.active=='c'}}" class="c">秩序册</view>
-            <view wx:if="{{tabs.active=='d'}}" class="d">赛况</view>
-            <view wx:if="{{tabs.active=='e'}}" class="e">成绩册</view>
         </view>
     </view>
 </mobile-main>

+ 2 - 68
pagesMatch/match/info.wxss

@@ -10,72 +10,6 @@
   position: relative;
   flex-grow: 1;
 }
-.main .two .a {
-  height: 83vh;
-}
-.main .two .a .a_1 {
-  width: 96vw;
-  display: flex;
-  flex-direction: column;
-  background-color: var(--mainColor);
-  position: relative;
-  margin: 2vw;
-}
-.main .two .a .a_1 .image {
-  width: 96vw;
-  height: 160px;
-}
-.main .two .a .a_1 .a_1_info {
-  position: absolute;
-  top: 30vw;
-  width: 92vw;
-  margin: 0 2vw;
-}
-.main .two .a .a_1 .a_1_info .a_1_1 {
-  background-color: var(--mainColor);
-  margin: 0 0 3vw 0;
-  border-radius: 5px;
-  padding: 2vw;
-  box-shadow: 0 0 1vw var(--fcColor);
-}
-.main .two .a .a_1 .a_1_info .a_1_1 .name {
-  font-size: var(--font18Szie);
-  font-weight: bold;
-  margin: 0 0 2vw 0;
-}
-.main .two .a .a_1 .a_1_info .a_1_1 .status {
-  margin: 0 0 2vw 0;
-}
-.main .two .a .a_1 .a_1_info .a_1_1 .status text {
-  display: inline-block;
-  background-color: var(--redColor);
-  color: var(--whiteColor);
-  padding: 1vw 3vw;
-  border-radius: 5px;
-}
-.main .two .a .a_1 .a_1_info .a_1_1 .other .other_1 {
-  margin: 0 0 1vw 0;
-  font-size: var(--font16Szie);
-  color: var(--f85Color);
-}
-.main .two .a .a_1 .a_1_info .a_1_1 .other .other_1 .icon {
-  margin: 0 2vw 0 0;
-}
-.main .two .a .a_1 .a_1_info .a_1_1 .other .other_1 text:nth-child(3) {
-  color: var(--blackColor);
-}
-.main .two .a .a_1 .a_1_info .a_1_2 .a_1_2t {
-  margin: 0 0 1vw 0;
-}
-.main .two .a .a_1 .a_1_info .a_1_2 .a_1_2t .txt {
-  font-size: var(--font16Szie);
-  margin: 0 0 1vw 0;
-}
-.main .two .a .a_1 .a_1_info .a_1_2 .a_1_2t .cont {
-  font-size: var(--font14Szie);
-  color: var(--f85Color);
-  text-indent: 1rem;
-}
 .scroll-view {
   position: absolute;
   top: 0;
@@ -91,7 +25,7 @@
   position: fixed;
   width: 96vw;
   bottom: 8vh;
-  right: 2vw;
+  right: 4vw;
   text-align: right;
 }
 .inMatch .btn {
@@ -99,7 +33,7 @@
   width: 10vw;
   padding: 1vw;
   text-align: center;
-  background-color: green;
+  background-color: var(--greenColor);
   color: var(--whiteColor);
   font-size: var(--font14Size);
   border-radius: 5px;

+ 5 - 5
pagesMatch/match/sign.js

@@ -21,11 +21,14 @@ Page({
     // 返回
     back: function () { wx.navigateBack({ delta: 1 }) },
     // 赛事分组
-    groupChange: function (e) {
+    groupChange: async function (e) {
         const that = this;
         let data = that.data.groupList[e.detail.value];
         if (data) {
             that.setData({ 'form.group_id': data._id, 'form.group_name': data.name, 'form.group_age': data.age })
+            // 项目
+            let arr = await app.$get(`/matchProject`, { match_id: that.data.id, group_id: data._id }, 'race');
+            if (arr.errcode == '0' && arr.total > 0) that.setData({ projectList: arr.data });
         }
     },
     // 项目名称
@@ -122,11 +125,8 @@ Page({
     searchOther: async function () {
         const that = this;
         let arr;
-        // 项目
-        arr = await app.$get(`/matchProject`, {}, 'race');
-        if (arr.errcode == '0' && arr.total > 0) that.setData({ projectList: arr.data });
         // 组别
-        arr = await app.$get(`/matchGroup`, {}, 'race');
+        arr = await app.$get(`/matchGroup`, { match_id: that.data.id }, 'race');
         if (arr.errcode == '0') that.setData({ groupList: arr.data })
     },
     /**

+ 119 - 0
pagesMatch/matchAdmin/address/add.js

@@ -0,0 +1,119 @@
+const app = getApp();
+import WxValidate from '../../../utils/wxValidate';
+import { is_use } from '../../../utils/dict';
+
+Page({
+    data: {
+        frameStyle: { useTop: true, name: '场地信息', leftArrow: true, useBar: false },
+        // 所属id
+        belong_id: '',
+        id: '',
+        form: {},
+        is_useList: is_use,
+    },
+    // 返回
+    back: function () { wx.navigateBack({ delta: 1 }) },
+    initValidate() {
+        const rules = { name: { required: true }, remark: { required: true }, is_use: { required: true } }
+        // 验证字段的提示信息,若不传则调用默认的信息
+        const messages = { name: { required: '请输入场地名称', }, remark: { required: '请输入场地备注', }, is_use: { required: '请选择是否使用' } };
+        this.WxValidate = new WxValidate(rules, messages)
+    },
+    // 是否使用
+    is_useChange: function (e) {
+        const that = this;
+        let data = that.data.is_useList[e.detail.value];
+        if (data) { that.setData({ 'form.is_use': data.value, 'form.zhIs_use': data.label }); }
+    },
+    // 提交登录
+    onSubmit: async function (e) {
+        const that = this;
+        let params = e.detail.value;
+        const form = that.data.form;
+        params = { ...params, belong_id: that.data.belong_id }
+        if (!this.WxValidate.checkForm(params)) {
+            const error = this.WxValidate.errorList[0];
+            wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+            return false
+        } else {
+            let arr;
+            if (form._id) arr = await app.$post(`/matchAddress/${form._id}`, params, 'race');
+            else arr = await app.$post(`/matchAddress`, params, 'race');
+            if (arr.errcode == '0') { wx.showToast({ title: `维护信息完成`, icon: 'success', duration: 2000 }); that.back(); }
+            else wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+        }
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        const that = this;
+        that.setData({ id: options && options.id || '' })
+        //验证规则函数
+        that.initValidate();
+        // 监听用户是否登录
+        that.watchLogin();
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'raceuser',
+            success: async res => {
+                that.setData({ belong_id: res.data._id })
+                if (that.data.id) {
+                    const arr = await app.$get(`/matchAddress/${that.data.id}`, {}, 'race');
+                    if (arr.errcode == '0') {
+                        let is_use = that.data.is_useList.find(i => i.value == arr.data.is_use)
+                        if (is_use) arr.data.zhIs_use = is_use.label;
+                        that.setData({ form: arr.data });
+                    }
+                }
+
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pagesMatch/matchAdmin/address/add.json

@@ -0,0 +1,6 @@
+{
+    "component": true,
+    "usingComponents": {
+      "mobile-main": "/commpents/mobile-frame/index"
+    }
+  }

+ 35 - 0
pagesMatch/matchAdmin/address/add.less

@@ -0,0 +1,35 @@
+@import (css) "/app.wxss";
+
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        .content {
+            display: flex;
+            flex-direction: row;
+            border-bottom: 1px dashed var(--f1Color);
+            padding: 2vw 0;
+            margin: 0 2vw 2vw 2vw;
+
+            .value {
+                flex-grow: 1;
+                color: var(--blackColor);
+
+                textarea {
+                    position: static;
+                    width: 72vw;
+                }
+            }
+        }
+
+        .btn {
+            text-align: center;
+            margin: 3vw 0;
+
+            button {
+                margin: 0 2vw;
+            }
+        }
+    }
+}

+ 31 - 0
pagesMatch/matchAdmin/address/add.wxml

@@ -0,0 +1,31 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <form catchsubmit="onSubmit">
+                <view class="content">
+                    <view class="label">比赛场地名称:</view>
+                    <view class="value">
+                        <input name="name" value="{{form.name}}" placeholder="请输入比赛场地名称" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">是否使用:</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="is_useChange" name="is_use" value="{{form.is_use}}" range="{{is_useList}}" range-key="label">
+                            <view class="picker">{{form.zhIs_use||'请选择是否使用'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">场地备注:</view>
+                    <view class="value">
+                        <textarea maxlength="500" name="remark" value="{{form.remark}}" placeholder="请输入场地备注" />
+                    </view>
+                </view>
+                <view class="btn">
+                    <button type="primary" size="mini" formType="submit">提交保存</button>
+                </view>
+            </form>
+        </view>
+    </view>
+</mobile-main>

+ 27 - 0
pagesMatch/matchAdmin/address/add.wxss

@@ -0,0 +1,27 @@
+@import "/app.wxss";
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one .content {
+  display: flex;
+  flex-direction: row;
+  border-bottom: 1px dashed var(--f1Color);
+  padding: 2vw 0;
+  margin: 0 2vw 2vw 2vw;
+}
+.main .one .content .value {
+  flex-grow: 1;
+  color: var(--blackColor);
+}
+.main .one .content .value textarea {
+  position: static;
+  width: 72vw;
+}
+.main .one .btn {
+  text-align: center;
+  margin: 3vw 0;
+}
+.main .one .btn button {
+  margin: 0 2vw;
+}

+ 129 - 0
pagesMatch/matchAdmin/address/list.js

@@ -0,0 +1,129 @@
+const app = getApp();
+import { is_use } from '../../../utils/dict';
+
+Page({
+    data: {
+        frameStyle: { useTop: true, name: '场地设置', leftArrow: true, useBar: false },
+        is_useList: is_use,
+        list: [],
+        total: 0,
+        page: 0,
+        skip: 0,
+        limit: 5,
+    },
+    // 返回
+    back: function () { wx.navigateBack({ delta: 1 }) },
+    //添加信息,信息维护
+    toCommon: function (e) {
+        const that = this;
+        const { item, route } = e.currentTarget.dataset;
+        that.setData({ skip: 0, page: 0, list: [] });
+        wx.navigateTo({ url: `/pagesMatch/${route}?id=${item && item._id ? item._id : ''}` })
+    },
+    // 删除
+    toDel: async function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认删除该条数据?',
+            async success(res) {
+                if (res.confirm) {
+                    const arr = await app.$delete(`/matchAddress/${item._id}`, {}, 'race');
+                    if (arr.errcode == '0') {
+                        wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
+                        that.setData({ skip: 0, page: 0, list: [] });
+                        that.watchLogin()
+                    } else {
+                        wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+                    }
+                }
+            }
+        })
+    },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.watchLogin();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) { },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'raceuser',
+            success: async res => {
+                let info = { skip: that.data.skip, limit: that.data.limit, belong_id: res.data._id };
+                let arr = await app.$get(`/matchAddress`, { ...info }, 'race');
+                if (arr.errcode == '0') {
+                    let list = [...that.data.list, ...arr.data];
+                    for (const val of list) {
+                        let use = is_use.find(i => i.value == val.is_use)
+                        if (use) val.zhIs_use = use.label;
+                    }
+                    that.setData({ list })
+                    that.setData({ total: arr.total })
+                } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+        const that = this;
+        that.setData({ skip: 0, page: 0, list: [] })
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pagesMatch/matchAdmin/address/list.json

@@ -0,0 +1,6 @@
+{
+    "component": true,
+    "usingComponents": {
+      "mobile-main": "/commpents/mobile-frame/index"
+    }
+  }

+ 93 - 0
pagesMatch/matchAdmin/address/list.less

@@ -0,0 +1,93 @@
+@import (css) "/app.wxss";
+
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+
+    .one {
+        display: flex;
+        flex-direction: column;
+        width: 96vw;
+        padding: 2vw;
+        border-bottom: 1px solid var(--f1Color);
+
+        .one_1 {
+            margin: 0 0 2vw 0;
+
+            input {
+                padding: 1vw 0 2vw 2vw;
+                background-color: var(--f1Color);
+                border-radius: 5px;
+            }
+        }
+
+        .one_2 {
+            display: flex;
+            flex-direction: row;
+            justify-content: space-around;
+
+            button {
+                width: 100%;
+                padding: 2vw;
+                font-size: var(--font14Size);
+            }
+        }
+    }
+
+    .two {
+        position: relative;
+        flex-grow: 1;
+        background-color: var(--whiteColor);
+        padding: 0 2vw;
+
+        .list {
+            background-color: var(--f9Color);
+            margin: 0 0 2vw 0;
+            padding: 2vw;
+            margin: 0 2vw 2vw 2vw;
+            border-radius: 5px;
+
+            .name {
+                font-size: var(--font16Szie);
+                font-weight: bold;
+                margin: 0 0 1vw 0;
+            }
+
+            .other {
+                margin: 0 0 1vw 0;
+
+                .other_1 {
+                    margin: 0 0 1vw 0;
+                    font-size: var(--font14Size);
+
+                    text:first-child {
+                        color: var(--f85Color);
+                    }
+                }
+            }
+
+            .btn {
+                text-align: center;
+
+                button {
+                    margin: 0 2vw;
+                    font-size: var(--font14Size);
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 37 - 0
pagesMatch/matchAdmin/address/list.wxml

@@ -0,0 +1,37 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="one_1">
+                <input type="text" placeholder="请输入关键词" />
+            </view>
+            <view class="one_2">
+                <view class="one_2_1">
+                    <button type="primary" bindtap="toCommon" data-route="matchAdmin/address/add">添加场地</button>
+                </view>
+            </view>
+        </view>
+        <view class="two">
+            <scroll-view scroll-y="true" class="scroll-view" bindscrolltolower="toPage">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{list}}" wx:key="item">
+                        <view class="name">{{item.name||'暂无'}}</view>
+                        <view class="other">
+                            <view class="other_1">
+                                <text>比赛场地名称:</text>
+                                <text>{{item.name||'暂无'}}</text>
+                            </view>
+                            <view class="other_1">
+                                <text>是否使用:</text>
+                                <text>{{item.zhIs_use||'暂无'}}</text>
+                            </view>
+                        </view>
+                        <view class="btn">
+                            <button type="primary" size="mini" bindtap="toCommon" data-route="matchAdmin/address/add" data-item="{{item}}">信息维护</button>
+                            <button type="warn" size="mini" bindtap="toDel" data-item="{{item}}">信息删除</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>

+ 76 - 0
pagesMatch/matchAdmin/address/list.wxss

@@ -0,0 +1,76 @@
+@import "/app.wxss";
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  display: flex;
+  flex-direction: column;
+  width: 96vw;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f1Color);
+}
+.main .one .one_1 {
+  margin: 0 0 2vw 0;
+}
+.main .one .one_1 input {
+  padding: 1vw 0 2vw 2vw;
+  background-color: var(--f1Color);
+  border-radius: 5px;
+}
+.main .one .one_2 {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+}
+.main .one .one_2 button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+}
+.main .two {
+  position: relative;
+  flex-grow: 1;
+  background-color: var(--whiteColor);
+  padding: 0 2vw;
+}
+.main .two .list {
+  background-color: var(--f9Color);
+  margin: 0 0 2vw 0;
+  padding: 2vw;
+  margin: 0 2vw 2vw 2vw;
+  border-radius: 5px;
+}
+.main .two .list .name {
+  font-size: var(--font16Szie);
+  font-weight: bold;
+  margin: 0 0 1vw 0;
+}
+.main .two .list .other {
+  margin: 0 0 1vw 0;
+}
+.main .two .list .other .other_1 {
+  margin: 0 0 1vw 0;
+  font-size: var(--font14Size);
+}
+.main .two .list .other .other_1 text:first-child {
+  color: var(--f85Color);
+}
+.main .two .list .btn {
+  text-align: center;
+}
+.main .two .list .btn button {
+  margin: 0 2vw;
+  font-size: var(--font14Size);
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 66 - 0
pagesMatch/matchAdmin/elimmatch/add.js

@@ -0,0 +1,66 @@
+const app = getApp();
+Page({
+    data: {
+        frameStyle: { useTop: true, name: '添加赛程', leftArrow: true, useBar: false },
+    },
+    // 返回
+    back: function () { wx.navigateBack({ delta: 1 }) },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) { },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'raceuser',
+            success: async res => { },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pagesMatch/matchAdmin/elimmatch/add.json

@@ -0,0 +1,6 @@
+{
+    "component": true,
+    "usingComponents": {
+      "mobile-main": "/commpents/mobile-frame/index"
+    }
+  }

+ 23 - 0
pagesMatch/matchAdmin/elimmatch/add.less

@@ -0,0 +1,23 @@
+@import (css) "/app.wxss";
+
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        width: 100vw;
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 7 - 0
pagesMatch/matchAdmin/elimmatch/add.wxml

@@ -0,0 +1,7 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            淘汰赛添加赛程页面
+        </view>
+    </view>
+</mobile-main>

+ 19 - 0
pagesMatch/matchAdmin/elimmatch/add.wxss

@@ -0,0 +1,19 @@
+@import "/app.wxss";
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  width: 100vw;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 240 - 0
pagesMatch/matchAdmin/elimmatch/edit.js

@@ -0,0 +1,240 @@
+const app = getApp();
+import WxValidate from '../../../utils/wxValidate';
+Page({
+    data: {
+        frameStyle: { useTop: true, name: '赛程信息', leftArrow: true, useBar: false },
+        raceuser: {},
+        id: '',
+        form: {},
+        // 赛事列表
+        matchList: [],
+        // 组别列表
+        groupList: [],
+        // 组内项目列表
+        projectList: [],
+        // 小组设置列表
+        teamList: [],
+        // 裁判
+        refereeList: [],
+        // 场地
+        addressList: [],
+        // 选手
+        memberList: [],
+        // 赛程状态
+        statusList: []
+    },
+    initValidate() {
+        const rules = { match_id: { required: true }, group_id: { required: true }, project_id: { required: true }, team_id: { required: true }, address_id: { required: false }, referee_id: { required: false }, match_time: { required: true }, player_type: { required: true }, player_one: { required: true }, player_two: { required: true } }
+        // 验证字段的提示信息,若不传则调用默认的信息
+        const messages = { match_id: { required: '比赛赛事' }, group_id: { required: '赛事分组' }, project_id: { required: '组内项目' }, team_id: { required: '小组名称' }, address_id: { required: '场地名称' }, referee_id: { required: '裁判名称' }, match_time: { required: '比赛时间' }, player_type: { required: '选手类型' }, player_one: { required: '选手一' }, player_two: { required: '选手二' } };
+        this.WxValidate = new WxValidate(rules, messages)
+    },
+    // 返回
+    back: function () { wx.navigateBack({ delta: 1 }) },
+    // 赛事
+    matchChange: async function (e) {
+        const that = this;
+        let data = that.data.matchList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.match_id': data._id, 'form.match_id_name': data.name });
+            const arr = await app.$get(`/matchGroup`, { match_id: data._id }, 'race');
+            if (arr.errcode == '0') { that.setData({ groupList: arr.data }) }
+        }
+    },
+    // 组别
+    groupChange: async function (e) {
+        const that = this;
+        let data = that.data.groupList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.group_id': data._id, 'form.group_id_name': data.name });
+            const arr = await app.$get(`/matchProject`, { match_id: data.match_id, group_id: data._id }, 'race');
+            if (arr.errcode == '0') { that.setData({ projectList: arr.data }) }
+        }
+    },
+    // 项目
+    projectChange: async function (e) {
+        const that = this;
+        let data = that.data.projectList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.project_id': data._id, 'form.project_id_name': data.name });
+            const arr = await app.$get(`/matchTeamGroup`, { match_id: data.match_id, group_id: data.group_id, project_id: data._id }, 'race');
+            if (arr.errcode == '0') { that.setData({ teamList: arr.data }) }
+        }
+    },
+    // 小组
+    teamChange: async function (e) {
+        const that = this;
+        let data = that.data.teamList[e.detail.value];
+        if (data) {
+            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 == '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 });
+            }
+
+        }
+    },
+    // 场地
+    addressChange: async function (e) {
+        const that = this;
+        let data = that.data.addressList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.address_id': data._id, 'form.address_id_name': data.name });
+        }
+    },
+    // 裁判
+    refereeChange: async function (e) {
+        const that = this;
+        let data = that.data.refereeList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.referee_id': data._id, 'form.referee_id_name': data.name });
+        }
+    },
+    // 确认选择
+    datetimeChange: function (e) {
+        const that = this;
+        that.setData({ [`form.${e.detail.name}`]: e.detail.datetime });
+    },
+    // 选手一
+    oneMemberChange: async function (e) {
+        const that = this;
+        let data = that.data.memberList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.player_one': data.id, 'form.player_one_name': data.name });
+        }
+    },
+    // 选手二
+    twoMemberChange: async function (e) {
+        const that = this;
+        let data = that.data.memberList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.player_two': data.id, 'form.player_two_name': data.name });
+        }
+    },
+    // 选择状态
+    statusChange: function (e) {
+        const that = this;
+        let data = that.data.statusList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.status': data.value, 'form.zhStatus': data.label });
+        }
+    },
+    // 提交保存
+    onSubmit: async function (e) {
+        const that = this;
+        const params = e.detail.value;
+        const form = that.data.form;
+        params.match_time = form.match_time;
+        if (!this.WxValidate.checkForm(params)) {
+            const error = this.WxValidate.errorList[0];
+            wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+            return false
+        } else {
+            let arr;
+            if (that.data.id) { arr = await app.$post(`/msgs/${that.data.id}`, params, 'race'); }
+            else { arr = await app.$post(`/msgs`, params, 'race'); }
+            if (arr.errcode == '0') { wx.showToast({ title: `维护信息完成`, icon: 'success', duration: 2000 }); that.back(); }
+            else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+        }
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: async function (options) {
+        const that = this;
+        that.setData({ id: options && options.id || '' })
+        //验证规则函数
+        that.initValidate();
+        // 监听用户是否登录
+        await that.watchLogin();
+    },
+    // 查询其他信息
+    searchOther: async function () {
+        const that = this;
+        const raceuser = that.data.raceuser;
+        let arr;
+        // 状态
+        arr = await app.$get(`/dict`, { code: 'schedule_status' });
+        if (arr.errcode == '0' && arr.total > 0) that.setData({ statusList: arr.data[0].list });
+        // 比赛
+        arr = await app.$get(`/match`, { belong_id: raceuser._id, status: '2' }, 'race');
+        if (arr.errcode == '0') that.setData({ matchList: arr.data });
+        // 场地
+        arr = await app.$get(`/matchAddress`, { belong_id: raceuser._id, is_use: '0' }, 'race');
+        if (arr.errcode == '0') that.setData({ addressList: arr.data });
+        // 裁判
+        arr = await app.$get(`/user`, { type: '2' }, 'race');
+        if (arr.errcode == '0') {
+            for (const val of arr.data) { val.name = val.user_id.name }
+            that.setData({ refereeList: arr.data });
+        }
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'raceuser',
+            success: async res => {
+                that.setData({ raceuser: res.data });
+                // 查询其他信息
+                await that.searchOther();
+                if (that.data.id) {
+                    const arr = await app.$get(`/msgs/${that.data.id}`, {}, 'race');
+                    if (arr.errcode == '0') {
+                        // 状态
+                        let status = that.data.statusList.find(i => i.value == arr.data.status)
+                        if (status) arr.data.zhStatus = status.label;
+                        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 })
+                    }
+                }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () { },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 7 - 0
pagesMatch/matchAdmin/elimmatch/edit.json

@@ -0,0 +1,7 @@
+{
+    "component": true,
+    "usingComponents": {
+      "mobile-main": "/commpents/mobile-frame/index",
+      "datatime-picker": "/commpents/datetime-picker/index"
+    }
+  }

+ 34 - 0
pagesMatch/matchAdmin/elimmatch/edit.less

@@ -0,0 +1,34 @@
+@import (css) "/app.wxss";
+
+.main {
+    background-color: var(--mainColor);
+
+    .one {
+        .content {
+            display: flex;
+            flex-direction: row;
+            border-bottom: 1px dashed var(--f1Color);
+            padding: 2vw 0;
+            margin: 0 2vw 2vw 2vw;
+
+            .value {
+                flex-grow: 1;
+                color: var(--blackColor);
+
+                textarea {
+                    position: static;
+                    width: 72vw;
+                }
+            }
+        }
+
+        .btn {
+            text-align: center;
+            margin: 3vw 0;
+
+            button {
+                margin: 0 2vw;
+            }
+        }
+    }
+}

+ 109 - 0
pagesMatch/matchAdmin/elimmatch/edit.wxml

@@ -0,0 +1,109 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <form catchsubmit="onSubmit">
+                <view class="content" style="display: none;">
+                    <view class="label">数据id:</view>
+                    <view class="value">
+                        <input type="text" name="_id" value="{{form._id}}" placeholder="请输入数据id" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">比赛名称:</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="matchChange" name="match_id" value="{{form.match_id}}" range="{{matchList}}" range-key="name">
+                            <view class="picker">{{form.match_id_name||'请选择赛事'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">赛事组别:</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="groupChange" name="group_id" value="{{form.group_id}}" range="{{groupList}}" range-key="name">
+                            <view class="picker">{{form.group_id_name||'请选择赛事分组'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">组内项目:</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="projectChange" name="project_id" value="{{form.project_id}}" range="{{projectList}}" range-key="name">
+                            <view class="picker">{{form.project_id_name||'请选择组内项目'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">小组名称:</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="teamChange" name="team_id" value="{{form.team_id}}" range="{{teamList}}" range-key="name">
+                            <view class="picker">{{form.team_id_name||'请选择小组名称'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">场地名称:</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="addressChange" name="address_id" value="{{form.address_id}}" range="{{addressList}}" range-key="name">
+                            <view class="picker">{{form.address_id_name||'请选择场地名称'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">裁判名称:</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="refereeChange" name="referee_id" value="{{form.referee_id}}" range="{{refereeList}}" range-key="name">
+                            <view class="picker">{{form.referee_id_name||'请选择裁判名称'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">比赛时间:</view>
+                    <view class="value">
+                        <datatime-picker datetime="{{form.match_time}}" name="match_time" bind:datetimeChange="datetimeChange"></datatime-picker>
+                    </view>
+                </view>
+                <view class="content" style="display: none;">
+                    <view class="label">选手类型:</view>
+                    <view class="value">
+                        <input type="text" name="player_type" value="{{form.player_type}}" placeholder="请输入选手类型" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">选手类型:</view>
+                    <view class="value">
+                        <input type="text" name="type_name" value="{{form.type_name}}" disabled placeholder="请输入选手类型" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">选手一:</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="oneMemberChange" name="player_one" value="{{form.player_one}}" range="{{memberList}}" range-key="name">
+                            <view class="picker">{{form.player_one_name||'请选择选手一'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">选手二:</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="twoMemberChange" name="player_two" value="{{form.player_two}}" range="{{memberList}}" range-key="name">
+                            <view class="picker">{{form.player_two_name||'请选择选手二'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">赛程状态:</view>
+                    <view class="value">
+                        <view class="value">
+                            <picker mode="selector" bindchange="statusChange" name="status" value="{{form.status}}" range="{{statusList}}" range-key="label">
+                                <view class="picker">{{form.zhStatus||'请选择赛程状态'}}</view>
+                            </picker>
+                        </view>
+                    </view>
+                </view>
+                <view class="btn">
+                    <button type="primary" size="mini" formType="submit">提交保存</button>
+                </view>
+            </form>
+        </view>
+    </view>
+</mobile-main>

+ 26 - 0
pagesMatch/matchAdmin/elimmatch/edit.wxss

@@ -0,0 +1,26 @@
+@import "/app.wxss";
+.main {
+  background-color: var(--mainColor);
+}
+.main .one .content {
+  display: flex;
+  flex-direction: row;
+  border-bottom: 1px dashed var(--f1Color);
+  padding: 2vw 0;
+  margin: 0 2vw 2vw 2vw;
+}
+.main .one .content .value {
+  flex-grow: 1;
+  color: var(--blackColor);
+}
+.main .one .content .value textarea {
+  position: static;
+  width: 72vw;
+}
+.main .one .btn {
+  text-align: center;
+  margin: 3vw 0;
+}
+.main .one .btn button {
+  margin: 0 2vw;
+}

+ 200 - 0
pagesMatch/matchAdmin/elimmatch/list.js

@@ -0,0 +1,200 @@
+const app = getApp();
+import WxValidate from '../../../utils/wxValidate';
+Page({
+    data: {
+        frameStyle: { useTop: true, name: '赛程设置', leftArrow: true, useBar: false },
+        // 赛事列表
+        matchList: [],
+        match: {},
+        dialog: { title: '赛程上分', show: false, type: '1' },
+        form: {},
+        list: [],
+        total: 0,
+        page: 0,
+        skip: 0,
+        limit: 5,
+        statusList: []
+    },
+    initValidate() {
+        const rules = { player_one_score: { required: true }, player_two_score: { required: true } }
+        // 验证字段的提示信息,若不传则调用默认的信息
+        const messages = { player_one_score: { required: '选手一比分' }, player_two_score: { required: '选手二比分' } };
+        this.WxValidate = new WxValidate(rules, messages)
+    },
+    // 返回
+    back: function () { wx.navigateBack({ delta: 1 }) },
+    // 添加
+    toCommon: function (e) {
+        const that = this;
+        const { item, route } = e.currentTarget.dataset;
+        that.setData({ skip: 0, page: 0, list: [] });
+        wx.navigateTo({ url: `/pagesMatch/${route}?id=${item && item._id ? item._id : ''}` })
+    },
+    // 赛程上分
+    toScore: function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        that.setData({ form: item })
+        that.setData({ dialog: { title: '赛程上分', show: true, type: '1' } })
+    },
+    // 提交保存
+    onSubmit: async function (e) {
+        const that = this;
+        const params = e.detail.value;
+        const form = that.data.form;
+        if (!this.WxValidate.checkForm(params)) {
+            const error = this.WxValidate.errorList[0];
+            wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+            return false
+        } else {
+            let arr = await app.$post(`/msgs/${form.id}`, params, 'race');
+            if (arr.errcode == '0') {
+                wx.showToast({ title: `上分成功`, icon: 'success', duration: 2000 });
+                that.toClose();
+                that.setData({ skip: 0, page: 0, list: [] })
+                that.watchLogin()
+            }
+            else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+        }
+    },
+    // 删除
+    toDel: function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认删除该条数据?',
+            async success(res) {
+                if (res.confirm) {
+                    const arr = await app.$delete(`/msgs/${item._id}`, {}, 'race');
+                    if (arr.errcode == '0') {
+                        wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
+                        that.setData({ skip: 0, page: 0, list: [] })
+                        that.watchLogin()
+                    } else {
+                        wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+                    }
+                }
+            }
+        })
+    },
+    // 选择赛事
+    matchChange: function (e) {
+        const that = this;
+        let data = that.data.matchList[e.detail.value];
+        if (data) {
+            that.setData({ 'match.id': data._id, 'match.name': data.name });
+            that.setData({ skip: 0, page: 0, list: [] })
+            that.search(data);
+        }
+    },
+    search: async function (e) {
+        const that = this;
+        let match = that.data.match;
+        let info = { skip: that.data.skip, limit: that.data.limit, match_id: match.id };
+        let arr = await app.$get(`/msgs`, { ...info }, 'race');
+        if (arr.errcode == '0') {
+            let list = [...that.data.list, ...arr.data]
+            for (const val of list) {
+                let status = that.data.statusList.find(i => i.value == val.status)
+                if (status) val.zhStatus = status.label;
+            }
+            that.setData({ list })
+            that.setData({ total: arr.total })
+        } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+    },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.search();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
+    },
+    // 关闭弹框
+    toClose: function () {
+        const that = this;
+        that.setData({ form: {} })
+        that.setData({ dialog: { title: '赛程上分', show: false, type: '1' } })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) { },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: async function () {
+        const that = this;
+        //验证规则函数
+        that.initValidate();
+        // 查询其他信息
+        await that.searchOther();
+        // 监听用户是否登录
+        await that.watchLogin();
+    },
+    searchOther: async function () {
+        const that = this;
+        let arr;
+        arr = await app.$get(`/dict`, { code: "schedule_status" });
+        if (arr.errcode == '0' && arr.total > 0) that.setData({ statusList: arr.data[0].list });
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'raceuser',
+            success: async res => {
+                let arr;
+                arr = await app.$get(`/match`, { belong_id: res.data._id }, 'race');  
+                if (arr.errcode == '0') { that.setData({ matchList: arr.data }) }
+                if(that.data.match&&that.data.match.id)that.search();
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+        const that = this;
+        that.setData({ skip: 0, page: 0, list: [] })
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 7 - 0
pagesMatch/matchAdmin/elimmatch/list.json

@@ -0,0 +1,7 @@
+{
+    "component": true,
+    "usingComponents": {
+      "mobile-main": "/commpents/mobile-frame/index",
+      "dialog": "/commpents/dialog/index"
+    }
+  }

+ 154 - 0
pagesMatch/matchAdmin/elimmatch/list.less

@@ -0,0 +1,154 @@
+@import (css) "/app.wxss";
+
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        display: flex;
+        flex-direction: column;
+        width: 96vw;
+        padding: 2vw;
+        border-bottom: 1px solid var(--f1Color);
+
+        .one_1 {
+            margin: 0 0 2vw 0;
+
+            input {
+                padding: 1vw 0 2vw 2vw;
+                background-color: var(--f1Color);
+                border-radius: 5px;
+            }
+        }
+
+        .one_2 {
+            display: flex;
+            flex-direction: row;
+            justify-content: space-around;
+
+            .one_2_1 {
+                width: 30vw;
+                margin: 0 1vw;
+            }
+
+            button {
+                width: 100%;
+                padding: 2vw;
+                font-size: var(--font14Size);
+            }
+        }
+    }
+
+    .two {
+        position: relative;
+        flex-grow: 1;
+        padding: 0 2vw;
+
+        .list {
+            background-color: #328d26;
+            margin: 0 0 2vw 0;
+            padding: 2vw;
+
+            .list_0 {
+                .name {
+                    padding: 1vw 0;
+                    color: var(--whiteColor);
+                    margin: 0 0 1vw 0;
+
+                    text {
+                        padding: 0 2vw 0 0;
+                    }
+                }
+
+                .pk {
+                    display: flex;
+                    flex-direction: row;
+                    justify-content: space-around;
+                    background-color: var(--whiteColor);
+
+                    .pk_1 {
+                        width: 30vw;
+                        text-align: center;
+                        padding: 2vw;
+                    }
+
+                    .pk_2 {
+                        text-align: center;
+                        box-shadow: 0 0 5px var(--fcColor);
+
+                        .time {
+                            background-color: #328d26;
+                            color: var(--whiteColor);
+                            padding: 1vw 0;
+                            font-size: var(--font14Size);
+                        }
+
+                        .status {
+                            background-color: #328d26;
+                            color: var(--whiteColor);
+                            font-size: var(--font14Size);
+                            padding: 0 0 1vw 0;
+                        }
+
+                        .score {
+                            font-size: var(--font20Szie);
+                            padding: 1vw 0;
+                            font-weight: bold;
+                        }
+                    }
+                }
+            }
+
+            .btn {
+                text-align: center;
+                margin: 2vw 0 0 0;
+
+                button {
+                    margin: 0 2vw;
+                    font-size: var(--font14Size);
+                }
+            }
+        }
+
+        .list:last-child {
+            margin: 0;
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}
+
+.dialog_1 {
+    .content {
+        display: flex;
+        flex-direction: row;
+        border-bottom: 1px dashed var(--f1Color);
+        padding: 2vw 0;
+        margin: 0 2vw 2vw 2vw;
+
+        .value {
+            flex-grow: 1;
+            color: var(--blackColor);
+        }
+    }
+
+    .btn {
+        text-align: center;
+        margin: 3vw 0;
+
+        button {
+            margin: 0 2vw;
+        }
+    }
+}

+ 89 - 0
pagesMatch/matchAdmin/elimmatch/list.wxml

@@ -0,0 +1,89 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="one_1">
+                <input type="text" placeholder="请输入关键词" />
+            </view>
+            <view class="one_2">
+                <view class="one_2_1">
+                    <picker mode="selector" bindchange="matchChange" name="id" value="{{match.id}}" range="{{matchList}}" range-key="name">
+                        <button type="primary" class="textOver">{{match.name||'选择赛事'}}</button>
+                    </picker>
+                </view>
+                <view class="one_2_1">
+                    <button type="primary" bindtap="toCommon" data-route="matchAdmin/elimmatch/add">添加赛程</button>
+                </view>
+            </view>
+        </view>
+        <view class="two">
+            <scroll-view scroll-y="true" class="scroll-view" bindscrolltolower="toPage">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{list}}" wx:key="item">
+                        <view class="list_0">
+                            <view class="name">
+                                <text>{{item.match_id_name}}</text>
+                                <text>{{item.group_id_name}}</text>
+                                <text>{{item.project_id_name}}</text>
+                                <text>{{item.team_id_name}}</text>
+                                <text>{{item.address_id_name}}</text>
+                            </view>
+                            <view class="pk">
+                                <view class="pk_1">
+                                    <text>{{item.player_one_name}}</text>
+                                </view>
+                                <view class="pk_2">
+                                    <view class="time">{{item.match_time}}</view>
+                                    <view class="status">{{item.zhStatus}}</view>
+                                    <view class="score"><text>{{item.player_one_score||0}}</text>-{{item.player_two_score||0}}</view>
+                                </view>
+                                <view class="pk_1">
+                                    <text>{{item.player_two_name}}</text>
+                                </view>
+                            </view>
+                        </view>
+                        <view class="btn">
+                            <button type="primary" size="mini" bindtap="toCommon" data-route="matchAdmin/elimmatch/edit" data-item="{{item}}">信息维护</button>
+                            <button type="primary" size="mini" bindtap="toScore" wx:if="{{item.status=='1'}}" data-item="{{item}}">赛程上分</button>
+                            <button type="warn" size="mini" bindtap="toDel" wx:if="{{item.status=='0'}}" data-item="{{item}}">赛事删除</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>
+<dialog dialog="{{dialog}}" bind:toClose="toClose">
+    <view slot="info" class="dialog">
+        <view class="dialog_1" wx:if="{{dialog.type=='1'}}">
+            <form catchsubmit="onSubmit">
+                <view class="content">
+                    <view class="label">选手一:</view>
+                    <view class="value">
+                        <input type="text" name="player_one_name" value="{{form.player_one_name}}" disabled placeholder="请输入选手一" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">选手一比分:</view>
+                    <view class="value">
+                        <input type="text" name="player_one_score" value="{{form.player_one_score}}" placeholder="请输入选手一比分" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">选手二:</view>
+                    <view class="value">
+                        <input type="text" name="player_two_name" value="{{form.player_two_name}}" disabled placeholder="请输入选手二" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">选手二比分:</view>
+                    <view class="value">
+                        <input type="text" name="player_two_score" value="{{form.player_two_score}}" placeholder="请输入选手二比分" />
+                    </view>
+                </view>
+                <view class="btn">
+                    <button type="primary" size="mini" formType="submit">提交保存</button>
+                </view>
+            </form>
+        </view>
+    </view>
+</dialog>

+ 124 - 0
pagesMatch/matchAdmin/elimmatch/list.wxss

@@ -0,0 +1,124 @@
+@import "/app.wxss";
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  display: flex;
+  flex-direction: column;
+  width: 96vw;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f1Color);
+}
+.main .one .one_1 {
+  margin: 0 0 2vw 0;
+}
+.main .one .one_1 input {
+  padding: 1vw 0 2vw 2vw;
+  background-color: var(--f1Color);
+  border-radius: 5px;
+}
+.main .one .one_2 {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+}
+.main .one .one_2 .one_2_1 {
+  width: 30vw;
+  margin: 0 1vw;
+}
+.main .one .one_2 button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+}
+.main .two {
+  position: relative;
+  flex-grow: 1;
+  padding: 0 2vw;
+}
+.main .two .list {
+  background-color: #328d26;
+  margin: 0 0 2vw 0;
+  padding: 2vw;
+}
+.main .two .list .list_0 .name {
+  padding: 1vw 0;
+  color: var(--whiteColor);
+  margin: 0 0 1vw 0;
+}
+.main .two .list .list_0 .name text {
+  padding: 0 2vw 0 0;
+}
+.main .two .list .list_0 .pk {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+  background-color: var(--whiteColor);
+}
+.main .two .list .list_0 .pk .pk_1 {
+  width: 30vw;
+  text-align: center;
+  padding: 2vw;
+}
+.main .two .list .list_0 .pk .pk_2 {
+  text-align: center;
+  box-shadow: 0 0 5px var(--fcColor);
+}
+.main .two .list .list_0 .pk .pk_2 .time {
+  background-color: #328d26;
+  color: var(--whiteColor);
+  padding: 1vw 0;
+  font-size: var(--font14Size);
+}
+.main .two .list .list_0 .pk .pk_2 .status {
+  background-color: #328d26;
+  color: var(--whiteColor);
+  font-size: var(--font14Size);
+  padding: 0 0 1vw 0;
+}
+.main .two .list .list_0 .pk .pk_2 .score {
+  font-size: var(--font20Szie);
+  padding: 1vw 0;
+  font-weight: bold;
+}
+.main .two .list .btn {
+  text-align: center;
+  margin: 2vw 0 0 0;
+}
+.main .two .list .btn button {
+  margin: 0 2vw;
+  font-size: var(--font14Size);
+}
+.main .two .list:last-child {
+  margin: 0;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}
+.dialog_1 .content {
+  display: flex;
+  flex-direction: row;
+  border-bottom: 1px dashed var(--f1Color);
+  padding: 2vw 0;
+  margin: 0 2vw 2vw 2vw;
+}
+.dialog_1 .content .value {
+  flex-grow: 1;
+  color: var(--blackColor);
+}
+.dialog_1 .btn {
+  text-align: center;
+  margin: 3vw 0;
+}
+.dialog_1 .btn button {
+  margin: 0 2vw;
+}

+ 13 - 21
pagesMatch/matchAdmin/group/add.js

@@ -3,14 +3,15 @@ import WxValidate from '../../../utils/wxValidate';
 Page({
     data: {
         frameStyle: { useTop: true, name: '信息维护', leftArrow: true, useBar: false },
+        //赛事列表
+        matchList: [],
+        id: '',
         form: {},
-        //比赛列表
-        matchList: []
     },
     initValidate() {
-        const rules = { name: { required: true }, age: { required: false }, explain: { required: false }, match_id: { required: false } }
+        const rules = { match_id: { required: true }, name: { required: true }, age: { required: false }, explain: { required: false } }
         // 验证字段的提示信息,若不传则调用默认的信息
-        const messages = { name: { required: '组别名称' }, age: { required: '年龄限制' }, explain: { required: '说明' }, match_id: { required: '比赛名称' } };
+        const messages = { match_id: { required: '赛事名称' }, name: { required: '组别名称' }, age: { required: '年龄限制' }, explain: { required: '组别说明' } };
         this.WxValidate = new WxValidate(rules, messages)
     },
     // 返回
@@ -21,9 +22,7 @@ Page({
     matchChange: function (e) {
         const that = this;
         let data = that.data.matchList[e.detail.value];
-        if (data) {
-            that.setData({ 'form.match_id': data._id, 'form.match_name': data.name })
-        }
+        if (data) { that.setData({ 'form.match_id': data._id, 'form.match_name': data.name }) }
     },
     //提交
     onSubmit: async function (e) {
@@ -44,34 +43,27 @@ Page({
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad: async function (options) {
+    onLoad: function (options) {
         const that = this;
-        that.setData({ id: options.id || '' })
+        that.setData({ id: options && options.id || '' })
         //验证规则函数
         that.initValidate();
-        // 查询其他信息
-        await that.searchOther();
         // 监听用户是否登录
-        await that.watchLogin();
-    },
-    searchOther: async function () {
-        const that = this;
-        let arr;
-        arr = await app.$get(`/match`, {  }, 'race');
-        if (arr.errcode == '0') that.setData({ matchList: arr.data })
+        that.watchLogin();
     },
     // 监听用户是否登录
     watchLogin: async function () {
         const that = this;
-        let matchList = that.data.matchList;
         wx.getStorage({
             key: 'raceuser',
             success: async res => {
+                // 赛事列表
+                let arr = await app.$get(`/match`, { belong_id: res.data._id }, 'race');
+                if (arr.errcode == '0') that.setData({ matchList: arr.data });
                 if (that.data.id) {
                     let arr = await app.$get(`/matchGroup/${that.data.id}`, {}, 'race');
                     if (arr.errcode == '0') {
-                        // 比赛名称
-                        let match = matchList.find(i => i._id == arr.data.match_id);
+                        let match = that.data.matchList.find(i => i._id == arr.data.match_id);
                         if (match) arr.data.match_name = match.name;
                         that.setData({ form: arr.data })
                     }

+ 5 - 5
pagesMatch/matchAdmin/group/add.wxml

@@ -9,7 +9,7 @@
                     </view>
                 </view>
                 <view class="content">
-                    <view class="label">赛名称:</view>
+                    <view class="label">赛名称:</view>
                     <view class="value">
                         <picker bindchange="matchChange" name="match_id" value="{{form.match_id}}" range-key='name' range="{{matchList}}">
                             <view class="picker">{{form.match_name||'请选择赛事'}}</view>
@@ -17,9 +17,9 @@
                     </view>
                 </view>
                 <view class="content">
-                    <view class="label">名称:</view>
+                    <view class="label">组别名称:</view>
                     <view class="value">
-                        <input type="text" name="name" value="{{form.name}}" placeholder="请输入名称" />
+                        <input type="text" name="name" value="{{form.name}}" placeholder="请输入组别名称" />
                     </view>
                 </view>
                 <view class="content">
@@ -29,9 +29,9 @@
                     </view>
                 </view>
                 <view class="content">
-                    <view class="label">说明:</view>
+                    <view class="label">组别说明:</view>
                     <view class="value">
-                        <textarea maxlength="500" name="explain" value="{{form.explain}}" placeholder="请输入说明" />
+                        <input type="text" name="explain" value="{{form.explain}}" placeholder="请输入组别说明" />
                     </view>
                 </view>
                 <view class="btn">

+ 32 - 8
pagesMatch/matchAdmin/group/list.js

@@ -2,6 +2,9 @@ const app = getApp();
 Page({
     data: {
         frameStyle: { useTop: true, name: '赛事组别', leftArrow: true, useBar: false },
+        // 赛事列表
+        matchList: [],
+        match: {},
         list: [],
         total: 0,
         page: 0,
@@ -10,6 +13,16 @@ Page({
     },
     // 返回
     back: function () { wx.navigateBack({ delta: 1 }) },
+    // 选择比赛
+    matchChange: function (e) {
+        const that = this;
+        let data = that.data.matchList[e.detail.value];
+        if (data) {
+            that.setData({ 'match.id': data._id, 'match.name': data.name });
+            that.setData({ skip: 0, page: 0, list: [] })
+            that.search();
+        }
+    },
     //添加信息,信息维护
     toCommon: function (e) {
         const that = this;
@@ -30,7 +43,7 @@ Page({
                     if (arr.errcode == '0') {
                         wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
                         that.setData({ skip: 0, page: 0, list: [] })
-                        that.watchLogin()
+                        that.search()
                     } else {
                         wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
                     }
@@ -38,6 +51,18 @@ Page({
             }
         })
     },
+    // 查询赛事组别
+    search: async function () {
+        const that = this;
+        let match = that.data.match;
+        let info = { skip: that.data.skip, limit: that.data.limit, match_id: match.id };
+        let arr = await app.$get(`/matchGroup`, { ...info }, 'race');
+        if (arr.errcode == '0') {
+            that.setData({ list: [...that.data.list, ...arr.data] })
+            that.setData({ total: arr.total })
+        } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+
+    },
     // 分页
     toPage: function () {
         const that = this;
@@ -49,10 +74,11 @@ Page({
             that.setData({ page: page })
             let skip = page * limit;
             that.setData({ skip: skip })
-            that.watchLogin();
+            that.search();
             wx.hideLoading()
         } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
     },
+
     /**
      * 生命周期函数--监听页面加载
      */
@@ -75,12 +101,10 @@ Page({
         wx.getStorage({
             key: 'raceuser',
             success: async res => {
-                let info = { skip: that.data.skip, limit: that.data.limit };
-                let arr = await app.$get(`/matchGroup`, { ...info }, 'race');
-                if (arr.errcode == '0') {
-                    that.setData({ list: [...that.data.list, ...arr.data] })
-                    that.setData({ total: arr.total })
-                } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+                let arr;
+                arr = await app.$get(`/match`, { belong_id: res.data.id }, 'race');
+                if (arr.errcode == '0') { that.setData({ matchList: arr.data }) }
+                if(that.data.match&&that.data.match.id)that.search();
             },
             fail: async res => {
                 wx.redirectTo({ url: '/pages/index/index' })

+ 12 - 3
pagesMatch/matchAdmin/group/list.less

@@ -6,12 +6,13 @@
 
     .one {
         display: flex;
-        flex-direction: row;
+        flex-direction: column;
+        width: 96vw;
         padding: 2vw;
         border-bottom: 1px solid var(--f1Color);
 
         .one_1 {
-            flex-grow: 1;
+            margin: 0 0 2vw 0;
 
             input {
                 padding: 1vw 0 2vw 2vw;
@@ -21,7 +22,15 @@
         }
 
         .one_2 {
-            width: 20vw;
+            display: flex;
+            flex-direction: row;
+            width: 96vw;
+            justify-content: space-around;
+
+            .one_2_1 {
+                width: 30vw;
+                margin: 0 1vw;
+            }
 
             button {
                 width: 100%;

+ 8 - 1
pagesMatch/matchAdmin/group/list.wxml

@@ -5,7 +5,14 @@
                 <input type="text" placeholder="请输入关键词" />
             </view>
             <view class="one_2">
-                <button type="primary" bindtap="toCommon" data-route="matchAdmin/group/add">添加</button>
+                <view class="one_2_1 textOver">
+                    <picker mode="selector" bindchange="matchChange" name="id" value="{{match.id}}" range="{{matchList}}" range-key="name">
+                        <button type="primary" class="textOver">{{match.name||'选择赛事'}}</button>
+                    </picker>
+                </view>
+                <view class="one_2_1 textOver">
+                    <button type="primary" bindtap="toCommon" data-route="matchAdmin/group/add">添加组别</button>
+                </view>
             </view>
         </view>
         <view class="two">

+ 11 - 3
pagesMatch/matchAdmin/group/list.wxss

@@ -5,12 +5,13 @@
 }
 .main .one {
   display: flex;
-  flex-direction: row;
+  flex-direction: column;
+  width: 96vw;
   padding: 2vw;
   border-bottom: 1px solid var(--f1Color);
 }
 .main .one .one_1 {
-  flex-grow: 1;
+  margin: 0 0 2vw 0;
 }
 .main .one .one_1 input {
   padding: 1vw 0 2vw 2vw;
@@ -18,7 +19,14 @@
   border-radius: 5px;
 }
 .main .one .one_2 {
-  width: 20vw;
+  display: flex;
+  flex-direction: row;
+  width: 96vw;
+  justify-content: space-around;
+}
+.main .one .one_2 .one_2_1 {
+  width: 30vw;
+  margin: 0 1vw;
 }
 .main .one .one_2 button {
   width: 100%;

+ 25 - 10
pagesMatch/matchAdmin/match/add.js

@@ -4,22 +4,25 @@ import WxValidate from '../../../utils/wxValidate'
 Page({
     data: {
         frameStyle: { useTop: true, name: '比赛信息', leftArrow: true, useBar: false },
-        id: '',
         // 所属id
         belong_id: '',
-        form: { logo: [] },
         // 状态列表
         statusList: [],
         // 类别列表
-        typeList: []
+        typeList: [],
+        // 赛制列表
+        formatList: [],
+        id: '',
+        form: { logo: [] },
+
     },
     initValidate() {
         const rules = {
-            belong_id: { required: false }, logo: { required: true }, name: { required: true }, start_time: { required: true }, end_time: { required: true }, address: { required: true }, sign_time: { required: true }, money: { required: true }, contact: { required: true }, status: { required: true }
+            belong_id: { required: false }, logo: { required: true }, name: { required: true }, start_time: { required: true }, end_time: { required: true }, address: { required: true }, sign_time: { required: true }, format: { required: true }, money: { required: true }, contact: { required: true }, status: { required: true }
         }
         // 验证字段的提示信息,若不传则调用默认的信息
         const messages = {
-            belong_id: { required: '属于id' }, logo: { required: 'logo' }, name: { required: '比赛名称' }, start_time: { required: '比赛开始时间' }, end_time: { required: '比赛结束时间' }, address: { required: '比赛地点' }, sign_time: { required: '报名截止时间' }, money: { required: '报名费用' }, contact: { required: '联系方式' }, status: { required: '比赛状态' },
+            belong_id: { required: '属于id' }, logo: { required: 'logo' }, name: { required: '比赛名称' }, start_time: { required: '比赛开始时间' }, end_time: { required: '比赛结束时间' }, address: { required: '比赛地点' }, sign_time: { required: '报名截止时间' }, format: { required: '赛事赛制' }, money: { required: '报名费用' }, contact: { required: '联系方式' }, status: { required: '比赛状态' },
         };
         this.WxValidate = new WxValidate(rules, messages)
     },
@@ -49,8 +52,7 @@ Page({
         const that = this;
         let data = that.data.statusList[e.detail.value];
         if (data) {
-            that.setData({ 'form.status': data.value });
-            that.setData({ 'form.zhStatus': data.label });
+            that.setData({ 'form.status': data.value, 'form.zhStatus': data.label });
         }
     },
     // 赛事类别
@@ -58,10 +60,15 @@ Page({
         const that = this;
         let data = that.data.typeList[e.detail.value];
         if (data) {
-            that.setData({ 'form.type': data.value });
-            that.setData({ 'form.zhtype': data.label });
+            that.setData({ 'form.type': data.value, 'form.zhtype': data.label });
         }
     },
+    // 选择赛制
+    formatChange: function (e) {
+        const that = this;
+        let data = that.data.formatList[e.detail.value];
+        if (data) { that.setData({ 'form.format': data.value, 'form.zhFormat': data.label }); }
+    },
     //赛事规程
     inputChange: function (e) {
         const that = this;
@@ -91,7 +98,7 @@ Page({
      */
     onLoad: async function (options) {
         const that = this;
-        that.setData({ id: options.id || '' })
+        that.setData({ id: options && options.id || '' })
         //验证规则函数
         that.initValidate();
         // 查询其他信息
@@ -102,10 +109,15 @@ Page({
     searchOther: async function () {
         const that = this;
         let arr;
+        // 赛事状态
         arr = await app.$get(`/dict`, { code: "match_status" });
         if (arr.errcode == '0' && arr.total > 0) that.setData({ statusList: arr.data[0].list });
+        // 赛事类别
         arr = await app.$get(`/dict`, { code: "match_type" });
         if (arr.errcode == '0' && arr.total > 0) that.setData({ typeList: arr.data[0].list });
+        // 赛制列表
+        arr = await app.$get(`/dict`, { code: "match_format" });
+        if (arr.errcode == '0' && arr.total > 0) that.setData({ formatList: arr.data[0].list });
     },
     // 监听用户是否登录
     watchLogin: async function () {
@@ -123,6 +135,9 @@ Page({
                         // 赛事类别
                         let type = that.data.typeList.find(i => i.value == arr.data.type)
                         if (type) arr.data.zhtype = type.label;
+                        // 赛事赛制
+                        let format = that.data.formatList.find(i => i.value == arr.data.format)
+                        if (format) arr.data.zhFormat = format.label;
                         that.setData({ form: arr.data });
                     }
                 }

+ 9 - 1
pagesMatch/matchAdmin/match/add.wxml

@@ -34,6 +34,14 @@
                         <datatime-picker datetime="{{form.end_time}}" name="end_time" bind:datetimeChange="datetimeChange"></datatime-picker>
                     </view>
                 </view>
+                <view class="content">
+                    <view class="label">比赛赛制:</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="formatChange" name="format" value="{{form.format}}" range="{{formatList}}" range-key="label">
+                            <view class="picker">{{form.zhFormat||'请选择赛制'}}</view>
+                        </picker>
+                    </view>
+                </view>
                 <view class="content">
                     <view class="label">比赛地点:</view>
                     <view class="value">
@@ -78,7 +86,7 @@
                 </view>
                 <view class="content">
                     <view class="value">
-                        <hg-editor placeholder="请输入赛事规程" name="{{form.regular}}" bind:input="inputChange"> </hg-editor>
+                        <hg-editor placeholder="请输入赛事规程" name="{{form.regular}}" bind:input="inputChange" bind:ready="onEditorReady"> </hg-editor>
                     </view>
                 </view>
                 <view class="content">

+ 6 - 6
pagesMatch/matchAdmin/match/list.js

@@ -3,30 +3,30 @@ const app = getApp();
 Page({
     data: {
         frameStyle: { useTop: true, name: '比赛信息', leftArrow: true, useBar: false },
+        // 状态列表
+        statusList: [],
+        // 类别列表
+        typeList: [],
         list: [],
         total: 0,
         page: 0,
         skip: 0,
         limit: 5,
-        // 状态列表
-        statusList: [],
-        // 类别列表
-        typeList: []
     },
     // 返回
     back: function () { wx.navigateBack({ delta: 1 }) },
     // 添加
     toCommon: function (e) {
         const that = this;
-        that.setData({ skip: 0, page: 0, list: [] })
         const { route } = e.currentTarget.dataset;
+        that.setData({ skip: 0, page: 0, list: [] })
         if (route) wx.navigateTo({ url: `/pagesMatch/matchAdmin/${route}` });
     },
     // 修改
     toEdit: function (e) {
         const that = this;
-        that.setData({ skip: 0, page: 0, list: [] })
         let { item } = e.currentTarget.dataset;
+        that.setData({ skip: 0, page: 0, list: [] })
         wx.navigateTo({ url: `/pagesMatch/matchAdmin/match/add?id=${item._id}` })
     },
     // 删除

+ 6 - 3
pagesMatch/matchAdmin/match/list.less

@@ -6,12 +6,13 @@
 
     .one {
         display: flex;
-        flex-direction: row;
+        flex-direction: column;
+        width: 96vw;
         padding: 2vw;
         border-bottom: 1px solid var(--f1Color);
 
         .one_1 {
-            flex-grow: 1;
+            margin: 0 0 2vw 0;
 
             input {
                 padding: 1vw 0 2vw 2vw;
@@ -21,7 +22,9 @@
         }
 
         .one_2 {
-            width: 20vw;
+            display: flex;
+            flex-direction: row;
+            justify-content: space-around;
 
             button {
                 width: 100%;

+ 0 - 0
pagesMatch/matchAdmin/match/list.wxml


Some files were not shown because too many files changed in this diff