Browse Source

更新问题

lex 10 months ago
parent
commit
ae098e3fda

+ 1 - 1
src/helpers/utils.ts

@@ -3,7 +3,7 @@ import dayjs from 'dayjs';
 import qs from 'query-string';
 
 export function vaildMusicScoreUrl() {
-  const url: string = window.location.href;
+  const url: string = window.location.hostname;
   let returnUrl = '';
   if (/test/.test(url) || /localhost/.test(url)) {
     // test 环境

+ 17 - 1
src/views/co-ai/baseIndex.module.less

@@ -110,6 +110,7 @@
     display: none;
   }
 
+  position: relative;
   // display: flex;
   flex: 1;
   // background-color: #FFFFFF;
@@ -137,6 +138,8 @@
       padding-top: 0;
     }
 
+
+
     :global {
       .van-empty__description {
         color: #777;
@@ -144,6 +147,19 @@
     }
   }
 
+  .loadingWrap {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    background-color: rgba(255, 255, 255, 0.4);
+    z-index: 99;
+  }
+
   :global {
     .van-empty {
       padding-bottom: 0 !important;
@@ -353,4 +369,4 @@
       padding: 0 30px
     }
   }
-}
+}

+ 16 - 1
src/views/co-ai/baseIndex.tsx

@@ -8,7 +8,15 @@ import {
 } from 'vue';
 import styles from './baseIndex.module.less';
 import icon_back from './image/icon_back.svg';
-import { Button, Space, Tab, Tabs, showConfirmDialog, Image } from 'vant';
+import {
+  Button,
+  Space,
+  Tab,
+  Tabs,
+  showConfirmDialog,
+  Image,
+  Loading
+} from 'vant';
 import {
   api_lessonCoursewareFavoriteRemove,
   api_lessonCoursewareFavoriteSave
@@ -214,6 +222,7 @@ export default defineComponent({
                     forms.musicTagId == item.id ? styles.active : ''
                   ]}
                   onClick={() => {
+                    if (data.loading || forms.musicTagId === item.id) return;
                     forms.musicTagId = item.id;
                     getList();
                   }}>
@@ -281,6 +290,12 @@ export default defineComponent({
                 <MEmpty image="list" description="暂无数据" />
               )}
             </div>
+
+            {data.loading && (
+              <div class={styles.loadingWrap}>
+                <Loading type="spinner" color="#44C9FF" />
+              </div>
+            )}
           </div>
         </div>
       </div>

+ 1 - 1
src/views/courseware-play/component/listen-item/index.tsx

@@ -5,7 +5,7 @@ import { storage } from '@/helpers/storage';
 import { ACCESS_TOKEN } from '@/store/mutation-types';
 
 export function vaildMusicScoreUrl() {
-  const url: string = window.location.href;
+  const url: string = window.location.hostname;
   let returnUrl = '';
   if (/localhost/.test(url)) {
     //本地环境