guhongwei vor 2 Jahren
Ursprung
Commit
1210a9713d
4 geänderte Dateien mit 242 neuen und 72 gelöschten Zeilen
  1. 6 6
      app.json
  2. 57 64
      pages/match/info.js
  3. 40 2
      pages/match/info.wxml
  4. 139 0
      pages/match/info.wxss

+ 6 - 6
app.json

@@ -1,21 +1,21 @@
 {
     "pages": [
-        "pages/me/index",
-        "pages/matchadmin/index",
-        "pages/addmatch/index",
-        "pages/matchadmin/layoutInfo",
-        "pages/matchadmin/layout",
         "pages/index/index",
         "pages/login/index",
         "pages/register/index",
         "pages/home/index",
         "pages/search/index",
-        "pages/match/info",
         "pages/teamrank/index",
         "pages/teamexam/index",
         "pages/team/index",
         "pages/teamInfo/index",
         "pages/teamInfo/info",
+        "pages/me/index",
+        "pages/match/info",
+        "pages/matchadmin/index",
+        "pages/addmatch/index",
+        "pages/matchadmin/layoutInfo",
+        "pages/matchadmin/layout",
         "pages/editBasic/index",
         "pages/uploadimg/index",
         "pages/uploadScore/index",

+ 57 - 64
pages/match/info.js

@@ -13,58 +13,72 @@ Page({
         // 主体高度
         infoHeight: '',
         bg_img: '/image/yun.jpg',
+        bg_img1: '/image/me_2.png',
         // 比赛信息
         match_id: '',
         matchInfo: {},
         // 参赛队伍
         matchteamList: [],
+        // 赛程列表
+        scheduleList: [],
+        // 榜单
+        rankingList: [
+            {
+                pm: '1',
+                logo: [{ url: '/image/team_1.jpg' }],
+                team_name: '测试战队',
+                sheng: '10',
+                fu: '10',
+                jf: '111'
+            },
+            {
+                pm: '1',
+                logo: [{ url: '/image/team_1.jpg' }],
+                team_name: '测试战队',
+                sheng: '10',
+                fu: '10',
+                jf: '111'
+            },
+            {
+                pm: '1',
+                logo: [{ url: '/image/team_1.jpg' }],
+                team_name: '测试战队',
+                sheng: '10',
+                fu: '10',
+                jf: '111'
+            },
+            {
+                pm: '1',
+                logo: [{ url: '/image/team_1.jpg' }],
+                team_name: '测试战队',
+                sheng: '10',
+                fu: '10',
+                jf: '111'
+            },
+            {
+                pm: '1',
+                logo: [{ url: '/image/team_1.jpg' }],
+                team_name: '测试战队',
+                sheng: '10',
+                fu: '10',
+                jf: '111'
+            },
+            {
+                pm: '1',
+                logo: [{ url: '/image/team_1.jpg' }],
+                team_name: '测试战队',
+                sheng: '10',
+                fu: '10',
+                jf: '111'
+            },
+        ],
         // 状态
         statusList: match_status,
         // 选项卡
         tabs: {
-            active: 'b',
+            active: 'd',
             list: [{ title: '赛制信息', name: 'a' }, { title: '参赛队伍', name: 'b' }, { title: '赛程列表', name: 'c' }, { title: '队伍榜单', name: 'd' }],
         },
-        // ids: '',
-        // // 选项卡
-        // tabs: {
-        //     active: 'd',
-        //     list: [
-        //         { title: '赛制信息', name: 'a' },
-        //         { title: '参赛队伍', name: 'b' },
-        //         { title: '赛程列表', name: 'c' },
-        //         { title: '队伍榜单', name: 'd' },
-        //     ],
-        // },
-        // teamlist: [],
-        // ranks: [],
-        // listbang: [
-        //     {
-        //         pm: '1',
-        //         team_name: '测试团队',
-        //         sf: '1/0',
-        //         jf: '234'
-        //     },
-        //     {
-        //         pm: '1',
-        //         team_name: '测试团队',
-        //         sf: '1/0',
-        //         jf: '234'
-        //     },
-        //     {
-        //         pm: '1',
-        //         team_name: '测试团队',
-        //         sf: '1/0',
-        //         jf: '234'
-        //     },
-        //     {
-        //         pm: '1',
-        //         team_name: '测试团队',
-        //         sf: '1/0',
-        //         jf: '234'
-        //     },
-        // ],
-        // schedule: [],
     },
     back: function () {
         wx.navigateBack({ url: '/pages/me/index' })
@@ -101,29 +115,8 @@ Page({
                 }
                 arr = await app.$get(`/courtAdmin/api/matchteam`, { match_id: that.data.match_id });
                 if (arr.errcode == '0') that.setData({ matchteamList: arr.data })
-                // wx.request({
-                //     url: `${app.globalData.publicUrl}/courtAdmin/api/match/${this.data.ids}`, //接口地址
-                //     method: 'get',
-                //     // data: {},
-                //     success(res) {
-                //         if (res.data.errcode == 0) {
-                //             let datas = res.data.data
-                //             that.setData({
-                //                 teamlist: datas,
-                //             });
-                //             // 查询参赛队伍数据
-                //             that.ranks();
-                //             // 查询赛程列表数据
-                //             that.course();
-                //         } else {
-                //             wx.showToast({
-                //                 title: res.data.errmsg,
-                //                 icon: 'none',
-                //                 duration: 2000
-                //             })
-                //         }
-                //     }
-                // })
+                arr = await app.$get(`/courtAdmin/api/schedule`, { match_id: that.data.match_id });
+                if (arr.errcode == '0') that.setData({ scheduleList: arr.data })
             },
             fail: res => {
                 return wx.redirectTo({ url: '/pages/index/index', })

+ 40 - 2
pages/match/info.wxml

@@ -25,10 +25,48 @@
                     </view>
                 </view>
                 <view wx:if="{{tabs.active=='c'}}" class="c">
-                    1
+                    <view class="list" wx:for="{{scheduleList}}" wx:key="item">
+                        <view class="list_1" style="background-image: url({{bg_img1}})">
+                            <text>{{item.status=='0'?'未开始':item.status=='1'?'开始':'已结束'}}</text>
+                            <text>{{item.match_time}}</text>
+                        </view>
+                        <view class="list_2">
+                            <view class="list_2one">
+                                <image src="{{item.red_logo[0].url}}"></image>
+                                <text class="textOver">{{item.red_name}}</text>
+                            </view>
+                            <view class="list_2two">
+                                <text>{{item.red_branch||0}}</text>
+                                <text>:</text>
+                                <text>{{item.blue_branch||0}}</text>
+                            </view>
+                            <view class="list_2one">
+                                <text class="textOver">{{item.blue_name||'暂无'}}</text>
+                                <image src="{{item.blue_logo[0].url}}"></image>
+                            </view>
+                        </view>
+                    </view>
                 </view>
                 <view wx:if="{{tabs.active=='d'}}" class="d">
-                    1
+                    <view class="ranking">
+                        <view>排名</view>
+                        <view>战队</view>
+                        <view>胜负</view>
+                        <view>积分</view>
+                    </view>
+                    <view class="ranking rankingList" wx:for="{{rankingList}}" wx:key="item">
+                        <view><text>{{item.pm}}</text></view>
+                        <view class="textOver">
+                            <image src="{{item.logo[0].url}}"></image>
+                            <text>{{item.team_name}}</text>
+                        </view>
+                        <view>
+                            <text>{{item.sheng}}</text>
+                            <text>/</text>
+                            <text>{{item.fu}}</text>
+                        </view>
+                        <view><text>{{item.jf}}</text></view>
+                    </view>
                 </view>
             </view>
         </view>

+ 139 - 0
pages/match/info.wxss

@@ -142,4 +142,143 @@
     width: 100%;
     font-size: 12px;
     color: #666;
+}
+
+.two_1 .c .list {
+    float: left;
+    width: 95%;
+    border-radius: 5px;
+    background-color: #fff;
+    margin: 0 0 10px 0;
+    padding: 10px;
+}
+
+.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;
+    font-size: 14px;
+    margin: 0 0 5px 0;
+}
+
+.two_1 .c .list .list_1 text:nth-child(2) {
+    float: right;
+}
+
+.two_1 .c .list .list_2 {
+    float: left;
+    width: 100%;
+}
+
+.two_1 .c .list .list_2 .list_2one {
+    float: left;
+    width: 39%;
+    text-align: center;
+}
+
+.two_1 .c .list .list_2 .list_2one image {
+    width: 50px;
+    height: 50px;
+    border-radius: 90px;
+}
+
+.two_1 .c .list .list_2 .list_2one text {
+    float: right;
+    font-size: 14px;
+    padding: 15px 0;
+}
+
+.two_1 .c .list .list_2 .list_2one:nth-child(3) text {
+    float: left;
+}
+
+.two_1 .c .list .list_2 .list_2two {
+    float: left;
+    width: 22%;
+    text-align: center;
+    padding: 10px 0;
+}
+
+.two_1 .c .list .list_2 .list_2two text {
+    background-color: rgb(228, 226, 226);
+    text-align: center;
+    color: #ff0000;
+    font-size: 20px;
+    font-weight: bold;
+    text-decoration: line-through;
+    text-decoration-color: #fff;
+    padding: 0 2px;
+}
+
+.two_1 .c .list .list_2 .list_2two text:nth-child(2) {
+    color: #000000;
+}
+
+.two_1 .c .list .list_2 .list_2two text:nth-child(3) {
+    color: #00427b;
+}
+
+.two_1 .d {
+    float: left;
+    width: 100%;
+}
+
+.two_1 .d .ranking {
+    float: left;
+    width: 100%;
+    background-color: #000000;
+    color: #fff;
+    padding: 5px 0;
+    border-top-left-radius: 10px;
+    border-top-right-radius: 10px;
+}
+
+.two_1 .d .ranking view {
+    float: left;
+    text-align: center;
+    width: 20%;
+}
+
+.two_1 .d .ranking view:nth-child(2) {
+    width: 40%;
+}
+
+.two_1 .d .rankingList {
+    background-color: #fff;
+    border-bottom: 1px solid #cccccc;
+    color: #000000;
+    border-radius: 0;
+}
+
+.two_1 .d .rankingList:nth-child(2) {
+    color: #fff;
+    background-color: rgba(247, 31, 67);
+}
+
+.two_1 .d .rankingList:nth-child(3) {
+    color: #fff;
+    background-color: rgba(245, 96, 133);
+}
+
+.two_1 .d .rankingList:nth-child(4) {
+    color: #fff;
+    background-color: rgb(252, 172, 198);
+}
+
+.two_1 .d .rankingList view text {
+    display: inline-block;
+    padding: 15px 0;
+    font-size: 14px;
+}
+
+.two_1 .d .rankingList view:nth-child(2) image {
+    float: left;
+    width: 50px;
+    height: 50px;
+    border-radius: 90px;
 }