hookehuyr

✨ feat: 所有头像新增默认图片

...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
11 <div class="video-bar"> 11 <div class="video-bar">
12 <van-row> 12 <van-row>
13 <van-col span="12" @click="goTo"> 13 <van-col span="12" @click="goTo">
14 - <van-image round width="2rem" height="2rem" style="vertical-align: middle;" :src="item.avatar" />&nbsp; 14 + <van-image v-if="item.avatar" round width="2rem" height="2rem" style="vertical-align: middle;" :src="item.avatar" />&nbsp;
15 + <van-image v-else round width="2rem" height="2rem" style="vertical-align: middle;" :src="icon_avatar" />&nbsp;
15 <span style="font-size: 1.05rem;vertical-align: middle;">{{ item.name }}</span> 16 <span style="font-size: 1.05rem;vertical-align: middle;">{{ item.name }}</span>
16 </van-col> 17 </van-col>
17 <van-col span="12"> 18 <van-col span="12">
...@@ -51,6 +52,7 @@ ...@@ -51,6 +52,7 @@
51 import icon_dianzan1 from '@images/icon-dianzan01@2x.png' 52 import icon_dianzan1 from '@images/icon-dianzan01@2x.png'
52 import icon_dianzan2 from '@images/icon-dianzan02@2x.png' 53 import icon_dianzan2 from '@images/icon-dianzan02@2x.png'
53 import icon_liuyan from '@images/icon-liuyan@2x.png' 54 import icon_liuyan from '@images/icon-liuyan@2x.png'
55 +import icon_avatar from '@images/que-touxiang@2x.png'
54 56
55 import icon_refuse from '@images/icon-jujue@2x.png' 57 import icon_refuse from '@images/icon-jujue@2x.png'
56 import icon_apply from '@images/icon-shenhe@2x.png' 58 import icon_apply from '@images/icon-shenhe@2x.png'
......
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
26 <div class="comment-wrapper"> 26 <div class="comment-wrapper">
27 <van-row style="font-size: 0.9rem;"> 27 <van-row style="font-size: 0.9rem;">
28 <van-col span="4"> 28 <van-col span="4">
29 - <van-image round width="3rem" height="3rem" :src="item.avatar" /> 29 + <van-image v-if="item.avatar" round width="3rem" height="3rem" :src="item.avatar" />
30 + <van-image v-else round width="3rem" height="3rem" :src="icon_avatar" />
30 </van-col> 31 </van-col>
31 <van-col span="14"> 32 <van-col span="14">
32 <p>{{ item.name }}</p> 33 <p>{{ item.name }}</p>
...@@ -58,6 +59,7 @@ import CommentBox from '@/components/CommentBox/index.vue' ...@@ -58,6 +59,7 @@ import CommentBox from '@/components/CommentBox/index.vue'
58 59
59 import icon_x from '@images/x.png' 60 import icon_x from '@images/x.png'
60 import icon_y from '@images/y.png' 61 import icon_y from '@images/y.png'
62 +import icon_avatar from '@images/que-touxiang@2x.png'
61 63
62 import axios from '@/utils/axios'; 64 import axios from '@/utils/axios';
63 import _ from 'lodash' 65 import _ from 'lodash'
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
5 <van-row> 5 <van-row>
6 <van-col> 6 <van-col>
7 <div class="donate-book"> 7 <div class="donate-book">
8 - <van-image width="80" height="80" :src="item.avatar" /> 8 + <van-image v-if="item.avatar" width="80" height="80" :src="item.avatar" />
9 + <van-image v-else width="80" height="80" :src="icon_avatar" />
9 </div> 10 </div>
10 </van-col> 11 </van-col>
11 <van-col> 12 <van-col>
...@@ -51,6 +52,7 @@ ...@@ -51,6 +52,7 @@
51 52
52 <script setup> 53 <script setup>
53 import Cookies from 'js-cookie' 54 import Cookies from 'js-cookie'
55 +import icon_avatar from '@images/que-touxiang@2x.png'
54 56
55 import MyButton from '@/components/MyButton/index.vue' 57 import MyButton from '@/components/MyButton/index.vue'
56 import { ref, reactive, onMounted } from 'vue' 58 import { ref, reactive, onMounted } from 'vue'
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
5 <div class="video-bar"> 5 <div class="video-bar">
6 <van-row> 6 <van-row>
7 <van-col span="12" @click="goTo"> 7 <van-col span="12" @click="goTo">
8 - <van-image round width="2rem" height="2rem" style="vertical-align: middle;" :src="item.avatar" />&nbsp; 8 + <van-image v-if="item.avatar" round width="2rem" height="2rem" style="vertical-align: middle;" :src="item.avatar" />&nbsp;
9 + <van-image v-else round width="2rem" height="2rem" style="vertical-align: middle;" :src="icon_avatar" />&nbsp;
9 <span style="font-size: 1.05rem;vertical-align: middle;">{{ item.name }}</span> 10 <span style="font-size: 1.05rem;vertical-align: middle;">{{ item.name }}</span>
10 </van-col> 11 </van-col>
11 <van-col span="12"> 12 <van-col span="12">
...@@ -40,6 +41,7 @@ ...@@ -40,6 +41,7 @@
40 import icon_dianzan1 from '@images/icon-dianzan01@2x.png' 41 import icon_dianzan1 from '@images/icon-dianzan01@2x.png'
41 import icon_dianzan2 from '@images/icon-dianzan02@2x.png' 42 import icon_dianzan2 from '@images/icon-dianzan02@2x.png'
42 import icon_liuyan from '@images/icon-liuyan@2x.png' 43 import icon_liuyan from '@images/icon-liuyan@2x.png'
44 +import icon_avatar from '@images/que-touxiang@2x.png'
43 45
44 import { ref, reactive, onMounted } from 'vue' 46 import { ref, reactive, onMounted } from 'vue'
45 import 'mui-player/dist/mui-player.min.css' 47 import 'mui-player/dist/mui-player.min.css'
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
4 <div class="info"> 4 <div class="info">
5 <van-row> 5 <van-row>
6 <van-col> 6 <van-col>
7 - <van-image round width="50" height="50" :src="userInfo.avatar" style="padding-right: 1rem;" /> 7 + <van-image v-if="userInfo.avatar" round width="50" height="50" :src="userInfo.avatar" style="padding-right: 1rem;" />
8 + <van-image v-else round width="50" height="50" :src="icon_avatar" style="padding-right: 1rem;" />
8 </van-col> 9 </van-col>
9 <van-col class="text-wrapper" span="18"> 10 <van-col class="text-wrapper" span="18">
10 <div> 11 <div>
...@@ -57,6 +58,7 @@ import { mainStore } from '@/store' ...@@ -57,6 +58,7 @@ import { mainStore } from '@/store'
57 import { storeToRefs } from 'pinia' 58 import { storeToRefs } from 'pinia'
58 59
59 import VideoCard from '@/components/VideoCard/index.vue' 60 import VideoCard from '@/components/VideoCard/index.vue'
61 +import icon_avatar from '@images/que-touxiang@2x.png'
60 62
61 import { ref, onActivated, onMounted } from 'vue' 63 import { ref, onActivated, onMounted } from 'vue'
62 import { useRoute, useRouter, onBeforeRouteLeave } from 'vue-router' 64 import { useRoute, useRouter, onBeforeRouteLeave } from 'vue-router'
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
3 <div @click="getUserInfo" class="detail-header"> 3 <div @click="getUserInfo" class="detail-header">
4 <van-row> 4 <van-row>
5 <van-col span="4"> 5 <van-col span="4">
6 - <van-image round width="3rem" height="3rem" :src="videoInfo.avatar" /> 6 + <van-image v-if="videoInfo.avatar" round width="3rem" height="3rem" :src="videoInfo.avatar" />
7 + <van-image v-else round width="3rem" height="3rem" :src="icon_avatar" />
7 </van-col> 8 </van-col>
8 <van-col style="line-height: 3rem;"> 9 <van-col style="line-height: 3rem;">
9 <div class="name-info">{{ videoInfo.name }}</div> 10 <div class="name-info">{{ videoInfo.name }}</div>
...@@ -37,6 +38,7 @@ ...@@ -37,6 +38,7 @@
37 <script setup> 38 <script setup>
38 import { mainStore } from '@/store' 39 import { mainStore } from '@/store'
39 import { storeToRefs } from 'pinia' 40 import { storeToRefs } from 'pinia'
41 +import icon_avatar from '@images/que-touxiang@2x.png'
40 42
41 import VideoDetail from '@/components/VideoDetail/index.vue' 43 import VideoDetail from '@/components/VideoDetail/index.vue'
42 import { ref, reactive, onMounted, watch } from 'vue' 44 import { ref, reactive, onMounted, watch } from 'vue'
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
5 <div class="comment-wrapper"> 5 <div class="comment-wrapper">
6 <van-row style="font-size: 0.9rem;"> 6 <van-row style="font-size: 0.9rem;">
7 <van-col span="4"> 7 <van-col span="4">
8 - <van-image round width="3rem" height="3rem" :src="item.avatar" /> 8 + <van-image v-if="item.avatar" round width="3rem" height="3rem" :src="item.avatar" />
9 + <van-image v-else round width="3rem" height="3rem" :src="icon_avatar" />
9 </van-col> 10 </van-col>
10 <van-col span="14"> 11 <van-col span="14">
11 <p>{{ item.name }}</p> 12 <p>{{ item.name }}</p>
...@@ -58,6 +59,7 @@ import { mainStore } from '@/store' ...@@ -58,6 +59,7 @@ import { mainStore } from '@/store'
58 import CommentList from '@/components/CommentList/index.vue' 59 import CommentList from '@/components/CommentList/index.vue'
59 import CommentBox from '@/components/CommentBox/index.vue' 60 import CommentBox from '@/components/CommentBox/index.vue'
60 import NoticeOverlay from '@/components/NoticeOverlay/index.vue' 61 import NoticeOverlay from '@/components/NoticeOverlay/index.vue'
62 +import icon_avatar from '@images/que-touxiang@2x.png'
61 63
62 import { ref, reactive, onMounted } from 'vue' 64 import { ref, reactive, onMounted } from 'vue'
63 import { useRoute, useRouter } from 'vue-router' 65 import { useRoute, useRouter } from 'vue-router'
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
3 <div class="comment-wrapper"> 3 <div class="comment-wrapper">
4 <van-row style="font-size: 0.9rem;"> 4 <van-row style="font-size: 0.9rem;">
5 <van-col span="4"> 5 <van-col span="4">
6 - <van-image round width="3rem" height="3rem" :src="item.avatar" /> 6 + <van-image v-if="item.avatar" round width="3rem" height="3rem" :src="item.avatar" />
7 + <van-image v-else round width="3rem" height="3rem" :src="icon_avatar" />
7 </van-col> 8 </van-col>
8 <van-col span="16"> 9 <van-col span="16">
9 <p>{{ item.name }}</p> 10 <p>{{ item.name }}</p>
...@@ -53,6 +54,7 @@ ...@@ -53,6 +54,7 @@
53 // import icon_player from '@images/bofang@2x.png' 54 // import icon_player from '@images/bofang@2x.png'
54 import CommentBox from '@/components/CommentBox/index.vue' 55 import CommentBox from '@/components/CommentBox/index.vue'
55 import NoticeOverlay from '@/components/NoticeOverlay/index.vue' 56 import NoticeOverlay from '@/components/NoticeOverlay/index.vue'
57 +import icon_avatar from '@images/que-touxiang@2x.png'
56 58
57 import { ref, reactive, onActivated } from 'vue' 59 import { ref, reactive, onActivated } from 'vue'
58 import { useRoute, useRouter, onBeforeRouteLeave } from 'vue-router' 60 import { useRoute, useRouter, onBeforeRouteLeave } from 'vue-router'
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
4 <div @click="getUserInfo(item)" class="info van-hairline--bottom"> 4 <div @click="getUserInfo(item)" class="info van-hairline--bottom">
5 <van-row> 5 <van-row>
6 <van-col> 6 <van-col>
7 - <van-image round width="50" height="50" :src="item.avatar" style="padding-right: 1rem;" /> 7 + <van-image v-if="item.avatar" round width="50" height="50" :src="item.avatar" style="padding-right: 1rem;" />
8 + <van-image v-else round width="50" height="50" :src="icon_avatar" style="padding-right: 1rem;" />
8 </van-col> 9 </van-col>
9 <van-col class="text-wrapper" span="18"> 10 <van-col class="text-wrapper" span="18">
10 <div> 11 <div>
...@@ -25,6 +26,7 @@ import { ref, reactive, onMounted } from 'vue' ...@@ -25,6 +26,7 @@ import { ref, reactive, onMounted } from 'vue'
25 import { useRoute, useRouter } from 'vue-router' 26 import { useRoute, useRouter } from 'vue-router'
26 import axios from '@/utils/axios'; 27 import axios from '@/utils/axios';
27 import { Toast } from 'vant'; 28 import { Toast } from 'vant';
29 +import icon_avatar from '@images/que-touxiang@2x.png'
28 30
29 const $router = useRouter(); 31 const $router = useRouter();
30 32
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
4 <div class="info"> 4 <div class="info">
5 <van-row> 5 <van-row>
6 <van-col> 6 <van-col>
7 - <van-image @click="handleUser('EDIT')" round width="50" height="50" :src="userInfo.avatar" style="padding-right: 1rem;" /> 7 + <van-image v-if="userInfo.avatar" @click="handleUser('EDIT')" round width="50" height="50" :src="userInfo.avatar" style="padding-right: 1rem;" />
8 + <van-image v-else @click="handleUser('EDIT')" round width="50" height="50" :src="icon_avatar" style="padding-right: 1rem;" />
8 </van-col> 9 </van-col>
9 <van-col class="text-wrapper" span="18"> 10 <van-col class="text-wrapper" span="18">
10 <div> 11 <div>
...@@ -68,6 +69,8 @@ ...@@ -68,6 +69,8 @@
68 </template> 69 </template>
69 70
70 <script setup> 71 <script setup>
72 +import icon_avatar from '@images/que-touxiang@2x.png'
73 +
71 import MyButton from '@/components/MyButton/index.vue' 74 import MyButton from '@/components/MyButton/index.vue'
72 75
73 import { ref, reactive, onMounted } from 'vue' 76 import { ref, reactive, onMounted } from 'vue'
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
4 <div class="comment-wrapper"> 4 <div class="comment-wrapper">
5 <van-row style="font-size: 0.9rem;"> 5 <van-row style="font-size: 0.9rem;">
6 <van-col span="4"> 6 <van-col span="4">
7 - <van-image round width="3rem" height="3rem" :src="item.avatar" /> 7 + <van-image v-if="item.avatar" round width="3rem" height="3rem" :src="item.avatar" />
8 + <van-image v-else round width="3rem" height="3rem" :src="icon_avatar" />
8 </van-col> 9 </van-col>
9 <van-col span="15"> 10 <van-col span="15">
10 <p>{{ item.name }}</p> 11 <p>{{ item.name }}</p>
...@@ -44,6 +45,7 @@ ...@@ -44,6 +45,7 @@
44 45
45 <script setup> 46 <script setup>
46 import icon_player from '@images/bofang@2x.png' 47 import icon_player from '@images/bofang@2x.png'
48 +import icon_avatar from '@images/que-touxiang@2x.png'
47 49
48 import { ref, reactive, onMounted, onActivated } from 'vue' 50 import { ref, reactive, onMounted, onActivated } from 'vue'
49 import { useRoute, useRouter, onBeforeRouteLeave } from 'vue-router' 51 import { useRoute, useRouter, onBeforeRouteLeave } from 'vue-router'
......