Sfoglia il codice sorgente

Merge branch '2025鹅状元dev' of https://gogs.mtavip.com/wangguoyu/uniProject into 2025鹅状元dev

tanxue 3 mesi fa
parent
commit
76b97e2b75

+ 44 - 50
pages.json

@@ -15,7 +15,7 @@
 		{
 			"path": "pages/selectGradesTerms/index",
 			"style": {
-				
+
 				"navigationBarTitleText": "选择学科和年纪",
 				"navigationStyle": "custom",
 				"app-plus": {
@@ -29,7 +29,7 @@
 				"navigationBarTitleText": "专题",
 				"navigationStyle": "custom"
 			}
-		},	
+		},
 		{
 			"path": "pages/zhuanti/zhuantiInfo",
 			"style": {
@@ -37,7 +37,7 @@
 				"navigationStyle": "custom"
 			}
 		},
-			{
+		{
 			"path": "pages/study/index",
 			"style": {
 				"navigationBarTitleText": "学习",
@@ -50,7 +50,7 @@
 				"navigationBarTitleText": "视频",
 				"navigationStyle": "custom"
 			}
-		},	{
+		}, {
 			"path": "pages/study/lookShipinNew",
 			"style": {
 				"navigationBarTitleText": "视频",
@@ -59,14 +59,14 @@
 		},
 		{
 			"path": "pages/game/index",
-				
+
 			"style": {
 				"navigationStyle": "custom",
 				"app-plus": {
 					"animationType": "none"
 				}
 			}
-		
+
 		},
 		{
 			"path": "pages/my/index",
@@ -87,10 +87,9 @@
 			}
 		},
 		{
-			"path" : "pages/unitTest/index",
-			"style" :
-			{
-				"navigationBarTitleText" : "单元测试",
+			"path": "pages/unitTest/index",
+			"style": {
+				"navigationBarTitleText": "单元测试",
 				"navigationStyle": "custom",
 				"app-plus": {
 					"softinputMode": "adjustResize",
@@ -99,67 +98,64 @@
 			}
 		},
 		{
-			"path" : "pages/pay/svip",
-			"style" : 
-			{
+			"path": "pages/pay/svip",
+			"style": {
 				"navigationStyle": "custom"
 			}
 		},
 		{
-			"path" : "pages/pay/order",
-			"style" : 
-			{
+			"path": "pages/pay/order",
+			"style": {
 				"navigationStyle": "custom"
 			}
 		},
-		
+
 		{
-			"path" : "pages/pay/orderPay",
-			"style" : 
-			{
+			"path": "pages/pay/orderPay",
+			"style": {
 				"navigationStyle": "custom"
 			}
 		},
 		{
-			"path" : "pages/wrong/index",
-			"style" : 
-			{
+			"path": "pages/wrong/index",
+			"style": {
 				"navigationStyle": "custom"
 			}
 		},
 		{
-			"path" : "pages/mall/mallPage",
-			"style" : 
-			{
+			"path": "pages/mall/mallPage",
+			"style": {
 				"navigationStyle": "custom"
 			}
 		},
 		{
-			"path" : "pages/selectVersion/selectVersion",
-			"style" : 
-			{
+			"path": "pages/selectVersion/selectVersion",
+			"style": {
 				"navigationStyle": "custom"
 			}
 		},
 		{
-			"path" : "pages/wordList/wordList",
-			"style" :
-			{
+			"path": "pages/wordList/wordList",
+			"style": {
 				"navigationStyle": "custom"
 			}
 		},
 		{
-			"path" : "pages/newEnglish/index",
-			"style" : 
-			{
+			"path": "pages/newEnglish/index",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		}, {
+			"path": "pages/newEnglish/components/xiangjie",
+			"style": {
 				"navigationStyle": "custom"
 			}
 		}
 	],
-	 "tabBar": {
-	    "custom": true,
-	    "list": []
-	  },
+	"tabBar": {
+		"custom": true,
+		"list": []
+	},
 	// "tabBar": {
 	// 	"height": "90rpx",
 	// 	"iconWidth": "134rpx",
@@ -188,26 +184,24 @@
 		"navigationBarTitleText": "鹅状元",
 		"navigationBarBackgroundColor": "#F8F8F8",
 		"backgroundColor": "#F8F8F8",
-	//	"animationType": "none",
+		//	"animationType": "none",
 		//"animationDuration": "0",
 		//禁止滑动返回
 		"app-plus": {
-					// "popGesture": "none"
-				}
+			// "popGesture": "none"
+		}
 		/* "app-plus": {
 			"background": "#efeff4"
 		} */
 	},
 
 	"uniIdRouter": {},
-	"condition" : { //模式配置,仅开发期间生效
+	"condition": { //模式配置,仅开发期间生效
 		"current": 0, //当前激活的模式(list 的索引项)
-		"list": [
-			{
-				"name": "login", //模式名称
-				"path": "pages/login/index", //启动页面,必选
-				"query": "" //启动参数,在页面的onLoad函数里面得到
-			}
-		]
+		"list": [{
+			"name": "login", //模式名称
+			"path": "pages/login/index", //启动页面,必选
+			"query": "" //启动参数,在页面的onLoad函数里面得到
+		}]
 	}
 }

+ 42 - 32
pages/newEnglish/components/learnContent.vue

@@ -7,11 +7,11 @@
 		<view>{{activeWord.yinbiao}}</view>
 		<view @click="playMainAudio">{{activeWord.yinpin}}</view>
 		<view>{{activeWord.jianyi}}</view>
-		<view>详解 ></view>
+		<view @click="goXiangjie">详解 ></view>
 		<view v-for="(item,index) in activeWord.yinjie" :key="index">
 			<view>{{item.cigen}}</view>
 			<view>{{item.yinbiao}}</view>
-			<view >{{item.yinpin}}</view>
+			<view>{{item.yinpin}}</view>
 		</view>
 		<view>自然拼读</view>
 		<view>音节拆分</view>
@@ -21,11 +21,11 @@
 				{{activeWord.cigen}}
 			</view>
 		</view>
-		
+
 		<view @click="clearFun">
 			asdfasdfasfasdfdasdfasdfasfadsfasdfadsfasdfasd
 		</view>
-		
+
 	</view>
 </template>
 
@@ -33,11 +33,18 @@
 	import selectWordsVue from './selectWords.vue';
 	import selectTypesVue from './selectTypes.vue';
 	import audioManager from './audioManager'
-	import { reactive,ref,onMounted } from 'vue';
+	import {
+		reactive,
+		ref,
+		onMounted
+	} from 'vue';
 	const props = defineProps({
 		activeWord: {
 			type: Object,
 		},
+		pageData: {
+			type: Object,
+		},
 		activeWords: {
 			type: Array
 		},
@@ -46,50 +53,53 @@
 	// setTimeout(() => {
 	// 	console.log('activeWord',props.activeWord)
 	// })
-	
+	const goXiangjie = () => {
+		uni.redirectTo({
+			url: '/pages/newEnglish/components/xiangjie?jieId='+props.pageData.jieId+'&wordId='+props.pageData.activeId
+		})
+	}
 	const audioInfo = ref(null)
-	
+
 	// 初始化并缓存音频
 	const initAudio = async () => {
-	  // 1. 从缓存获取已有信息
-	  const cachedInfo = audioManager.getAudioInfoFromStorage(props.activeWord.id)
-	  
-	  if (cachedInfo) {
-	    audioInfo.value = cachedInfo
-	  }
-	  
-	  // 2. 预加载所有音频(无论是否已有缓存)
-	  await audioManager.cacheWordAudios(props.activeWord)
-	  
-	  // 3. 更新音频信息
-	  audioInfo.value = audioManager.getAudioInfoFromStorage(props.activeWord.id)
+		// 1. 从缓存获取已有信息
+		const cachedInfo = audioManager.getAudioInfoFromStorage(props.activeWord.id)
+
+		if (cachedInfo) {
+			audioInfo.value = cachedInfo
+		}
+
+		// 2. 预加载所有音频(无论是否已有缓存)
+		await audioManager.cacheWordAudios(props.activeWord)
+
+		// 3. 更新音频信息
+		audioInfo.value = audioManager.getAudioInfoFromStorage(props.activeWord.id)
 	}
-	
+
 	// 播放主音频
 	const playMainAudio = () => {
-	  if (audioInfo.value && audioInfo.value.main) {
-	    audioManager.playAudio(audioInfo.value.main)
-	  }
+		if (audioInfo.value && audioInfo.value.main) {
+			audioManager.playAudio(audioInfo.value.main)
+		}
 	}
-	
+
 	// 播放音节音频
 	const playSyllable = (syllable) => {
-	  audioManager.playAudio(syllable)
+		audioManager.playAudio(syllable)
 	}
-	
+
+
 	// 播放频度音频
 	const playFrequency = (frequency) => {
-	  audioManager.playAudio(frequency)
+		audioManager.playAudio(frequency)
 	}
 	const clearFun = (frequency) => {
-	  audioManager.clearAllCache()
+		audioManager.clearAllCache()
 	}
-	
+
 	onMounted(() => {
-	  initAudio()
+		initAudio()
 	})
-	
-	
 </script>
 
 <style>

+ 6 - 3
pages/newEnglish/components/mainCard.vue

@@ -2,7 +2,7 @@
 	<swiper class="word-view-swiper-box" :indicator-dots="false" :autoplay="false" :circular="false">
 		<swiper-item>
 			<view class="swiper-item uni-bg-red">
-				<learnContent :active-word="activeWord" :active-words="activeWords"></learnContent>
+				<learnContent :active-word="activeWord" :pageData="pageData" :active-words="activeWords"></learnContent>
 			</view>
 		</swiper-item>
 		<swiper-item>
@@ -12,8 +12,7 @@
 		</swiper-item>
 		<swiper-item>
 			<view class="swiper-item uni-bg-blue">
-				读
-				<hr />{{activeWord}}
+				<readContent :active-word="activeWord" :pageData="pageData" :active-words="activeWords"></readContent>
 			</view>
 		</swiper-item>
 		<swiper-item>
@@ -34,9 +33,13 @@
 	import selectPageVue from './selectPage.vue';
 	import beiPageVue from './beiPage.vue';
 	import learnContent from './learnContent.vue';
+	import readContent from './readContent.vue';
 	const props = defineProps({
 		activeWord: {
 			type: Object,
+		},	
+		pageData: {
+			type: Object,
 		},
 		activeWords: {
 			type: Array

+ 36 - 0
pages/newEnglish/components/readContent.vue

@@ -0,0 +1,36 @@
+<template>
+	<view>
+	<selectTypesVue activeSelect="3"></selectTypesVue>
+	</view>
+</template>
+
+<script setup>
+	import selectWordsVue from './selectWords.vue';
+	import selectTypesVue from './selectTypes.vue';
+	import {
+		reactive,
+		ref,
+		onMounted
+	} from 'vue';
+	const props = defineProps({
+		activeWord: {
+			type: Object,
+		},
+		pageData: {
+			type: Object,
+		},
+		activeWords: {
+			type: Array
+		},
+	})
+	let tabFlag = ref(1)
+	const audioInfo = ref(null)
+
+	
+	onMounted(() => {
+		
+	})
+</script>
+
+<style>
+</style>

+ 79 - 0
pages/newEnglish/components/xiangjie.vue

@@ -0,0 +1,79 @@
+<template>
+	<view class="icon-title-navBar-box">
+		<view @click="handleBack" class="nav-bar-icon"></view>
+		<text class="nav-bar-title">单词详解</text>
+	</view>
+	<view>
+		<view>
+			{{pageInfo.name}}
+		</view>
+		<view>
+			<text>
+				通用释义
+			</text>
+			<text  v-for="(item,index) in pageInfo.xiangyi" :key="index">
+				<text>
+					{{item}}
+				</text>
+			</text>
+		</view>
+		<view>
+			<text>
+				实用口语
+			</text>
+			<text  v-for="(item,index) in pageInfo.kouyu" :key="index">
+				<text>
+					{{item.en}}
+					{{item.zn}}
+				</text>
+			</text>
+		</view>
+	</view>
+</template>
+
+<script setup>
+	import {
+		reactive,
+		ref,
+		onMounted
+	} from 'vue';
+	import {
+		getWordInfo
+	} from "@/api/word.js"
+	import {
+		onLoad
+	} from '@dcloudio/uni-app';
+	const goXiangjie = () => {
+
+	}
+	const pageInfo = ref({
+		kouyu: [],
+		xiangyi: [],
+		name: ''
+	})
+	const data = ref(null)
+
+
+	onLoad((options) => {
+		getInfo(options)
+		data.value = options
+	})
+	const handleBack = () => {
+		uni.redirectTo({
+			url: `/pages/newEnglish/index?jieId=${data.value.jieId}&wordId=${data.value.wordId}`
+		});
+	}
+	const getInfo = (data) => {
+		let req = {
+			jieId: data.jieId,
+			wordId: data.wordId
+		}
+		getWordInfo(req).then(res => {
+			console.log('res', res);
+			pageInfo.value = res.data
+		})
+	}
+</script>
+
+<style>
+</style>

+ 1 - 1
pages/newEnglish/index.vue

@@ -7,7 +7,7 @@
 		<view class="ezy-tab-border">
 			<view class="ezy-border-body">
 				<template v-for="item in data.wordList">
-					<mainCardVue :active-word="data.activeWord" :active-words="activeWords"
+					<mainCardVue :active-word="data.activeWord"  :pageData="data" :active-words="activeWords"
 						v-if="item.id == data.activeId" :key="item.id">
 					</mainCardVue>
 				</template>

+ 1 - 7
pages/study/index.vue

@@ -502,13 +502,7 @@
 		})
 	}
 
-	function goDanciList(data, index) {
-		
-		uni.redirectTo({
-			url: 	'/pages/newEnglish/index?jieId=666&wordId=42'
-		})
-
-		return
+	function goDanciList(data, index) {
 		if (!cacheManager.get('auth')) {
 			let youkeData = {
 				subjectId: subjectId.value,