Browse Source

fix[mobile]: wechat avatar error

chenlei 9 months ago
parent
commit
94b2896062
1 changed files with 4 additions and 3 deletions
  1. 4 3
      packages/mobile/src/views/Mine/index.vue

+ 4 - 3
packages/mobile/src/views/Mine/index.vue

@@ -42,6 +42,8 @@
         >
       </div>
 
+      <van-empty v-if="!bookList.length" description="暂无数据" />
+
       <ul class="mine-page-list">
         <li v-for="item in bookList" :key="item.id">
           <book-card
@@ -67,11 +69,10 @@ import { uploadApi, updateUserInfoApi, getMyBookListApi } from "@/api";
 import BookCard from "@/components/BookCard.vue";
 import PhotoIcon from "@/assets/images/icon_portrait@2x-min.png";
 import EditNamePopup from "./components/EditNamePopup.vue";
-import { getBaseUrl } from "@/utils";
+import { getFixUrl } from "@/utils";
 
 const { toClipboard } = useClipboard();
 const baseStore = useBaseStore();
-const baseUrl = getBaseUrl();
 const { userInfo } = storeToRefs(baseStore);
 const fileList = ref([]);
 const editNameVisible = ref(false);
@@ -148,7 +149,7 @@ watch(
   (v) => {
     fileList.value = [
       {
-        url: baseUrl + v.avatarUrl,
+        url: getFixUrl(v.avatarUrl),
         isImage: true,
       },
     ];