瀏覽代碼

更新优化

lex 2 年之前
父節點
當前提交
cc53e8df69

文件差異過大導致無法顯示
+ 0 - 0
dist/assets/index-legacy.2f7df93b.js


文件差異過大導致無法顯示
+ 0 - 0
dist/assets/index-legacy.cab2b305.js


+ 0 - 0
dist/assets/teacher.a6c9550a.css → dist/assets/index.5062a520.css


文件差異過大導致無法顯示
+ 0 - 0
dist/assets/index.6e1aab6b.js


文件差異過大導致無法顯示
+ 0 - 0
dist/assets/index.80bb6e24.js


文件差異過大導致無法顯示
+ 0 - 0
dist/assets/polyfills-legacy.11b78793.js


文件差異過大導致無法顯示
+ 0 - 0
dist/assets/teacher-legacy.cc24cc5d.js


文件差異過大導致無法顯示
+ 0 - 0
dist/assets/teacher.0435a24c.js


+ 2 - 2
dist/index.html

@@ -40,7 +40,7 @@
     <link rel="modulepreload" href="./assets/index.5a60ef99.js">
     <link rel="stylesheet" href="./assets/vendor.68261ebd.css">
     <link rel="stylesheet" href="./assets/index.cb2212cc.css">
-    <link rel="stylesheet" href="./assets/teacher.a6c9550a.css">
+    <link rel="stylesheet" href="./assets/index.5062a520.css">
     <script type="module">!function(){try{new Function("m","return import(m)")}catch(o){console.warn("vite: loading legacy build because dynamic import is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}}();</script>
   </head>
 
@@ -49,7 +49,7 @@
     
     <!-- <script type="module" src="/src/teacher/main.ts"></script> -->
     <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
-    <script nomodule id="vite-legacy-polyfill" src="./assets/polyfills-legacy.7f3f9b80.js"></script>
+    <script nomodule id="vite-legacy-polyfill" src="./assets/polyfills-legacy.11b78793.js"></script>
     <script nomodule id="vite-legacy-entry" data-src="./assets/index-legacy.57d96220.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
   </body>
 </html>

+ 4 - 4
dist/teacher.html

@@ -35,12 +35,12 @@
     <meta name="msapplication-tap-highlight" content="no" />
     <title>酷乐秀</title>
     <script src="./flexible.js" charset="UTF-8"></script>
-    <script type="module" crossorigin src="./assets/teacher.66a7eb0c.js"></script>
+    <script type="module" crossorigin src="./assets/teacher.0435a24c.js"></script>
     <link rel="modulepreload" href="./assets/vendor.7fdfd452.js">
     <link rel="modulepreload" href="./assets/index.5a60ef99.js">
     <link rel="stylesheet" href="./assets/index.cb2212cc.css">
     <link rel="stylesheet" href="./assets/vendor.68261ebd.css">
-    <link rel="stylesheet" href="./assets/teacher.a6c9550a.css">
+    <link rel="stylesheet" href="./assets/index.5062a520.css">
     <script type="module">!function(){try{new Function("m","return import(m)")}catch(o){console.warn("vite: loading legacy build because dynamic import is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}}();</script>
   </head>
 
@@ -48,7 +48,7 @@
     <div id="app"></div>
     
     <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
-    <script nomodule id="vite-legacy-polyfill" src="./assets/polyfills-legacy.7f3f9b80.js"></script>
-    <script nomodule id="vite-legacy-entry" data-src="./assets/teacher-legacy.80d0106d.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+    <script nomodule id="vite-legacy-polyfill" src="./assets/polyfills-legacy.11b78793.js"></script>
+    <script nomodule id="vite-legacy-entry" data-src="./assets/teacher-legacy.cc24cc5d.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
   </body>
 </html>

+ 36 - 25
src/teacher/share-page/share-video/index.tsx

@@ -38,31 +38,36 @@ export default defineComponent({
       wxStatus: false
     }
   },
-  created() {
-    if (browser().isApp) {
-      if (state.platformType === 'STUDENT') {
-        // 自动跳转到学生端视频课详情购买页
-        window.location.replace(
-          `${location.origin}/student/#/videoDetail?${qs.stringify(
-            this.$route.query
-          )}`
-        )
-      } else if (state.platformType === 'TEACHER') {
-        Dialog.alert({
-          title: '提示',
-          message: '请使用酷乐秀学生端扫码打开',
-          confirmButtonColor: '#2dc7aa'
-        }).then(() => {
-          postMessage({ api: 'back' })
-        })
-      }
-    } else {
-      // 如果不在app里面则不需要唤起操作
-      this.reCall()
-    }
-  },
   async mounted() {
     try {
+      if (browser().isApp) {
+        if (state.platformType === 'STUDENT') {
+          // 自动跳转到学生端视频课详情购买页
+          // window.location.replace(
+          //   `${location.origin}/student/#/videoDetail?${qs.stringify(
+          //     this.$route.query
+          //   )}`
+          // )
+
+          this.locationReplace(
+            `${location.origin}/student/#/videoDetail?${qs.stringify(
+              this.$route.query
+            )}`
+          )
+        } else if (state.platformType === 'TEACHER') {
+          Dialog.alert({
+            title: '提示',
+            message: '请使用酷乐秀学生端扫码打开',
+            confirmButtonColor: '#2dc7aa'
+          }).then(() => {
+            postMessage({ api: 'back' })
+          })
+        }
+      } else {
+        // 如果不在app里面则不需要唤起操作
+        this.reCall()
+      }
+
       const res = await request.post(`/api-teacher/open/videoShareProfit`, {
         data: {
           bizId: this.params.videoLessonGroupId,
@@ -86,10 +91,16 @@ export default defineComponent({
     } catch {
       //
     }
-
-    console.log()
   },
   methods: {
+    locationReplace(url: string) {
+      if (history.replaceState) {
+        history.replaceState(null, document.title, url)
+        history.go(0)
+      } else {
+        location.replace(url)
+      }
+    },
     reCall() {
       const { origin } = location
       let str = origin + '/student/#/videoDetail'

部分文件因文件數量過多而無法顯示