guhongwei 2 years ago
parent
commit
29dc0dc567
3 changed files with 31 additions and 156 deletions
  1. 1 1
      pages/match/info.js
  2. 8 145
      pages/match/info.wxml
  3. 22 10
      pages/match/info.wxss

+ 1 - 1
pages/match/info.js

@@ -55,7 +55,7 @@ Page({
      */
     onLoad: function (options) {
         const that = this;
-        that.setData({ match_id: options.id || '' });
+        that.setData({ match_id: options.id || '62a2eb5378ee7c27422d9e51' });
         // 计算高度
         that.searchHeight()
         // 监听用户是否登录

+ 8 - 145
pages/match/info.wxml

@@ -26,9 +26,12 @@
                 </view>
                 <view wx:if="{{tabs.active=='c'}}" class="c">
                     <view class="list" wx:for="{{scheduleList}}" wx:key="item" bindtap="toSchedule" data-id="{{item._id}}">
-                        <view class="list_1" style="background-image: url({{bg_img1}})">
-                            <text>{{item.status=='0'?'未开始':item.status=='1'?'开始':'已结束'}}</text>
-                            <text>{{item.match_time}}</text>
+                        <view class="list_1">
+                            <image class="image" src="{{bg_img1}}"></image>
+                            <view class="txt">
+                                <text>{{item.status=='0'?'未开始':item.status=='1'?'开始':'已结束'}}</text>
+                                <text>{{item.match_time}}</text>
+                            </view>
                         </view>
                         <view class="list_2">
                             <view class="list_2one">
@@ -45,6 +48,8 @@
                                 <image src="{{item.blue_logo[0].url}}"></image>
                             </view>
                         </view>
+
+
                     </view>
                 </view>
                 <view wx:if="{{tabs.active=='d'}}" class="d">
@@ -70,147 +75,5 @@
                 </view>
             </view>
         </view>
-        <!-- <view class="one">
-      <image class="image" src="{{src}}"></image>
-    </view>
-    <view class="two">
-      <view class="list">
-        <view class="listtou">
-          <view class="name">{{teamlist.name}}</view>
-          <view class="listbut"> <button class="color{{teamlist.status}}" size="mini">{{teamlist.status=='0'?'未开始':teamlist.status=='1'?'报名中':teamlist.status=='2'?'待比赛':teamlist.status=='3'?'进行中':'已结束'}}</button>
-          </view>
-        </view>
-        <view class="left1">
-          <view class="otherInfos">
-            <text class="text1">{{teamlist.match_time}}</text>
-          </view>
-          <view class="otherInfoq"><text class="text3">{{teamlist.address}}</text></view>
-          <view class="otherInfo textOver"><text class="text3" wx:for="{{teamlist.format}}" wx:key="item">{{item.type}}{{item.name}}</text></view>
-        </view>
-        <view class="right1" wx:if="{{item.listbisai}}" wx:for="{{item.listbisai}}" wx:for-item="items" wx:key="key">
-          <view class="right1_1">
-            <text class="text4">{{items.match}}</text>
-            <text class="text4">{{items.group}}</text>
-          </view>
-          <view class="right1_2">
-            <view class="right1_2o">
-              <image class="head1" src="{{items.head1}}"></image>
-            </view>
-            <view class="right1_2t"><text>{{items.groupname1}}</text></view>
-            <view class="right1_2i">
-              <text class="text6">{{items.fraction1}}</text>
-              <text class="text8">:</text>
-              <text class="text7">{{items.fraction2}}</text>
-            </view>
-            <view class="right1_2t"><text>{{items.groupname2}}</text></view>
-            <view class="right1_2o">
-              <image class="head2" src="{{items.head2}}"></image>
-            </view>
-          </view>
-        </view>
-      </view>
-    </view>
-    <view class="thr">
-      <e-tabs tabs="{{tabs}}" bind:tabsChange="tabsChange"></e-tabs>
-      <view wx:if="{{tabs.active=='a'}}" class="a">
-        模板
-      </view>
-      <view wx:elif="{{tabs.active=='b'}}" class="b">
-        <view class="thrsss">
-          <view class="thr-1" wx:key="item" wx:for="{{ranks}}">
-            <view class="thr1">
-              <view class="thr-left">
-                <image class="img" src="{{item.logo[0].url}}"></image>
-              </view>
-              <view class="thr-right textOver"><text class="thrname">{{item.team_name}}</text> </view>
-              <view class="thr-right textOver"><text class="thrperson">{{item.match_num}}人</text> </view>
-            </view>
-          </view>
-        </view>
-      </view>
-      <view wx:elif="{{tabs.active=='c'}}" class="b">
-        <view class="root" wx:if="{{item.status=='0'||item.status=='1'}}" wx:key="item" wx:for="{{schedule}}">
-          <image class='background-image' src='/image/huang.png'></image>
-          <view class="content">
-            <view class="four">
-              <view class="four-1">
-                <view class="fourleft3">
-                  <text class="fourtext5">{{item.status=='0'?'未开始':item.status=='1'?'报名中':item.status=='2'?'待比赛':item.status=='3'?'进行中':'已结束'}}</text>
-                  <text class="fourtext6">{{item.match_time}}</text>
-                </view>
-                <view class="fourright4">
-                  <view class="fourright1_2">
-                    <view class="fourright1_2o">
-                      <image class="fourhead1" src="{{item.blue_logo[0].url}}"></image>
-                    </view>
-                    <view class="fourright1_2t"><text>{{item.blue_name}}</text></view>
-                    <view class="fourright1_2i">
-                      <text class="fourtext6-1">{{item.blue_branch||0}}</text>
-                      <text class="fourtext8-1">:</text>
-                      <text class="fourtext7-1">{{item.red_branch||0}}</text>
-                    </view>
-                    <view class="fourright1_2t"><text>{{item.red_name}}</text></view>
-                    <view class="fourright1_2oi">
-                      <image class="fourhead2" src="{{item.red_logo[0].url}}"></image>
-                    </view>
-                  </view>
-                </view>
-              </view>
-            </view>
-          </view>
-        </view>
-        <view class="root" wx:if="{{item.status=='2'}}" wx:key="item" wx:for="{{schedule}}">
-          <image class='background-image' src='/image/hhh.png'></image>
-          <view class="content">
-            <view class="four">
-              <view class="four-1">
-                <view class="fourleft3">
-                  <text class="fourtext5">{{item.status=='0'?'未开始':item.status=='1'?'开始':'已结束'}}</text>
-                  <text class="fourtext6">{{item.match_time}}</text>
-                </view>
-                <view class="fourright4">
-                  <view class="fourright1_2">
-                    <view class="fourright1_2o">
-                      <image class="fourhead1" src="{{item.blue_logo[0].url}}"></image>
-                    </view>
-                    <view class="fourright1_2t"><text>{{item.blue_name}}</text></view>
-                    <view class="fourright1_2i">
-                      <text class="fourtext6-1">{{item.blue_branch||0}}</text>
-                      <text class="fourtext8-1">:</text>
-                      <text class="fourtext7-1">{{item.red_branch||0}}</text>
-                    </view>
-                    <view class="fourright1_2t"><text>{{item.red_name}}</text></view>
-                    <view class="fourright1_2o">
-                      <image class="fourhead2" src="{{item.red_logo[0].url}}"></image>
-                    </view>
-                  </view>
-                </view>
-              </view>
-            </view>
-          </view>
-        </view>
-      </view>
-      <view wx:elif="{{tabs.active=='d'}}" class="b">
-        <view class="head">
-          <text class="head1">排名</text>
-          <text class="head2">战队</text>
-          <text class="head3">胜负</text>
-          <text class="head4">积分</text>
-        </view>
-        <view class="headList">
-          <view class=" item {{index < 3 ? 'select-item' : 'dis-select-item'}} sortContent" wx:for="{{listbang}}" wx:key="item">
-            <text class="pai ">{{index+1}}</text>
-            <image class="headtou" src="{{item.logo[0].url}}"></image>
-            <text class="dui">{{item.team_name}}</text>
-            <view class="fen">
-              <text class="score1 {{index < 3 ? 'scorea' : 'scoreb'}}">{{item.win||0}}</text>/ <text>{{item.shu||0}}</text>
-            </view>
-            <view class="fens">
-              <text class="score1 {{index < 3 ? 'scorea' : 'scorec'}}">{{item.integral||0}}</text>
-            </view>
-          </view>
-        </view>
-      </view>
-    </view> -->
     </view>
 </mobile-main>

+ 22 - 10
pages/match/info.wxss

@@ -111,7 +111,7 @@
 
 .two_1 .b .list {
     float: left;
-    width: 19%;
+    width: 19.8%;
     margin: 0 10px 10px 0;
     background-color: #fff;
     text-align: center;
@@ -155,18 +155,30 @@
 
 .two_1 .c .list .list_1 {
     float: left;
-    width: 95%;
-    background-repeat: no-repeat;
-    background-size: 100% 100%;
-    border-top-left-radius: 5px;
-    border-top-right-radius: 5px;
-    color: #fff;
-    padding: 2px 10px;
+    width: 100%;
+    margin: 0 0 10px 0;
+}
+
+.two_1 .c .list .list_1 .image {
+    float: left;
+    width: 100%;
+    height: 25px;
+    overflow: hidden;
+    border-top-left-radius: 10px;
+    border-top-right-radius: 10px;
+}
+
+.two_1 .c .list .list_1 .txt {
+    position: absolute;
+    height: 25px;
+    width: 85%;
+    line-height: 25px;
     font-size: 14px;
-    margin: 0 0 5px 0;
+    color: #fff;
+    padding: 0 10px;
 }
 
-.two_1 .c .list .list_1 text:nth-child(2) {
+.two_1 .c .list .list_1 .txt text:nth-child(2) {
     float: right;
 }