Kaynağa Gözat

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

zs 2 yıl önce
ebeveyn
işleme
8ccb8ef593

+ 11 - 1
commpents/pagesMatchs/match/match-3.js

@@ -16,6 +16,16 @@ Component({
      * 组件的方法列表
      */
     methods: {
-
+        // 秩序册
+        orderChange: function (e) {
+            const that = this;
+            const { ctype } = e.currentTarget.dataset;
+            that.triggerEvent('orderChange', ctype)
+        },
+        cSearch: function (e) {
+            const that = this;
+            let name = e.detail.value
+            that.triggerEvent('cSearch', name)
+        },
     }
 })

+ 39 - 1
commpents/pagesMatchs/match/match-3.less

@@ -3,6 +3,43 @@
     display: flex;
     flex-direction: column;
 
+    .c_1 {
+        width: 96vw;
+        padding: 2vw;
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        background-color: var(--f1Color);
+        margin: 0 0 2vw 0;
+
+        .c_1btn {
+            width: 25vw;
+
+            button {
+                width: 100%;
+                font-size: 14px;
+                padding: 2vw;
+            }
+        }
+
+        .c_1inp {
+            width: 66vw;
+
+            input {
+                text-align: left;
+                border: 1px solid var(--fcColor);
+                padding: 1vw;
+                border-radius: 5px;
+            }
+        }
+    }
+
+    .c_2 {
+        width: 94vw;
+        position: relative;
+        flex-grow: 1;
+        height: 74.5vh;
+        margin: 0 3vw;
 
         .cList {
             background-color: #328d26;
@@ -83,8 +120,9 @@
         .cList:last-child {
             margin: 0;
         }
-    
+    }
 }
+
 .scroll-view {
     position: absolute;
     top: 0;

+ 44 - 33
commpents/pagesMatchs/match/match-3.wxml

@@ -1,43 +1,54 @@
 <view class="c">
-    <scroll-view scroll-y="true" class="scroll-view">
-        <view class="list-scroll-view">
-            <view class="cList" wx:for="{{cList}}" wx:key="item" data-item="{{item}}">
-                <view class="cList_0" 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 class="c_1">
+        <view class="c_1btn">
+            <button type="primary" bindtap="orderChange" wx:if="{{cType=='1'}}" data-ctype="{{0}}">查看场次表</button>
+            <button type="primary" bindtap="orderChange" wx:if="{{cType=='0'}}" data-ctype="{{1}}">查看对阵表</button>
+        </view>
+        <view class="c_1inp">
+            <input type="text" value="{{cSearch.name}}" bindconfirm="cSearch" placeholder="{{cType=='0'?'请输入队友姓名':'请输入项目名称'}}" />
+        </view>
+    </view>
+    <view class="c_2">
+        <scroll-view scroll-y="true" class="scroll-view">
+            <view class="list-scroll-view">
+                <view class="cList" wx:for="{{cList}}" wx:key="item" data-item="{{item}}">
+                    <view class="cList_0" 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_1">
-                            <view>{{item.two_one||''||item.player_two_name}}</view>
-                            <view>{{item.two_two||''}}</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>
-                <view class="cList_1" wx:elif="{{cType=='1'}}">
-                    <text>{{item.group_id_name}}({{item.age}}周岁)</text>
-                    <text>{{item.project_id_name}}({{item.zhGender}})</text>
-                    <text>{{item.name}}</text>
-                    <view class="person">
-                        <view wx:for="{{item.person}}" wx:key="item">
-                            <view class="user_name">
-                                <view>{{item.one||''||item.name}}</view>
-                                <view>{{item.two||''}}</view>
+                    <view class="cList_1" wx:elif="{{cType=='1'}}">
+                        <text>{{item.group_id_name}}({{item.age}}周岁)</text>
+                        <text>{{item.project_id_name}}({{item.zhGender}})</text>
+                        <text>{{item.name}}</text>
+                        <view class="person">
+                            <view wx:for="{{item.person}}" wx:key="item">
+                                <view class="user_name">
+                                    <view>{{item.one||''||item.name}}</view>
+                                    <view>{{item.two||''}}</view>
+                                </view>
                             </view>
                         </view>
                     </view>
                 </view>
             </view>
-        </view>
-    </scroll-view>
+        </scroll-view>
+    </view>
 </view>

+ 45 - 12
commpents/pagesMatchs/match/match-3.wxss

@@ -3,50 +3,83 @@
   display: flex;
   flex-direction: column;
 }
