Browse Source

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

zs 2 years ago
parent
commit
97d4f6120b
4 changed files with 404 additions and 1 deletions
  1. 55 0
      pages/openMatch/index.js
  2. 153 0
      pages/openMatch/index.less
  3. 69 1
      pages/openMatch/index.wxml
  4. 127 0
      pages/openMatch/index.wxss

+ 55 - 0
pages/openMatch/index.js

@@ -29,6 +29,56 @@ Page({
         // 选手
         bActive: '0',
         groupList: [],
+        // 场次表
+        sessionsList: [
+            {
+                person: [
+                    { name: "用户1" },
+                    { name: "用户2" }],
+                red_members: [
+                    { name: "用户3" },
+                    { name: "用户4" }],
+            },
+            {
+                person: [
+                    { name: "用户1" },
+                    { name: "用户2" }],
+                red_members: [
+                    { name: "用户3" },
+                    { name: "用户4" }],
+            },
+            {
+                person: [
+                    { name: "用户2" }],
+                red_members: [
+                    { name: "用户4" }],
+            },
+            {
+                person: [
+                    { name: "用户2" }],
+                red_members: [
+                    { name: "用户4" }],
+            },
+            {
+                person: [
+                    { name: "用户2" }],
+                red_members: [
+                    { name: "用户4" }],
+            },
+        ],
+        // 对阵表
+        againstList: [
+            { name: '青年一组 A组' }, { name: '青年一组 B组' },
+            { name: '青年一组 C组' }, { name: '青年一组 D组' },
+            { name: '青年二组 A组' }, { name: '青年二组 B组' },
+            { name: '青年二组 C组' }, { name: '青年二组 D组' },
+            { name: '青年一组 A组' }, { name: '青年一组 B组' },
+            { name: '青年一组 C组' }, { name: '青年一组 D组' },
+            { name: '青年二组 A组' }, { name: '青年二组 B组' },
+            { name: '青年二组 C组' }, { name: '青年二组 D组' },
+        ],
+        // 场次/对阵表
+        switch: '2',
         //比赛进程安排
         racelist: [
             {
@@ -158,6 +208,11 @@ Page({
         const that = this;
         that.setData({ bActive: e.detail })
     },
+    // 查看场次/对阵表
+    toSwitch: function (e) {
+        const that = this;
+        that.setData({ switch: e.currentTarget.dataset.switch })
+    },
     /**
      * 生命周期函数--监听页面加载
      */

+ 153 - 0
pages/openMatch/index.less

@@ -164,6 +164,159 @@
                             }
                         }
                     }
+
+                    .c_1 {
+                        width: 96vw;
+                        // height: 61vh;
+
+                        .c_top {
+                            display: flex;
+                            flex-direction: row;
+                            // background-color: #009cd8;
+                            padding: 3px;
+                            height: 34px;
+                            width: 94vw;
+
+                            button {
+                                background-color: #328d26;
+                                color: #fff;
+                                font-size: 12px;
+                                height: 34px;
+                                padding: 4px 12px;
+                            }
+
+                            .c_top_2 {
+                                width: 70vw;
+
+                                input {
+                                    margin: 0 0 0 5px;
+                                    background-color: #f1f1f1;
+                                    height: 34px;
+                                    flex-grow: 1;
+                                    padding: 0 0 0 4px;
+                                }
+                            }
+                        }
+
+                        .c_buttom {
+                            flex-grow: 1;
+                            position: relative;
+                            margin: 8px 0 0 0;
+                            display: flex;
+                            flex-direction: column;
+                            height: 73vh;
+
+                            .scroll-view {
+                                position: absolute;
+                                top: 0;
+                                left: 0;
+                                right: 0;
+                                bottom: 0;
+
+                                .list-scroll-view {
+                                    display: flex;
+                                    flex-wrap: wrap;
+                                    align-content: flex-start;
+                                    flex-direction: column;
+                                    justify-content: space-between;
+
+                                    .list {
+                                        width: 96vw;
+                                        margin: 0 0 5px 0;
+
+                                        .lists {
+                                            box-shadow: 0 0 1vw #cccccc;
+
+                                            .list_1 {
+                                                border-radius: 3px;
+                                                background-color: #328d26;
+                                                padding: 5px 3px;
+                                                color: #fff;
+
+                                                text {
+                                                    margin: 0 5px;
+                                                }
+                                            }
+
+                                            .list_2 {
+                                                display: flex;
+                                                flex-direction: row;
+                                                border-radius: 3px;
+
+                                                .one {
+                                                    width: 33vw;
+                                                    display: flex;
+                                                    flex-direction: row;
+                                                    font-size: 14px;
+                                                    text-align: center;
+                                                    padding: 8px 0;
+
+                                                    image {
+                                                        border-radius: 50%;
+                                                        width: 40px;
+                                                        height: 40px;
+                                                    }
+                                                }
+
+                                                .two {
+                                                    display: flex;
+                                                    flex-direction: column;
+                                                    text-align: center;
+                                                    width: 28vw;
+                                                    background-color: #fff;
+                                                    margin: 0 3px 5px 3px;
+                                                    box-shadow: 13px 0 8px -15px rgb(32, 32, 32),
+                                                        -13px 0 8px -15px rgb(32, 32, 32);
+                                                    border-radius: 0 0 5px 5px;
+
+                                                    .time {
+                                                        background-color: #328d26;
+                                                        border-radius: 0 0 5px 5px;
+                                                        color: #fff;
+                                                        padding: 3px;
+                                                        font-size: 14px;
+                                                    }
+
+                                                    .branch {
+                                                        font-size: 22px;
+                                                        padding: 2px 0 0 0;
+                                                        font-weight: 700;
+
+                                                        text {
+                                                            margin: 0 5px;
+                                                        }
+                                                    }
+                                                }
+                                            }
+                                        }
+                                    }
+
+                                    .list_2 {
+                                        margin: 0 0 8px 0;
+                                        padding: 0 5px;
+                                        width: 96vw;
+
+                                        .lists {
+                                            display: flex;
+                                            flex-direction: row;
+                                            border-bottom: 1px solid #999;
+                                            padding: 8px 10px;
+
+                                            .one_1 {
+                                                color: rgb(63, 63, 63);
+                                            }
+
+                                            .one_2 {
+                                                color: rgb(63, 63, 63);
+                                                flex-grow: 1;
+                                                text-align: right;
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
                 }
             }
         }

+ 69 - 1
pages/openMatch/index.wxml

@@ -87,7 +87,75 @@
             <view wx:elif="{{tabs.active=='c'}}" class="a c">
                 <scroll-view scroll-y="true" class="scroll-view">
                     <view class="list-scroll-view">
-                        秩序册
+                        <view class="c_1">
+                            <!-- 场次表 -->
+                            <view class="c_top" wx:if="{{switch=='2'}}">
+                                <view class="c_top_1">
+                                    <button size="mini" bindtap="toSwitch" data-switch="1">查看对阵表</button>
+                                </view>
+                                <view class="c_top_2">
+                                    <input type="text" value="{{searchInfo.name}}" bindconfirm="search" placeholder="请输入队员姓名" />
+                                </view>
+                            </view>
+                            <!-- 对阵表 -->
+                            <view class="c_top" wx:if="{{switch=='1'}}">
+                                <view class="c_top_1">
+                                    <button size="mini" bindtap="toSwitch" data-switch="2">查看场次表</button>
+                                </view>
+                                <view class="c_top_2">
+                                    <input type="text" value="{{searchInfo.name}}" bindconfirm="search" placeholder="请输入项目名称" />
+                                </view>
+                            </view>
+                            <view class="c_buttom">
+                                <scroll-view scroll-y="true" class="scroll-view">
+                                    <view class="list-scroll-view">
+                                        <!-- 场次表 -->
+                                        <view class="list" wx:for="{{sessionsList}}" wx:key="item" wx:if="{{switch=='2'}}">
+                                            <view class="lists">
+                                                <view class="list_1">
+                                                    <text>{{item.name||'青年一组 A组 2v2'}}</text>
+                                                    <text>{{item.name||'场地1'}}</text>
+                                                </view>
+                                                <view class="list_2">
+                                                    <view class="one">
+                                                        <view class="list" wx:for="{{item.person}}" wx:key="item">
+                                                            <!-- <image class="img" src="{{item.icon[0].url}}"></image> -->
+                                                            <image class="img" src="/image/icon.jpg"></image>
+                                                            <view class="name">{{item.name}}</view>
+                                                        </view>
+                                                    </view>
+                                                    <view class="two">
+                                                        <view class="time">
+                                                            <view>{{item.data||'2022-08-06'}}</view>
+                                                            <view>{{item.time||'08:00'}}</view>
+                                                        </view>
+                                                        <view class="branch">
+                                                            <text>{{item.red_branch||0}}</text>
+                                                            <text>-</text>
+                                                            <text>{{item.blue_branch||0}}</text>
+                                                        </view>
+                                                    </view>
+                                                    <view class="one">
+                                                        <view class="list" wx:for="{{item.red_members}}" wx:key="item">
+                                                            <!-- <image class="img" src="{{item.icon[0].url}}"></image> -->
+                                                            <image class="img" src="/image/icon.jpg"></image>
+                                                            <view class="name">{{item.name}}</view>
+                                                        </view>
+                                                    </view>
+                                                </view>
+                                            </view>
+                                        </view>
+                                        <!-- 对阵表 -->
+                                        <view class="list_2" wx:for="{{againstList}}" wx:key="item" wx:if="{{switch=='1'}}">
+                                            <view class="lists">
+                                                <view class="one_1">{{item.name}}</view>
+                                                <view class="one_2">></view>
+                                            </view>
+                                        </view>
+                                    </view>
+                                </scroll-view>
+                            </view>
+                        </view>
                     </view>
                 </scroll-view>
             </view>

+ 127 - 0
pages/openMatch/index.wxss

@@ -132,6 +132,133 @@
   text-align: center;
   font-size: 15px;
 }
+.main .zero .a .scroll-view .list-scroll-view .c_1 {
+  width: 96vw;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_top {
+  display: flex;
+  flex-direction: row;
+  padding: 3px;
+  height: 34px;
+  width: 94vw;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_top button {
+  background-color: #328d26;
+  color: #fff;
+  font-size: 12px;
+  height: 34px;
+  padding: 4px 12px;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_top .c_top_2 {
+  width: 70vw;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_top .c_top_2 input {
+  margin: 0 0 0 5px;
+  background-color: #f1f1f1;
+  height: 34px;
+  flex-grow: 1;
+  padding: 0 0 0 4px;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom {
+  flex-grow: 1;
+  position: relative;
+  margin: 8px 0 0 0;
+  display: flex;
+  flex-direction: column;
+  height: 73vh;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view {
+  display: flex;
+  flex-wrap: wrap;
+  align-content: flex-start;
+  flex-direction: column;
+  justify-content: space-between;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list {
+  width: 96vw;
+  margin: 0 0 5px 0;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list .lists {
+  box-shadow: 0 0 1vw #cccccc;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list .lists .list_1 {
+  border-radius: 3px;
+  background-color: #328d26;
+  padding: 5px 3px;
+  color: #fff;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list .lists .list_1 text {
+  margin: 0 5px;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list .lists .list_2 {
+  display: flex;
+  flex-direction: row;
+  border-radius: 3px;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list .lists .list_2 .one {
+  width: 33vw;
+  display: flex;
+  flex-direction: row;
+  font-size: 14px;
+  text-align: center;
+  padding: 8px 0;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list .lists .list_2 .one image {
+  border-radius: 50%;
+  width: 40px;
+  height: 40px;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list .lists .list_2 .two {
+  display: flex;
+  flex-direction: column;
+  text-align: center;
+  width: 28vw;
+  background-color: #fff;
+  margin: 0 3px 5px 3px;
+  box-shadow: 13px 0 8px -15px #202020, -13px 0 8px -15px #202020;
+  border-radius: 0 0 5px 5px;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list .lists .list_2 .two .time {
+  background-color: #328d26;
+  border-radius: 0 0 5px 5px;
+  color: #fff;
+  padding: 3px;
+  font-size: 14px;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list .lists .list_2 .two .branch {
+  font-size: 22px;
+  padding: 2px 0 0 0;
+  font-weight: 700;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list .lists .list_2 .two .branch text {
+  margin: 0 5px;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list_2 {
+  margin: 0 0 8px 0;
+  padding: 0 5px;
+  width: 96vw;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list_2 .lists {
+  display: flex;
+  flex-direction: row;
+  border-bottom: 1px solid #999;
+  padding: 8px 10px;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list_2 .lists .one_1 {
+  color: #3f3f3f;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list_2 .lists .one_2 {
+  color: #3f3f3f;
+  flex-grow: 1;
+  text-align: right;
+}
 .main .zero .d_1 {
   width: 96vw;
   text-align: center;