|
@@ -44,12 +44,12 @@ Page({
|
|
wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
|
|
wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
|
|
return false
|
|
return false
|
|
} else {
|
|
} else {
|
|
- let arr = await app.$post(`/msgs/${form.id}`, params, 'race');
|
|
|
|
|
|
+ let arr = await app.$post(`/eliminate/${form.id}`, params, 'race');
|
|
if (arr.errcode == '0') {
|
|
if (arr.errcode == '0') {
|
|
wx.showToast({ title: `上分成功`, icon: 'success', duration: 2000 });
|
|
wx.showToast({ title: `上分成功`, icon: 'success', duration: 2000 });
|
|
- that.toClose();
|
|
|
|
- that.setData({ skip: 0, page: 0, list: [] })
|
|
|
|
|
|
+ that.setData({ skip: 0, page: 0, list: [], form: {} })
|
|
that.watchLogin()
|
|
that.watchLogin()
|
|
|
|
+ that.toClose();
|
|
}
|
|
}
|
|
else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
|
|
else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
|
|
}
|
|
}
|
|
@@ -63,7 +63,7 @@ Page({
|
|
content: '是否确认交换场地?',
|
|
content: '是否确认交换场地?',
|
|
async success(res) {
|
|
async success(res) {
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
- let arr = await app.$post(`/msgs/${item._id}`, { is_change: '1' }, 'race');
|
|
|
|
|
|
+ let arr = await app.$post(`/eliminate/${item._id}`, { is_change: '1' }, 'race');
|
|
if (arr.errcode == '0') {
|
|
if (arr.errcode == '0') {
|
|
wx.showToast({ title: `交换场地成功`, icon: 'success', duration: 2000 });
|
|
wx.showToast({ title: `交换场地成功`, icon: 'success', duration: 2000 });
|
|
that.setData({ skip: 0, page: 0, list: [] })
|
|
that.setData({ skip: 0, page: 0, list: [] })
|
|
@@ -92,8 +92,6 @@ Page({
|
|
// 关闭弹框
|
|
// 关闭弹框
|
|
toClose: function () {
|
|
toClose: function () {
|
|
const that = this;
|
|
const that = this;
|
|
- that.setData({ skip: 0, page: 0, list: [], form: {} })
|
|
|
|
- that.watchLogin();
|
|
|
|
that.setData({ dialog: { title: '赛程上分', show: false, type: '1' } })
|
|
that.setData({ dialog: { title: '赛程上分', show: false, type: '1' } })
|
|
},
|
|
},
|
|
/**
|
|
/**
|
|
@@ -129,7 +127,7 @@ Page({
|
|
key: 'raceuser',
|
|
key: 'raceuser',
|
|
success: async res => {
|
|
success: async res => {
|
|
let info = { skip: that.data.skip, limit: that.data.limit, referee_id: res.data._id };
|
|
let info = { skip: that.data.skip, limit: that.data.limit, referee_id: res.data._id };
|
|
- let arr = await app.$get(`/msgs`, { ...info }, 'race');
|
|
|
|
|
|
+ let arr = await app.$get(`/eliminate`, { ...info }, 'race');
|
|
if (arr.errcode == '0') {
|
|
if (arr.errcode == '0') {
|
|
let list = [...that.data.list, ...arr.data]
|
|
let list = [...that.data.list, ...arr.data]
|
|
for (const val of list) {
|
|
for (const val of list) {
|