|
@@ -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 })
|
|
|
},
|