wangguoyu hai 6 meses
pai
achega
5c2f03afc7
Modificáronse 2 ficheiros con 15 adicións e 9 borrados
  1. 2 0
      pages/study/eggDialog.vue
  2. 13 9
      pages/study/index.vue

+ 2 - 0
pages/study/eggDialog.vue

@@ -13,6 +13,7 @@
 
 <script setup>
 	import { ref } from 'vue';
+	 const $emit = defineEmits(['eggBtn'])
 	const eggPopup = ref(null); // 索引
 	// 打开弹窗
 	function eggShow() {
@@ -21,6 +22,7 @@
 	// 开启提分之旅按钮
 	function eggBtn(){
 		eggPopup.value.close();
+		$emit('eggBtn')
 	}
 	defineExpose({
 			eggShow

+ 13 - 9
pages/study/index.vue

@@ -23,6 +23,7 @@
 	import {
 		reactive,
 		ref,
+		nextTick,
 		getCurrentInstance,
 		onMounted
 	} from "vue";
@@ -47,7 +48,7 @@
 	} from "@/utils/common";
 	import cacheManager from "@/utils/cacheManager.js";
 	const tipContent = '付费章节,是否前往开通付费?'; //当前产品
-	const goPayDialogRef = ref(null);
+	const goPayDialogRef = ref(null);
 	const youkeDialogRef = ref(null);
 	const eggDialogRef = ref(null);
 	const YouKeContent = '您当前是游客身份,登录后才能浏览内容,现在去登录?';
@@ -80,6 +81,9 @@
 			// 已登录
 			// 选择年级进入调用此接口
 			//options.flag == 'selectGrades'
+			nextTick(() => {
+				eggDialogRef.value.eggShow();
+			})
 			getZhangInfo()
 			// 蛋
 			// eggDialogRef.value.eggShow();
@@ -142,10 +146,10 @@
 
 
 
-	function onLeft(event) {
-		const authCode = getUserIdentity();
-		if (authCode !== 'VIP') {
-			return false
+	function onLeft(event) {
+		const authCode = getUserIdentity();
+		if (authCode !== 'VIP') {
+			return false
 		}
 		console.log('用户左滑了');
 		let req = {
@@ -168,10 +172,10 @@
 		})
 	}
 
-	function onRight(event) {
-		const authCode = getUserIdentity();
-		if (authCode !== 'VIP') {
-			return false
+	function onRight(event) {
+		const authCode = getUserIdentity();
+		if (authCode !== 'VIP') {
+			return false
 		}
 		console.log('用户又滑了');
 		let req = {