YY vor 3 Jahren
Ursprung
Commit
5e8e51c7d2
4 geänderte Dateien mit 24 neuen und 10 gelöschten Zeilen
  1. 2 2
      pages/layNew/index.js
  2. 19 4
      pages/me/index.js
  3. 1 1
      pages/me/index.wxml
  4. 2 3
      pages/me/index.wxss

+ 2 - 2
pages/layNew/index.js

@@ -67,11 +67,11 @@ Page({
         var match_time = this.data.date + '  ' + this.data.time;
         const value = e.detail.value;
         value.match_id = this.data.id;
-        value.red_id = this.data.red._id;
+        value.red_id = this.data.red.team_id;
         value.red_name = this.data.red.team_name;
         value.red_logo = this.data.red.logo;
         value.red_members = this.data.red.members;
-        value.blue_id = this.data.blue._id;
+        value.blue_id = this.data.blue.team_id;
         value.blue_name = this.data.blue.team_name;
         value.blue_logo = this.data.blue.logo;
         value.blue_members = this.data.blue.members;

+ 19 - 4
pages/me/index.js

@@ -18,6 +18,7 @@ Page({
     total: '4',
     //上传比分
     match: [],
+    blue_red: [],
     //个人信息详情
     item1: {},
     //团队列表
@@ -180,20 +181,34 @@ Page({
   },
   //查询比赛列表
   searchMatch: function (e) {
+    const that = this;
     let id = e[0]._id
-    console.log(e[0]._id);
     wx.request({
       url: `${app.globalData.publicUrl}/courtAdmin/api/schedule`,
       method: "get",
-      data: { blue_id: id , red_id :id},
+      data: { red_id: id },
+      header: {},
+      success: res => {
+        // that.setData({ blue_red: res.data.data })
+        that.setData({ match: res.data.data })
+      },
+      error: err => {
+      }
+    })
+    wx.request({
+      url: `${app.globalData.publicUrl}/courtAdmin/api/schedule`,
+      method: "get",
+      data: { blue_id: id },
       header: {},
       success: res => {
-        console.log(res.data.data);
-        this.setData({ match: res.data.data })
+        // that.setData({ blue_red: res.data.data })
+        that.setData({ match: res.data.data })
       },
       error: err => {
       }
     })
+    // let blue_red = that.data.blue_red;
+    // that.setData({ match: that.data.blue_red})
   },
   // 计算高度
   searchHeight: function () {

+ 1 - 1
pages/me/index.wxml

@@ -76,7 +76,7 @@
       </view>
     </view>
     <!-- 上传比分-无比赛 -->
-    <view class="four-zan" wx:if="{{item.length==0}}" >
+    <view class="four-zan" wx:if="{{match.length==0}}" >
       <view class="zan-left">
         <text>暂无比赛</text>
       </view>

+ 2 - 3
pages/me/index.wxss

@@ -137,7 +137,7 @@
   top: -30px; */
   width: 100%;
   /* height: 105px; */
-  margin: 0 0 16px 0;
+  margin: 16px 0 0 0;
 }
 
 .left3 {
@@ -179,8 +179,7 @@
 }
 
 .four-zan {
-  position: relative;
-  top: 12%;
+  margin: 10px 20px;
   width: 91%;
   text-align: center;
   height: 70px;