|
@@ -112,11 +112,15 @@ Page({
|
|
|
let schedule = arr.data;
|
|
|
if (arr.errcode == '0') that.setData({ form: schedule }); that.setData({ match_file: schedule.match_file || [] });
|
|
|
// 红方
|
|
|
- arr = await app.$get(`/courtAdmin/api/team/${schedule.red_id}`);
|
|
|
- if (arr.errcode == '0') that.setData({ redTeam: arr.data });
|
|
|
+ if (schedule && schedule.red_id) {
|
|
|
+ arr = await app.$get(`/courtAdmin/api/team/${schedule.red_id}`);
|
|
|
+ if (arr.errcode == '0') that.setData({ redTeam: arr.data });
|
|
|
+ }
|
|
|
// 蓝方
|
|
|
- arr = await app.$get(`/courtAdmin/api/team/${schedule.blue_id}`);
|
|
|
- if (arr.errcode == '0') that.setData({ blueTeam: arr.data });
|
|
|
+ if (schedule && schedule.blue_id) {
|
|
|
+ arr = await app.$get(`/courtAdmin/api/team/${schedule.blue_id}`);
|
|
|
+ if (arr.errcode == '0') that.setData({ blueTeam: arr.data });
|
|
|
+ }
|
|
|
},
|
|
|
fail: res => {
|
|
|
return wx.redirectTo({ url: '/pages/login/index', })
|