|
@@ -66,7 +66,7 @@ Page({
|
|
|
level: 1
|
|
|
}, 'post').then(res => {
|
|
|
let arrayCollege = [];
|
|
|
- if (res.data.length > 1) {
|
|
|
+ if (res.data.length >= 1) {
|
|
|
for (let i = 0; i < res.data.length; i++) {
|
|
|
arrayCollege.push(res.data[i].deptName)
|
|
|
if (i == res.data.length - 1) {
|
|
@@ -79,7 +79,10 @@ Page({
|
|
|
}
|
|
|
} else {
|
|
|
that.setData({
|
|
|
- arrayCollege: arrayCollege
|
|
|
+ arrayCollege: arrayCollege,
|
|
|
+ arrayDept: [],
|
|
|
+ listDept: '',
|
|
|
+ list: ''
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -92,7 +95,7 @@ Page({
|
|
|
parentId: that.data.listCollege[that.data.indexCollege].deptId
|
|
|
}, 'post').then(res => {
|
|
|
let arrayDept = [];
|
|
|
- if (res.data.length > 1) {
|
|
|
+ if (res.data.length >= 1) {
|
|
|
for (let i = 0; i < res.data.length; i++) {
|
|
|
arrayDept.push(res.data[i].deptName)
|
|
|
if (i == res.data.length - 1) {
|
|
@@ -105,9 +108,13 @@ Page({
|
|
|
}
|
|
|
} else {
|
|
|
that.setData({
|
|
|
- arrayDept: arrayDept
|
|
|
+ arrayClass: [],
|
|
|
+ arrayDept: [],
|
|
|
+ listDept: '',
|
|
|
+ registerCount: 0,
|
|
|
+ unRegisterCount: 0,
|
|
|
+ list: ''
|
|
|
})
|
|
|
- that.getRegisterInfo();
|
|
|
}
|
|
|
})
|
|
|
},
|