tanxue il y a 5 mois
Parent
commit
f3fb8bad85

+ 55 - 3
common/styles/global/pages.scss

@@ -175,8 +175,7 @@
 	}
 	// -webkit-text-stroke: 1.6rpx #ac5300;text-stroke: 1.6rpx #ac5300; 
 	.grade-item.active{
-		color: #fff;-webkit-text-stroke: 1.6rpx #ac5300;text-stroke: 1.6rpx #ac5300; 
-		background-image: url("@/static/images/grade/grades-a-bj.png");
+		color: #fff;background-image: url("@/static/images/grade/grades-a-bj.png");
 	}
 	.grade-line{width: 90%;height: 4rpx;border-top: 4rpx dashed #7cbeee;margin: 5% auto 4%;}
 	.grade-confirm-btn{
@@ -234,7 +233,7 @@
 	.study-school-year{
 		width: 237rpx;height: 73rpx;line-height:68rpx;background-image: url("@/static/images/study/school-year-bj.png");
 		color: #fff;@include ezy-no-repeat-cover;padding-left: 75rpx;margin: 1% 0 0 3%; 
-		font-size: 32rpx;
+		font-size: 28rpx;font-weight: 600;
 	}
 	.ezy-study-wrap{
 		width:100%;height:1394rpx;background-image: url("@/static/images/study/study-wrap-bj.png");@include ezy-no-repeat-cover;
@@ -288,6 +287,59 @@
 	}
 }
 
+//目录页
+.ezy-catalogue-dialog{
+	width: 663rpx;height: 1038rpx;padding: 180rpx 52rpx 60rpx;box-sizing: border-box;position: relative;
+	background-image: url("@/static/images/catalog/catalog-bj.png");@include ezy-no-repeat-cover;
+	display: flex;
+	.catalogue-close-btn{
+		width: 54rpx;height: 54rpx;
+		background-image: url("@/static/images/catalog/catalog-close-btn.png");@include ezy-no-repeat-cover;
+		position: absolute;top: 40rpx;right: 36rpx;
+	}
+	.ezy-catalogue-collapse{
+		background-color: transparent!important;flex: 1;overflow-y: auto;
+		.collapse-item-box{
+			display: flex;flex-direction: column;padding: 24rpx 10rpx;box-sizing: border-box;
+			border-bottom: 2rpx dashed #9dc0f6;
+			.uni-collapse-item__wrap{background-color: transparent!important;}
+			.collapse-title{display: flex;font-size: 30rpx;font-weight: 700;color: #0a549d;position: relative;}
+			.collapse-num-box{
+				width: 46rpx;height: 46rpx;line-height: 46rpx;font-size: 30rpx;font-weight: 700;color: #fff;text-align: center;
+				background-image: url("@/static/images/catalog/num-bj.png");@include ezy-no-repeat-cover;
+				-webkit-text-stroke: 1rpx #0d64d7;text-stroke: 1rpx #0d64d7;margin-right: 20rpx;
+			}
+			.uni-icons{
+				width: 37rpx;height: 37rpx;
+				background-image: url("@/static/images/catalog/jt-btn.png");@include ezy-no-repeat-cover;
+				&::before{display: none;}
+			}
+			/* .collapse-lock{
+				width: 31rpx;height: 37rpx;position: absolute;right: 0rpx;
+				background-image: url("@/static/images/catalog/catalog-lock.png");@include ezy-no-repeat-cover;
+			} */
+		}
+		.collapse-item-box.collapse-active{
+			border: 0;
+			.collapse-title{color: #01b106;}
+			.collapse-num-box{
+				background-image: url("@/static/images/catalog/num-active-bj.png");
+				-webkit-text-stroke: 1rpx #009931;text-stroke: 1rpx #009931;
+			}
+			.uni-icons{
+				background-image: url("@/static/images/catalog/jt-active-btn.png");transform:unset;
+			}
+		}
+		.collapse-content-box{border-top: 2rpx dashed #9dc0f6;margin: 20rpx 0 100rpx;}
+		.collapse-content-item{
+			font-size: 28rpx;color:#343434;
+			border-bottom: 1px dashed #999;
+			padding: 20rpx 10rpx;margin: 0 10rpx;
+			}
+		// .collapse-item-box:last-child{border: 0;}
+	}
+}
+
 // 考试页
 .ezy-exam-page{
 	width: 100%;height: 100vh;background-color: #0ab2f0;position: relative;

+ 15 - 100
components/catalogue/catalogue.vue

@@ -1,42 +1,30 @@
 <template>
-	<uni-popup ref="popupRef" :mask-background-color="popup_background_color">
-		<uni-card :is-shadow="false" class="card-container">
-			<template #title>
-				<!-- 章节目录区域 -->
-				<view class="catalogue-custom-title">
-					<!-- 自定义标题区域 -->
-					<text></text>
-					<uni-icons type="closeempty" size="16" @click="handleClose"></uni-icons>
-				</view>
-			</template>
+	<uni-popup ref="popupRef" :animation="false" :is-mask-click="false"
+	 mask-background-color="rgba(255, 255, 255, 0.6);" :is-shadow="false">
+		<view class="ezy-catalogue-dialog">
+			<uni-icons @click="handleClose" class="catalogue-close-btn"></uni-icons>
 			<!-- 目录区域 -->
-			<uni-collapse v-model="activeCollapse" class="collapse-container" accordion>
-				<uni-collapse-item title-border="none" :border="false" :name="index" v-for="(item,index) in list">
+			<uni-collapse v-model="activeCollapse" class="ezy-catalogue-collapse" accordion>
+				<uni-collapse-item title-border="none" :border="false" :name="index" v-for="(item,index) in list" 
+				class="collapse-item-box" :class="{ 'collapse-active': activeCollapse === index}">
 					<template v-slot:title>
-						<view class="title-layout">
-							<view @click.stop="handleSelectZhang(item)" class="text-container">
-								<uni-badge class="uni-badge-left-margin" :text="index+1" type="primary" />
+							<view @click.stop="handleSelectZhang(item)" class="collapse-title">
+								<view class="collapse-num-box">{{index+1}}</view>
 								<!-- 章名 -->
-								<text class="text-white">{{item.zhangName}}</text>
+								<text>{{item.zhangName}}</text>
 							</view>
-							<!-- 三角图标 双色激活不同图标 -->
-							<uni-icons v-if="activeCollapse === index" type="right" size="16"
-								style="justify-self: flex-end;"></uni-icons>
-							<uni-icons v-else type="right" size="16" style="justify-self: flex-end;"></uni-icons>
-							<!-- 三角图标完结 -->
-							<uni-icons :class="['right-icon']" @click="handleExpand" type="locked-filled" size="16"
-								style="justify-self: flex-end;"></uni-icons>
-						</view>
+							<!-- 锁 -->
+							<!-- <view class="collapse-lock"></view> -->
 					</template>
-					<view class="content">
-						<view v-for="(jie,cindex) in item.jieList">
+					<view class="collapse-content-box">
+						<view v-for="(jie,cindex) in item.jieList" class="collapse-content-item">
 							<text class="jie-index">{{`${index+1}.${cindex+1}`}}</text>
 							<text class="text">{{jie.jieName}}</text>
 						</view>
 					</view>
 				</uni-collapse-item>
 			</uni-collapse>
-		</uni-card>
+		</view>
 	</uni-popup>
 </template>
 
@@ -124,76 +112,3 @@
 		showPopup
 	})
 </script>
-
-<style lang="scss" scoped>
-	.title-layout {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		padding: 10px
-	}
-
-	.child-item {
-		padding: 10px;
-	}
-
-	// 章节目录Card
-	.card-container {
-		background-color: rgba(0, 0, 0, 0.2); // 【弹出框 背景颜色】
-		min-width: 300px;
-	}
-
-	// 目录区域 
-	::v-deep .uni-card__content {
-		padding: 0 !important;
-		margin: 10px 0;
-		background-color: rgba(0, 0, 0, 0.5); // 【弹出框 内容区域背景颜色】
-		border-radius: 4px;
-	}
-
-	// 目录文字 颜色调整
-	.text-white {
-		color: #fff; // 【课件 章文字颜色】
-	}
-
-	// 章节目录区域 标题
-	.catalogue-custom-title {
-		display: flex;
-		justify-content: space-between;
-		height: 40px;
-		line-height: 40px;
-		margin-top: 10px;
-		background-color: #fff; // 【弹出 框 标题背景 待替换成背景图】
-
-		border-top-left-radius: 4px;
-		border-top-right-radius: 4px;
-	}
-
-	// 章文本区域
-	.text-container {
-		width: 100%;
-	}
-
-	.collapse-container {
-		background-color: transparent; // 【弹出框 内容区域背景颜色】
-	}
-
-	::v-deep .uni-collapse-item__wrap {
-		background-color: transparent; // 【弹出框 内容区域背景颜色】
-	}
-
-	::v-deep .uni-collapse-item__wrap-content {
-		color: #fff; // 【课件 章文字颜色】
-		line-height: 1.5;
-		padding: 5px 10px;
-	}
-
-	.jie-index {
-		margin-right: 5px;
-	}
-
-	.active {
-		rotate: 90deg;
-		color: red;
-	}
-</style>

BIN
static/images/catalog/catalog-lock.png