Browse Source

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

lrf 2 years ago
parent
commit
d64d12f397

+ 1 - 1
pagesMatch/refereeAdmin/mtschedule/list.wxml

@@ -33,7 +33,7 @@
                             </view>
                         </view>
                         <view class="btn">
-                            <button type="primary" size="mini" bindtap="toCommon" data-route="refereeAdmin/outschedule/info" data-item="{{item}}">详细信息</button>
+                            <button type="primary" size="mini" bindtap="toCommon" data-route="refereeAdmin/mtschedule/info" data-item="{{item}}">详细信息</button>
                             <button type="primary" size="mini" bindtap="toScore" wx:if="{{item.status=='1'}}" data-item="{{item}}">赛程上分</button>
                             <button type="primary" size="mini" bindtap="toChange" wx:if="{{item.status=='1'&&item.player_one_score==16||item.player_two_score==16}}" data-item="{{item}}">交换场地</button>
                         </view>

+ 3 - 1
pagesMatch/refereeAdmin/outschedule/info.js

@@ -32,9 +32,11 @@ Page({
             key: 'user',
             success: async res => {
                 if (that.data.id) {
-                    const arr = await app.$get(`/msgs/${that.data.id}`, {}, 'race');
+                    const arr = await app.$get(`/eliminate/${that.data.id}`, {}, 'race');
                     if (arr.errcode == '0') {
                         arr.data.zhStatus = that.searchStatus(arr.data.status);
+                        if (arr.data.player_one == arr.data.winner) arr.data.winner_name = arr.data.player_one_name;
+                        else arr.data.winner_name = arr.data.player_two_name;
                         that.setData({ info: arr.data })
                     } else {
                         wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })

+ 1 - 5
pagesMatch/refereeAdmin/outschedule/info.wxml

@@ -13,10 +13,6 @@
                 <text>组别项目:</text>
                 <text>{{info.project_id_name||'暂无'}}</text>
             </view>
-            <view class="one_1">
-                <text>小组名称:</text>
-                <text>{{info.team_id_name||'暂无'}}</text>
-            </view>
             <view class="one_1">
                 <text>场地名称:</text>
                 <text>{{info.address_id_name||'暂无'}}</text>
@@ -63,7 +59,7 @@
             </view>
             <view class="one_1">
                 <text>胜者:</text>
-                <text>{{info.winner||'暂无'}}</text>
+                <text>{{info.winner_name||'暂无'}}</text>
             </view>
         </view>
     </view>

+ 5 - 7
pagesMatch/refereeAdmin/outschedule/list.js

@@ -44,12 +44,12 @@ Page({
             wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
             return false
         } else {
-            let arr = await app.$post(`/msgs/${form.id}`, params, 'race');
+            let arr = await app.$post(`/eliminate/${form.id}`, params, 'race');
             if (arr.errcode == '0') {
                 wx.showToast({ title: `上分成功`, icon: 'success', duration: 2000 });
-                that.toClose();
-                that.setData({ skip: 0, page: 0, list: [] })
+                that.setData({ skip: 0, page: 0, list: [], form: {} })
                 that.watchLogin()
+                that.toClose();
             }
             else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
         }
@@ -63,7 +63,7 @@ Page({
             content: '是否确认交换场地?',
             async success(res) {
                 if (res.confirm) {
-                    let arr = await app.$post(`/msgs/${item._id}`, { is_change: '1' }, 'race');
+                    let arr = await app.$post(`/eliminate/${item._id}`, { is_change: '1' }, 'race');
                     if (arr.errcode == '0') {
                         wx.showToast({ title: `交换场地成功`, icon: 'success', duration: 2000 });
                         that.setData({ skip: 0, page: 0, list: [] })
@@ -92,8 +92,6 @@ Page({
     // 关闭弹框
     toClose: function () {
         const that = this;
-        that.setData({ skip: 0, page: 0, list: [], form: {} })
-        that.watchLogin();
         that.setData({ dialog: { title: '赛程上分', show: false, type: '1' } })
     },
     /**
@@ -129,7 +127,7 @@ Page({
             key: 'raceuser',
             success: async res => {
                 let info = { skip: that.data.skip, limit: that.data.limit, referee_id: res.data._id };
-                let arr = await app.$get(`/msgs`, { ...info }, 'race');
+                let arr = await app.$get(`/eliminate`, { ...info }, 'race');
                 if (arr.errcode == '0') {
                     let list = [...that.data.list, ...arr.data]
                     for (const val of list) {

+ 6 - 5
pagesMatch/refereeAdmin/outschedule/list.wxml

@@ -9,14 +9,14 @@
                     <view class="list" wx:for="{{list}}" wx:key="item">
                         <view class="list_0">
                             <view class="name">
-                                <text>{{item.match_id_name}}</text>
-                                <text>{{item.group_id_name}}</text>
-                                <text>{{item.project_id_name}}</text>
-                                <text>{{item.team_id_name}}</text>
-                                <text>{{item.address_id_name}}</text>
+                                <text>{{item.match_id.name}}</text>
+                                <text>{{item.group_id.name}}</text>
+                                <text>{{item.project_id.name}}</text>
+                                <text>{{item.address_id.name}}</text>
                             </view>
                             <view class="pk">
                                 <view class="pk_1">
+                                    <text wx:if="{{!item.player_one_name&&!item.player_two_name}}">TBD</text>
                                     <text wx:if="{{item.is_change=='0'}}">{{item.player_one_name}}</text>
                                     <text wx:if="{{item.is_change=='1'}}">{{item.player_two_name}}</text>
                                 </view>
@@ -27,6 +27,7 @@
                                     <view class="score" wx:if="{{item.is_change=='1'}}"><text>{{item.player_two_score||0}}</text>-{{item.player_one_score||0}}</view>
                                 </view>
                                 <view class="pk_1">
+                                    <text wx:if="{{!item.player_one_name&&!item.player_two_name}}">TBD</text>
                                     <text wx:if="{{item.is_change=='0'}}">{{item.player_two_name}}</text>
                                     <text wx:if="{{item.is_change=='1'}}">{{item.player_one_name}}</text>
                                 </view>