6 Incheckningar 6819fbd74e ... b641c26733

Upphovsman SHA1 Meddelande Datum
  tanxue b641c26733 Merge branch '2025鹅状元数学' of https://gogs.mtavip.com/wangguoyu/uniProject into 2025鹅状元数学 2 dagar sedan
  tanxue 62d7fe970c 样式修改 2 dagar sedan
  tanxue 3050fed79a 样式修改 2 dagar sedan
  tanxue 9db94e68d7 Merge remote-tracking branch 'origin/2025鹅状元数学' into 2025鹅状元数学 5 dagar sedan
  tanxue 81adfc4f5a 代码优化 5 dagar sedan
  tanxue c07289bb41 资料开发 5 dagar sedan

+ 4 - 20
common/styles/global/components.scss

@@ -76,7 +76,7 @@ $titleBar-tabBar-page: calc(100vh - var(--status-bar-height));
 /***** tabbar  *****/
 .ezy-custom-tabbar{
 	width: 100%;height: 100rpx;position: fixed;left: 0;right: 0;background-color: #f9f9f9;box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.4);
-	bottom: env(safe-area-inset-bottom);padding: 0 24rpx env(safe-area-inset-bottom) 24rpx;box-sizing: border-box;z-index: 9;
+	bottom: 0;padding: 0 24rpx env(safe-area-inset-bottom) 24rpx;box-sizing: border-box;z-index: 9;
 	display: flex;flex-direction: row;align-items: center;
 	.tabbar-item-box{
 		width: 25%;display: flex;flex-wrap: nowrap;justify-content: space-evenly;
@@ -329,24 +329,8 @@ $titleBar-tabBar-page: calc(100vh - var(--status-bar-height));
 	}
 }
 
