|
@@ -98,12 +98,8 @@ Page({
|
|
|
wx.getStorage({
|
|
|
key: 'user',
|
|
|
success: async res => {
|
|
|
- let match = await app.$get(`/match`, {}, 'race');
|
|
|
- if (match.errcode == '0') that.setData({ matchList: match.data })
|
|
|
- let group = await app.$get(`/matchGroup`, {}, 'race');
|
|
|
- if (group.errcode == '0') that.setData({ groupList: group.data })
|
|
|
if (that.data.id) {
|
|
|
- let arr = await app.$get(`/matchProject/${that.data.id}`, 'race');
|
|
|
+ let arr = await app.$get(`/matchProject/${that.data.id}`, {}, 'race');
|
|
|
if (arr.errcode == '0') {
|
|
|
// 比赛名称
|
|
|
let match = matchList.find(i => i._id == arr.data.match_id);
|
|
@@ -136,6 +132,12 @@ Page({
|
|
|
// 项目类别
|
|
|
arr = await app.$get(`/dict`, { code: 'match_project_type' });
|
|
|
if (arr.errcode == '0' && arr.total > 0) that.setData({ typeList: arr.data[0].list });
|
|
|
+ // 比赛
|
|
|
+ arr = await app.$get(`/match`, { status: "0" }, 'race');
|
|
|
+ if (arr.errcode == '0') that.setData({ matchList: arr.data })
|
|
|
+ // 组别
|
|
|
+ arr = await app.$get(`/matchGroup`, {}, 'race');
|
|
|
+ if (arr.errcode == '0') that.setData({ groupList: arr.data })
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|