guhongwei 2 years ago
parent
commit
0c35a38613
3 changed files with 42 additions and 9 deletions
  1. 3 2
      pages/matchadmin/layoutInfo.js
  2. 22 2
      pages/me/index.wxml
  3. 17 5
      pages/me/index.wxss

+ 3 - 2
pages/matchadmin/layoutInfo.js

@@ -82,7 +82,7 @@ Page({
             content: '是否确认删除该条数据?',
             async success(res) {
                 if (res.confirm) {
-                    const arr = app.$delete(`/courtAdmin/api/schedule/${id}`);
+                    const arr = await app.$delete(`/courtAdmin/api/schedule/${id}`);
                     if (arr.errcode == '0') {
                         wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
                         that.watchLogin()
@@ -151,7 +151,8 @@ Page({
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
-
+        const that = this;
+        that.watchLogin()
     },
 
     /**

+ 22 - 2
pages/me/index.wxml

@@ -33,7 +33,27 @@
                 </view>
                 <view class="two_1u">
                     <view class="ismatchList" wx:for="{{ismatchList}}" wx:key="item" bindtap="matchView" data-id="{{item._id}}">
-                        <view class="ismatch_1" style="background-image: url({{ismatch_url}});">
+                        <view class="ismatch_1">
+                            <image class="image" src="{{ismatch_url}}"></image>
+                            <view class="ismatch_1Info">
+                                <text>{{item.status=='0'?'未开始':item.status=='1'?'已开始':'已结束'}}</text>
+                                <text>{{item.match_time}}</text>
+                            </view>
+                        </view>
+                        <view class="ismatch_2">
+                            <view class="ismatch_2_1">
+                                <image src="{{item.red_logo[0].url}}"></image>
+                            </view>
+                            <view class="ismatch_2_2">
+                                <text class="name ismatchname textOver">{{item.red_name}}</text>
+                                <text class="name"><text>{{item.red_branch||0}}</text>:<text>{{item.blue_branch||0}}</text></text>
+                                <text class="name ismatchname textOver">{{item.blue_name}}</text>
+                            </view>
+                            <view class="ismatch_2_1">
+                                <image src="{{item.blue_logo[0].url}}"></image>
+                            </view>
+                        </view>
+                        <!-- <view class="ismatch_1" style="background-image: url({{ismatch_url}});">
                             <text>{{item.status=='0'?'未开始':item.status=='1'?'已开始':'已结束'}}</text>
                             <text>{{item.match_time}}</text>
                         </view>
@@ -49,7 +69,7 @@
                             <view class="ismatch_2_1">
                                 <image src="{{item.blue_logo[0].url}}"></image>
                             </view>
-                        </view>
+                        </view> -->
                     </view>
                 </view>
             </view>

+ 17 - 5
pages/me/index.wxss

@@ -161,27 +161,39 @@
 .main .two .two_1 .two_1u .ismatchList .ismatch_1 {
     float: left;
     width: 100%;
-    padding: 5px 0;
-    background-repeat: no-repeat;
-    background-size: 100% 100%;
+}
+
+.main .two .two_1 .two_1u .ismatchList .ismatch_1 .image {
+    float: left;
+    width: 100%;
+    height: 30px;
     border-top-left-radius: 5px;
     border-top-right-radius: 5px;
 }
 
-.main .two .two_1 .two_1u .ismatchList .ismatch_1 text:nth-child(1) {
+.main .two .two_1 .two_1u .ismatchList .ismatch_1 .ismatch_1Info {
+    position: absolute;
+    width: 95%;
+    height: 30px;
+    line-height: 30px;
+}
+
+.main .two .two_1 .two_1u .ismatchList .ismatch_1 .ismatch_1Info text:nth-child(1) {
     float: left;
     padding: 0 10px;
     font-size: 12px;
     color: #fff;
 }
 
-.main .two .two_1 .two_1u .ismatchList .ismatch_1 text:nth-child(2) {
+.main .two .two_1 .two_1u .ismatchList .ismatch_1 .ismatch_1Info text:nth-child(2) {
     float: right;
     padding: 0 10px 0 0;
     font-size: 12px;
     color: #fff;
 }
 
+
+
 .main .two .two_1 .two_1u .ismatchList .ismatch_2 {
     float: left;
     width: 95%;