|
@@ -5,6 +5,8 @@ Page({
|
|
|
frameStyle: { useTop: true, name: '淘汰赛管理', leftArrow: true, useBar: false },
|
|
|
dialog: { title: '赛程上分', show: false, type: '1' },
|
|
|
form: {},
|
|
|
+ //查询
|
|
|
+ searchInfo: {},
|
|
|
// 赛事列表
|
|
|
matchList: [],
|
|
|
// 组别列表
|
|
@@ -50,7 +52,7 @@ Page({
|
|
|
const that = this;
|
|
|
let data = that.data.matchList[e.detail.value];
|
|
|
if (data) {
|
|
|
- that.setData({ 'form.match_id': data._id, 'form.match_name': data.name, });
|
|
|
+ that.setData({ 'searchInfo.match_id': data._id, 'searchInfo.match_name': data.name, });
|
|
|
const group = await app.$get(`/matchGroup`, { match_id: data._id }, 'race');
|
|
|
if (group.errcode == '0') that.setData({ groupList: group.data });
|
|
|
}
|
|
@@ -60,7 +62,7 @@ Page({
|
|
|
const that = this;
|
|
|
let data = that.data.groupList[e.detail.value];
|
|
|
if (data) {
|
|
|
- that.setData({ 'form.group_id': data._id, 'form.group_name': data.name });
|
|
|
+ that.setData({ 'searchInfo.group_id': data._id, 'searchInfo.group_name': data.name });
|
|
|
const arr = await app.$get(`/matchProject`, { match_id: data.match_id, group_id: data._id }, 'race');
|
|
|
if (arr.errcode == '0') { that.setData({ projectList: arr.data }) }
|
|
|
}
|
|
@@ -70,7 +72,7 @@ Page({
|
|
|
const that = this;
|
|
|
let data = that.data.projectList[e.detail.value];
|
|
|
if (data) {
|
|
|
- that.setData({ 'form.project_id': data._id, 'form.project_name': data.name });
|
|
|
+ that.setData({ 'searchInfo.project_id': data._id, 'searchInfo.project_name': data.name });
|
|
|
}
|
|
|
},
|
|
|
toSubmit: function (e) {
|
|
@@ -168,15 +170,15 @@ Page({
|
|
|
// 监听用户是否登录
|
|
|
watchLogin: async function () {
|
|
|
const that = this;
|
|
|
- let form = that.data.form;
|
|
|
+ let searchInfo = that.data.searchInfo;
|
|
|
wx.getStorage({
|
|
|
key: 'raceuser',
|
|
|
success: async res => {
|
|
|
let match = await app.$get(`/match`, {}, 'race');
|
|
|
if (match.errcode == '0') { that.setData({ matchList: match.data }) }
|
|
|
- if (form.group_id && form.match_id && form.project_id) {
|
|
|
- let info = { skip: that.data.skip, limit: that.data.limit, referee_id: res.data._id, group_id: form.group_id, match_id: form.match_id, project_id: form.project_id }
|
|
|
- let arr = await app.$get(`/eliminate`, { ...info }, 'race');
|
|
|
+ if (searchInfo.group_id && searchInfo.match_id && searchInfo.project_id) {
|
|
|
+ let info = { skip: that.data.skip, limit: that.data.limit, referee_id: res.data._id, group_id: searchInfo.group_id, match_id: searchInfo.match_id, project_id: searchInfo.project_id }
|
|
|
+ let arr = await app.$get(`/msgs`, { ...info }, 'race');
|
|
|
if (arr.errcode == '0') {
|
|
|
let list = [...that.data.list, ...arr.data]
|
|
|
for (const val of list) {
|