Browse Source

更新判断条件

lex-xin 4 years ago
parent
commit
56228c9a4c
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/store/modules/selects.js

+ 3 - 3
src/store/modules/selects.js

@@ -58,7 +58,7 @@ export default {
       }
     },
     async setTeachers ({ commit, state }, force) {
-      if (!state.subjects.length || force === true) {
+      if (!state.teachers.length || force === true) {
         try {
           const res = await getTeacher()
           commit('commit_teachers', res.data)
@@ -66,7 +66,7 @@ export default {
       }
     },
     async setSchools ({ commit, state }, force) {
-      if (!state.subjects.length || force === true) {
+      if (!state.schools.length || force === true) {
         try {
           const res = await getSchool()
           commit('commit_schools', res.data)
@@ -74,7 +74,7 @@ export default {
       }
     },
     async setVipGroupCategory ({ commit, state }, force) {
-      if (!state.subjects.length || force === true) {
+      if (!state.vipGroupCategory.length || force === true) {
         try {
           const res = await vipGroupCategory()
           commit('commit_vip_group_category', res.data)