lex-xin 7 kuukautta sitten
vanhempi
commit
320fc5c8f7
1 muutettua tiedostoa jossa 16 lisäystä ja 0 poistoa
  1. 16 0
      src/views/coursewarePlay/index.tsx

+ 16 - 0
src/views/coursewarePlay/index.tsx

@@ -994,6 +994,22 @@ export default defineComponent({
 
     // 上一个知识点, 下一个知识点
     const handlePreAndNext = (type: string) => {
+
+      if(data.source === 'search') {
+        // 判断是否需要会员
+        const index = type === "up" ? popupData.activeIndex - 1 : popupData.activeIndex + 1
+        const item = data.itemList[index]
+        const parentItem = detailList.value?.find((n: any) => n.lessonCoursewareDetailId == item?.lessonCoursewareDetailId)
+        if(String(parentItem?.accessScope) === '1') {
+          const hasVip = handleCheckVip()
+          console.log(hasVip, parentItem, "parentItem");
+          if (!hasVip) {
+            handleStop()
+            return
+          }
+        }
+      }
+      
       if (type === 'up') {
         handleSwipeChange(popupData.activeIndex - 1)
       } else {