-.c .cList {
+.c .c_1 {
+  width: 96vw;
+  padding: 2vw;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  background-color: var(--f1Color);
+  margin: 0 0 2vw 0;
+}
+.c .c_1 .c_1btn {
+  width: 25vw;
+}
+.c .c_1 .c_1btn button {
+  width: 100%;
+  font-size: 14px;
+  padding: 2vw;
+}
+.c .c_1 .c_1inp {
+  width: 66vw;
+}
+.c .c_1 .c_1inp input {
+  text-align: left;
+  border: 1px solid var(--fcColor);
+  padding: 1vw;
+  border-radius: 5px;
+}
+.c .c_2 {
+  width: 94vw;
+  position: relative;
+  flex-grow: 1;
+  height: 74.5vh;
+  margin: 0 3vw;
+}
+.c .c_2 .cList {
   background-color: #328d26;
   margin: 0 0 2vw 0;
   padding: 2vw;
 }
-.c .cList .cList_0 .name {
+.c .c_2 .cList .cList_0 .name {
   padding: 1vw 0;
   color: var(--whiteColor);
   margin: 0 0 1vw 0;
 }
-.c .cList .cList_0 .name text {
+.c .c_2 .cList .cList_0 .name text {
   padding: 0 2vw 0 0;
 }
-.c .cList .cList_0 .pk {
+.c .c_2 .cList .cList_0 .pk {
   display: flex;
   flex-direction: row;
   justify-content: space-around;
   background-color: var(--whiteColor);
 }
-.c .cList .cList_0 .pk .pk_1 {
+.c .c_2 .cList .cList_0 .pk .pk_1 {
   width: 30vw;
   text-align: center;
   padding: 2vw;
 }
-.c .cList .cList_0 .pk .pk_2 {
+.c .c_2 .cList .cList_0 .pk .pk_2 {
   text-align: center;
   box-shadow: 0 0 5px var(--fcColor);
 }
-.c .cList .cList_0 .pk .pk_2 .time {
+.c .c_2 .cList .cList_0 .pk .pk_2 .time {
   background-color: #328d26;
   color: var(--whiteColor);
   padding: 1vw 0;
   font-size: var(--font14Size);
 }
-.c .cList .cList_0 .pk .pk_2 .score {
+.c .c_2 .cList .cList_0 .pk .pk_2 .score {
   font-size: var(--font20Szie);
   padding: 1vw 0;
   font-weight: bold;
 }
-.c .cList .cList_1 text {
+.c .c_2 .cList .cList_1 text {
   padding: 0 1vw;
   color: var(--whiteColor);
 }
-.c .cList .cList_1 .person {
+.c .c_2 .cList .cList_1 .person {
   margin: 2vw 0 1vw 0;
   display: flex;
   flex-direction: row;
@@ -54,7 +87,7 @@
   flex-wrap: wrap;
   background-color: var(--whiteColor);
 }
-.c .cList .cList_1 .person .user_name {
+.c .c_2 .cList .cList_1 .person .user_name {
   width: 22vw;
   margin: 1vw;
   padding: 2vw;
@@ -64,7 +97,7 @@
   border: 1px solid var(--f85Color);
   border-radius: 2px;
 }
-.c .cList:last-child {
+.c .c_2 .cList:last-child {
   margin: 0;
 }
 .scroll-view {

+ 3 - 3
pagesMatch/match/info.js

@@ -93,14 +93,14 @@ Page({
     // 秩序册
     orderChange: function (e) {
         const that = this;
-        const { ctype } = e.currentTarget.dataset;
-        that.setData({ cType: ctype == '0' ? '1' : '0' })
+        const ctype = e.detail;
+        that.setData({ cType: ctype })
         that.setData({ cList: that.data.cType == '0' ? that.data.raceList : that.data.raceteamList })
     },
     // 秩序册查询
     cSearch: async function (e) {
         const that = this;
-        that.setData({ 'searchInfo.name': e.detail.value });
+        that.setData({ 'searchInfo.name': e.detail });
         that.searchOrderBook();
     },
     /**

+ 2 - 38
pagesMatch/match/info.less

@@ -84,45 +84,9 @@
             display: flex;
             flex-direction: column;
 
-            .c_1 {
-                width: 96vw;
-                padding: 2vw;
-                display: flex;
-                flex-direction: row;
-                justify-content: space-between;
-                background-color: var(--f1Color);
-                margin: 0 0 2vw 0;
-
-                .c_1btn {
-                    width: 25vw;
-
-                    button {
-                        width: 100%;
-                        font-size: 14px;
-                        padding: 2vw;
-                    }
-                }
-
-                .c_1inp {
-                    width: 66vw;
-
-                    input {
-                        text-align: left;
-                        border: 1px solid var(--fcColor);
-                        padding: 1vw;
-                        border-radius: 5px;
-                    }
-                }
-            }
+          
 
-            .c_2 {
-                width: 94vw;
-                position: relative;
-                flex-grow: 1;
-                height: 74.5vh;
-                margin: 0 3vw;
-
-            }
+            
         }
 
         .d {

+ 4 - 14
pagesMatch/match/info.wxml

@@ -48,21 +48,11 @@
                 </scroll-view>
             </view>
             <view wx:if="{{tabs.active=='c'}}" class="c">
-                <view class="c_1">
-                    <view class="c_1btn">
-                        <button type="primary" bindtap="orderChange" data-ctype="{{cType}}">{{cType=='0'?'查看对阵表':'查看场次表'}}</button>
-                    </view>
-                    <view class="c_1inp">
-                        <input type="text" value="{{cSearch.name}}" bindconfirm="cSearch" placeholder="{{cType=='0'?'请输入队友姓名':'请输入组别名称'}}" />
+                <scroll-view scroll-y="true" class="scroll-view">
+                    <view class="list-scroll-view">
+                        <match-3 cList="{{cList}}" cType="{{cType}}" bind:orderChange="orderChange" bind:cSearch="cSearch"></match-3>
                     </view>
-                </view>
-                <view class="c_2">
-                    <scroll-view scroll-y="true" class="scroll-view">
-                        <view class="list-scroll-view">
-                            <match-3 cList="{{cList}}" cType="{{cType}}"></match-3>
-                        </view>
-                    </scroll-view>
-                </view>
+                </scroll-view>
             </view>
             <view wx:if="{{tabs.active=='d'}}" class="d">
                 <scroll-view scroll-y="true" class="scroll-view">

+ 0 - 33
pagesMatch/match/info.wxss

@@ -65,39 +65,6 @@
   display: flex;
   flex-direction: column;
 }
-.main .two .c .c_1 {
-  width: 96vw;
-  padding: 2vw;
-  display: flex;
-  flex-direction: row;
-  justify-content: space-between;
-  background-color: var(--f1Color);
-  margin: 0 0 2vw 0;
-}
-.main .two .c .c_1 .c_1btn {
-  width: 25vw;
-}
-.main .two .c .c_1 .c_1btn button {
-  width: 100%;
-  font-size: 14px;
-  padding: 2vw;
-}
-.main .two .c .c_1 .c_1inp {
-  width: 66vw;
-}
-.main .two .c .c_1 .c_1inp input {
-  text-align: left;
-  border: 1px solid var(--fcColor);
-  padding: 1vw;
-  border-radius: 5px;
-}
-.main .two .c .c_2 {
-  width: 94vw;
-  position: relative;
-  flex-grow: 1;
-  height: 74.5vh;
-  margin: 0 3vw;
-}
 .main .two .d {
   height: 83vh;
 }