chenxiong 3 anni fa
parent
commit
81422cd1b7
1 ha cambiato i file con 14 aggiunte e 18 eliminazioni
  1. 14 18
      pages/index/index.vue

+ 14 - 18
pages/index/index.vue

@@ -186,7 +186,7 @@ export default {
 		this.courseList();
 		this.bankList();
 		this.getAdvertising();
-		await this.init()
+		this.init()
 	},
 	onShow() {
 		if (uni.getStorageSync('updateHome')){
@@ -481,23 +481,19 @@ export default {
 			}
 		},
 		async init() {
-			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()
-			})
+			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();
+			}
 			
 		},
 		getMonDate() {