ZhaoJing 1 year ago
parent
commit
b6127a02e6
2 changed files with 34 additions and 28 deletions
  1. 2 3
      src/pages/myImage/[id].vue
  2. 32 25
      src/pages/myVoice/[id].vue

+ 2 - 3
src/pages/myImage/[id].vue

@@ -8,7 +8,7 @@
     <van-loading class="w-full text-center" v-if="loading" color="#FFFFFF" />
     <div v-else class="flex flex-col justify-center h-80vh">
         <video-player
-        :key="detailData.axi_rxcj_spwj_v2" :src="https+'/'+(detailData.axi_rxcj_spwj_v2)"
+        :key="detailData.axi_rxcj_spwj_v2" :src="detailData.axi_rxcj_spwj_v2"
         :poster="(detailData.axi_img)" class="w-full"
         />
     </div>
@@ -21,8 +21,7 @@ import img2 from "~/assets/voice2.png";
 const props = defineProps<{
   id: string;
 }>();
-console.log(props.id);
-let https = window.GLOBAL_CONFIG.api
+
 const router = useRouter();
 function onClickLeft() {
   router.back();

+ 32 - 25
src/pages/myVoice/[id].vue

@@ -6,31 +6,38 @@
       @click-left="onClickLeft"
     ></van-nav-bar>
     <van-loading class="w-full text-center" v-if="loading" color="#FFFFFF" />
-    <van-list :finished="finished" finished-text="没有更多了">
-      <van-cell
-        :border="false"
-        center
-        v-for="item in voiceList"
-        :key="item.audioId"
-        :title="item.text"
-      >
-        <template #title>
-          <van-text-ellipsis class="w-250px" :content="item.text" dots="......">
-            <template #action="{ expanded }">
-              {{ expanded }}1111
-              <van-icon color="#1989fa" v-if="expanded" name="arrow" />
-              <van-icon color="#1989fa" v-else name="arrow-up" /> </template
-          ></van-text-ellipsis>
-        </template>
-        <template #right-icon>
-          <img
-            @click="handlePlay(item)"
-            class="w-25px h-25px"
-            :src="!item.play ? img1 : img2"
-            alt=""
-          />
-        </template>
-      </van-cell>
+    <van-list v-else :finished="finished" finished-text="没有更多了">
+      <template v-if="voiceList.length > 0">
+        <van-cell
+          :border="false"
+          center
+          v-for="item in voiceList"
+          :key="item.audioId"
+          :title="item.text"
+        >
+          <template #title>
+            <van-text-ellipsis
+              class="w-250px"
+              :content="item.text"
+              dots="......"
+            >
+              <template #action="{ expanded }">
+                {{ expanded }}1111
+                <van-icon color="#1989fa" v-if="expanded" name="arrow" />
+                <van-icon color="#1989fa" v-else name="arrow-up" /> </template
+            ></van-text-ellipsis>
+          </template>
+          <template #right-icon>
+            <img
+              @click="handlePlay(item)"
+              class="w-25px h-25px"
+              :src="!item.play ? img1 : img2"
+              alt=""
+            />
+          </template>
+        </van-cell>
+      </template>
+      <van-empty v-else description="暂无数据" />
     </van-list>
   </div>
 </template>