|
@@ -22,14 +22,15 @@ Page({
|
|
|
toView: async function (e) {
|
|
|
const that = this;
|
|
|
const { item } = e.currentTarget.dataset;
|
|
|
- if (item.winner) {
|
|
|
- const arr = await app.$get(`/newCourt/api/user/${item.winner}`);
|
|
|
- if (arr.errcode == '0') {
|
|
|
- item.winner_name = arr.data.name
|
|
|
+ const arr = await app.$get(`/newCourt/api/eliminateRace/${item._id}`);
|
|
|
+ if (arr.errcode == '0') {
|
|
|
+ if (arr.data.winner) {
|
|
|
+ const user = await app.$get(`/newCourt/api/user/${arr.data.winner}`);
|
|
|
+ if (user.errcode == '0') { arr.data.winner_name = user.data.name }
|
|
|
}
|
|
|
+ that.setData({ info: arr.data });
|
|
|
+ that.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
|
|
|
}
|
|
|
- that.setData({ info: item })
|
|
|
- that.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
|
|
|
},
|
|
|
|
|
|
toChange: async function (e) {
|
|
@@ -72,7 +73,7 @@ Page({
|
|
|
const params = e.detail.value;
|
|
|
const arr = await app.$post(`/newCourt/api/eliminateRace/${params._id}`, params);
|
|
|
if (arr.errcode == '0') {
|
|
|
- wx.showToast({ title: `上分成功`, icon: 'error', duration: 2000 })
|
|
|
+ wx.showToast({ title: `信息维护成功`, icon: 'error', duration: 2000 })
|
|
|
that.toClose()
|
|
|
} else {
|
|
|
wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
|