Sfoglia il codice sorgente

试卷报告页推荐课程

xuqiaoying 2 anni fa
parent
commit
4346dad021

+ 2 - 0
pages2/bank/question_report.vue

@@ -173,6 +173,7 @@ export default {
 	onUnload() {},
 	computed: { ...mapGetters(['userInfo', 'hideBuyState']) },
 	onShow() {
+		this.pageNum = 1
 		this.courseList = []
 		this.getcourList()
 	},
@@ -195,6 +196,7 @@ export default {
 	},
 	onPullDownRefresh() {
 		this.pageNum = 1
+		this.courseList = []
 		this.getcourList()
 		// this.timer = setTimeout(function() {
 		// 	uni.stopPullDownRefresh()

+ 2 - 0
pages2/class/question_report.vue

@@ -149,6 +149,7 @@ export default {
 	},
 	onPullDownRefresh() {
 		this.pageNum = 1
+		this.courseList = []
 		this.getcourList()
 		// this.timer = setTimeout(function() {
 		// 	uni.stopPullDownRefresh()
@@ -171,6 +172,7 @@ export default {
 		}
 	},
 	async onShow() {
+		this.pageNum = 1
 		this.courseList = []
 		this.getcourList()
 	},

+ 20 - 14
pages5/examReport/index.vue

@@ -218,6 +218,7 @@ export default {
 	
 	onPullDownRefresh() {
 		this.pageNum = 1
+		this.courseList = []
 		this.getcourList()
 		// this.timer = setTimeout(function() {
 		// 	uni.stopPullDownRefresh()
@@ -244,7 +245,21 @@ export default {
 		await this.bankExam();
 		await this.mockReport();
 		
-		uni.getSystemInfo({
+		
+		
+	},
+	onShow() {
+		this.pageNum = 1
+		this.courseList = []
+		this.getcourList()
+	},
+	onUnload() {
+		clearTimeout(this.timer)
+	},
+	methods: {
+		...mapActions(['setSystemTime']),
+		getCanvas() {
+			uni.getSystemInfo({
 			success: res => {
 				var winW = res.screenWidth;
 				var winH = res.screenHeight;
@@ -330,19 +345,9 @@ export default {
 						
 						
 					});
-			}
-		});
-		
-	},
-	onShow() {
-		this.courseList = []
-		this.getcourList()
-	},
-	onUnload() {
-		clearTimeout(this.timer)
-	},
-	methods: {
-		...mapActions(['setSystemTime']),
+				}
+			});
+		},
 		getcourList() {
             this.$http({
                 url: '/apply/recommend/goodsList',
@@ -477,6 +482,7 @@ export default {
 				// /mock/record/'+data
 				this.$api.mockReport(this.recordId).then(res => {
 					this.reportdata = res.data.data;
+					this.getCanvas()
 					resolve()
 				});