wangxy 3 месяцев назад
Родитель
Сommit
6494ddb5d9
2 измененных файлов с 17 добавлено и 2 удалено
  1. 16 0
      pages/newEnglish/components/beiPage.vue
  2. 1 2
      pages/newEnglish/components/mainCard.vue

+ 16 - 0
pages/newEnglish/components/beiPage.vue

@@ -85,6 +85,9 @@
 		activeWords: {
 			type: Array
 		},
+		pageData: {
+			type:Object
+		}
 	})
 
 	const data = reactive({
@@ -108,6 +111,19 @@
 		} else {
 			data.result = false;
 		}
+		noticeBackComplete()
+	}
+	
+	function noticeBackComplete() {
+		// 通知后台已学完当前单词
+		if (userCode == 'Visitor') {
+			// 游客不更新后台
+			return;
+		}
+		httpApi.getWordWancheng({
+			jieId: props.pageData.jieId,
+			wordId: props.pageData.wordId
+		})
 	}
 
 	function noticeBackDb() {

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

@@ -2,7 +2,6 @@
 	<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" :pageData="pageData" :active-words="activeWords"></learnContent>-->
 				<xuePage :active-word="activeWord" :active-words="activeWords" @play-audio="handlePlayAudio" :pageData="pageData"></xuePage>
 			</view>
 		</swiper-item>
@@ -23,7 +22,7 @@
 		</swiper-item>
 		<swiper-item>
 			<view class="swiper-item uni-bg-blue">
-				<beiPageVue :active-word="activeWord" :active-words="activeWords" @play-audio="handlePlayAudio"></beiPageVue>
+				<beiPageVue :active-word="activeWord" :pageData="pageData" :active-words="activeWords" @play-audio="handlePlayAudio"></beiPageVue>
 			</view>
 		</swiper-item>
 	</swiper>