优化代码
This commit is contained in:
36
src/App.vue
36
src/App.vue
@@ -6,24 +6,24 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
const debounce = (fn, delay) => {
|
// const debounce = (fn, delay) => {
|
||||||
let timer
|
// let timer
|
||||||
return (...args) => {
|
// return (...args) => {
|
||||||
if (timer) {
|
// if (timer) {
|
||||||
clearTimeout(timer)
|
// clearTimeout(timer)
|
||||||
}
|
// }
|
||||||
timer = setTimeout(() => {
|
// timer = setTimeout(() => {
|
||||||
fn(...args)
|
// fn(...args)
|
||||||
}, delay)
|
// }, delay)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
const _ResizeObserver = window.ResizeObserver
|
// const _ResizeObserver = window.ResizeObserver
|
||||||
window.ResizeObserver = class ResizeObserver extends _ResizeObserver {
|
// window.ResizeObserver = class ResizeObserver extends _ResizeObserver {
|
||||||
constructor(callback) {
|
// constructor(callback) {
|
||||||
callback = debounce(callback, 200)
|
// callback = debounce(callback, 200)
|
||||||
super(callback)
|
// super(callback)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
</script>
|
</script>
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
@import "@/static/css/app.less";
|
@import "@/static/css/app.less";
|
||||||
|
|||||||
@@ -157,4 +157,12 @@ export function forgetPassword(data) {
|
|||||||
//重设密码
|
//重设密码
|
||||||
export function resetPassword(data) {
|
export function resetPassword(data) {
|
||||||
return postAxios({ url: 'user/resetPassword', data })
|
return postAxios({ url: 'user/resetPassword', data })
|
||||||
|
}
|
||||||
|
//激活邮箱
|
||||||
|
export function activeEmail(data) {
|
||||||
|
return getAxios({ url: 'user/activate?token=' + data})
|
||||||
|
}
|
||||||
|
//验证账号
|
||||||
|
export function checkAccount(data) {
|
||||||
|
return getAxios({ url: 'user/verificationMail?token=' + data})
|
||||||
}
|
}
|
||||||
@@ -397,12 +397,32 @@ const chatList = ref({
|
|||||||
//监听会话消息
|
//监听会话消息
|
||||||
function onConversationsUpdated(conversations) {
|
function onConversationsUpdated(conversations) {
|
||||||
chatList.value = conversations;
|
chatList.value = conversations;
|
||||||
|
if (chatList.value.unreadTotal != 0) {
|
||||||
|
initNotification();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
//谷歌通知提醒
|
||||||
|
function initNotification() {
|
||||||
|
if (Notification.permission !== "granted") {
|
||||||
|
Notification.requestPermission().then(showNotification);
|
||||||
|
} else {
|
||||||
|
showNotification();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function showNotification() {
|
||||||
|
new Notification("新消息到达", {
|
||||||
|
body: "您有 "+ chatList.value.unreadTotal +" 封未读消息",
|
||||||
|
lang: "zh-CN", // 语言
|
||||||
|
// onClick: () => window.location.href = "/nav/Message",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//获取会话列表
|
//获取会话列表
|
||||||
function getChatList() {
|
function getChatList() {
|
||||||
goEasyGetConversations().then((res) => {
|
goEasyGetConversations().then((res) => {
|
||||||
chatList.value = res.content;
|
chatList.value = res.content;
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
//重发邮箱验证
|
//重发邮箱验证
|
||||||
@@ -416,7 +436,7 @@ function ResendEmail() {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
isResendEmail.value = 1;
|
isResendEmail.value = 1;
|
||||||
setInterval(startCountdown, 1000);
|
setInterval(startCountdown, 1000);
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
//修改新邮箱
|
//修改新邮箱
|
||||||
@@ -442,7 +462,7 @@ function changeEmail() {
|
|||||||
ElMessage.success("修改成功,请至新邮箱中验证邮箱");
|
ElMessage.success("修改成功,请至新邮箱中验证邮箱");
|
||||||
emailVisible.value = false;
|
emailVisible.value = false;
|
||||||
UserInfo();
|
UserInfo();
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取验证码
|
//获取验证码
|
||||||
@@ -456,7 +476,7 @@ function sendEmail() {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
isSendEmail.value = 1;
|
isSendEmail.value = 1;
|
||||||
setInterval(startCountdown, 1000);
|
setInterval(startCountdown, 1000);
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
function startCountdown() {
|
function startCountdown() {
|
||||||
@@ -516,7 +536,7 @@ function changePassword() {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
passwordVisible.value = false;
|
passwordVisible.value = false;
|
||||||
ElMessage.success("修改成功");
|
ElMessage.success("修改成功");
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
//修改昵称
|
//修改昵称
|
||||||
function handleNickNameChange() {
|
function handleNickNameChange() {
|
||||||
@@ -527,7 +547,7 @@ function handleNickNameChange() {
|
|||||||
setStorage("user", res);
|
setStorage("user", res);
|
||||||
ElMessage.success("修改成功");
|
ElMessage.success("修改成功");
|
||||||
UserInfo();
|
UserInfo();
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
// 上传头像
|
// 上传头像
|
||||||
const headers = {
|
const headers = {
|
||||||
@@ -545,7 +565,7 @@ const handleAvatarSuccess = (
|
|||||||
setStorage("user", res);
|
setStorage("user", res);
|
||||||
ElMessage.success("修改成功");
|
ElMessage.success("修改成功");
|
||||||
UserInfo();
|
UserInfo();
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
const beforeAvatarUpload = (rawFile) => {
|
const beforeAvatarUpload = (rawFile) => {
|
||||||
@@ -671,7 +691,7 @@ function getAnchorLibrary() {
|
|||||||
}
|
}
|
||||||
).then(res => {
|
).then(res => {
|
||||||
anchorLibrary.value = res;
|
anchorLibrary.value = res;
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
//侧边导航
|
//侧边导航
|
||||||
@@ -716,8 +736,8 @@ function popoverClick(id) {
|
|||||||
clearStorage("user")
|
clearStorage("user")
|
||||||
clearStorage("token")
|
clearStorage("token")
|
||||||
clearStorage("activeId")
|
clearStorage("activeId")
|
||||||
})
|
}).catch((err) => {});
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -727,7 +747,7 @@ function setsignIn() {
|
|||||||
userId: info.value.id,
|
userId: info.value.id,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
ElMessage.success("签到成功");
|
ElMessage.success("签到成功");
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取用户数据
|
//获取用户数据
|
||||||
@@ -743,7 +763,7 @@ function UserInfo() {
|
|||||||
if (info.value.mailVerification == 1) {
|
if (info.value.mailVerification == 1) {
|
||||||
ElMessage.error("邮箱未验证,请至设置验证邮箱,如果已经验证请刷新页面");
|
ElMessage.error("邮箱未验证,请至设置验证邮箱,如果已经验证请刷新页面");
|
||||||
}
|
}
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
const refname = ref('');
|
const refname = ref('');
|
||||||
@@ -754,13 +774,13 @@ watch(refname, async (newQuestion, oldQuestion) => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getPromiseStorage('activeId').then(res => {
|
getPromiseStorage('activeId').then(res => {
|
||||||
activeId.value = res || 1;
|
activeId.value = res || 1;
|
||||||
});
|
}).catch((err) => {});
|
||||||
getPromiseStorage('user').then(res => {
|
getPromiseStorage('user').then(res => {
|
||||||
info.value = res;
|
info.value = res;
|
||||||
avatar.value = info.value.headerIcon;
|
avatar.value = info.value.headerIcon;
|
||||||
getAnchorLibrary()
|
getAnchorLibrary()
|
||||||
UserInfo();
|
UserInfo();
|
||||||
});
|
}).catch((err) => {});
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
getChatList();
|
getChatList();
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ function agreedialogConfirm(){
|
|||||||
ElMessage.success("同意成功");
|
ElMessage.success("同意成功");
|
||||||
PkIDInfodata.value.pkStatus = 1;
|
PkIDInfodata.value.pkStatus = 1;
|
||||||
agreedialog.value = false
|
agreedialog.value = false
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
//确认拒绝
|
//确认拒绝
|
||||||
@@ -221,7 +221,7 @@ function refusedialogConfirm(){
|
|||||||
ElMessage.success("拒绝成功");
|
ElMessage.success("拒绝成功");
|
||||||
PkIDInfodata.value.pkStatus = 2;
|
PkIDInfodata.value.pkStatus = 2;
|
||||||
refusedialog.value = false
|
refusedialog.value = false
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
//同意邀请
|
//同意邀请
|
||||||
@@ -244,7 +244,7 @@ watch(
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
PkIDInfodata.value = res;
|
PkIDInfodata.value = res;
|
||||||
console.log("PkIDInfodata", res);
|
console.log("PkIDInfodata", res);
|
||||||
});
|
}).catch((err) => {});
|
||||||
pkArticleDetail({
|
pkArticleDetail({
|
||||||
id: newVal.payload.customData.pkIdA,
|
id: newVal.payload.customData.pkIdA,
|
||||||
userId: info.value.id,
|
userId: info.value.id,
|
||||||
@@ -252,7 +252,7 @@ watch(
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
ArticleDetailsA.value = res;
|
ArticleDetailsA.value = res;
|
||||||
console.log("ArticleDetailsA", res);
|
console.log("ArticleDetailsA", res);
|
||||||
});
|
}).catch((err) => {});
|
||||||
pkArticleDetail({
|
pkArticleDetail({
|
||||||
id: newVal.payload.customData.pkIdB,
|
id: newVal.payload.customData.pkIdB,
|
||||||
userId: info.value.id,
|
userId: info.value.id,
|
||||||
@@ -260,7 +260,7 @@ watch(
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
ArticleDetailsB.value = res;
|
ArticleDetailsB.value = res;
|
||||||
console.log("ArticleDetailsB", res);
|
console.log("ArticleDetailsB", res);
|
||||||
});
|
}).catch((err) => {});
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
@@ -268,7 +268,7 @@ watch(
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getPromiseStorage("user").then((res) => {
|
getPromiseStorage("user").then((res) => {
|
||||||
info.value = res;
|
info.value = res;
|
||||||
});
|
}).catch((err) => {});
|
||||||
});
|
});
|
||||||
onUpdated(() => {
|
onUpdated(() => {
|
||||||
// 组件更新后执行
|
// 组件更新后执行
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ function agreedialogConfirm() {
|
|||||||
ElMessage.success("同意成功");
|
ElMessage.success("同意成功");
|
||||||
PkIDInfodata.value.pkStatus = 1;
|
PkIDInfodata.value.pkStatus = 1;
|
||||||
agreedialog.value = false;
|
agreedialog.value = false;
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
//确认拒绝
|
//确认拒绝
|
||||||
@@ -204,7 +204,7 @@ function refusedialogConfirm() {
|
|||||||
ElMessage.success("拒绝成功");
|
ElMessage.success("拒绝成功");
|
||||||
PkIDInfodata.value.pkStatus = 2;
|
PkIDInfodata.value.pkStatus = 2;
|
||||||
refusedialog.value = false;
|
refusedialog.value = false;
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
//同意邀请
|
//同意邀请
|
||||||
@@ -227,7 +227,7 @@ watch(
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
PkIDInfodata.value = res;
|
PkIDInfodata.value = res;
|
||||||
console.log("PkIDInfodata", res);
|
console.log("PkIDInfodata", res);
|
||||||
});
|
}).catch((err) => {});
|
||||||
pkArticleDetail({
|
pkArticleDetail({
|
||||||
id: newVal.payload.customData.pkIdA,
|
id: newVal.payload.customData.pkIdA,
|
||||||
userId: info.value.id,
|
userId: info.value.id,
|
||||||
@@ -235,7 +235,7 @@ watch(
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
ArticleDetailsA.value = res;
|
ArticleDetailsA.value = res;
|
||||||
console.log("ArticleDetailsA", res);
|
console.log("ArticleDetailsA", res);
|
||||||
});
|
}).catch((err) => {});
|
||||||
pkArticleDetail({
|
pkArticleDetail({
|
||||||
id: newVal.payload.customData.pkIdB,
|
id: newVal.payload.customData.pkIdB,
|
||||||
userId: info.value.id,
|
userId: info.value.id,
|
||||||
@@ -243,7 +243,7 @@ watch(
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
ArticleDetailsB.value = res;
|
ArticleDetailsB.value = res;
|
||||||
console.log("ArticleDetailsB", res);
|
console.log("ArticleDetailsB", res);
|
||||||
});
|
}).catch((err) => {});
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
@@ -251,7 +251,7 @@ watch(
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getPromiseStorage("user").then((res) => {
|
getPromiseStorage("user").then((res) => {
|
||||||
info.value = res;
|
info.value = res;
|
||||||
});
|
}).catch((err) => {});
|
||||||
});
|
});
|
||||||
onUpdated(() => {
|
onUpdated(() => {
|
||||||
// 组件更新后执行
|
// 组件更新后执行
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
class="anchor-library-list"
|
class="anchor-library-list"
|
||||||
style="overflow: auto"
|
style="overflow: auto"
|
||||||
v-infinite-scroll="load"
|
v-infinite-scroll="load"
|
||||||
|
v-if="list.length !== 0"
|
||||||
>
|
>
|
||||||
<div class="anchor-library-card" v-for="(item, index) in list" :key="index">
|
<div class="anchor-library-card" v-for="(item, index) in list" :key="index">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
@@ -46,6 +47,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="chatNotDeta" v-if="list.length === 0">
|
||||||
|
<div class="chatNotDeta-text">您还没有主播,快去添加吧!</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-splitter-panel>
|
</el-splitter-panel>
|
||||||
<el-splitter-panel size="25%" :collapsible="true" :resizable="false">
|
<el-splitter-panel size="25%" :collapsible="true" :resizable="false">
|
||||||
@@ -102,7 +106,8 @@
|
|||||||
</el-splitter>
|
</el-splitter>
|
||||||
</div>
|
</div>
|
||||||
<!-- 确认删除弹窗 -->
|
<!-- 确认删除弹窗 -->
|
||||||
<el-dialog center
|
<el-dialog
|
||||||
|
center
|
||||||
class="center-dialog"
|
class="center-dialog"
|
||||||
v-model="centerDialogVisible"
|
v-model="centerDialogVisible"
|
||||||
title="提示"
|
title="提示"
|
||||||
@@ -147,7 +152,7 @@ const genderOptions = [
|
|||||||
const gendervalue = ref(null); // 性别值
|
const gendervalue = ref(null); // 性别值
|
||||||
const countryvalue = ref(null); //国家
|
const countryvalue = ref(null); //国家
|
||||||
const anchorName = ref(null); // 主播名称
|
const anchorName = ref(null); // 主播名称
|
||||||
const list = ref([{}, {}, {}, {}, {}, {}]);
|
const list = ref([]);
|
||||||
const user = ref(null); // 用户信息
|
const user = ref(null); // 用户信息
|
||||||
const AnchorProfilePicture = ref(null); // 主播头像
|
const AnchorProfilePicture = ref(null); // 主播头像
|
||||||
const centerDialogVisible = ref(false); // 确认删除弹窗
|
const centerDialogVisible = ref(false); // 确认删除弹窗
|
||||||
@@ -189,11 +194,13 @@ function cancel() {
|
|||||||
// 删除主播
|
// 删除主播
|
||||||
const deleteAnchorID = ref(null);
|
const deleteAnchorID = ref(null);
|
||||||
const deleteAnchor = () => {
|
const deleteAnchor = () => {
|
||||||
delAnchor({ id: deleteAnchorID.value }).then((res) => {
|
delAnchor({ id: deleteAnchorID.value })
|
||||||
centerDialogVisible.value = false;
|
.then((res) => {
|
||||||
ElMessage.success("删除成功");
|
centerDialogVisible.value = false;
|
||||||
AnchorList();
|
ElMessage.success("删除成功");
|
||||||
});
|
AnchorList();
|
||||||
|
})
|
||||||
|
.catch((err) => {});
|
||||||
};
|
};
|
||||||
function anchordelete(id) {
|
function anchordelete(id) {
|
||||||
deleteAnchorID.value = id;
|
deleteAnchorID.value = id;
|
||||||
@@ -320,6 +327,19 @@ onUnmounted(() => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.chatNotDeta{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.chatNotDeta-text{
|
||||||
|
font-size: 20px;
|
||||||
|
color: #03aba8;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
.anchor-library-card {
|
.anchor-library-card {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- list -->
|
<!-- list -->
|
||||||
<div class="list" style="overflow: auto" v-infinite-scroll="load">
|
<div class="list" style="overflow: auto" v-infinite-scroll="load" v-if="list.length !== 0">
|
||||||
<div v-for="(item, index) in list" :key="index" class="list-item">
|
<div v-for="(item, index) in list" :key="index" class="list-item">
|
||||||
<div
|
<div
|
||||||
class="list-content"
|
class="list-content"
|
||||||
@@ -93,6 +93,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="chatNotDeta"v-if="list.length === 0">
|
||||||
|
<div class="chatNotDeta-text">您还没有PK记录</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-splitter-panel>
|
</el-splitter-panel>
|
||||||
|
|
||||||
@@ -208,7 +211,7 @@ function detail(item) {
|
|||||||
id: item.id,
|
id: item.id,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
fetchDetailPkDataWithId.value = res;
|
fetchDetailPkDataWithId.value = res;
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
//切换选项卡
|
//切换选项卡
|
||||||
function optionsclick(value) {
|
function optionsclick(value) {
|
||||||
@@ -243,7 +246,7 @@ function PkRecord(type) {
|
|||||||
list.value = InvitationData.value;
|
list.value = InvitationData.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 加载更多
|
// 加载更多
|
||||||
@@ -404,6 +407,19 @@ onUnmounted(() => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% -150px);
|
height: calc(100% -150px);
|
||||||
}
|
}
|
||||||
|
.chatNotDeta{
|
||||||
|
width: 100%;
|
||||||
|
height: calc(100% -150px);
|
||||||
|
background-color: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.chatNotDeta-text{
|
||||||
|
font-size: 20px;
|
||||||
|
color: #03aba8;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
.list-item {
|
.list-item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
class="anchor-library-list"
|
class="anchor-library-list"
|
||||||
style="overflow: auto"
|
style="overflow: auto"
|
||||||
v-infinite-scroll="load"
|
v-infinite-scroll="load"
|
||||||
|
v-if="list.length !== 0"
|
||||||
>
|
>
|
||||||
<div class="anchor-library-card" v-for="(item, index) in list" :key="index">
|
<div class="anchor-library-card" v-for="(item, index) in list" :key="index">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
@@ -85,6 +86,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="chatNotDeta" v-if="list.length === 0">
|
||||||
|
<div class="chatNotDeta-text">您还没有PK信息,快去添加吧!</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-splitter-panel>
|
</el-splitter-panel>
|
||||||
<el-splitter-panel size="25%" :resizable="false" collapsible>
|
<el-splitter-panel size="25%" :resizable="false" collapsible>
|
||||||
@@ -342,7 +346,7 @@ function getMyAnchorLibrary() {
|
|||||||
getAnchorList({ id: user.value.id }).then((res) => {
|
getAnchorList({ id: user.value.id }).then((res) => {
|
||||||
console.log("anchorLibrary", res);
|
console.log("anchorLibrary", res);
|
||||||
anchorLibrary.value = res;
|
anchorLibrary.value = res;
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
// 置顶or取消置顶
|
// 置顶or取消置顶
|
||||||
function topPosition(item) {
|
function topPosition(item) {
|
||||||
@@ -371,7 +375,7 @@ function topPositionstateConfirm() {
|
|||||||
list.value = [];
|
list.value = [];
|
||||||
page.value = 0;
|
page.value = 0;
|
||||||
PKInfo();
|
PKInfo();
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 确认取消置顶
|
// 确认取消置顶
|
||||||
@@ -382,7 +386,7 @@ function cancelTopPositionstateConfirm() {
|
|||||||
list.value = [];
|
list.value = [];
|
||||||
page.value = 0;
|
page.value = 0;
|
||||||
PKInfo();
|
PKInfo();
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
//计算置顶时长
|
//计算置顶时长
|
||||||
@@ -449,7 +453,7 @@ function deleteAnchor() {
|
|||||||
list.value = [];
|
list.value = [];
|
||||||
page.value = 0;
|
page.value = 0;
|
||||||
PKInfo();
|
PKInfo();
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 确认发布
|
// 确认发布
|
||||||
@@ -508,7 +512,7 @@ function Confirm() {
|
|||||||
page.value = 0;
|
page.value = 0;
|
||||||
PKInfo();
|
PKInfo();
|
||||||
cancel();
|
cancel();
|
||||||
});
|
}).catch((err) => {});
|
||||||
} else {
|
} else {
|
||||||
releasePkInfo({
|
releasePkInfo({
|
||||||
anchorId: anchorName.value,
|
anchorId: anchorName.value,
|
||||||
@@ -585,7 +589,7 @@ function PKInfo() {
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log("list", res);
|
console.log("list", res);
|
||||||
list.value.push(...res);
|
list.value.push(...res);
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 组件挂载完成后执行
|
// 组件挂载完成后执行
|
||||||
@@ -629,6 +633,19 @@ watch(refname, async (newQuestion, oldQuestion) => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.chatNotDeta{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.chatNotDeta-text{
|
||||||
|
font-size: 20px;
|
||||||
|
color: #03aba8;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
.anchor-library-card {
|
.anchor-library-card {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
|
|||||||
@@ -1,36 +1,35 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 积分列表 -->
|
<!-- 积分列表 -->
|
||||||
<div class="points-list-container">
|
<div class="points-list-container">
|
||||||
<div class="points-list-title">
|
<div class="points-list-title">
|
||||||
<img
|
<img class="points-icon" src="@/assets/Points.png" mode="scaleToFill" />
|
||||||
class="points-icon"
|
<div class="points-text">
|
||||||
src="@/assets/Points.png"
|
我的积分:{{ user.points }}
|
||||||
mode="scaleToFill"
|
<div class="points-alwaysnum"></div>
|
||||||
/>
|
|
||||||
<div class="points-text">
|
|
||||||
我的积分:{{ user.points }}
|
|
||||||
<div class="points-alwaysnum">
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="points-list" style="overflow: auto" v-if="pointsList.length !== 0">
|
||||||
<div class="points-list" style="overflow: auto;">
|
<div class="points-list-item" v-for="(item, index) in pointsList" :key="index">
|
||||||
<div class="points-list-item" v-for="(item, index) in pointsList" :key="index">
|
<div
|
||||||
<div class="points-list-content" :style="{background: item.status == 1 ? '#DFFEFC':'#FBECE9'}">
|
class="points-list-content"
|
||||||
<div class="Event">
|
:style="{ background: item.status == 1 ? '#DFFEFC' : '#FBECE9' }"
|
||||||
{{ item.info }}
|
>
|
||||||
</div>
|
<div class="Event">
|
||||||
<div class="points-num">
|
{{ item.info }}
|
||||||
{{ item.number }}
|
</div>
|
||||||
</div>
|
<div class="points-num">
|
||||||
<div class="time">
|
{{ item.number }}
|
||||||
{{TimestamptolocalTime(item.time*1000) }}
|
</div>
|
||||||
|
<div class="time">
|
||||||
|
{{ TimestamptolocalTime(item.time * 1000) }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="chatNotDeta" v-if="pointsList.length === 0">
|
||||||
|
<div class="chatNotDeta-text">您还没有积分记录!</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -41,24 +40,26 @@ import {
|
|||||||
onUpdated, // 组件更新后执行
|
onUpdated, // 组件更新后执行
|
||||||
onUnmounted, // 组件销毁前执行
|
onUnmounted, // 组件销毁前执行
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import {getIntegralDetail} from "@/api/account";
|
import { getIntegralDetail } from "@/api/account";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import {getPromiseStorage } from "@/utils/storage.js";
|
import { getPromiseStorage } from "@/utils/storage.js";
|
||||||
import { TimestamptolocalTime } from "../../utils/timeConversion";
|
import { TimestamptolocalTime } from "../../utils/timeConversion";
|
||||||
const pointsList = ref([]);
|
const pointsList = ref([]);
|
||||||
const user = ref({});//用户信息
|
const user = ref({}); //用户信息
|
||||||
const page = ref(0);
|
const page = ref(0);
|
||||||
|
|
||||||
//获取积分数据
|
//获取积分数据
|
||||||
function getPointsList () {
|
function getPointsList() {
|
||||||
getIntegralDetail({
|
getIntegralDetail({
|
||||||
page: page.value,
|
page: page.value,
|
||||||
size: 30,
|
size: 30,
|
||||||
userId: user.value.id,
|
userId: user.value.id,
|
||||||
}).then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
pointsList.value.push(...res);
|
|
||||||
})
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
pointsList.value.push(...res);
|
||||||
|
})
|
||||||
|
.catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 组件挂载完成后执行
|
// 组件挂载完成后执行
|
||||||
@@ -66,7 +67,7 @@ onMounted(() => {
|
|||||||
getPromiseStorage("user")
|
getPromiseStorage("user")
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
user.value = res;
|
user.value = res;
|
||||||
getPointsList()
|
getPointsList();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
@@ -79,14 +80,14 @@ onUpdated(() => {
|
|||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
// 组件销毁前执行
|
// 组件销毁前执行
|
||||||
});
|
});
|
||||||
const refname = ref('');
|
const refname = ref("");
|
||||||
watch(refname, async (newQuestion, oldQuestion) => {
|
watch(refname, async (newQuestion, oldQuestion) => {
|
||||||
// 变化后执行
|
// 变化后执行
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.points-list-container{
|
.points-list-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
@@ -94,44 +95,57 @@ watch(refname, async (newQuestion, oldQuestion) => {
|
|||||||
-ms-user-select: none;
|
-ms-user-select: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
.points-list{
|
.points-list {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 70px);
|
height: calc(100% - 70px);
|
||||||
}
|
}
|
||||||
.points-list-title{
|
.chatNotDeta {
|
||||||
|
width: 100%;
|
||||||
|
height: calc(100% - 70px);
|
||||||
|
background-color: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.chatNotDeta-text {
|
||||||
|
font-size: 20px;
|
||||||
|
color: #03aba8;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.points-list-title {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.points-text{
|
.points-text {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.points-alwaysnum{
|
.points-alwaysnum {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.points-icon{
|
.points-icon {
|
||||||
width: 52px;
|
width: 52px;
|
||||||
height: 52px;
|
height: 52px;
|
||||||
margin-right: 18px;
|
margin-right: 18px;
|
||||||
}
|
}
|
||||||
.points-list-item{
|
.points-list-item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content:center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.points-list-content{
|
.points-list-content {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
@@ -139,17 +153,17 @@ watch(refname, async (newQuestion, oldQuestion) => {
|
|||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.Event{
|
.Event {
|
||||||
color: @Supplementary-text-color;
|
color: @Supplementary-text-color;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
.points-num{
|
.points-num {
|
||||||
color: @font-color;
|
color: @font-color;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.time{
|
.time {
|
||||||
color:@Prompt-text-color;
|
color: @Prompt-text-color;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import ActivateEmail from '../views/ActivateEmail.vue'
|
|||||||
import activationSuccessful from '../views/activationSuccessful.vue'
|
import activationSuccessful from '../views/activationSuccessful.vue'
|
||||||
import forgetPassword from '../views/forgetPassword.vue'
|
import forgetPassword from '../views/forgetPassword.vue'
|
||||||
import resetPassword from '../views/resetPassword.vue'
|
import resetPassword from '../views/resetPassword.vue'
|
||||||
|
import verifyAccount from '../views/verifyAccount.vue'
|
||||||
import { setStorage , getStorage } from '@/utils/storage.js';
|
import { setStorage , getStorage } from '@/utils/storage.js';
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
@@ -23,9 +24,16 @@ const routes = [
|
|||||||
component: ActivateEmail
|
component: ActivateEmail
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/activationSuccessful',
|
path: '/activationSuccessful/:token',
|
||||||
name: 'activationSuccessful',
|
name: 'activationSuccessful',
|
||||||
component: activationSuccessful
|
component: activationSuccessful,
|
||||||
|
props: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/verifyAccount/:token',
|
||||||
|
name: 'verifyAccount',
|
||||||
|
component: verifyAccount,
|
||||||
|
props: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/forgetPassword',
|
path: '/forgetPassword',
|
||||||
@@ -33,9 +41,10 @@ const routes = [
|
|||||||
component: forgetPassword
|
component: forgetPassword
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/resetPassword',
|
path: '/resetPassword/:token',
|
||||||
name: 'resetPassword',
|
name: 'resetPassword',
|
||||||
component: resetPassword
|
component: resetPassword,
|
||||||
|
props: true
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -88,8 +88,10 @@ export function getAxios({ url, params }) {
|
|||||||
} else if (res.code == 40400) {
|
} else if (res.code == 40400) {
|
||||||
router.push('/')
|
router.push('/')
|
||||||
ElMessage.error(res.code + '' + res.msg);
|
ElMessage.error(res.code + '' + res.msg);
|
||||||
|
reject();
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(res.code + '' + res.msg);
|
ElMessage.error(res.code + '' + res.msg);
|
||||||
|
reject();
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
reject(err)
|
reject(err)
|
||||||
@@ -116,9 +118,11 @@ export function postAxios({ url, data }) {
|
|||||||
router.push('/')
|
router.push('/')
|
||||||
console.log(res.msg);
|
console.log(res.msg);
|
||||||
ElMessage.error(res.code + '' + res.msg);
|
ElMessage.error(res.code + '' + res.msg);
|
||||||
|
reject();
|
||||||
} else {
|
} else {
|
||||||
console.log(res.msg);
|
console.log(res.msg);
|
||||||
ElMessage.error(res.code + '' + res.msg);
|
ElMessage.error(res.code + '' + res.msg);
|
||||||
|
reject();
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
reject(err)
|
reject(err)
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ onMounted(() => {
|
|||||||
getPromiseStorage('user').then(res => {
|
getPromiseStorage('user').then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
user.value = res;
|
user.value = res;
|
||||||
});
|
}).catch((err) => {});
|
||||||
});
|
});
|
||||||
onUpdated(() => {
|
onUpdated(() => {
|
||||||
// 组件更新后执行
|
// 组件更新后执行
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ function forgetPassword() {
|
|||||||
function fetchQrcode() {
|
function fetchQrcode() {
|
||||||
getVxQrcode().then((res) => {
|
getVxQrcode().then((res) => {
|
||||||
Qrcode.value = res;
|
Qrcode.value = res;
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
//查询微信扫码是否成功
|
//查询微信扫码是否成功
|
||||||
function checkLogin() {
|
function checkLogin() {
|
||||||
@@ -170,7 +170,7 @@ function checkLogin() {
|
|||||||
pollstop();
|
pollstop();
|
||||||
router.push("/nav");
|
router.push("/nav");
|
||||||
}
|
}
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
function pollstop() {
|
function pollstop() {
|
||||||
clearInterval(vxloginstatus);
|
clearInterval(vxloginstatus);
|
||||||
|
|||||||
@@ -3,13 +3,46 @@
|
|||||||
<!-- 完成注册 -->
|
<!-- 完成注册 -->
|
||||||
<div class="form">
|
<div class="form">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
验证成功
|
{{Hinttext}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { useRoute,useRouter } from "vue-router";
|
||||||
|
import { ref, watch, onMounted, onUpdated, onUnmounted } from "vue";
|
||||||
|
import { activeEmail } from "@/api/account";
|
||||||
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
|
const token = ref("");
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
const Hinttext = ref("激活中,请稍候");
|
||||||
|
//确认
|
||||||
|
function nextStep() {
|
||||||
|
activeEmail(
|
||||||
|
token.value,
|
||||||
|
).then(() => {
|
||||||
|
Hinttext.value = "激活成功,请登录";
|
||||||
|
setTimeout(() => {
|
||||||
|
router.push("/");
|
||||||
|
}, 3000);
|
||||||
|
}).catch(() => {
|
||||||
|
Hinttext.value = "激活失败";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
token.value = route.params.token;
|
||||||
|
nextStep();
|
||||||
|
});
|
||||||
|
|
||||||
|
onUpdated(() => {
|
||||||
|
// 组件更新后执行
|
||||||
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
// 组件销毁前执行
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@@ -45,5 +78,6 @@
|
|||||||
font-size: 100px;
|
font-size: 100px;
|
||||||
color: #03aba8;
|
color: #03aba8;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
transition: all 0.5s ease-in-out;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ function userNameBlur() {
|
|||||||
ElMessage.success('用户名可用');
|
ElMessage.success('用户名可用');
|
||||||
userNamebtn.value = true
|
userNamebtn.value = true
|
||||||
}
|
}
|
||||||
})
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
//下一步
|
//下一步
|
||||||
function nextStep() {
|
function nextStep() {
|
||||||
@@ -157,7 +157,7 @@ function check(id) {
|
|||||||
pollstop()
|
pollstop()
|
||||||
router.push('/nav')
|
router.push('/nav')
|
||||||
}
|
}
|
||||||
})
|
}).catch((err) => {});
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
function pollstop() {
|
function pollstop() {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ watch(refname, async (newQuestion, oldQuestion) => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getNoticeList({page: 0, size: 10}).then((res) => {
|
getNoticeList({page: 0, size: 10}).then((res) => {
|
||||||
NoticeList.value = res;
|
NoticeList.value = res;
|
||||||
});
|
}).catch((err) => {});
|
||||||
});
|
});
|
||||||
onUpdated(() => {
|
onUpdated(() => {
|
||||||
// 组件更新后执行
|
// 组件更新后执行
|
||||||
|
|||||||
@@ -581,7 +581,7 @@ function getAnchorList() {
|
|||||||
userId: handleClickdata.value.userId,
|
userId: handleClickdata.value.userId,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
getAnchorListdata.value = res;
|
getAnchorListdata.value = res;
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
//查询我方已发布的未被邀请的主播列表
|
//查询我方已发布的未被邀请的主播列表
|
||||||
function getMyAnchorList() {
|
function getMyAnchorList() {
|
||||||
@@ -589,7 +589,7 @@ function getMyAnchorList() {
|
|||||||
userId: user.value.id,
|
userId: user.value.id,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
getMyAnchorListdata.value = res;
|
getMyAnchorListdata.value = res;
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
//确认邀请
|
//确认邀请
|
||||||
@@ -626,8 +626,8 @@ function reminderDialogConfirm() {
|
|||||||
chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight;
|
chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
}).catch((err) => {});
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
// PK邀请弹窗
|
// PK邀请弹窗
|
||||||
function PKInvitationdialogclick() {
|
function PKInvitationdialogclick() {
|
||||||
@@ -683,7 +683,7 @@ const handleFileSelect = (event) => {
|
|||||||
chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight;
|
chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -705,7 +705,7 @@ function sendMsg() {
|
|||||||
chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight;
|
chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 加载更多消息
|
// 加载更多消息
|
||||||
@@ -740,14 +740,14 @@ function handleClick(item) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
chatlistContainer.value.addEventListener("scroll", scrollHandler);
|
chatlistContainer.value.addEventListener("scroll", scrollHandler);
|
||||||
});
|
}).catch((err) => {});
|
||||||
messageRead();
|
messageRead();
|
||||||
}
|
}
|
||||||
//已读消息
|
//已读消息
|
||||||
function messageRead() {
|
function messageRead() {
|
||||||
goEasyMessageRead({
|
goEasyMessageRead({
|
||||||
id: handleClickdata.value.userId,
|
id: handleClickdata.value.userId,
|
||||||
}).then((res) => {});
|
}).then((res) => {}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取更多消息
|
//获取更多消息
|
||||||
@@ -818,7 +818,7 @@ function onPrivateMessageReceived(message) {
|
|||||||
function getChatList() {
|
function getChatList() {
|
||||||
goEasyGetConversations().then((res) => {
|
goEasyGetConversations().then((res) => {
|
||||||
chatList.value = res.content.conversations;
|
chatList.value = res.content.conversations;
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
watch(counter, (newQuestion, oldQuestion) => {
|
watch(counter, (newQuestion, oldQuestion) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@@ -61,14 +61,8 @@ const options = [
|
|||||||
icon: require("@/assets/PointsList.png"),
|
icon: require("@/assets/PointsList.png"),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
import { throttle } from 'lodash-es';
|
|
||||||
|
|
||||||
const throttledUpdate = throttle((value) => {
|
|
||||||
segmentedvalue.value = value;
|
|
||||||
}, 500);
|
|
||||||
|
|
||||||
function SelectorClick(value) {
|
function SelectorClick(value) {
|
||||||
throttledUpdate(value);
|
segmentedvalue.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
const segmentedvalue = ref(1);
|
const segmentedvalue = ref(1);
|
||||||
|
|||||||
@@ -757,7 +757,7 @@ function getAnchorList() {
|
|||||||
userId: info.value.id,
|
userId: info.value.id,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
getAnchorListdata.value = res;
|
getAnchorListdata.value = res;
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
//查询我方已发布的未被邀请的主播列表
|
//查询我方已发布的未被邀请的主播列表
|
||||||
function getMyAnchorList() {
|
function getMyAnchorList() {
|
||||||
@@ -765,7 +765,7 @@ function getMyAnchorList() {
|
|||||||
userId: user.value.id,
|
userId: user.value.id,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
getMyAnchorListdata.value = res;
|
getMyAnchorListdata.value = res;
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
//确认邀请
|
//确认邀请
|
||||||
@@ -801,8 +801,8 @@ function reminderDialogConfirm() {
|
|||||||
chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight;
|
chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
}).catch((err) => {});
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
// PK邀请弹窗
|
// PK邀请弹窗
|
||||||
function PKInvitationdialogclick() {
|
function PKInvitationdialogclick() {
|
||||||
@@ -859,7 +859,7 @@ const handleFileSelect = (event) => {
|
|||||||
chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight;
|
chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -881,7 +881,7 @@ function sendMsg() {
|
|||||||
chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight;
|
chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
// 选中主播后获取聊天列表数据
|
// 选中主播后获取聊天列表数据
|
||||||
function handleClick(time) {
|
function handleClick(time) {
|
||||||
@@ -904,8 +904,8 @@ function handleClick(time) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
chatlistContainer.value.addEventListener("scroll", scrollHandler);
|
chatlistContainer.value.addEventListener("scroll", scrollHandler);
|
||||||
});
|
}).catch((err) => {});
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 加载更多消息
|
// 加载更多消息
|
||||||
@@ -920,7 +920,7 @@ function loadMore() {
|
|||||||
function messageRead() {
|
function messageRead() {
|
||||||
goEasyMessageRead({
|
goEasyMessageRead({
|
||||||
id: String(handleClickdata.value.senderId),
|
id: String(handleClickdata.value.senderId),
|
||||||
}).then((res) => {});
|
}).then((res) => {}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
//私聊消息接收
|
//私聊消息接收
|
||||||
@@ -1012,7 +1012,7 @@ function PkList(body,type) {
|
|||||||
list.value = TodayList.value;
|
list.value = TodayList.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 加载更多
|
// 加载更多
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ const token = ref("");
|
|||||||
const Password = ref("");// 密码
|
const Password = ref("");// 密码
|
||||||
const ConfirmPassword = ref("");// 确认密码
|
const ConfirmPassword = ref("");// 确认密码
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
//确认
|
//确认
|
||||||
function nextStep() {
|
function nextStep() {
|
||||||
// 密码验证
|
// 密码验证
|
||||||
@@ -64,8 +63,8 @@ function nextStep() {
|
|||||||
password: Password.value,
|
password: Password.value,
|
||||||
confirmPassword: ConfirmPassword.value
|
confirmPassword: ConfirmPassword.value
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
active.value = active.value + 1;
|
active.value = 1;
|
||||||
})
|
}).catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -115,8 +114,8 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
.forms{
|
.forms{
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
width: 900px;
|
width: 80%;
|
||||||
height: 600px;
|
height: 80%;
|
||||||
background-image: linear-gradient(180deg, #dbf0f1, #ffffff);
|
background-image: linear-gradient(180deg, #dbf0f1, #ffffff);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
border: 1px solid #4fcacd;
|
border: 1px solid #4fcacd;
|
||||||
|
|||||||
84
src/views/verifyAccount.vue
Normal file
84
src/views/verifyAccount.vue
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<div class="email-registration">
|
||||||
|
<!-- 完成注册 -->
|
||||||
|
<div class="form">
|
||||||
|
<div class="title">
|
||||||
|
{{ Hinttext }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { useRoute, useRouter } from "vue-router";
|
||||||
|
import { ref, watch, onMounted, onUpdated, onUnmounted } from "vue";
|
||||||
|
import { checkAccount } from "@/api/account";
|
||||||
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
|
const token = ref("");
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
const Hinttext = ref("验证中,请稍候");
|
||||||
|
//确认
|
||||||
|
function nextStep() {
|
||||||
|
checkAccount(token.value,
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
Hinttext.value = "验证成功,请登录";
|
||||||
|
setTimeout(() => {
|
||||||
|
router.push("/");
|
||||||
|
}, 3000);
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
Hinttext.value = "验证失败";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
token.value = route.params.token;
|
||||||
|
nextStep();
|
||||||
|
});
|
||||||
|
|
||||||
|
onUpdated(() => {
|
||||||
|
// 组件更新后执行
|
||||||
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
// 组件销毁前执行
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.email-registration {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background-image: url(../assets/bg.png);
|
||||||
|
background-size: 100% 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
.form {
|
||||||
|
margin-top: 30px;
|
||||||
|
width: 80%;
|
||||||
|
height: 80%;
|
||||||
|
background-image: linear-gradient(180deg, #dbf0f1, #ffffff);
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid #4fcacd;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
font-size: 100px;
|
||||||
|
color: #03aba8;
|
||||||
|
font-weight: bold;
|
||||||
|
transition: all 0.5s ease-in-out;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user