-.sxtk-sc-dialog{
-	.tip-title{color: #343434;font-size: 38rpx;margin-bottom: 24rpx;}
-	.tip-content-box{
-		width: 625rpx;height: 587rpx;padding: 42rpx 48rpx;box-sizing: border-box;
-		background-image: url("@/static/images/my/tk-dialog-bj.png");
-		@include ezy-no-repeat-cover;box-sizing: border-box;text-align:center;
-	}
-	.tip-content{
-		min-height: 180rpx;text-align: justify;border-bottom: 1px dashed #70cbf4;
-		margin-bottom: 30rpx;color: #666;font-size: 32rpx;padding-bottom: 42rpx;
-		border-bottom: 1px dashed #70cbf4;line-height: 1.8;}
-	.not-confirm-btn,.confirm-btn{
-		width: 519rpx;height: 98rpx;line-height: 98rpx;@include ezy-no-repeat-cover;
-		color: #fff;
-		}
-	.not-confirm-btn{background-image: url("@/static/images/my/tk-dialog-qx.png");margin-top: 16rpx;}
-	.confirm-btn{background-image: url("@/static/images/my/tk-dialog-sc.png");}
-}
+
+
 
 /*积分框*/
 .ezy-jf-box{
@@ -359,7 +343,7 @@ $titleBar-tabBar-page: calc(100vh - var(--status-bar-height));
 
 /***** 学科tab *****/
 .ezy-xueke-tab-box{
-	display: flex;justify-content: center;margin-bottom: 24rpx;
+	display: flex;justify-content: center;margin-bottom: 24rpx;flex-shrink: 0;
 	.tab-item{
 		width: 242rpx;height: 90rpx;line-height: 90rpx;@include ezy-no-repeat-cover;
 		background-image: url("@/static/images/xuanke/tab-item-bj.png");

+ 69 - 2
common/styles/global/pages.scss

@@ -914,9 +914,76 @@
 // 资料
 .ezy-ziliao-page{
 	width: 100%;height: 100vh;display: flex;flex-direction: column;
+	padding-bottom: 100rpx;box-sizing: border-box;
+	.zl-card-list{width: 100%;display: flex;flex-direction: column;flex: 1;overflow-y: auto;}
+	.jstx-card-box{
+		border-radius: 16rpx;margin: 0 24rpx 32rpx;font-size: 0;
+		box-shadow: 0 0rpx 6rpx rgba(100, 159, 241, 0.3);
+		.jstx-card-img{width: 100%;height: 400rpx;}
+		.jstx-card-title{
+			padding: 32rpx 24rpx 42rpx;text-align: center;
+			font-size: 32rpx;color: #333;@include single-line-ellipsis;
+		}
+	}
 }
 
 // 资料---数学--计算特训题库下载
-.ezy-jstx-ziliao-page{
+/* .ezy-jstx-ziliao-page{
 	width: 100%;height: 100vh;display: flex;flex-direction: column;
-}
+	.jstx-body{
+		margin-top: 48rpx;position: relative;overflow: unset;padding: 0 24rpx;box-sizing: border-box;
+		height: calc(100vh - 160rpx - var(--status-bar-height));
+		.jstx-body-title{
+			width: 406rpx;height: 77rpx;display: block;overflow-x:auto;
+			position: absolute;left: 50%;transform: translateX(-50%);top: -28rpx;z-index: 3;
+			@include ezy-no-repeat-cover;background-image: url("@/static/images/ziliao/select-dj-img.png");
+		}
+		
+		.jstx-tab-box{
+			width: 100%;height: 64rpx;white-space: nowrap;padding: 0;
+			text-align:center;margin: 90rpx 0 0;overflow-x: auto;
+			.tab-item{
+				height: 64rpx;line-height: 64rpx;margin: 0 18rpx;padding: 0 20rpx;
+				color: #333;font-size: 36rpx;display: inline-block;text-align:center;}
+			.active{color: #0d7ffc;position: relative;}
+			.active::after{
+				content: '';width: 100%;height: 4rpx;background-color: #0d7ffc;
+				position: absolute;bottom: 0;left: 0;border-radius: 4rpx;
+			}
+		}
+		
+		.jstx-card-list{
+			padding: 24rpx 0 0;overflow-y: auto;flex: 1;
+			.ziliao-card-box{
+				display: flex;align-items: center;justify-content: space-between;box-sizing: border-box;
+				background-color: #f3f3f3;padding: 20rpx;margin-bottom: 24rpx;border-radius: 16rpx;
+				.card-img{width: 150rpx;height: 150rpx;flex-shrink: 0;margin-right: 24rpx;}
+				.card-content-box{
+					flex: 1;line-height: 1.6;
+					.ziliao-name{font-size: 32rpx;color: #333;@include single-line-ellipsis;margin-bottom: 10rpx;}
+					.banben-name{font-size: 28rpx;color: #0d7ffc;@include single-line-ellipsis;}
+				}
+				.card-icon{
+					width: 58rpx;height: 62rpx;flex-shrink: 0;
+					@include ezy-no-repeat-cover;background-image: url("@/static/images/ziliao/jstx-pdf.png");
+				}
+			}
+			
+		}
+	}
+} */
+
+// 资料下载弹窗
+/* .sxtk-sc-dialog{
+	.tip-title{color: #343434;font-size: 38rpx;margin-bottom: 24rpx;}
+	.tip-content-box{
+		width: 625rpx;height: 587rpx;padding: 42rpx 48rpx;
+		background-image: url("@/static/images/my/tk-dialog-bj.png");
+		@include ezy-no-repeat-cover;box-sizing: border-box;text-align:center;
+	}
+	.tip-content{
+		display: flex;align-items: center;
+		min-height: 260rpx;text-align: justify;border-bottom: 1px dashed #70cbf4;
+		margin-bottom: 30rpx;color: #666;font-size: 32rpx;padding-bottom: 32rpx;
+		border-bottom: 1px dashed #70cbf4;line-height: 1.8;}
+} */

+ 3 - 3
pages/chanpinZiliao/index.vue

@@ -14,13 +14,13 @@
 			<!-- 资源卡片列表 -->
 
 			<!-- 数学 -->
-			<!--<ShuXueList v-if="data.chanpinActiveSelect === 'shuxue'" :list="data.shuxueList" />-->
+			<ShuXueList v-if="data.chanpinActiveSelect === 'shuxue'" :list="data.shuxueList" />
 
 			<!-- 英语 -->
-			<!--<YingYuList v-if="data.chanpinActiveSelect === 'yingyu'" :list="data.yingyuList" />-->
+			<YingYuList v-if="data.chanpinActiveSelect === 'yingyu'" :list="data.yingyuList" />
 
 			<!-- 语文 -->
-			<!--<YuWenList v-if="data.chanpinActiveSelect === 'yuwen'" :list="data.yuwenList" />-->
+			<YuWenList v-if="data.chanpinActiveSelect === 'yuwen'" :list="data.yuwenList" />
 
 		</view>
 	</view>

+ 6 - 6
pages/chanpinZiliao/shuxue/jstxCard.vue

@@ -1,9 +1,9 @@
 <template>
 	<!-- 数学-计算特训card -->
-	<view class="card" @click="handleClick(item)">
-	  <image :src="item.cover" mode="aspectFill" class="cover" />
-	  <view class="name">{{ item.name }}</view>
-	</view>
+	<ezyActiveVue class="ezy-list-item-active jstx-card-box" @click="handleClick(item)">
+	  <img :src="item.cover" mode="aspectFill" class="jstx-card-img" />
+	  <view class="jstx-card-title">{{ item.name }}</view>
+	</ezyActiveVue>
 </template>
 
 <script setup>
@@ -16,9 +16,9 @@ const porps = defineProps({
 // 跳转详情页面
 function handleClick(item) {
 	console.log('item',item.ziliaoId);
-	/*uni.navigateTo({
+	uni.navigateTo({
 		url: `/pages/chanpinZiliao/shuxue/jstxInfo?ziliaoId=${item.ziliaoId}`
-	})*/
+	})
 }
 </script>
 

+ 16 - 12
pages/chanpinZiliao/shuxue/jstxDownDialog.vue

@@ -1,24 +1,28 @@
 <!-- 生成题库弹窗 -->
 <template>
  <uni-popup ref="tipBigPopup" :animation="false" :is-mask-click="false"
-  mask-background-color="rgba(255, 255, 255, 0.6);">
-  <view class="phone-tip-dialog sxtk-sc-dialog">
-  <view class="tip-content-box">
-   <view class="tip-title">{{title}}</view>
-   <view class="tip-content sxtk-content" v-if="content">
-	<view class="content-text">{{content}}</view>
-   </view>
-   <view class="tip-btn-box sxtk-btn-box">
-    <view class="confirm-btn down-btn" @click="confirmBtn">下载到手机</view>
-    <view class="not-confirm-btn cancel-btn" @click="handleClose">取消</view>
-   </view>
-  </view>
+  mask-background-color="rgba(0,0,0, 0.76);">
+  <view class="ezy-tip-dialog sxtk-sc-dialog">
+	  <view class="tip-content-box">
+		   <view class="tip-title">{{title}}</view>
+		   <view class="tip-content sxtk-content" v-if="content">
+				<view class="content-text">
+					<view>用户您好:</view>
+				{{content}}
+				</view>
+		   </view>
+		   <view class="tip-btn-box">
+				<ezyActiveVue class="ezy-btn-active confirm-btn" @aclick="confirmBtn">下载到手机</ezyActiveVue>
+				<ezyActiveVue class="ezy-btn-active not-confirm-btn" @aclick="handleClose">取消</ezyActiveVue>
+		   </view>
+	  </view>
   </view>
  </uni-popup>
 </template>
 
 <script setup>
  import { ref } from 'vue';
+ import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
  const props = defineProps({
    title: {
      type: String,

+ 94 - 39
pages/chanpinZiliao/shuxue/jstxInfo.vue

@@ -1,38 +1,38 @@
 <template>
 	<view class="ezy-jstx-ziliao-page">
 		<view class="icon-title-navBar-box">
+			<view @click="handleBack" class="nav-bar-icon"></view>
 			<text class="nav-bar-title">{{data.ziliaoName}}</text>
 		</view>
-		<!--<view class="ezy-page-body">
-			<scroll-view scroll-y="true" class="level-list-container">
-				<view v-for="(item, index) in data.dengjiList" :key="item.dengjiId" class="level-item">
-					<view class="level-item-content">
-						&lt;!&ndash; 图标 &ndash;&gt;
-						<view @click="selectDjBtn(item)"
-						:class="{active: item.dengjiId == data.dengjiActiveSelect}">{{ item.dengjiName }}</view>
-
-						<view>
-							<view class="ziliao-card-box">
-								&lt;!&ndash; <img/> &ndash;&gt;
-								&lt;!&ndash; 内容区 &ndash;&gt;
-								<view class="content-box">
-									<text class="title">{{ ziliaoName }}</text>
-									<text class="version">{{ getFirstVersion(item.banbenList) }}</text>
-								</view>
-
-								&lt;!&ndash; PDF 按钮 &ndash;&gt;
-								<view class="pdf-btn">
-									<icon>PDF</icon>
-								</view>
-							</view>
-
-						</view>
-
+		<view class="ezy-page-body jstx-body">
+			<view class="jstx-body-title"></view>
+			<!-- 资料等级标签切换 -->
+			<view class="jstx-tab-box">
+				<view v-if="data.dengjiList.length > 0" v-for="(item, index) in data.dengjiList" :key="item.dengjiId" @click="zldjBtn(item,index)"
+				class="tab-item" :class="{active: item.dengjiId == data.dengjiActiveSelect}">{{ item.dengjiName }}</view>
+			</view>
+			<!-- 版本卡片列表 -->
+			<view v-if="data.banbenList.length > 0" class="jstx-card-list">
+				<view v-for="(bbItem, index) in data.banbenList" :key="bbItem.banbenId"
+				@click="cardBtn(bbItem)" class="ziliao-card-box">
+					<!-- <img/> -->
+					<img :src="bbItem.cover" class="card-img"/>
+					<!-- 内容区 -->
+					<view class="card-content-box">
+						<view class="ziliao-name">{{ bbItem.ziliaoName }}</view>
+						<view class="banben-name">{{ bbItem.banbenName}}</view>
 					</view>
+					<icon class="card-icon"></icon>
 				</view>
-			</scroll-view>
-		</view>-->
-		<!--<jstxDownDialog ref="jiaocaiRef" @confirm-btn="jcConfirm" :content="jcContent"></jstxDownDialog>-->
+			</view>
+			<!-- 无数据提示 -->
+			<view class="ezy-no-sj" v-else>
+				<icon></icon>
+				<text>暂无数据</text>
+			</view>
+		</view>
+		<!-- 下载弹窗 -->
+		<jstxDownDialog ref="jstxDownRef" @confirm-btn="jstxDialogConfirm" :content="data.jcContent"></jstxDownDialog>
 	</view>
 </template>
 
@@ -46,33 +46,88 @@ const data = reactive({
 	ziliaoName: '',
 	dengjiList: [],
 	dengjiActiveSelect: '',
+	dengjiActiveSelectName: '',
+	banbenList: [],
+	banbenId: '',
+	jcContent: '',
 })
+const jstxDownRef = ref(null);
 
+function handleBack() {
+	uni.switchTab({
+		url: '/pages/chanpinZiliao/index'
+	})
+}
+			
 // jisuantexun Info data
 function getJisuanInfo() {
   jisuanInfo({ziliaoId:data.id}).then(res => {
 	  data.ziliaoName = res.data.ziliaoName;
 	  data.dengjiList = res.data.dengjiList;
-	  // 默认为等级list中第一个
-	  data.dengjiActiveSelect = res.data.dengjiList[0].dengjiId;
+	  // 默认加载第一个资料等级的数据
+	  const firstLevel = data.dengjiList[0];
+	  data.dengjiActiveSelect = firstLevel.dengjiId;
+	  data.dengjiActiveSelectName = firstLevel.dengjiName;
+	  data.banbenList = firstLevel.banbenList || [];
+  }).catch(err => {
+	  uni.showToast({ title: '加载失败,请稍后重试', icon: 'none' });
   })
 }
 
-// 获取第一个版本名称
-function getFirstVersion(banbenList) {
-	if (banbenList && banbenList.length > 0) {
-		return banbenList[0].banbenName;
-	}
-	return '未知版本';
+// tab切换资料登记
+function zldjBtn(item,index){
+	data.dengjiActiveSelect = item.dengjiId;
+	data.dengjiActiveSelectName = item.dengjiName;
+	data.banbenList = data.dengjiList[index].banbenList;
 }
 
-function selectDjBtn(item){
-	data.dengjiActiveSelect = item.dengjiId
+// card点击
+function cardBtn(bbItem) {
+	// 确认逻辑
+	data.banbenId = bbItem.banbenId;
+	data.jcContent = "鹅状元将为您随机生成"+ data.dengjiActiveSelectName +"《" + bbItem.banbenName + "》100道试题。"
+	jstxDownRef.value.handleShow();
 }
 
+// 弹窗确认	
+function jstxDialogConfirm() {
+	uni.showLoading({ title: '正在生成试题...' });
+	jisuanPdf({
+	  banbenId:data.banbenId,
+	}).then(res1 => {
+		const url = res1.data;
+		if (!url) {
+			uni.showToast({ title: '未获取到文件地址', icon: 'none' });
+			return;
+		}
+		
+		uni.downloadFile({
+		  url,
+		  success: function (res) {
+		    var filePath = res.tempFilePath;
+		    uni.openDocument({
+		      filePath: filePath,
+		      showMenu: true,
+		      success: function (res) {
+				jstxDownRef.value.handleClose();
+		      },
+			  fail: () => {
+			  	uni.showToast({ title: '无法打开文件', icon: 'none' });
+			  },
+			  complete: () => {
+				  uni.hideLoading();
+			  }
+		    });
+		  }
+		});
+	}).catch(err => {
+		uni.showToast({ title: '生成失败,请稍后重试', icon: 'none' });
+		uni.hideLoading();
+	});
+}
+	
 onLoad((options) => {
 	data.id = options.ziliaoId;
-	console.log('options',options);
 	getJisuanInfo()
 })
 </script>

+ 1 - 2
pages/chanpinZiliao/shuxue/sxList.vue

@@ -1,7 +1,6 @@
 <template>
-	<view class="sx-card-list" v-if="list.length">
+	<view class="zl-card-list" v-if="list.length">
 	    <template  v-for="{chanpin,content:item} in list">
-			{{list}}
 			<jstxCard v-if="chanpin == 'jisuantexun'" :item="item" :key="item.ziliaoId"></jstxCard>
 	    </template>
 	

+ 12 - 1
pages/chanpinZiliao/yingyu/yyList.vue

@@ -1,7 +1,18 @@
 <template>
+	<view class="zl-card-list" v-if="list.length">
+	</view>
+	<view class="ezy-no-sj" v-else>
+		<icon></icon>
+		<text>暂无数据</text>
+	</view>
 </template>
 
-<script>
+<script setup>
+const props = defineProps({
+	list: {
+		type: Object
+	}
+})
 </script>
 
 <style>

+ 12 - 1
pages/chanpinZiliao/yuwen/ywList.vue

@@ -1,7 +1,18 @@
 <template>
+	<view class="zl-card-list" v-if="list.length">
+	</view>
+	<view class="ezy-no-sj" v-else>
+		<icon></icon>
+		<text>暂无数据</text>
+	</view>
 </template>
 
-<script>
+<script setup>
+const props = defineProps({
+	list: {
+		type: Object
+	}
+})
 </script>
 
 <style>

BIN
static/images/my/tk-dialog-qx.png


BIN
static/images/my/tk-dialog-sc.png


BIN
static/images/ziliao/jstx-pdf.png


BIN
static/images/ziliao/select-dj-img.png


+ 6 - 6
unpackage/dist/cache/.vite/deps/_metadata.json

@@ -1,19 +1,19 @@
 {
-  "hash": "64b32842",
-  "configHash": "4326db84",
-  "lockfileHash": "e3b0c442",
-  "browserHash": "969e594e",
+  "hash": "78e2cbc4",
+  "configHash": "cf70751b",
+  "lockfileHash": "7b43968b",
+  "browserHash": "4a933061",
   "optimized": {
     "ts-md5/dist/md5": {
       "src": "../../../../../node_modules/ts-md5/dist/md5.js",
       "file": "ts-md5_dist_md5.js",
-      "fileHash": "97009b77",
+      "fileHash": "6abade9f",
       "needsInterop": true
     },
     "uview-plus": {
       "src": "../../../../../node_modules/uview-plus/index.js",
       "file": "uview-plus.js",
-      "fileHash": "1cb56964",
+      "fileHash": "adbef8d1",
       "needsInterop": false
     }
   },