YY 2 năm trước cách đây
mục cha
commit
d34deffd88

+ 21 - 0
pages/matchadmin/layoutInfo.js

@@ -13,6 +13,10 @@ Page({
         // 比赛信息
         match_id: '629eb5de78fa03648c0535d9',
         list: [],
+        // 弹框
+        dialog: { title: '详细信息', show: false, type: '1' },
+        //详情
+        form: {}
     },
     back: function () {
         wx.navigateBack({ url: '/pages/matchadmin/index' })
@@ -22,6 +26,23 @@ Page({
         const that = this;
         wx.navigateTo({ url: `/pages/matchadmin/layout?id=${that.data.match_id}` })
     },
+    // 查看
+    toView: async function (e) {
+        const that = this;
+        let { id } = e.currentTarget.dataset;
+        const arr = await app.$get(`/courtAdmin/api/schedule/${id}`);
+        if (arr.errcode == '0') {
+            that.setData({ form: arr.data })
+            that.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
+        }
+    },
+    //维护
+    toEdit: function () {
+    },
+    toClose: function () {
+        const that = this;
+        that.setData({ dialog: { title: '详细信息', show: false, } })
+    },
     /**
      * 生命周期函数--监听页面加载
      */

+ 6 - 5
pages/matchadmin/layoutInfo.json

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

+ 83 - 2
pages/matchadmin/layoutInfo.wxml

@@ -5,8 +5,89 @@
         </view>
         <view class="two">
             <view class="list" wx:for="{{list}}" wx:key="item">
-                {{item.match_id}}
+                <view class="name textOver">{{item.match_name}}</view>
+                <view class="other">
+                    <view class="otherInfo"><text>红方队伍: </text><text>{{item.red_name}}</text></view>
+                    <view class="otherInfo"><text>红方比分:</text><text>{{item.red_branch}}</text></view>
+                    <view class="otherInfo"><text>蓝方队伍: </text><text>{{item.blue_name}}</text></view>
+                    <view class="otherInfo"><text>蓝方比分: </text><text>{{item.blue_branch}}</text></view>
+                    <view class="otherInfo"><text>状态:</text><text>{{item.status=='0'?'未开始':item.status=='1'?'报名中':item.status=='2'?'待比赛':item.status=='3'?'进行中':'已结束'}}</text></view>
+                </view>
+                <view class="btn">
+                    <button type="default" size="mini" bindtap="toView" data-id="{{item._id}}">详情</button>
+                    <button type="warn" size="mini" bindtap="toEdit" data-id="{{item._id}}" data-route="layoutInfo">维护</button>
+                </view>
             </view>
         </view>
     </view>
-</mobile-main>
+</mobile-main>
+<e-dialog dialog="{{dialog}}" bind:toClose="toClose">
+    <view slot="info">
+        <view class="dialog_one" wx:if="{{dialog.type=='1'}}">
+            <view class="one_1">
+                <text class="text">比赛名称:</text>
+                <text class="text1">{{form.match_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">红方团队:</text>
+                <text class="text1">{{form.red_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">红方LOGO:</text>
+                <image src="{{form.red_logo[0].url}}"></image>
+            </view>
+            <view class="one_1">
+                <text class="text">红方队员:</text>
+                <text class="members" wx:for="{{form.red_members}}" wx:key="item">{{item.nickname}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">红方比分:</text>
+                <text class="text1">{{form.red_branch||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">红方积分:</text>
+                <text class="text1">{{form.red_integral||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">红方比赛流程图位置:</text>
+                <text class="text1">{{form.red_position||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">蓝方团队:</text>
+                <text class="text1">{{form.blue_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">蓝方LOGO:</text>
+                <image src="{{form.blue_logo[0].url}}"></image>
+            </view>
+            <view class="one_1">
+                <text class="text">蓝方队员:</text>
+                <text class="members" wx:for="{{form.blue_members}}" wx:key="item">{{item.nickname}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">蓝方比分:</text>
+                <text class="text1">{{form.blue_branch||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">蓝方积分:</text>
+                <text class="text1">{{form.blue_integral||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">蓝方比赛流程图位置:</text>
+                <text class="text1">{{form.blue_position||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">比赛图片</text>
+                <image src="{{form. match_file[0].url}}"></image>
+            </view>
+            <view class="one_1">
+                <text class="text">比赛状态:</text>
+                <text class="text1">{{info.status=='0'?'未开始':info.status=='1'?'报名中':info.status=='2'?'待比赛':info.status=='3'?'进行中':'已结束'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">是否轮空: </text>
+                <text class="text1">{{info.is_bye=='true'?'是':'否'}}</text>
+            </view>
+        </view>
+    </view>
+</e-dialog>

+ 96 - 0
pages/matchadmin/layoutInfo.wxss

@@ -19,13 +19,109 @@
 .main .two {
     float: left;
     width: 95%;
+    padding: 10px;
     overflow-x: hidden;
 }
 
+/* 
+.main .two .two_1 {
+    background-color: #fff;
+    border-radius: 5px;
+    margin: 0 0 10px 0;
+    padding: 10px;
+}
+
+.main .two .two_1 .two_1_1 {
+    font-size: 16px;
+    font-weight: 700;
+}
+
+.main .two .two_1 .two_1_2 {
+    font-size: 14px;
+    color: #999;
+}
+
+.main .two .two_1 .two_1_2 .two_1_2_text {
+    font-size: 14px;
+    color: #333;
+
+} */
 .main .two .list {
     float: left;
     width: 95%;
     padding: 10px;
+    background-color: #fff;
+    margin: 0 0 10px 0;
+    border-radius: 5px;
+}
+
+.main .two .list .name {
+    float: left;
+    width: 100%;
+    font-size: 14px;
+    font-weight: bold;
+    margin: 0 0 5px 0;
+}
+
+.main .two .list .other {
+    float: left;
+    width: 100%;
+    margin: 0 0 5px 0;
+}
+
+.main .two .list .other .otherInfo {
+    font-size: 12px;
+    color: #666;
+    margin: 0 0 5px 0;
+}
+
+.main .two .list .other .otherInfo text:nth-child(2) {
+    color: #000;
+}
+
+.main .two .list .btn {
+    text-align: center;
+}
+
+.main .two .list .btn button {
+    margin: 0 10px;
+    padding: 0 10px;
+    font-size: 12px;
+}
+
+.dialog_one {
+    float: left;
+    width: 100%;
+    margin: 10px 0 0 0;
+}
+
+.dialog_one .one_1 {
+    float: left;
+    width: 91%;
+    border: 1px solid #ccc;
+    border-radius: 5px;
     margin: 0 0 10px 0;
+    padding: 10px;
+
+}
+
+.dialog_one .one_1 .text {
+    color: #666;
+    font-size: 14px;
+}
+
+.dialog_one .one_1 .text1 {
+    float: right;
+    color: #000;
+}
+
+.dialog_one .one_1 image {
+    float: right;
+    width: 60px;
+    height: 60px;
+}
 
+.dialog_one .one_1 .members {
+    padding: 5px;
+    font-size: 12px;
 }