Browse Source

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

lrf 2 years ago
parent
commit
a082cf2a24

+ 2 - 2
pages/eliminate/index.js

@@ -42,7 +42,7 @@ Page({
         const params = e.detail.value;
         const arr = await app.$post(`/newCourt/api/eliminateRace/${params._id}`, params);
         if (arr.errcode == '0') {
-            wx.showToast({ title: `上分成功`, icon: 'error', duration: 2000 })
+            wx.showToast({ title: `信息维护成功`, icon: 'error', duration: 2000 })
             that.toClose()
         } else {
             wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
@@ -78,7 +78,7 @@ Page({
         const that = this;
         that.setData({ form: {} })
         that.setData({ dialog: { title: '赛程信息', show: false, type: '1' } })
-
+        that.watchLogin()
     },
     // 选择赛事
     matchChange: function (e) {

+ 1 - 1
pages/race/index.js

@@ -48,7 +48,7 @@ Page({
         const params = e.detail.value;
         const arr = await app.$post(`/newCourt/api/race/${params._id}`, params);
         if (arr.errcode == '0') {
-            wx.showToast({ title: `上分成功`, icon: 'error', duration: 2000 })
+            wx.showToast({ title: `信息维护成功`, icon: 'error', duration: 2000 })
             that.toClose()
         } else {
             wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })

+ 8 - 7
pages/referee/eliminate.js

@@ -22,14 +22,15 @@ 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
+        const arr = await app.$get(`/newCourt/api/eliminateRace/${item._id}`);
+        if (arr.errcode == '0') {
+            if (arr.data.winner) {
+                const user = await app.$get(`/newCourt/api/user/${arr.data.winner}`);
+                if (user.errcode == '0') { arr.data.winner_name = user.data.name }
             }
+            that.setData({ info: arr.data });
+            that.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
         }
-        that.setData({ info: item })
-        that.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
     },
     // 更换场地
     toChange: async function (e) {
@@ -72,7 +73,7 @@ Page({
         const params = e.detail.value;
         const arr = await app.$post(`/newCourt/api/eliminateRace/${params._id}`, params);
         if (arr.errcode == '0') {
-            wx.showToast({ title: `上分成功`, icon: 'error', duration: 2000 })
+            wx.showToast({ title: `信息维护成功`, icon: 'error', duration: 2000 })
             that.toClose()
         } else {
             wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })

+ 1 - 1
pages/referee/eliminate.less

@@ -36,7 +36,7 @@
                 .list {
                     background-color: #ffffff;
                     border-bottom: 1px solid #cccccc;
-                    width: 96vw;
+                    width: 92vw;
                     padding: 2vw;
 
                     .name {

+ 0 - 4
pages/referee/eliminate.wxml

@@ -80,10 +80,6 @@
                 <text class="text">选手2的比分纪录:</text>
                 <text class="text1">{{info.score_two||0}}分</text>
             </view>
-            <view class="one_1">
-                <text class="text">小组名:</text>
-                <text class="text1">{{info.team_name||'暂无'}}</text>
-            </view>
             <view class="one_1">
                 <text class="text">胜者:</text>
                 <text class="text1">{{info.winner_name||'暂无'}}</text>

+ 1 - 1
pages/referee/eliminate.wxss

@@ -32,7 +32,7 @@
 .main .two .scroll-view .list-scroll-view .list {
   background-color: #ffffff;
   border-bottom: 1px solid #cccccc;
-  width: 96vw;
+  width: 92vw;
   padding: 2vw;
 }
 .main .two .scroll-view .list-scroll-view .list .name {

+ 8 - 7
pages/referee/group.js

@@ -22,14 +22,15 @@ 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
+        const arr = await app.$get(`/newCourt/api/race/${item._id}`)
+        if (arr.errcode == '0') {
+            if (arr.data.winner) {
+                const user = await app.$get(`/newCourt/api/user/${arr.data.winner}`);
+                if (user.errcode == '0') { arr.data.winner_name = user.data.name }
             }
+            that.setData({ info: arr.data });
+            that.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
         }
-        that.setData({ info: item })
-        that.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
     },
     // 更换场地
     toChange: async function (e) {
@@ -72,7 +73,7 @@ Page({
         const params = e.detail.value;
         const arr = await app.$post(`/newCourt/api/race/${params._id}`, params);
         if (arr.errcode == '0') {
-            wx.showToast({ title: `上分成功`, icon: 'error', duration: 2000 })
+            wx.showToast({ title: `信息维护成功`, icon: 'error', duration: 2000 })
             that.toClose()
         } else {
             wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })

+ 1 - 1
pages/referee/group.less

@@ -36,7 +36,7 @@
                 .list {
                     background-color: #ffffff;
                     border-bottom: 1px solid #cccccc;
-                    width: 96vw;
+                    width: 92vw;
                     padding: 2vw;
 
                     .name {

+ 0 - 4
pages/referee/group.wxml

@@ -80,10 +80,6 @@
                 <text class="text">选手2的比分纪录:</text>
                 <text class="text1">{{info.score_two||0}}分</text>
             </view>
-            <view class="one_1">
-                <text class="text">小组名:</text>
-                <text class="text1">{{info.team_name||'暂无'}}</text>
-            </view>
             <view class="one_1">
                 <text class="text">胜者:</text>
                 <text class="text1">{{info.winner_name||'暂无'}}</text>

+ 1 - 1
pages/referee/group.wxss

@@ -32,7 +32,7 @@
 .main .two .scroll-view .list-scroll-view .list {
   background-color: #ffffff;
   border-bottom: 1px solid #cccccc;
-  width: 96vw;
+  width: 92vw;
   padding: 2vw;
 }
 .main .two .scroll-view .list-scroll-view .list .name {