Selaa lähdekoodia

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

tanxue 3 kuukautta sitten
vanhempi
commit
02ea33ce32

+ 3 - 2
pages/newEnglish/components/beiPage.vue

@@ -3,7 +3,7 @@
 		<!-- 显示区 -->
 		<selectTypesVue activeSelect="5"></selectTypesVue>
 		<!-- 输入区 -->
-		<input class="words-answer-box" placeholder="请输入答案" v-model.trim="data.answer" readonly />
+		<input class="words-answer-box" placeholder="请输入答案" v-model.trim="data.answer" readonly :class="{'words-answer-right-box': data.result&&data.result!=null, 'words-answer-error-box': !data.result&&data.result!=null}" />
 		<!-- 清空按钮 -->
 		<view class="clean-btn" @click="handleReset('all')" v-if="data.answer.length"></view>
 		<view class="bei-body-box">
@@ -50,7 +50,7 @@
 				<btnTxtVue @text-select="handleSelect('z')">z</btnTxtVue>
 				<btnTxtVue @text-select="handleReset" class="del-btn"></btnTxtVue>
 			</view>
-			<view class="bei-confirm-btn"></view>
+			<view class="bei-confirm-btn" @click="checkIsRight"></view>
 		</view>
 	</view>
 </template>
@@ -125,6 +125,7 @@
 		if (code == 'all') {
 			// 全部清空
 			data.answer = '';
+			data.result = null;
 		} else {
 			// 单个清空
 			data.answer = data.answer ? data.answer.slice(0, -1) : ''

+ 1 - 0
pages/newEnglish/components/mainCard.vue

@@ -33,6 +33,7 @@
 	import pinPageVue from './pinPage.vue';
 	import selectPageVue from './selectPage.vue';
 	import beiPageVue from './beiPage.vue';
+	import readContent from './readContent.vue';
 	import xuePage from './xuePage.vue';
 	const props = defineProps({
 		activeWord: {

+ 25 - 9
pages/newEnglish/components/readContent.vue

@@ -3,28 +3,29 @@
 		<selectTypesVue activeSelect="3"></selectTypesVue>
 		<view class="words-xuan-box">
 			<!-- 单词区 -->
-			<view class="show-words-box"> {{activeWord.name}} </view>
+			<view class="show-words-box"> {{data.name}} </view>
 			<!--  音标区  -->
 			<view class="yb-play-box">
-				<text>{{activeWord.yinbiao}}</text>
+				<text>{{data.yinbiao}}</text>
 				<!-- active -->
-				
+
 				<icon class="yb-play-btn"></icon>
 				<icon class="yb-playing-btn" v-if="false"></icon>
 			</view>
-			
+
 			<view style="text-align: center;">
-				<text v-if="activeWord.jianyi&&activeWord.jianyi.length>0" v-for="(item,index) in activeWord.jianyi" :key="index">
+				<text v-if="data.jianyi&&data.jianyi.length>0" v-for="(item,index) in data.jianyi"
+					:key="index">
 					{{item}}
 				</text>
 			</view>
-			
+
 			<view>
 				<view class="audio-play-btn"></view>
 				<!-- 播放中 -->
 				<view class="audio-playing-btn" v-if="false"></view>
 			</view>
-			
+
 		</view>
 	</view>
 </template>
@@ -33,6 +34,9 @@
 	import selectWordsVue from './selectWords.vue';
 	import selectTypesVue from './selectTypes.vue';
 	import {
+		onLoad
+	} from "@dcloudio/uni-app"
+	import {
 		reactive,
 		ref,
 		onMounted
@@ -51,10 +55,22 @@
 	let tabFlag = ref(1)
 	const audioInfo = ref(null)
 
+	const data = reactive({
+		name: '',
+		yinbiao: '',
+		jianyi:[]
+	})
 
-	onMounted(() => {
-
+	onLoad(() => {
+		initItem()
 	})
+
+	function initItem() {
+		console.log('data',data);
+		data.name = props.activeWord.name;
+		data.yinbiao = props.activeWord.yinbiao;
+		data.jianyi = props.activeWord.jianyi;
+	}
 </script>
 
 <style>