Browse Source

平台过来的 隐藏资源的一些功能

黄琪勇 2 tháng trước cách đây
mục cha
commit
01cb27130b

+ 34 - 20
src/views/components/element/cloudCoachElement/cloudCoachList/cloudCoachList.vue

@@ -126,7 +126,13 @@
                   </div>
                 </div>
                 <div class="musicRight">
-                  <img class="sc" @click="handleFavorite(item)" :src="item.favoriteFlag ? scActImg : scImg" alt="" />
+                  <img
+                    v-if="queryParams.fromType !== 'PLATFORM'"
+                    class="sc"
+                    @click="handleFavorite(item)"
+                    :src="item.favoriteFlag ? scActImg : scImg"
+                    alt=""
+                  />
                   <div class="addBtn" @click="handleAddMusic(item.id, item.name)">添加</div>
                 </div>
               </div>
@@ -167,24 +173,32 @@ function handleAddMusic(id: string, name: string) {
   emits("close")
 }
 
-const tabData = [
-  {
-    label: "相关资源",
-    value: 5
-  },
-  {
-    label: "共享资源",
-    value: 2
-  },
-  {
-    label: "我的资源",
-    value: 3
-  },
-  {
-    label: "我的收藏",
-    value: 4
-  }
-]
+const tabData =
+  queryParams.fromType === "PLATFORM"
+    ? [
+        {
+          label: "共享资源",
+          value: 2
+        }
+      ]
+    : [
+        {
+          label: "相关资源",
+          value: 5
+        },
+        {
+          label: "共享资源",
+          value: 2
+        },
+        {
+          label: "我的资源",
+          value: 3
+        },
+        {
+          label: "我的收藏",
+          value: 4
+        }
+      ]
 // 场景
 const audioPlayTypesOption = [
   { text: "全部", value: "" },
@@ -201,7 +215,7 @@ const queryData = reactive({
   page: 1,
   rows: 21,
   total: 0,
-  sourceType: 5,
+  sourceType: tabData[0].value,
   name: "",
   bookVersionId: "",
   audioPlayTypes: "",