Skip to content

Commit 55ffca8

Browse files
authored
Merge pull request #28 from CurryPaste/main
逻辑优化
2 parents 00e59ca + f56ac8c commit 55ffca8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

example/src/store/modules/classe.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class Classe implements StoreOptions<State> {
7070
actions: ActionTree<State, unknown> = {
7171
// 班级列表
7272
getClassList({ commit }, data) {
73+
commit('updateClassList', []);
7374
const searchData = new SearchClassClass(data);
7475
searchData.setKeyWord(data.keyWord);
7576
return new Promise((resolve) => {

example/src/store/modules/user.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ class User implements StoreOptions<State> {
174174
},
175175
// 教师列表
176176
getTeacherList({ commit }: { commit: Commit }, Querydata: BaseSearchFace) {
177+
commit('updateTeacherList', []);
177178
const searchData = new SearchUserClass(Querydata);
178179
searchData.setQueryParam(Querydata);
179180
return new Promise((resolve, reject) => {
@@ -188,6 +189,7 @@ class User implements StoreOptions<State> {
188189
},
189190
// 学生列表——按照v2版本的接口查询
190191
getStudentList({ commit }: { commit: Commit }, Querydata: BaseSearchFace) {
192+
commit('updateStudentList', []);
191193
const searchData = new SearchUserClass(Querydata);
192194
searchData.setKeyWord(Querydata.keyWord);
193195
searchData.setTeacherId();

0 commit comments

Comments
 (0)