wangxy il y a 1 mois
Parent
commit
c4b833171a

+ 23 - 0
pages/chaojidanci/wordList/useTishi.js

@@ -0,0 +1,23 @@
+import cacheManager from "@/utils/cacheManager";
+import {ref} from "vue"
+let code = 'is-show-tishi'
+export function useShowTishi() {
+
+    const isShowTishi = ref(true)
+
+    function getShowTishi() {
+        return !cacheManager.get(code);
+    }
+
+    function updateDate() {
+        cacheManager.set(code, true)
+        isShowTishi.value = false;
+    }
+
+    isShowTishi.value = getShowTishi()
+
+    return {
+        isShowTishi,
+        updateDate,
+    }
+}

+ 7 - 1
pages/chaojidanci/wordList/wordList.vue

@@ -113,8 +113,8 @@
       </swiper>
     </view>
     <tip-small-dialog ref="goPayDialogRef" @confirm-btn="goPayPage" content="需要购买当前课程才能学习" qrBtnName="前往购买"></tip-small-dialog>
+    <view class="ezy-tip-mask-box" v-if="isShowTishi" @click="updateDate"></view>
   </view>
-  <view class="ezy-tip-mask-box"></view>
 </template>
 
 <script setup>
@@ -131,6 +131,7 @@ import cacheManager from "@/utils/cacheManager.js";
 import {useSwiper} from "@/utils/useSwiper";
 import tipSmallDialog from "@/components/dialog/tipSmallDialog.vue";
 import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
+import {useShowTishi} from "./useTishi.js"
 
 const goPayDialogRef = ref(null);
 const listData = reactive({
@@ -148,6 +149,11 @@ const info = reactive({
   zhangId: null,
 });
 
+const {
+  isShowTishi,
+  updateDate,
+} = useShowTishi()
+
 const {swiperData, handleTouchStart, handleTouchEnd, userCode} = useSwiper(
     listData,
     (userCode) => {