Переглянути джерело

Merge branch 'master' of http://git.cc-lotus.info/ball-court/court-badminton

guhongwei 2 роки тому
батько
коміт
fa941fc2bb
2 змінених файлів з 8 додано та 2 видалено
  1. 7 1
      pages/referee/group.js
  2. 1 1
      pages/referee/group.wxml

+ 7 - 1
pages/referee/group.js

@@ -22,6 +22,12 @@ Page({
     toView: async function (e) {
         const that = this;
         const { item } = e.currentTarget.dataset;
+        if (item.winner) {
+            const arr = await app.$get(`/newCourt/api/user/${item.winner}`);
+            if (arr.errcode == '0') {
+                item.winner_name = arr.data.name
+            }
+        }
         that.setData({ info: item })
         that.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
     },
@@ -108,7 +114,7 @@ Page({
         wx.getStorage({
             key: 'user',
             success: async (res) => {
-                let info = { skip: 0, limit: 1000, referee_id: res.data.openid,status:'2' };
+                let info = { skip: 0, limit: 1000, referee_id: res.data.openid, status: '2' };
                 // if (searchInfo && searchInfo.name) info.name = searchInfo.name;
                 const arr = await app.$get(`/newCourt/api/race`, { ...info });
                 if (arr.errcode == '0') {

+ 1 - 1
pages/referee/group.wxml

@@ -86,7 +86,7 @@
             </view>
             <view class="one_1">
                 <text class="text">胜者:</text>
-                <text class="text1">{{info.winner||'暂无'}}</text>
+                <text class="text1">{{info.winner_name||'暂无'}}</text>
             </view>
             <view class="one_1">
                 <text class="text">比赛时间:</text>