|
@@ -102,10 +102,16 @@ Page({
|
|
|
that.setData({ cList: that.data.cType == '0' ? that.data.raceList : that.data.raceteamList })
|
|
|
},
|
|
|
// 秩序册查询
|
|
|
- cSearch: function name(params) {
|
|
|
+ cSearch: async function (e) {
|
|
|
const that = this;
|
|
|
- that.setData({ 'searchInfo.name': e.detail.value });
|
|
|
- that.searchOrderBook()
|
|
|
+ const name = e.detail.value;
|
|
|
+ const type = that.data.cType;
|
|
|
+ if (name) {
|
|
|
+ let arr;
|
|
|
+ if (type == '0') { arr = await app.$get(`/msgs`, { match_id: that.data.id, user_name: name }, 'race'); }
|
|
|
+ else { arr = await app.$get(`/matchTeamGroup`, { match_id: that.data.info._id, name: name }, 'race'); }
|
|
|
+ if (arr.errcode == '0') { that.setData({ cList: arr.data }); };
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
@@ -219,7 +225,7 @@ Page({
|
|
|
}
|
|
|
else wx.showToast({ title: `${arr.errmsg}`, icon: 'fail', duration: 2000 });
|
|
|
//小组赛赛程--对阵表
|
|
|
- arr = await app.$get(`/msgs`, { match: match._id }, 'race');
|
|
|
+ arr = await app.$get(`/msgs`, { match_id: match._id }, 'race');
|
|
|
if (arr.errcode == '0') {
|
|
|
for (const val of arr.data) {
|
|
|
val.one_one = val.player_one_name.split("-")[0];
|