wangguoyu 1 month ago
parent
commit
6e841e9957
1 changed files with 9 additions and 5 deletions
  1. 9 5
      pages/chanpinneirong/index.vue

+ 9 - 5
pages/chanpinneirong/index.vue

@@ -16,6 +16,9 @@
 				<text class="course-name">等级:{{ subjectDetail.dengjiName }}</text>
 				<text class="course-name">等级:{{ subjectDetail.dengjiName }}</text>
 				<text class="course-name">版本:{{ subjectDetail.dengjiName }}</text>
 				<text class="course-name">版本:{{ subjectDetail.dengjiName }}</text>
 				<text class="course-name">单元:{{ subjectDetail.curDanyuanName }}</text>
 				<text class="course-name">单元:{{ subjectDetail.curDanyuanName }}</text>
+				<progress :percent="20" class="exam-progress-box"
+								stroke-width="10" backgroundColor="#3c7dfd" activeColor="#ffd11c"/>
+									<text class="course-name">继续学习</text>
 			</view>
 			</view>
 			<!-- 单元列表 -->
 			<!-- 单元列表 -->
 			<view v-for="(unit, index) in danyuanList" :key="unit.danyuanId" :id="'unit-' + index" class="unit-item">
 			<view v-for="(unit, index) in danyuanList" :key="unit.danyuanId" :id="'unit-' + index" class="unit-item">
@@ -24,7 +27,7 @@
 					<text class="unit-name">{{ unit.danyuanName }}</text>
 					<text class="unit-name">{{ unit.danyuanName }}</text>
 					<text class="unit-intro">{{ unit.danyuanIntro }}</text>
 					<text class="unit-intro">{{ unit.danyuanIntro }}</text>
 				</view>
 				</view>
-
+							<text class="unit-name">{{ unit.danyuanName }}</text>
 				<!-- 节列表 -->
 				<!-- 节列表 -->
 				<view v-for="section in unit.jieList" :key="section.jieId" class="section-item">
 				<view v-for="section in unit.jieList" :key="section.jieId" class="section-item">
 					<view class="status" :class="section.wanchengFlag === 1 ? 'completed' : 'uncompleted'">
 					<view class="status" :class="section.wanchengFlag === 1 ? 'completed' : 'uncompleted'">
@@ -72,7 +75,7 @@
 			CustomTabBar
 			CustomTabBar
 		},
 		},
 		onShow() {
 		onShow() {
-				debugger
+		
 			console.log('学习页面显示,尝试恢复滚动位置')
 			console.log('学习页面显示,尝试恢复滚动位置')
 			// 如果没有恢复过,从缓存恢复
 			// 如果没有恢复过,从缓存恢复
 			if (!this.hasRestoredScroll) {
 			if (!this.hasRestoredScroll) {
@@ -82,18 +85,18 @@
 
 
 		// 新增:页面隐藏时保存滚动位置
 		// 新增:页面隐藏时保存滚动位置
 		onHide() {
 		onHide() {
-				debugger
+		
 			console.log('学习页面隐藏,保存滚动位置')
 			console.log('学习页面隐藏,保存滚动位置')
 			this.saveScrollPosition()
 			this.saveScrollPosition()
 		},
 		},
 
 
 		onLoad() {
 		onLoad() {
-				debugger
+			
 			this.loadDataFromApi()
 			this.loadDataFromApi()
 		},
 		},
 
 
 		onReady() {
 		onReady() {
-			debugger
+		
 			// 页面渲染完成后执行
 			// 页面渲染完成后执行
 			setTimeout(() => {
 			setTimeout(() => {
 				this.getUnitPositions();
 				this.getUnitPositions();
@@ -194,6 +197,7 @@
 
 
 			// 更新当前显示的单元
 			// 更新当前显示的单元
 			updateCurrentUnit(scrollTop) {
 			updateCurrentUnit(scrollTop) {
+			
 				const query = uni.createSelectorQuery().in(this);
 				const query = uni.createSelectorQuery().in(this);
 
 
 				for (let i = 0; i < this.danyuanList.length; i++) {
 				for (let i = 0; i < this.danyuanList.length; i++) {