he2802 4 yıl önce
ebeveyn
işleme
14b59e580c
1 değiştirilmiş dosya ile 16 ekleme ve 18 silme
  1. 16 18
      pages2/course/detail.vue

+ 16 - 18
pages2/course/detail.vue

@@ -227,8 +227,8 @@ export default {
 			boxList: [], //章节弹窗列表
 			payStatus: true, //是否购买该课程
 			commendList: [], //推荐课程列表
-			collecStatus: false ,//收藏状态
-			initH4:0,
+			collecStatus: false, //收藏状态
+			initH4: 0
 		};
 	},
 	onLoad(option) {
@@ -271,15 +271,16 @@ export default {
 		}
 	},
 	methods: {
-		swipStatus(){
-			this.activeStatus = !this.activeStatus
-			let self = this
-			self.$nextTick(function(){
-				self.getHeight()
-			})
+
+		swipStatus() {
+			this.activeStatus = !this.activeStatus;
+			let self = this;
+			self.$nextTick(function() {
+				self.getHeight();
+			});
 		},
-		getHeight(){
-			let that = this
+		getHeight() {
+			let that = this;
 			const query = uni.createSelectorQuery().in(this);
 			query
 				.select('#modules1')
@@ -306,11 +307,9 @@ export default {
 			query
 				.select('#modules4')
 				.boundingClientRect(data => {
-
-					if(that.h4==0){
-						that.h4 = data.height
+					if (that.h4 == 0) {
+						that.h4 = data.height;
 					}
-
 					that.countHeight(that);
 				})
 				.exec();
@@ -369,10 +368,9 @@ export default {
 			};
 			this.$api.courseInforecommendList(data).then(res => {
 				self.commendList = res.data.data;
-				self.$nextTick(function(){
-					self.getHeight()
-				})
-				
+				self.$nextTick(function() {
+					self.getHeight();
+				});
 			});
 		},
 		activeList(item, index) {