hookehuyr

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

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