zs il y a 1 an
Parent
commit
66a0d312fb
1 fichiers modifiés avec 5 ajouts et 2 suppressions
  1. 5 2
      pagesMy/course/index.js

+ 5 - 2
pagesMy/course/index.js

@@ -103,8 +103,11 @@ Page({
         const that = this;
         let info = { skip: that.data.skip, limit: that.data.limit };
         info.match_id = that.data.id
-        if (that.data.team_id) info.team_id = that.data.team_id
-        let res = await app.$api('course/only', 'GET', { ...info })
+        let res;
+        if (that.data.team_id) {
+            info.team_id = that.data.team_id
+            res = await app.$api('course/only', 'GET', { ...info })
+        } else res = await app.$api('course', 'GET', { ...info })
         if (res.errcode == '0') {
             let list = [...that.data.list, ...res.data]
             for (const val of list) {