3 Commits d4b62f745d ... 578b14e59e

Autore SHA1 Messaggio Data
  tanxue 578b14e59e 资料开发 6 giorni fa
  tanxue f2ca108830 样式修改 6 giorni fa
  tanxue 704aac7c6c 组件修改 6 giorni fa

+ 14 - 0
common/styles/global/components.scss

@@ -255,6 +255,7 @@ $titleBar-tabBar-page: calc(100vh - var(--status-bar-height));
 	display: flex;align-items: center;justify-content: center;overflow: hidden;z-index: 998;
   }
 
+
 // 小的提示弹窗
 .ezy-tip-dialog{
 	.tip-content-box{@include ezy-no-repeat-cover;box-sizing: border-box;text-align:center;}
@@ -355,6 +356,19 @@ $titleBar-tabBar-page: calc(100vh - var(--status-bar-height));
 	@include ezy-no-repeat-cover;background-image: url("@/static/images/my/jf-qb.png");}
 	.jf-text{min-width: 60rpx;text-align: center;color: #fff;}
 }
+
+/***** 学科tab *****/
+.ezy-xueke-tab-box{
+	display: flex;justify-content: center;margin-bottom: 24rpx;
+	.tab-item{
+		width: 242rpx;height: 90rpx;line-height: 90rpx;@include ezy-no-repeat-cover;
+		background-image: url("@/static/images/xuanke/tab-item-bj.png");
+		text-align: center;color: #a6a6a6;    
+	}
+	.tab-item.active{
+		color: #fff;background-image: url("@/static/images/xuanke/tab-item-a.png");
+	}
+}
 	
 // tab页面
 .ezy-tab-border{

+ 0 - 10
common/styles/global/pages.scss

@@ -247,16 +247,6 @@
 //  选课
 .ezy-xuanke-page{
 	width: 100%;height: 100vh;display: flex;flex-direction: column;padding-bottom: 100rpx;overflow: hidden; 
-		.xuanke-tab-box{display: flex;justify-content: center;margin-bottom: 24rpx;}
-		.tab-item{
-			width: 242rpx;height: 90rpx;line-height: 90rpx;@include ezy-no-repeat-cover;
-			background-image: url("@/static/images/xuanke/tab-item-bj.png");
-			text-align: center;color: #a6a6a6;    
-		}
-		.tab-item.active{
-			color: #fff;background-image: url("@/static/images/xuanke/tab-item-a.png");
-		}
-		
 		.sx-card-list{overflow-y: auto;flex: 1;padding: 24rpx 0 0;}
 		.sx-card-box{
 			border-radius: 16rpx;margin: 0 24rpx 32rpx;padding: 32rpx;

+ 5 - 4
components/ezyActive/ezyActive.vue

@@ -1,4 +1,5 @@
 <template>
+	<!-- 按钮点击动画 暂时去掉了时间 -->
 	<view @click="handleClick">
 		<slot />
 	</view>
@@ -11,16 +12,16 @@
 const props = defineProps({
 	delay: {
 		type: Number,
-		default: 300
+		default: 0
 	}
 })
 
 const emits = defineEmits(['aclick'])
 
 function handleClick() {
-			emits('aclick')
-	/* setTimeout(() => {
-	}, props.delay); // 使用props.delay作为延迟时间 */
+	setTimeout(() => {
+		emits('aclick')
+	}, props.delay); // 使用props.delay作为延迟时间
 }
 </script>
 

+ 1 - 1
pages/chanpinXuanze/index.vue

@@ -7,7 +7,7 @@
     <view class="ezy-page-body">
       <!-- 头部区域 -->
 
-      <view class="xuanke-tab-box">
+      <view class="ezy-xueke-tab-box">
         <!-- 动画按钮 -->
         <ezyActiveVue class="ezy-btn-active tab-item" v-for="item in data.list"
                       :key="item.value"

+ 49 - 0
pages/chanpinZiliao/index.vue

@@ -4,6 +4,35 @@
 			<text class="nav-bar-title">资料</text>
 		</view>
 		<view class="ezy-page-body">
+			<!-- 科目标签切换 -->
+			<view class="ezy-xueke-tab-box">
+				<ezyActiveVue class="tab-item ezy-btn-active" v-for="item in data.list" :key="item.value" 
+					:class="{active: item.key == data.chanpinActiveSelect}" @aclick="handleSelectChanpin(item)">
+					{{item.label}}</ezyActiveVue>
+			</view>
+			
+			<!-- 资源卡片列表 -->
+			
+			<!-- 数学 -->
+			<ShuXueList
+			  v-if="data.chanpinActiveSelect === 'shuxue'"
+			  :list="data.shuxue"
+			  @select="goDetail"
+			/>
+			
+			<!-- 英语 -->
+			<YingYuList
+			  v-else-if="data.chanpinActiveSelect === 'yingyu'"
+			  :list="data.yingyu"
+			  @select="goDetail"
+			/>
+			
+			<!-- 语文 -->
+			<YuWenList
+			  v-else-if="data.chanpinActiveSelect === 'yuwen'"
+			  :list="data.yuwen"
+			  @select="goDetail"
+			/>
 			
 		</view>
 	</view>
@@ -14,7 +43,27 @@
 import {reactive, ref} from "vue";
 import {onLoad,onShow} from "@dcloudio/uni-app"
 import CustomTabBar from "@/components/custom-tabbar/index.vue";
+import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
+import shuxueList  from "./shuxue/sxList.vue"
+import yingyuList  from "./yingyu/yyList.vue"
+import yuwenList  from "./yuwen/ywList.vue"
 let currentTabIndex = ref(2);
+const data = reactive({
+	list:[
+	  { key: 'shuxue', label: '数学' },
+	  { key: 'yingyu', label: '英语' },
+	  { key: 'yuwen', label: '语文' }
+	],
+	chanpinActiveSelect: 'shuxue',
+	shuxue: {},
+	yingyu: {},
+	yuwen: {}
+})
+
+// tab click
+function handleSelectChanpin(item) {
+	data.chanpinActiveSelect = item.key
+}
 onLoad(() => {
 	// 隐藏默认系统导航栏显示自定义导航栏
 	uni.hideTabBar()

+ 13 - 0
pages/chanpinZiliao/shuxue/jstxCard.vue

@@ -0,0 +1,13 @@
+<template>
+	<!-- 数学-计算特训card -->
+	<view class="card" @click="handleClick">
+	  <image :src="data.cover" mode="aspectFill" class="cover" />
+	  <text class="name">{{ data.name }}</text>
+	</view>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
pages/chanpinZiliao/shuxue/jstxInfo.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
pages/chanpinZiliao/shuxue/sxList.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
pages/chanpinZiliao/yingyu/yyList.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
pages/chanpinZiliao/yuwen/ywList.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>