|
@@ -182,11 +182,11 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {},
|
|
|
- onLoad(option) {
|
|
|
- this.init()
|
|
|
+ async onLoad(option) {
|
|
|
this.courseList();
|
|
|
this.bankList();
|
|
|
this.getAdvertising();
|
|
|
+ await this.init()
|
|
|
},
|
|
|
onShow() {
|
|
|
if (uni.getStorageSync('updateHome')){
|
|
@@ -481,19 +481,24 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async init() {
|
|
|
- if (!this.$method.isLogin()) {
|
|
|
- //未登录
|
|
|
- this.date_num = [];
|
|
|
- this.workList = [];
|
|
|
- this.planGoodsList = [];
|
|
|
- this.initDay();
|
|
|
- } else {
|
|
|
- this.date_num = [];
|
|
|
- this.workList = [];
|
|
|
- this.planGoodsList = [];
|
|
|
- await this.userPlanSeven();
|
|
|
- await this.getUserSubscribeRecentExam();
|
|
|
- }
|
|
|
+ return new Promise(async resolve => {
|
|
|
+ if (!this.$method.isLogin()) {
|
|
|
+ //未登录
|
|
|
+ this.date_num = [];
|
|
|
+ this.workList = [];
|
|
|
+ this.planGoodsList = [];
|
|
|
+ this.initDay();
|
|
|
+ } else {
|
|
|
+ this.date_num = [];
|
|
|
+ this.workList = [];
|
|
|
+ this.planGoodsList = [];
|
|
|
+ await this.userPlanSeven();
|
|
|
+ await this.getUserSubscribeRecentExam();
|
|
|
+ }
|
|
|
+
|
|
|
+ resolve()
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
getMonDate() {
|
|
|
var d = new Date(),
|