Browse Source

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

lrf 2 years ago
parent
commit
a7b280034b

+ 1 - 1
commpents/pagesMatchs/match/match-4.less

@@ -10,7 +10,7 @@
         width: 94vw;
         position: relative;
         flex-grow: 1;
-        height: 74.5vh;
+        height: 72vh;
         margin: 0 2vw;
 
         .list {

+ 1 - 1
commpents/pagesMatchs/match/match-4.wxss

@@ -7,7 +7,7 @@
   width: 94vw;
   position: relative;
   flex-grow: 1;
-  height: 74.5vh;
+  height: 72vh;
   margin: 0 2vw;
 }
 .main .two .list {

+ 10 - 6
pagesMatch/match/info.js

@@ -33,6 +33,7 @@ Page({
         raceList: [],
         // 赛况
         dTabs: { active: '0', menu: [] },
+        outsList: [],
         dList: [],
         // 成绩册
         achieveList: [],
@@ -139,11 +140,11 @@ Page({
     // 赛况场地选择
     dtabsChange: function (e) {
         const that = this;
-        let raceList = that.data.raceList;
+        let outsList = that.data.outsList;
         let data = that.data.dTabs.menu[e.detail];
         let list = []
-        if (data._id) list = raceList.filter(i => i.address_id == data._id);
-        else list = raceList;
+        if (data._id) list = outsList.filter(i => i.address_id == data._id);
+        else list = outsList;
         that.setData({ dList: list })
         that.setData({ 'dTabs.active': e.detail })
     },
@@ -218,7 +219,6 @@ Page({
                 } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'fail', duration: 2000 }); }
                 // 赛事选手
                 arr = await app.$get(`/match/getAll/${arr.data._id}`, {}, 'race');
-                console.log(arr);
                 if (arr.errcode == '0') that.setData({ playerList: arr.data })
                 // 秩序册
                 that.searchOrderBook();
@@ -232,10 +232,15 @@ Page({
                     }
                     that.setData({ 'dTabs.menu': addressList })
                 }
+                // 赛况
+                arr = await app.$get(`/match/getSchedule`, { match_id: that.data.info._id }, 'race');
+                if (arr.errcode == '0') {
+                    that.setData({ outsList: arr.data })
+                    that.setData({ dList: that.data.outsList })
+                }
                 // 成绩册列表
                 arr = await app.$get(`/matchProject`, { match_id: that.data.info._id }, 'race');
                 if (arr.errcode == '0') { that.setData({ achieveList: arr.data }) }
-
             },
             fail: async res => {
                 wx.redirectTo({ url: '/pages/index/index' })
@@ -287,7 +292,6 @@ Page({
                 }
             }
             that.setData({ raceList: arr.data });
-            that.setData({ dList: that.data.raceList })
         }
         that.setData({ cList: that.data.cType == '0' ? that.data.raceList : that.data.raceteamList })
     },

+ 43 - 0
pagesMatch/matchAdmin/elimmatch/add.js

@@ -121,6 +121,7 @@ Page({
         that.setData({ match_id: options.match_id, group_id: options.group_id, project_id: options.project_id })
         await this.search();
         await this.searchUser();
+        that.searchLevel();
     },
     /**
      * 查询函数
@@ -161,6 +162,48 @@ Page({
             this.setTopPlayerName();
         }
     },
+    searchLevel: function (e) {
+        const that = this;
+        let nodes = that.data.winData.nodes;
+        nodes = nodes.filter(f => !f.id.includes('l'));
+        let mls = nodes.map(i => i.level);
+        let marr = [];
+        for (const i of mls) {
+            if (!marr.includes(i)) marr.push(i)
+        }
+        const group = marr.map(i => {
+            const list = nodes.filter(f => f.level == i)
+            return list;
+        })
+        const schList = that.data.schList;
+        for (const i of nodes) {
+            const { level, id } = i;
+            const r1 = group.find(f => f[0].level == level)
+            let J1 = r1.length, J2 = J1 / 2;
+            const r2 = schList.find(f => f.player_one_node == id)
+            if (!r2) continue;
+            r2.J1 = J1, r2.J2 = J2;
+        }
+        // let levels = {};
+        // for (const val of nodes) {
+        //     let level = val.level;
+        //     levels[level];
+        //     if (levels[level]) {
+        //         levels[level].push(val);
+        //     } else {
+        //         let dui = [val];
+        //         levels[level] = dui;
+        //     }
+        // }
+        // for (const val of nodes) {
+        //     let level = val.level;
+        //     let node = schList.find((i) => i.player_one_node == val.id);
+        //     let J1 = levels[level].length;
+        //     let J2 = levels[level].length / 2;
+        //     if (node) node.J1 = J1, node.J2 = J2;
+        // }
+        that.setData({ schList: schList })
+    },
     /**
      * 同步图与赛程的人名
      * @param {Object} data 赛程数据

+ 7 - 0
pagesMatch/matchAdmin/elimmatch/add.wxml

@@ -35,6 +35,13 @@
                                                 <view>{{s.zhStatus||'暂无状态'}}</view>
                                             </view>
                                         </view>
+                                        <view class="change" wx:if="{{s.J1&&s.J2}}">
+                                            <view class="change_1 textOver" style="color: green;">
+                                                <text>{{s.J1}}</text>
+                                                进
+                                                <text>{{s.J2}}</text>
+                                            </view>
+                                        </view>
                                         <view class="name">
                                             <view class="name_1">{{s.player_one_name || s.player_one_node}}</view>
                                             <view> <text style="color: red;">PK</text></view>

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

@@ -31,7 +31,7 @@
             </view>
             <view class="one_1">
                 <text>选手类型:</text>
-                <text>{{info.player_type=='User'?'单打':info.player_type=='TeamApply'?'双打':'暂无'}}</text>
+                <text>{{info.player_type=='Race.User'?'单打':info.player_type=='Race.TeamApply'?'双打':'暂无'}}</text>
             </view>
             <view class="one_1">
                 <text>选手一:</text>

+ 72 - 51
pagesMatch/refereeAdmin/mtschedule/list.js

@@ -3,22 +3,26 @@ import WxValidate from '../../../utils/wxValidate';
 Page({
     data: {
         frameStyle: { useTop: true, name: '小组赛管理', leftArrow: true, useBar: false },
-        dialog: { title: '赛程上分', show: false, type: '1' },
-        form: {},
-        //查询
-        searchInfo: {},
+        // 用户信息
+        raceuser: {},
         // 赛事列表
         matchList: [],
         // 组别列表
         groupList: [],
         // 组内项目列表
         projectList: [],
+        // 赛程状态
+        statusList: [],
         list: [],
         total: 0,
         page: 0,
         skip: 0,
         limit: 5,
-        statusList: []
+        dialog: { title: '赛程上分', show: false, type: '1' },
+        //查询
+        searchInfo: {},
+        // 上分
+        form: {},
     },
     initValidate() {
         const rules = { player_one_score: { required: true }, player_two_score: { required: true } }
@@ -27,7 +31,7 @@ Page({
         this.WxValidate = new WxValidate(rules, messages)
     },
     // 返回
-    back: function () { wx.navigateBack({ delta: 1 }) },
+    back: function () { wx.navigateBack({ delta: 1 }); wx.removeStorage({ key: 'searchInfo' }) },
     // 详细信息
     toCommon: function (e) {
         const that = this;
@@ -40,13 +44,6 @@ Page({
         const that = this;
         that.setData({ dialog: { title: '选择赛事', show: true, type: '2' } })
     },
-    // 赛程上分
-    toScore: function (e) {
-        const that = this;
-        const { item } = e.currentTarget.dataset;
-        that.setData({ form: item })
-        that.setData({ dialog: { title: '赛程上分', show: true, type: '1' } })
-    },
     // 选择赛事
     matchChange: async function (e) {
         const that = this;
@@ -75,33 +72,84 @@ Page({
             that.setData({ 'searchInfo.project_id': data._id, 'searchInfo.project_name': data.name });
         }
     },
+    // 提交查询
     toSubmit: function (e) {
         const that = this
-        const params = e.detail.value;
-        if (params) { that.setData({ skip: 0, page: 0, list: [] }); that.toClose(); that.watchLogin(); }
+        let searchInfo = that.data.searchInfo;
+        if (searchInfo) {
+            that.setData({ skip: 0, page: 0, list: [] });
+            wx.setStorage({ key: "searchInfo", data: searchInfo });
+            that.search();
+            that.toClose();
+        }
         else { wx.showToast({ title: '请选择数据', icon: 'error', duration: 2000 }) }
     },
-    // 提交保存
+    // 查询
+    search: async function () {
+        const that = this;
+        let raceuser = that.data.raceuser;
+        let statusList = that.data.statusList;
+        wx.getStorage({
+            key: 'searchInfo',
+            success: async res => {
+                if (res.data.group_id && res.data.match_id && res.data.project_id) {
+                    let info = { skip: that.data.skip, limit: that.data.limit, referee_id: raceuser._id, group_id: res.data.group_id, match_id: res.data.match_id, project_id: res.data.project_id }
+                    let arr = await app.$get(`/msgs`, { ...info }, 'race');
+                    if (arr.errcode == '0') {
+                        let list = [...that.data.list, ...arr.data];
+                        for (const val of list) {
+                            let status = statusList.find(i => i.value == val.status)
+                            if (status) val.zhStatus = status.label;
+                        }
+                        that.setData({ list })
+                        that.setData({ total: arr.total })
+                    } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+                }
+            },
+        })
+    },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.search();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
+    },
+    // 赛程上分
+    toScore: function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        that.setData({ form: item })
+        that.setData({ dialog: { title: '赛程上分', show: true, type: '1' } })
+    },
+    // 提交上分
     onSubmit: async function (e) {
         const that = this;
         const params = e.detail.value;
-        const form = that.data.form;
         if (!this.WxValidate.checkForm(params)) {
             const error = this.WxValidate.errorList[0];
             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(`/msgs/${params.id}`, params, 'race');
             if (arr.errcode == '0') {
                 wx.showToast({ title: `上分成功`, icon: 'success', duration: 2000 });
                 that.setData({ skip: 0, page: 0, list: [], form: {} })
-                that.watchLogin();
+                that.search();
                 that.toClose();
             }
             else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
         }
     },
-    // 删除
+    // 交换场地
     toChange: function (e) {
         const that = this;
         const { item } = e.currentTarget.dataset;
@@ -114,28 +162,13 @@ Page({
                     if (arr.errcode == '0') {
                         wx.showToast({ title: `交换场地成功`, icon: 'success', duration: 2000 });
                         that.setData({ skip: 0, page: 0, list: [] })
-                        that.watchLogin();
+                        that.search();
                     }
                     else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
                 }
             }
         })
     },
-    // 分页
-    toPage: function () {
-        const that = this;
-        let list = that.data.list;
-        let limit = that.data.limit;
-        if (that.data.total > list.length) {
-            wx.showLoading({ title: '加载中', mask: true })
-            let page = that.data.page + 1;
-            that.setData({ page: page })
-            let skip = page * limit;
-            that.setData({ skip: skip })
-            that.watchLogin();
-            wx.hideLoading()
-        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
-    },
     // 关闭弹框
     toClose: function () {
         const that = this;
@@ -170,25 +203,13 @@ Page({
     // 监听用户是否登录
     watchLogin: async function () {
         const that = this;
-        let searchInfo = that.data.searchInfo;
         wx.getStorage({
             key: 'raceuser',
             success: async res => {
-                let match = await app.$get(`/match`, {}, 'race');
+                that.setData({ raceuser: res.data })
+                let match = await app.$get(`/match`, { belong_id: res.data.parent_id }, 'race');
                 if (match.errcode == '0') { that.setData({ matchList: match.data }) }
-                if (searchInfo.group_id && searchInfo.match_id && searchInfo.project_id) {
-                    let info = { skip: that.data.skip, limit: that.data.limit, referee_id: res.data._id, group_id: searchInfo.group_id, match_id: searchInfo.match_id, project_id: searchInfo.project_id }
-                    let arr = await app.$get(`/msgs`, { ...info }, 'race');
-                    if (arr.errcode == '0') {
-                        let list = [...that.data.list, ...arr.data]
-                        for (const val of list) {
-                            let status = that.data.statusList.find(i => i.value == val.status)
-                            if (status) val.zhStatus = status.label;
-                        }
-                        that.setData({ list })
-                        that.setData({ total: arr.total })
-                    } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
-                }
+                that.search();
             },
             fail: async res => {
                 wx.redirectTo({ url: '/pages/index/index' })

+ 6 - 0
pagesMatch/refereeAdmin/mtschedule/list.wxml

@@ -54,6 +54,12 @@
     <view slot="info" class="dialog">
         <view class="dialog_1" wx:if="{{dialog.type=='1'}}">
             <form catchsubmit="onSubmit">
+                <view class="content">
+                    <view class="label">数据id:</view>
+                    <view class="value">
+                        <input type="text" name="id" value="{{form.id}}" disabled/>
+                    </view>
+                </view>
                 <view class="content">
                     <view class="label">选手一:</view>
                     <view class="value">

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

@@ -27,7 +27,7 @@
             </view>
             <view class="one_1">
                 <text>选手类型:</text>
-                <text>{{info.player_type=='User'?'单打':info.player_type=='TeamApply'?'双打':'暂无'}}</text>
+                <text>{{info.player_type=='Race.User'?'单打':info.player_type=='Race.TeamApply'?'双打':'暂无'}}</text>
             </view>
             <view class="one_1">
                 <text>选手一:</text>

+ 73 - 51
pagesMatch/refereeAdmin/outschedule/list.js

@@ -3,22 +3,26 @@ import WxValidate from '../../../utils/wxValidate';
 Page({
     data: {
         frameStyle: { useTop: true, name: '淘汰赛管理', leftArrow: true, useBar: false },
-        dialog: { title: '赛程上分', show: false, type: '1' },
-        form: {},
-        //查询
-        searchInfo: {},
+        // 用户信息
+        raceuser: {},
         // 赛事列表
         matchList: [],
         // 组别列表
         groupList: [],
         // 组内项目列表
         projectList: [],
+        // 赛程状态
+        statusList: [],
         list: [],
         total: 0,
         page: 0,
         skip: 0,
         limit: 5,
-        statusList: []
+        dialog: { title: '赛程上分', show: false, type: '1' },
+        //查询
+        searchInfo: {},
+        // 赛程上分
+        form: {},
     },
     initValidate() {
         const rules = { player_one_score: { required: true }, player_two_score: { required: true } }
@@ -27,7 +31,7 @@ Page({
         this.WxValidate = new WxValidate(rules, messages)
     },
     // 返回
-    back: function () { wx.navigateBack({ delta: 1 }) },
+    back: function () { wx.navigateBack({ delta: 1 }); wx.removeStorage({ key: 'searchInfo' }) },
     // 详细信息
     toCommon: function (e) {
         const that = this;
@@ -40,13 +44,6 @@ Page({
         const that = this;
         that.setData({ dialog: { title: '选择赛事', show: true, type: '2' } })
     },
-    // 赛程上分
-    toScore: function (e) {
-        const that = this;
-        const { item } = e.currentTarget.dataset;
-        that.setData({ form: item })
-        that.setData({ dialog: { title: '赛程上分', show: true, type: '1' } })
-    },
     // 选择赛事
     matchChange: async function (e) {
         const that = this;
@@ -77,31 +74,82 @@ Page({
     },
     toSubmit: function (e) {
         const that = this
-        const params = e.detail.value;
-        if (params) { that.setData({ skip: 0, page: 0, list: [] }); that.toClose(); that.watchLogin(); }
+        let searchInfo = that.data.searchInfo;
+        if (searchInfo) {
+            that.setData({ skip: 0, page: 0, list: [] });
+            wx.setStorage({ key: "searchInfo", data: searchInfo });
+            that.search();
+            that.toClose();
+
+        }
         else { wx.showToast({ title: '请选择数据', icon: 'error', duration: 2000 }) }
     },
-    // 提交保存
+    // 查询
+    search: async function () {
+        const that = this;
+        let raceuser = that.data.raceuser;
+        let statusList = that.data.statusList;
+        wx.getStorage({
+            key: 'searchInfo',
+            success: async res => {
+                if (res.data.group_id && res.data.match_id && res.data.project_id) {
+                    let info = { skip: that.data.skip, limit: that.data.limit, referee_id: raceuser._id, group_id: res.data.group_id, match_id: res.data.match_id, project_id: res.data.project_id }
+                    let arr = await app.$get(`/eliminate`, { ...info }, 'race');
+                    if (arr.errcode == '0') {
+                        let list = [...that.data.list, ...arr.data]
+                        for (const val of list) {
+                            let status = statusList.find(i => i.value == val.status)
+                            if (status) val.zhStatus = status.label;
+                        }
+                        that.setData({ list })
+                        that.setData({ total: arr.total })
+                    } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+                }
+            },
+        })
+    },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.search();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
+    },
+    // 赛程上分
+    toScore: function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        that.setData({ form: item })
+        that.setData({ dialog: { title: '赛程上分', show: true, type: '1' } })
+    },
+    // 提交上分
     onSubmit: async function (e) {
         const that = this;
         const params = e.detail.value;
-        const form = that.data.form;
         if (!this.WxValidate.checkForm(params)) {
             const error = this.WxValidate.errorList[0];
             wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
             return false
         } else {
-            let arr = await app.$post(`/eliminate/${form.id}`, params, 'race');
+            let arr = await app.$post(`/eliminate/${params.id}`, params, 'race');
             if (arr.errcode == '0') {
                 wx.showToast({ title: `上分成功`, icon: 'success', duration: 2000 });
                 that.setData({ skip: 0, page: 0, list: [], form: {} })
-                that.watchLogin()
+                that.search()
                 that.toClose();
             }
             else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
         }
     },
-    // 删除
+    // 交换场地
     toChange: function (e) {
         const that = this;
         const { item } = e.currentTarget.dataset;
@@ -114,28 +162,14 @@ Page({
                     if (arr.errcode == '0') {
                         wx.showToast({ title: `交换场地成功`, icon: 'success', duration: 2000 });
                         that.setData({ skip: 0, page: 0, list: [] })
-                        that.watchLogin();
+                        that.search();
                     }
                     else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
                 }
             }
         })
     },
-    // 分页
-    toPage: function () {
-        const that = this;
-        let list = that.data.list;
-        let limit = that.data.limit;
-        if (that.data.total > list.length) {
-            wx.showLoading({ title: '加载中', mask: true })
-            let page = that.data.page + 1;
-            that.setData({ page: page })
-            let skip = page * limit;
-            that.setData({ skip: skip })
-            that.watchLogin();
-            wx.hideLoading()
-        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
-    },
+
     // 关闭弹框
     toClose: function () {
         const that = this;
@@ -170,25 +204,13 @@ Page({
     // 监听用户是否登录
     watchLogin: async function () {
         const that = this;
-        let searchInfo = that.data.searchInfo;
         wx.getStorage({
             key: 'raceuser',
             success: async res => {
-                let match = await app.$get(`/match`, {}, 'race');
+                that.setData({ raceuser: res.data })
+                let match = await app.$get(`/match`, { belong_id: res.data.parent_id }, 'race');
                 if (match.errcode == '0') { that.setData({ matchList: match.data }) }
-                if (searchInfo.group_id && searchInfo.match_id && searchInfo.project_id) {
-                    let info = { skip: that.data.skip, limit: that.data.limit, referee_id: res.data._id, group_id: searchInfo.group_id, match_id: searchInfo.match_id, project_id: searchInfo.project_id }
-                    let arr = await app.$get(`/msgs`, { ...info }, 'race');
-                    if (arr.errcode == '0') {
-                        let list = [...that.data.list, ...arr.data]
-                        for (const val of list) {
-                            let status = that.data.statusList.find(i => i.value == val.status)
-                            if (status) val.zhStatus = status.label;
-                        }
-                        that.setData({ list })
-                        that.setData({ total: arr.total })
-                    } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
-                }
+                that.search();
             },
             fail: async res => {
                 wx.redirectTo({ url: '/pages/index/index' })

+ 10 - 4
pagesMatch/refereeAdmin/outschedule/list.wxml

@@ -16,10 +16,10 @@
                     <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.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">
@@ -55,6 +55,12 @@
     <view slot="info" class="dialog">
         <view class="dialog_1" wx:if="{{dialog.type=='1'}}">
             <form catchsubmit="onSubmit">
+                <view class="content">
+                    <view class="label">数据id:</view>
+                    <view class="value">
+                        <input type="text" name="id" value="{{form.id}}" disabled />
+                    </view>
+                </view>
                 <view class="content">
                     <view class="label">选手一:</view>
                     <view class="value">

+ 1 - 1
pagesMatch/system/index.js

@@ -49,7 +49,7 @@ Page({
                     const aee = await app.$get(`/user/${arr.data.user_id}`);
                     if (aee.errcode == '0') { arr.data.user_id = aee.data; }
                     that.setData({ user: arr.data })
-                    let btnData = match_menu.find((i) => i.type == '2');
+                    let btnData = match_menu.find((i) => i.type == arr.data.type);
                     that.setData({ list: [...btnData.menu, ...school_sysmenu] })
                 }
                 else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }); }

+ 13 - 13
pagesMatch/userAdmin/schedule/list.js

@@ -79,19 +79,19 @@ Page({
         wx.getStorage({
             key: 'raceuser',
             success: async res => {
-                if (tabs.active == 'a') {
-                    let info = { skip: that.data.skip, limit: that.data.limit, user_id: res.data._id };
-                    let arr = await app.$get(`/msgs`, { ...info }, 'race');
-                    if (arr.errcode == '0') {
-                        let list = [...that.data.list, ...arr.data]
-                        for (const val of list) {
-                            let status = that.data.statusList.find(i => i.value == val.status)
-                            if (status) val.zhStatus = status.label;
-                        }
-                        that.setData({ list })
-                        that.setData({ total: arr.total })
-                    } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
-                }
+                let arr;
+                let info = { skip: that.data.skip, limit: that.data.limit, user_id: res.data._id };
+                if (tabs.active == 'a') arr = await app.$get(`/msgs`, { ...info }, 'race');
+                if (tabs.active == 'b') arr = await app.$get(`/eliminate`, { ...info }, 'race');
+                if (arr.errcode == '0') {
+                    let list = [...that.data.list, ...arr.data]
+                    for (const val of list) {
+                        let status = that.data.statusList.find(i => i.value == val.status)
+                        if (status) val.zhStatus = status.label;
+                    }
+                    that.setData({ list })
+                    that.setData({ total: arr.total })
+                } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
             },
             fail: async res => {
                 wx.redirectTo({ url: '/pages/index/index' })