瀏覽代碼

更新判断条件

lex-xin 4 年之前
父節點
當前提交
56228c9a4c
共有 1 個文件被更改,包括 3 次插入3 次删除
  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)