Browse Source

样式修改

tanxue 1 month ago
parent
commit
fc5baf8bba
2 changed files with 19 additions and 20 deletions
  1. 4 7
      common/styles/global/pages.scss
  2. 15 13
      pages/chanpinneirong/index.vue

+ 4 - 7
common/styles/global/pages.scss

@@ -2000,8 +2000,8 @@
 // 学习
 // 学习
 .ezy-xuexi-page{
 .ezy-xuexi-page{
 	width: 100%;height: 100vh;background-color: #fff;display: flex;flex-direction: column;
 	width: 100%;height: 100vh;background-color: #fff;display: flex;flex-direction: column;
-	.xuexi-page-body{padding:72rpx 0 100rpx;overflow-y: auto;}
-	
+	.xuexi-page-body{padding:0 0 100rpx;overflow-y: auto;}
+	.xxjl-card-box-padding{padding-top: 64rpx;}
 	// 切换单元
 	// 切换单元
 	/* .change-dy-box{
 	/* .change-dy-box{
 		width: 100%;position: relative;display: flex;margin-bottom: 12rpx;
 		width: 100%;position: relative;display: flex;margin-bottom: 12rpx;
@@ -2028,7 +2028,7 @@
 	
 	
 	// 学习记录
 	// 学习记录
 	.xxjl-card-box{
 	.xxjl-card-box{
-		width: 95%;margin: 0 auto;padding: 72rpx 24rpx 24rpx 24rpx;box-sizing: border-box;
+		width: 95%;margin: 0 auto 0;padding: 72rpx 24rpx 24rpx 24rpx;box-sizing: border-box;
 		background-color: #5795f6;border-radius: 16rpx;position: relative;
 		background-color: #5795f6;border-radius: 16rpx;position: relative;
 		.card-body-box{
 		.card-body-box{
 			display: flex;
 			display: flex;
@@ -2055,9 +2055,6 @@
 		position: absolute;top: -28rpx;text-align: center;color: #fff;font-size: 34rpx;
 		position: absolute;top: -28rpx;text-align: center;color: #fff;font-size: 34rpx;
 	}
 	}
 	
 	
-	// 滚动
-	// .xx-scroll-body{overflow-y: auto;padding-top: 12rpx;}
-	
 	// 学习进度
 	// 学习进度
 	.xx-jd-box{
 	.xx-jd-box{
 		border-radius: 16rpx;margin: 0 24rpx 32rpx;padding: 32rpx;
 		border-radius: 16rpx;margin: 0 24rpx 32rpx;padding: 32rpx;
@@ -2123,7 +2120,7 @@
 		}
 		}
 		.item-dy-box.item-fixed{
 		.item-dy-box.item-fixed{
 			position: fixed;left: 50%;transform: translate(-50%);
 			position: fixed;left: 50%;transform: translate(-50%);
-			top: calc(120rpx + var(--status-bar-height));
+			top: calc(120rpx + var(--status-bar-height));z-index: 10;
 		}
 		}
 		/* 动画类 */
 		/* 动画类 */
 		.item-dy-box.item-active {
 		.item-dy-box.item-active {

+ 15 - 13
pages/chanpinneirong/index.vue

@@ -3,8 +3,9 @@
 		<view class="icon-title-navBar-box">
 		<view class="icon-title-navBar-box">
 			<text class="nav-bar-title">学习</text>
 			<text class="nav-bar-title">学习</text>
 		</view>
 		</view>
+		<view v-if="existData" class="ezy-page-body xuexi-page-body">
 		<scroll-view scroll-y>
 		<scroll-view scroll-y>
-			<view v-if="existData" class="ezy-page-body xuexi-page-body">
+			<view class="xxjl-card-box-padding">
 				<view class="xxjl-card-box">
 				<view class="xxjl-card-box">
 					<!-- 显示内容 -->
 					<!-- 显示内容 -->
 					<view class="card-body-box">
 					<view class="card-body-box">
@@ -26,7 +27,7 @@
 						<view class="jxxx-btn" @click="handlePlay(banbenInfo,'jixu')"></view>
 						<view class="jxxx-btn" @click="handlePlay(banbenInfo,'jixu')"></view>
 					</view>
 					</view>
 				</view>
 				</view>
-				<view class="xx-scroll-body">
+				</view>
 					<view class="xx-item-list">
 					<view class="xx-item-list">
 						<view class="xx-item-title">— 以下为当前等级课程目录 —</view>
 						<view class="xx-item-title">— 以下为当前等级课程目录 —</view>
 						<view v-for="(danyuanItem,index) in danyuanList" :key="danyuanItem.danyuanId">
 						<view v-for="(danyuanItem,index) in danyuanList" :key="danyuanItem.danyuanId">
@@ -34,8 +35,10 @@
 							<view v-if="index ==0"  class="item-dy-box" :class="{ 'item-fixed': isFixed }" @click="handleClickDanyuan" :id="`unit-title-${danyuanItem.danyuanId}`">
 							<view v-if="index ==0"  class="item-dy-box" :class="{ 'item-fixed': isFixed }" @click="handleClickDanyuan" :id="`unit-title-${danyuanItem.danyuanId}`">
 								<view class="dy-left-box">L{{banbenInfo.dengjiId}}</view>
 								<view class="dy-left-box">L{{banbenInfo.dengjiId}}</view>
 								<view class="dy-right-box">
 								<view class="dy-right-box">
-									<view class="dy-name">{{danyuanItem.danyuanName}}</view>
-									<view>{{danyuanItem.danyuanIntro}}</view>
+									<view class="right-content">
+										<view class="dy-name">{{danyuanItem.danyuanName}}</view>
+										<view>{{danyuanItem.danyuanIntro}}</view>
+									</view>
 								</view>
 								</view>
 							</view>
 							</view>
 							<!-- 其他单元 -->
 							<!-- 其他单元 -->
@@ -61,19 +64,18 @@
 						</view>
 						</view>
 					</view>
 					</view>
 
 
-				</view>
-
+				<!-- 回到顶部 -->
+				<view class="go-top-btn" v-if="false"></view>
+				
+			</scroll-view>
 			</view>
 			</view>
 			<view v-if="!existData">
 			<view v-if="!existData">
 
 
 			</view>
 			</view>
 
 
-		</scroll-view>
-
 		<danyuanInfoVue ref="dyRef" v-if="isShow" @close="isShow= false"></danyuanInfoVue>
 		<danyuanInfoVue ref="dyRef" v-if="isShow" @close="isShow= false"></danyuanInfoVue>
 		<custom-tab-bar :show="true" :current-index="currentTabIndex" />
 		<custom-tab-bar :show="true" :current-index="currentTabIndex" />
-		<!-- 回到顶部 -->
-		<view class="go-top-btn" v-if="false"></view>
+		
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -118,7 +120,7 @@
 				currentVisibleUnit: '', // 当前可见的单元名称
 				currentVisibleUnit: '', // 当前可见的单元名称
 				observer: null, // IntersectionObserver实例
 				observer: null, // IntersectionObserver实例
 				lastToastUnitId: null ,// 上一次toast的单元ID,防止重复触发
 				lastToastUnitId: null ,// 上一次toast的单元ID,防止重复触发
-				isFixed:true
+				isFixed:false,
 			}
 			}
 		},
 		},
 		components: {
 		components: {
@@ -190,9 +192,9 @@
 			          
 			          
 						console.log('item',item);
 						console.log('item',item);
 						if(item.danyuanName !="第一单元"){
 						if(item.danyuanName !="第一单元"){
-							this.isFixed = false
+							this.isFixed = true 
 						}else{
 						}else{
-							this.isFixed = true
+							this.isFixed = false
 						}
 						}
 			          // uni.showToast({
 			          // uni.showToast({
 			          //   title: `${item.danyuanName}`,
 			          //   title: `${item.danyuanName}`,