lex 2 lat temu
rodzic
commit
394f66f7eb

+ 6 - 2
src/router/index-student.ts

@@ -52,8 +52,12 @@ router.onError(error => {
         confirmButtonColor: 'var(--van-primary)'
       }).then(() => {
         // on close
-        location.hash = targetPath
-        window.location.reload()
+        if (browser().isApp) {
+          postMessage({ api: 'back' })
+        } else {
+          location.hash = targetPath
+          window.location.reload()
+        }
       })
     }
   }

+ 6 - 2
src/router/index-teacher.ts

@@ -32,8 +32,12 @@ router.onError(error => {
         confirmButtonColor: 'var(--van-primary)'
       }).then(() => {
         // on close
-        location.hash = targetPath
-        window.location.reload()
+        if (browser().isApp) {
+          postMessage({ api: 'back' })
+        } else {
+          location.hash = targetPath
+          window.location.reload()
+        }
       })
     }
   }

+ 3 - 3
src/teacher/video-class/create.tsx

@@ -53,7 +53,7 @@ export default defineComponent({
         lessonSubject: lessonSubject,
         lessonDesc: lessonDesc,
         lessonPrice: lessonPrice,
-        relationType,
+        relationType: 'RECOMMEND',
         lessonCoverTemplateUrl: statusUrl ? lessonCoverUrl : '',
         lessonCoverUrl: statusUrl ? '' : lessonCoverUrl
       }
@@ -63,11 +63,11 @@ export default defineComponent({
           const tempInfo = item.musicAlbumInfos || []
           const relationList = tempInfo.map((info: any) => {
             return {
-              relationMusicAlbum: info.relationType,
+              relationMusicAlbum: 'RECOMMEND',
               musicAlbumName: info.name,
               musicAlbumId: info.musicAlbumId,
               relationId: info.id,
-              useRelationType: relationType
+              useRelationType: 'RECOMMEND'
             }
           })
           createState.lessonList.push({