|
@@ -102,14 +102,8 @@ Page({
|
|
|
// 秩序册查询
|
|
|
cSearch: async function (e) {
|
|
|
const that = this;
|
|
|
- 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 }); };
|
|
|
- }
|
|
|
+ that.setData({ 'searchInfo.name': e.detail.value });
|
|
|
+ that.searchOrderBook();
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
@@ -198,9 +192,13 @@ Page({
|
|
|
const that = this;
|
|
|
let type = that.data.cType;
|
|
|
let match = that.data.info;
|
|
|
+ let searchInfo = that.data.searchInfo;
|
|
|
+ let info = { match_id: match._id, };
|
|
|
+ if (type == '0') if (searchInfo && searchInfo.name) info.user_name = searchInfo.name;
|
|
|
+ if (type == '1') if (searchInfo && searchInfo.name) info.project_name = searchInfo.name;
|
|
|
let arr;
|
|
|
//小组赛组--场次表
|
|
|
- arr = await app.$get(`/matchTeamGroup`, { match_id: match._id }, 'race');
|
|
|
+ arr = await app.$get(`/matchTeamGroup`, { ...info }, 'race');
|
|
|
if (arr.errcode == '0') {
|
|
|
for (const val of arr.data) {
|
|
|
const project = await app.$get(`/matchProject`, { id: val.project_id, group_id: val.group_id, match_id: match._id }, 'race');
|
|
@@ -223,7 +221,7 @@ Page({
|
|
|
}
|
|
|
else wx.showToast({ title: `${arr.errmsg}`, icon: 'fail', duration: 2000 });
|
|
|
//小组赛赛程--对阵表
|
|
|
- arr = await app.$get(`/msgs`, { match_id: match._id }, 'race');
|
|
|
+ arr = await app.$get(`/msgs`, { ...info }, 'race');
|
|
|
if (arr.errcode == '0') {
|
|
|
for (const val of arr.data) {
|
|
|
val.one_one = val.player_one_name.split("-")[0];
|