zs 2 years ago
parent
commit
bc53f1d4ea
1 changed files with 4 additions and 4 deletions
  1. 4 4
      pagesMatch/matchAdmin/group/add.js

+ 4 - 4
pagesMatch/matchAdmin/group/add.js

@@ -37,10 +37,10 @@ Page({
         } else {
             let arr;
             console.log(params);
-            // if (params._id) { arr = await app.$post(`/matchGroup/${params._id}`, params, 'race') }
-            // else { arr = await app.$post(`/matchGroup`, params, 'race') }
-            // if (arr.errcode == '0') { wx.showToast({ title: `维护信息完成`, icon: 'success', duration: 2000 }); that.back(); }
-            // else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+            if (params._id) { arr = await app.$post(`/matchGroup/${params._id}`, params, 'race') }
+            else { arr = await app.$post(`/matchGroup`, params, 'race') }
+            if (arr.errcode == '0') { wx.showToast({ title: `维护信息完成`, icon: 'success', duration: 2000 }); that.back(); }
+            else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
         }
     },
     /**