|
@@ -128,6 +128,7 @@ Page({
|
|
|
// 赛制列表
|
|
|
arr = await app.$get(`/dict`, { code: "match_format" });
|
|
|
if (arr.errcode == '0' && arr.total > 0) that.setData({ formatList: arr.data[0].list });
|
|
|
+ // 性别列表
|
|
|
arr = await app.$get(`/dict`, { code: "gender" });
|
|
|
if (arr.errcode == '0' && arr.total > 0) that.setData({ genderList: arr.data[0].list });
|
|
|
},
|
|
@@ -164,6 +165,11 @@ Page({
|
|
|
let regular = arr.data.regular.replace(/\<img/gi, '<img style="width:100%;height:auto;margin: 5px 0"');
|
|
|
if (regular) arr.data.zhRegular = regular;
|
|
|
that.setData({ info: arr.data })
|
|
|
+ // 选手
|
|
|
+ let getAll = await app.$get(`/match/getAll/${arr.data._id}`, {}, 'race');
|
|
|
+ if (getAll.errcode == '0') that.setData({ player: getAll.data })
|
|
|
+ // 秩序册
|
|
|
+ that.searchOrderBook();
|
|
|
// 场地
|
|
|
let address = await app.$get(`/matchAddress`, { is_use: '0', belong_id: arr.data.belong_id }, 'race');
|
|
|
if (address.errcode == '0') {
|
|
@@ -180,11 +186,7 @@ Page({
|
|
|
that.setData({ projectList: project.data })
|
|
|
}
|
|
|
} else { wx.showToast({ title: `${res.errmsg}`, icon: 'fail', duration: 2000 }); }
|
|
|
- // 选手
|
|
|
- arr = await app.$get(`/match/getAll/${that.data.id}`, {}, 'race');
|
|
|
- if (arr.errcode == '0') that.setData({ player: arr.data })
|
|
|
- // 秩序册
|
|
|
- that.searchOrderBook();
|
|
|
+
|
|
|
},
|
|
|
fail: async res => {
|
|
|
wx.redirectTo({ url: '/pages/index/index' })
|