|
@@ -101,7 +101,7 @@ Page({
|
|
|
if (person && person.length > 0) {
|
|
|
params.person = person;
|
|
|
let arr;
|
|
|
- if (that.data.id) { arr = await app.$post(`/newCourt/api/raceTeam/${that.data.id}`, params); }
|
|
|
+ if (that.data.form._id) { arr = await app.$post(`/newCourt/api/raceTeam/${that.data.form._id}`, params); }
|
|
|
else { arr = await app.$post(`/newCourt/api/raceTeam`, params); }
|
|
|
if (arr.errcode == '0') { wx.showToast({ title: `维护信息完成`, icon: 'success', duration: 2000 }); that.back(); }
|
|
|
else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
|
|
@@ -119,7 +119,7 @@ Page({
|
|
|
const that = this;
|
|
|
//验证规则函数
|
|
|
that.initValidate();
|
|
|
- that.setData({ id: options.id || '62eb1358d1c7ad6a16b963fb' });//62eb1138d1c7ad6a16b9600a 62eb1358d1c7ad6a16b963fb
|
|
|
+ that.setData({ id: options.id || '' });
|
|
|
|
|
|
that.watchLogin()
|
|
|
},
|
|
@@ -133,7 +133,7 @@ Page({
|
|
|
if (match.errcode == '0') { that.setData({ matchList: match.data }); };
|
|
|
if (that.data.id) {
|
|
|
const arr = await app.$get(`/newCourt/api/raceTeam/${that.data.id}`);
|
|
|
- if (arr.errcode == '0') {
|
|
|
+ if (arr.errcode == '0'&&arr.data) {
|
|
|
// 比赛信息
|
|
|
let matchInfo = match.data.find((i) => i._id == arr.data.match_id);
|
|
|
if (matchInfo) {
|