Forráskód Böngészése

音频播放判断兼容离线包的方式

natasha 2 napja
szülő
commit
b01edbaf40

+ 1 - 1
src/views/book/courseware/preview/components/character_base/components/AudioPlay.vue

@@ -100,7 +100,7 @@ export default {
     fileId: {
       handler(val) {
         if (!val) return;
-        if (val.indexOf('http') > -1) {
+        if (val.indexOf('/') > -1) {
           this.url = val;
         } else {
           GetFileURLMap({ file_id_list: [val] }).then(({ url_map }) => {

+ 1 - 1
src/views/book/courseware/preview/components/new_word/components/AudioPlay.vue

@@ -38,7 +38,7 @@ export default {
     fileId: {
       handler(val) {
         if (!val) return;
-        if (val.indexOf('http') > -1) {
+        if (val.indexOf('/') > -1) {
           this.url = val;
         } else {
           GetFileURLMap({ file_id_list: [val] }).then(({ url_map }) => {