|
@@ -45,6 +45,7 @@ Component({
|
|
|
timer = setInterval(() => {
|
|
|
if (this.data.userInfo.uid && !this.data.userInfo.grade) {
|
|
|
this.showGrade()
|
|
|
+ clearInterval(timer)
|
|
|
} else if (this.data.userInfo.uid && this.data.userInfo.grade) {
|
|
|
clearInterval(timer)
|
|
|
}
|
|
@@ -63,6 +64,11 @@ Component({
|
|
|
this.setData({
|
|
|
isGradeShow: false,
|
|
|
})
|
|
|
+ if (typeof this.getTabBar === 'function') {
|
|
|
+ this.getTabBar().setData({
|
|
|
+ mask: false
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
// 选择年级
|
|
|
selectGrade({
|
|
@@ -77,6 +83,11 @@ Component({
|
|
|
})
|
|
|
},
|
|
|
showGrade() {
|
|
|
+ if (typeof this.getTabBar === 'function') {
|
|
|
+ this.getTabBar().setData({
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
+ }
|
|
|
if (this.data.isGradeShow) {
|
|
|
return
|
|
|
}
|
|
@@ -95,13 +106,12 @@ Component({
|
|
|
duration: 2000
|
|
|
})
|
|
|
}
|
|
|
- this.setData({
|
|
|
- isGradeShow: false,
|
|
|
- })
|
|
|
let res = await setUserInfo({
|
|
|
grade
|
|
|
}, 'put')
|
|
|
+ console.log(res);
|
|
|
this.setUser(res)
|
|
|
+ this.closeGrade()
|
|
|
setTimeout(() => {
|
|
|
this.triggerEvent('reload')
|
|
|
}, 300)
|