1
0

2 کامیت‌ها 1772b8057d ... 2c4254c9df

نویسنده SHA1 پیام تاریخ
  liushengqiang 2c4254c9df Merge branch '2023-9-21_免费' into jenkins-main 1 سال پیش
  liushengqiang b86edb5fc9 fix 1 سال پیش
2فایلهای تغییر یافته به همراه17 افزوده شده و 17 حذف شده
  1. 0 3
      src/views/courseList/index.tsx
  2. 17 14
      src/views/coursewarePlay/index.tsx

+ 0 - 3
src/views/courseList/index.tsx

@@ -331,9 +331,6 @@ export default defineComponent({
                     let isLock = item.lockFlag ||
                       ((route.query.code == 'select' || state.platformType == 'STUDENT') &&
                         !item.unlock)
-                    if (String(item.accessScope) === '0'){
-                      isLock = false
-                    }
                     const isSelect = route.query.code === 'select'
                     return (
                       <Cell

+ 17 - 14
src/views/coursewarePlay/index.tsx

@@ -107,7 +107,7 @@ export default defineComponent({
     const route = useRoute()
     const headeRef = ref()
     const data = reactive({
-      detail: null,
+      detail: null as any,
       knowledgePointList: [] as any,
       itemList: [] as any,
       showHead: true,
@@ -315,21 +315,24 @@ export default defineComponent({
       }
     }
 
-    onMounted(() => {
-      const hasVip = handleCheckVip()
-      if (!hasVip) {
-        nextTick(() => {
-          postMessage({
-            api: 'courseLoading',
-            content: {
-              show: false,
-              type: 'fullscreen'
-            }
+    onMounted(async () => {
+      await getDetail()
+      const hasFree = String(data.detail?.accessScope) === '0'
+      if (!hasFree){
+        const hasVip = handleCheckVip()
+        if (!hasVip) {
+          nextTick(() => {
+            postMessage({
+              api: 'courseLoading',
+              content: {
+                show: false,
+                type: 'fullscreen'
+              }
+            })
           })
-        })
-        return
+          return
+        }
       }
-      getDetail()
       getCourseSchedule()
       window.addEventListener('message', iframeHandle)
     })