fix: for thesis
This commit is contained in:
@@ -9,7 +9,8 @@
|
|||||||
<div class="voice" v-if="onCall.panel">
|
<div class="voice" v-if="onCall.panel">
|
||||||
<div>
|
<div>
|
||||||
<div class="profilebox">
|
<div class="profilebox">
|
||||||
<img :src="onCall.target.avatar" alt="头像">
|
<!-- 原逻辑::src="onCall.target.avatar"(远端头像) -->
|
||||||
|
<img :src="defaultAvatar" alt="头像">
|
||||||
</div>
|
</div>
|
||||||
<div class="infobox">
|
<div class="infobox">
|
||||||
<p>{{ onCall.target.name }}</p>
|
<p>{{ onCall.target.name }}</p>
|
||||||
@@ -37,6 +38,7 @@ import { onCallStore } from '@/store/VoiceTarget';
|
|||||||
import { Mic } from '@element-plus/icons-vue';
|
import { Mic } from '@element-plus/icons-vue';
|
||||||
import { ref, onMounted, onBeforeUnmount } from 'vue';
|
import { ref, onMounted, onBeforeUnmount } from 'vue';
|
||||||
import { denyCall, hangupCall,sendOffer } from '@/store/Voice.ts';
|
import { denyCall, hangupCall,sendOffer } from '@/store/Voice.ts';
|
||||||
|
import defaultAvatar from '@/assets/defaultavatar.jpg';
|
||||||
|
|
||||||
const onCall = onCallStore();
|
const onCall = onCallStore();
|
||||||
const userinfo = userInfoStore()
|
const userinfo = userInfoStore()
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<router-link to="/home/user" v-if="userinfo.user.u_avatar" class="user-profile-link">
|
<router-link to="/home/user" class="user-profile-link">
|
||||||
<div class="user-profile">
|
<div class="user-profile">
|
||||||
<img :src="userinfo.user.u_avatar" alt="User Avatar" />
|
<!-- 原逻辑::src="userinfo.user.u_avatar"(远端头像) -->
|
||||||
|
<img :src="defaultAvatar" alt="User Avatar" />
|
||||||
<div :class="['status-dot', statusClass]"></div>
|
<div :class="['status-dot', statusClass]"></div>
|
||||||
</div>
|
</div>
|
||||||
</router-link>
|
</router-link>
|
||||||
@@ -11,6 +12,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { userInfoStore } from '@/store/user.ts';
|
import { userInfoStore } from '@/store/user.ts';
|
||||||
|
import defaultAvatar from '@/assets/defaultavatar.jpg';
|
||||||
|
|
||||||
const userinfo = userInfoStore();
|
const userinfo = userInfoStore();
|
||||||
|
|
||||||
|
|||||||
@@ -10,12 +10,12 @@
|
|||||||
<p>项目管理是我</p>
|
<p>项目管理是我</p>
|
||||||
<p>架构设计是我</p>
|
<p>架构设计是我</p>
|
||||||
<p>数据库设计还是我</p>
|
<p>数据库设计还是我</p>
|
||||||
<p>感谢使用与支持</p>
|
<p>感谢使用</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="9">
|
<!-- <el-col :span="9">
|
||||||
可以添加微信询问详情
|
可以添加微信询问详情
|
||||||
<img class="QRcode" src="@/assets/微信二维码.png" alt="candlelight_official">
|
<img class="QRcode" src="@/assets/微信二维码.png" alt="candlelight_official">
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<!-- <el-col :span="9">
|
<!-- <el-col :span="9">
|
||||||
<img class="QRcode" src="@/assets/微信收款码.png" alt="" />
|
<img class="QRcode" src="@/assets/微信收款码.png" alt="" />
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="home-default">
|
<div class="home-default">
|
||||||
<h1>欢迎使用Myplayer!</h1>
|
<h1>欢迎使用Myplayer!</h1>
|
||||||
<h2>当前版本v0.3.0测试版</h2>
|
<h2>当前版本v0.4.0测试版</h2>
|
||||||
<p>v0.1.0 websocket实时聊天实装</p>
|
<!-- <p>v0.1.0 websocket实时聊天实装</p>
|
||||||
<p>v0.1.1 面板更新,websocket重连机制增加</p>
|
<p>v0.1.1 面板更新,websocket重连机制增加</p>
|
||||||
<p>v0.1.2 修复bug,群聊功能性实现,webRTC点对点语言聊天实装</p>
|
<p>v0.1.2 修复bug,群聊功能性实现,webRTC点对点语言聊天实装</p>
|
||||||
<p>v0.2.0 修复若干bug,完善了部分ui和逻辑</p>
|
<p>v0.2.0 修复若干bug,完善了部分ui和逻辑</p>
|
||||||
<p>v0.3.0 重构了后端以及前端逻辑</p>
|
<p>v0.3.0 重构了后端以及前端逻辑</p>
|
||||||
<p>预期开发计划:1、播放器相关开发 2、ui重绘 3、群聊功能完善......</p>
|
<p>预期开发计划:1、播放器相关开发 2、ui重绘 3、群聊功能完善......</p> -->
|
||||||
<p>总之还有好多事,慢慢写吧!</p>
|
<p>总之还有好多事,慢慢写吧!</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
@click="switchTemplate(item.id, item.u_name, item.u_avatar)"
|
@click="switchTemplate(item.id, item.u_name, item.u_avatar)"
|
||||||
:class="{ 'selected': selectedFriendId === item.id }">
|
:class="{ 'selected': selectedFriendId === item.id }">
|
||||||
<div class="user-profile">
|
<div class="user-profile">
|
||||||
<img :src="item.u_avatar" alt="User Avatar" />
|
<!-- 原逻辑::src="item.u_avatar"(远端头像) -->
|
||||||
|
<img :src="defaultAvatar" alt="User Avatar" />
|
||||||
<div :class="['status-dot', statusClass]"></div>
|
<div :class="['status-dot', statusClass]"></div>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: inline-block;">{{ item.u_name }}#{{ item.u_id }}</div>
|
<div style="display: inline-block;">{{ item.u_name }}#{{ item.u_id }}</div>
|
||||||
@@ -24,8 +25,8 @@
|
|||||||
<div v-for="(item) in messagebox" class="message-item">
|
<div v-for="(item) in messagebox" class="message-item">
|
||||||
<div
|
<div
|
||||||
:class="{ 'message-item-profile': true, 'left': item.from !== userinfo.user.id, 'right': item.from === userinfo.user.id }">
|
:class="{ 'message-item-profile': true, 'left': item.from !== userinfo.user.id, 'right': item.from === userinfo.user.id }">
|
||||||
<img :src="item.from !== userinfo.user.id ? oppositeAvatar : userinfo.user.u_avatar"
|
<!-- 原逻辑::src="item.from !== userinfo.user.id ? oppositeAvatar : userinfo.user.u_avatar"(远端头像) -->
|
||||||
alt="User Avatar" />
|
<img :src="defaultAvatar" alt="User Avatar" />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:class="{ 'message-item-content': true, 'left': item.from !== userinfo.user.id, 'right': item.from === userinfo.user.id }">
|
:class="{ 'message-item-content': true, 'left': item.from !== userinfo.user.id, 'right': item.from === userinfo.user.id }">
|
||||||
@@ -48,7 +49,8 @@
|
|||||||
<el-dialog v-model="dialogVisibleCallConfirm" title="确认通话对象" width="30%" :before-close="handleClose">
|
<el-dialog v-model="dialogVisibleCallConfirm" title="确认通话对象" width="30%" :before-close="handleClose">
|
||||||
<el-row style="height: 80px;align-items: center;">
|
<el-row style="height: 80px;align-items: center;">
|
||||||
<div class="user-profile">
|
<div class="user-profile">
|
||||||
<img :src="oppositeAvatar" alt="User Avatar" />
|
<!-- 原逻辑::src="oppositeAvatar"(远端头像) -->
|
||||||
|
<img :src="defaultAvatar" alt="User Avatar" />
|
||||||
</div>
|
</div>
|
||||||
<div>{{ oppositeName }}</div>
|
<div>{{ oppositeName }}</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -64,7 +66,8 @@
|
|||||||
<el-table-column prop="u_avatar" label="" width="100">
|
<el-table-column prop="u_avatar" label="" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- 使用 el-avatar 组件显示头像 -->
|
<!-- 使用 el-avatar 组件显示头像 -->
|
||||||
<el-avatar :src="friendSearchResult[scope.$index].u_avatar" size="large" />
|
<!-- 原逻辑::src="friendSearchResult[scope.$index].u_avatar"(远端头像) -->
|
||||||
|
<el-avatar :src="defaultAvatar" size="large" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="u_name" label="姓名" width="100"></el-table-column>
|
<el-table-column prop="u_name" label="姓名" width="100"></el-table-column>
|
||||||
@@ -96,6 +99,7 @@ import { messageStore } from '@/store/message.ts';
|
|||||||
import { Search } from '@element-plus/icons-vue'
|
import { Search } from '@element-plus/icons-vue'
|
||||||
import { onCallStore } from '@/store/VoiceTarget.ts';
|
import { onCallStore } from '@/store/VoiceTarget.ts';
|
||||||
import { getFriends, deleteFriend } from '@/api/friend';
|
import { getFriends, deleteFriend } from '@/api/friend';
|
||||||
|
import defaultAvatar from '@/assets/defaultavatar.jpg';
|
||||||
|
|
||||||
|
|
||||||
const userinfo = userInfoStore()
|
const userinfo = userInfoStore()
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
@click="switchGroup(item.g_id, item.g_name, item.g_avatar, item.g_note)"
|
@click="switchGroup(item.g_id, item.g_name, item.g_avatar, item.g_note)"
|
||||||
:class="{ 'selected': selectedGroupId === item.g_id }">
|
:class="{ 'selected': selectedGroupId === item.g_id }">
|
||||||
<div class="groupAvatar">
|
<div class="groupAvatar">
|
||||||
<img :src="item.g_avatar" alt="群头像">
|
<!-- 原逻辑::src="item.g_avatar"(远端群头像) -->
|
||||||
|
<img :src="defaultAvatar" alt="群头像">
|
||||||
</div>
|
</div>
|
||||||
<div class="groupName">
|
<div class="groupName">
|
||||||
<el-text truncated>{{ item.g_name }}</el-text>
|
<el-text truncated>{{ item.g_name }}</el-text>
|
||||||
@@ -48,7 +49,8 @@
|
|||||||
<div v-for="(item) in messagebox" class="message-item">
|
<div v-for="(item) in messagebox" class="message-item">
|
||||||
<div
|
<div
|
||||||
:class="{ 'message-item-profile': true, 'left': item.from !== userinfo.user.id, 'right': item.from === userinfo.user.id }">
|
:class="{ 'message-item-profile': true, 'left': item.from !== userinfo.user.id, 'right': item.from === userinfo.user.id }">
|
||||||
<img :src="getAvatar(item.from)" alt="User Avatar" />
|
<!-- 原逻辑::src="getAvatar(item.from)"(远端用户头像) -->
|
||||||
|
<img :src="defaultAvatar" alt="User Avatar" />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:class="{ 'message-item-content': true, 'left': item.from !== userinfo.user.id, 'right': item.from === userinfo.user.id }">
|
:class="{ 'message-item-content': true, 'left': item.from !== userinfo.user.id, 'right': item.from === userinfo.user.id }">
|
||||||
@@ -84,7 +86,8 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<div style="display: inline-block;">
|
<div style="display: inline-block;">
|
||||||
<div class="groupAvatar">
|
<div class="groupAvatar">
|
||||||
<img :src="selectedGroupAvatar" alt="群头像">
|
<!-- 原逻辑::src="selectedGroupAvatar"(远端群头像) -->
|
||||||
|
<img :src="defaultAvatar" alt="群头像">
|
||||||
</div>
|
</div>
|
||||||
<div class="groupName">
|
<div class="groupName">
|
||||||
<el-text truncated>{{ selectedGroupName }}#{{ selectedGroupId }}</el-text>
|
<el-text truncated>{{ selectedGroupName }}#{{ selectedGroupId }}</el-text>
|
||||||
@@ -112,7 +115,8 @@
|
|||||||
<el-table-column prop="m_avatar" label="" width="100">
|
<el-table-column prop="m_avatar" label="" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- 使用 el-avatar 组件显示头像 -->
|
<!-- 使用 el-avatar 组件显示头像 -->
|
||||||
<el-avatar :src="memberSearchResult[scope.$index].u_avatar" size="large" />
|
<!-- 原逻辑::src="memberSearchResult[scope.$index].u_avatar"(远端头像) -->
|
||||||
|
<el-avatar :src="defaultAvatar" size="large" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="u_name" label="姓名" width="125"></el-table-column>
|
<el-table-column prop="u_name" label="姓名" width="125"></el-table-column>
|
||||||
@@ -145,7 +149,8 @@
|
|||||||
<el-table :data="groupSearchResult" style="height: 300px;">
|
<el-table :data="groupSearchResult" style="height: 300px;">
|
||||||
<el-table-column prop="g_avatar" label="" width="100">
|
<el-table-column prop="g_avatar" label="" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-avatar :src="groupSearchResult[scope.$index].g_avatar" size="large" />
|
<!-- 原逻辑::src="groupSearchResult[scope.$index].g_avatar"(远端群头像) -->
|
||||||
|
<el-avatar :src="defaultAvatar" size="large" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="g_name" label="姓名" width="125"></el-table-column>
|
<el-table-column prop="g_name" label="姓名" width="125"></el-table-column>
|
||||||
@@ -169,6 +174,7 @@ import { Search } from '@element-plus/icons-vue'
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { onlineSocketStore } from '@/store/Online'
|
import { onlineSocketStore } from '@/store/Online'
|
||||||
import { getGroups,createGroup, searchGroups, joinGroup, leaveGroup, getGroupMembers } from '@/api/group'
|
import { getGroups,createGroup, searchGroups, joinGroup, leaveGroup, getGroupMembers } from '@/api/group'
|
||||||
|
import defaultAvatar from '@/assets/defaultavatar.jpg'
|
||||||
|
|
||||||
const socket = onlineSocketStore();
|
const socket = onlineSocketStore();
|
||||||
const userinfo = userInfoStore();
|
const userinfo = userInfoStore();
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<template></template>
|
<template>设置</template>
|
||||||
@@ -3,7 +3,8 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="updateProfile">
|
<div class="updateProfile">
|
||||||
<div class="profile">
|
<div class="profile">
|
||||||
<img :src="avatarPreview" alt="头像">
|
<!-- 原逻辑::src="avatarPreview"(远端头像/本地预览) -->
|
||||||
|
<img :src="defaultAvatar" alt="头像">
|
||||||
</div>
|
</div>
|
||||||
<el-col span="12">
|
<el-col span="12">
|
||||||
<input type="file" id="avatar" @change="handleAvatarChange" accept="image/*" />
|
<input type="file" id="avatar" @change="handleAvatarChange" accept="image/*" />
|
||||||
@@ -137,6 +138,7 @@ import axios from 'axios';
|
|||||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||||
import { reactive, ref } from 'vue'
|
import { reactive, ref } from 'vue'
|
||||||
import { getUserInfo } from '@/functions/user';
|
import { getUserInfo } from '@/functions/user';
|
||||||
|
import defaultAvatar from '@/assets/defaultavatar.jpg'
|
||||||
|
|
||||||
const userinfo = userInfoStore();
|
const userinfo = userInfoStore();
|
||||||
console.log(userinfo.account);
|
console.log(userinfo.account);
|
||||||
@@ -195,7 +197,7 @@ const passwordRules = {
|
|||||||
|
|
||||||
//修改头像部分
|
//修改头像部分
|
||||||
//预览头像
|
//预览头像
|
||||||
const avatarPreview = ref(userinfo.user.u_avatar);
|
// const avatarPreview = ref(userinfo.user.u_avatar); // 原:远端头像预览
|
||||||
const avatar = ref(null); // 存储上传的头像文件
|
const avatar = ref(null); // 存储上传的头像文件
|
||||||
|
|
||||||
|
|
||||||
@@ -204,7 +206,7 @@ const handleAvatarChange = (event) => {
|
|||||||
const file = event.target.files[0];
|
const file = event.target.files[0];
|
||||||
if (file) {
|
if (file) {
|
||||||
avatar.value = file;
|
avatar.value = file;
|
||||||
avatarPreview.value = URL.createObjectURL(file);
|
// avatarPreview.value = URL.createObjectURL(file); // 原:本地预览
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user