整理

上级 591a28b8
.login-container[data-v-1be4e8ce]{background-color:#35495e;height:100%}.login-container .login-box[data-v-1be4e8ce]{width:400px;height:250px;background-color:#fff;border-radius:3px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);box-shadow:0 0 6px hsla(0,0%,100%,.5)}.login-container .login-box .form-login[data-v-1be4e8ce]{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box}.form-control[data-v-1be4e8ce]{flex:1}.avatar-box[data-v-1be4e8ce]{position:absolute;width:100%;top:-65px;left:0}.avatar-box .avatar[data-v-1be4e8ce]{width:120px;height:120px;border-radius:50%!important;box-shadow:0 0 6px #efefef}.layout-header-left-img[data-v-0bc02e96]{height:50px}.layout-aside-container[data-v-04b0cce7]{width:200px;height:100%;border-right:1px solid #eaeaea}.left-aside-item[data-v-04b0cce7]{font-size:20px}.el-main{padding:20px 3px!important}.el-header[data-v-5503bb7a]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-5503bb7a]{color:#333}.pagination[data-v-5503bb7a]{margin-top:16px;text-align:right}.arrow-button[data-v-5503bb7a]{display:flex;align-items:center;justify-content:center;border:none;background-color:transparent;cursor:pointer}.custom-icon[data-v-5503bb7a]{font-size:24px;color:#f90;margin-right:6px}.arrow-button.disabled[data-v-5503bb7a]{pointer-events:none;opacity:.1}.el-header[data-v-46e73c50]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-46e73c50]{color:#333}.pagination[data-v-46e73c50]{margin-top:16px;text-align:right}.header-button-item[data-v-46e73c50]{margin-right:15px;font-size:20px}.backtop[data-v-46e73c50]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.backtop[data-v-46e73c50]:hover{background-color:#0050a0}.el-header[data-v-a05e897a]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-a05e897a]{color:#333}.pagination[data-v-a05e897a]{margin-top:16px;text-align:right}.header-button-item[data-v-a05e897a]{margin-right:15px;font-size:20px}.red-title[data-v-a05e897a]{line-height:24px;font-size:18px;color:red}.backtop[data-v-a05e897a]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-a05e897a]{width:100%;text-align:left}.backtop[data-v-a05e897a]:hover{background-color:#0050a0}.el-header[data-v-277bc25c]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-277bc25c]{color:#333}.pagination[data-v-277bc25c]{margin-top:16px;text-align:right}.header-button-item[data-v-277bc25c]{margin-right:15px;font-size:20px}.red-title[data-v-277bc25c]{line-height:24px;font-size:18px;color:red}.backtop[data-v-277bc25c]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-277bc25c]{width:100%;text-align:left}.backtop[data-v-277bc25c]:hover{background-color:#0050a0}.el-header[data-v-7f9d4b2f]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-7f9d4b2f]{color:#333}.pagination[data-v-7f9d4b2f]{margin-top:16px;text-align:right}.header-button-item[data-v-7f9d4b2f]{margin-right:15px;font-size:20px}.red-title[data-v-7f9d4b2f]{line-height:24px;font-size:18px;color:red}.backtop[data-v-7f9d4b2f]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-7f9d4b2f]{width:100%;text-align:left}.backtop[data-v-7f9d4b2f]:hover{background-color:#0050a0}.el-header[data-v-46c1f8ba]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-46c1f8ba]{color:#333}.pagination[data-v-46c1f8ba]{margin-top:16px;text-align:right}.header-button-item[data-v-46c1f8ba]{margin-right:15px;font-size:20px}.red-title[data-v-46c1f8ba]{line-height:24px;font-size:18px;color:red}.backtop[data-v-46c1f8ba]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-46c1f8ba]{width:100%;text-align:left}.backtop[data-v-46c1f8ba]:hover{background-color:#0050a0}.el-header[data-v-38003344]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-38003344]{color:#333}.pagination[data-v-38003344]{margin-top:16px;text-align:right}.header-button-item[data-v-38003344]{margin-right:15px;font-size:20px}.red-title[data-v-38003344]{line-height:24px;font-size:18px;color:red}.backtop[data-v-38003344]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-38003344]{width:100%;text-align:left}.backtop[data-v-38003344]:hover{background-color:#0050a0}.el-header[data-v-9d40f752]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-9d40f752]{color:#333}.pagination[data-v-9d40f752]{margin-top:16px;text-align:right}.header-button-item[data-v-9d40f752]{margin-right:15px;font-size:20px}.red-title[data-v-9d40f752]{line-height:24px;font-size:18px;color:red}.backtop[data-v-9d40f752]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-9d40f752]{width:100%;text-align:left}.backtop[data-v-9d40f752]:hover{background-color:#0050a0}.button-container[data-v-bdbc2b14]{position:fixed;bottom:0;right:0;margin:16px}.container[data-v-19e0b810]{display:flex;justify-content:center;align-items:center;height:30vh} .login-container[data-v-1be4e8ce]{background-color:#35495e;height:100%}.login-container .login-box[data-v-1be4e8ce]{width:400px;height:250px;background-color:#fff;border-radius:3px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);box-shadow:0 0 6px hsla(0,0%,100%,.5)}.login-container .login-box .form-login[data-v-1be4e8ce]{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box}.form-control[data-v-1be4e8ce]{flex:1}.avatar-box[data-v-1be4e8ce]{position:absolute;width:100%;top:-65px;left:0}.avatar-box .avatar[data-v-1be4e8ce]{width:120px;height:120px;border-radius:50%!important;box-shadow:0 0 6px #efefef}.layout-header-left-img[data-v-0bc02e96]{height:50px}.layout-aside-container[data-v-5b66f297]{width:200px;height:100%;border-right:1px solid #eaeaea}.left-aside-item[data-v-5b66f297]{font-size:20px}.el-main{padding:20px 3px!important}.el-header[data-v-5503bb7a]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-5503bb7a]{color:#333}.pagination[data-v-5503bb7a]{margin-top:16px;text-align:right}.arrow-button[data-v-5503bb7a]{display:flex;align-items:center;justify-content:center;border:none;background-color:transparent;cursor:pointer}.custom-icon[data-v-5503bb7a]{font-size:24px;color:#f90;margin-right:6px}.arrow-button.disabled[data-v-5503bb7a]{pointer-events:none;opacity:.1}.el-header[data-v-46e73c50]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-46e73c50]{color:#333}.pagination[data-v-46e73c50]{margin-top:16px;text-align:right}.header-button-item[data-v-46e73c50]{margin-right:15px;font-size:20px}.backtop[data-v-46e73c50]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.backtop[data-v-46e73c50]:hover{background-color:#0050a0}.el-header[data-v-a05e897a]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-a05e897a]{color:#333}.pagination[data-v-a05e897a]{margin-top:16px;text-align:right}.header-button-item[data-v-a05e897a]{margin-right:15px;font-size:20px}.red-title[data-v-a05e897a]{line-height:24px;font-size:18px;color:red}.backtop[data-v-a05e897a]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-a05e897a]{width:100%;text-align:left}.backtop[data-v-a05e897a]:hover{background-color:#0050a0}.el-header[data-v-277bc25c]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-277bc25c]{color:#333}.pagination[data-v-277bc25c]{margin-top:16px;text-align:right}.header-button-item[data-v-277bc25c]{margin-right:15px;font-size:20px}.red-title[data-v-277bc25c]{line-height:24px;font-size:18px;color:red}.backtop[data-v-277bc25c]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-277bc25c]{width:100%;text-align:left}.backtop[data-v-277bc25c]:hover{background-color:#0050a0}.el-header[data-v-7f9d4b2f]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-7f9d4b2f]{color:#333}.pagination[data-v-7f9d4b2f]{margin-top:16px;text-align:right}.header-button-item[data-v-7f9d4b2f]{margin-right:15px;font-size:20px}.red-title[data-v-7f9d4b2f]{line-height:24px;font-size:18px;color:red}.backtop[data-v-7f9d4b2f]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-7f9d4b2f]{width:100%;text-align:left}.backtop[data-v-7f9d4b2f]:hover{background-color:#0050a0}.el-header[data-v-570cb36f]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-570cb36f]{color:#333}.pagination[data-v-570cb36f]{margin-top:16px;text-align:right}.header-button-item[data-v-570cb36f]{margin-right:15px;font-size:20px}.red-title[data-v-570cb36f]{line-height:24px;font-size:18px;color:red}.backtop[data-v-570cb36f]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-570cb36f]{width:100%;text-align:left}.backtop[data-v-570cb36f]:hover{background-color:#0050a0}.el-header[data-v-33b199a6]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-33b199a6]{color:#333}.pagination[data-v-33b199a6]{margin-top:16px;text-align:right}.header-button-item[data-v-33b199a6]{margin-right:15px;font-size:20px}.red-title[data-v-33b199a6]{line-height:24px;font-size:18px;color:red}.backtop[data-v-33b199a6]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-33b199a6]{width:100%;text-align:left}.backtop[data-v-33b199a6]:hover{background-color:#0050a0}.el-header[data-v-410d989c]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-410d989c]{color:#333}.pagination[data-v-410d989c]{margin-top:16px;text-align:right}.header-button-item[data-v-410d989c]{margin-right:15px;font-size:20px}.red-title[data-v-410d989c]{line-height:24px;font-size:18px;color:red}.backtop[data-v-410d989c]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-410d989c]{width:100%;text-align:left}.backtop[data-v-410d989c]:hover{background-color:#0050a0}.el-header[data-v-0f57df08]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-0f57df08]{color:#333}.pagination[data-v-0f57df08]{margin-top:16px;text-align:right}.header-button-item[data-v-0f57df08]{margin-right:15px;font-size:20px}.red-title[data-v-0f57df08]{line-height:24px;font-size:18px;color:red}.backtop[data-v-0f57df08]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-0f57df08]{width:100%;text-align:left}.backtop[data-v-0f57df08]:hover{background-color:#0050a0}.button-container[data-v-bdbc2b14]{position:fixed;bottom:0;right:0;margin:16px}.container[data-v-19e0b810]{display:flex;justify-content:center;align-items:center;height:30vh}
/*! /*!
* Bootstrap v4.5.0 (https://getbootstrap.com/) * Bootstrap v4.5.0 (https://getbootstrap.com/)
......
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/kwan.png"><title>kwan</title><link href="/css/app.8cde8efd.css" rel="preload" as="style"><link href="/css/chunk-vendors.0bfa23eb.css" rel="preload" as="style"><link href="/js/app.c2e5544a.js" rel="preload" as="script"><link href="/js/chunk-vendors.533b9d47.js" rel="preload" as="script"><link href="/css/chunk-vendors.0bfa23eb.css" rel="stylesheet"><link href="/css/app.8cde8efd.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but kwan doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.533b9d47.js"></script><script src="/js/app.c2e5544a.js"></script></body></html> <!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/kwan.png"><title>kwan</title><link href="/css/app.78b5c797.css" rel="preload" as="style"><link href="/css/chunk-vendors.0bfa23eb.css" rel="preload" as="style"><link href="/js/app.743e7515.js" rel="preload" as="script"><link href="/js/chunk-vendors.533b9d47.js" rel="preload" as="script"><link href="/css/chunk-vendors.0bfa23eb.css" rel="stylesheet"><link href="/css/app.78b5c797.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but kwan doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.533b9d47.js"></script><script src="/js/app.743e7515.js"></script></body></html>
\ No newline at end of file \ No newline at end of file
因为 它太大了无法显示 source diff 。你可以改为 查看blob
因为 它太大了无法显示 source diff 。你可以改为 查看blob
因为 它太大了无法显示 source diff 。你可以改为 查看blob
...@@ -2,20 +2,20 @@ import axios from 'axios' ...@@ -2,20 +2,20 @@ import axios from 'axios'
// 创建一个名为 ApiService 的对象,包含您的异步方法 // 创建一个名为 ApiService 的对象,包含您的异步方法
const ApiService = { const ApiService = {
async triplet(articleId) { async triplet(articleId) {
return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/triplet?articleId=' + articleId); return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/triplet?articleId=' + articleId)
}, },
async resetLikes() { async resetLikes() {
return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/fixLikesStatus'); return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/fixLikesStatus')
}, },
async allTriplet(articleIds) { async allTriplet(articleIds) {
return await axios.post('http://43.139.90.182:8888/csdnArticleInfo/multiTriplet', articleIds); return await axios.post('http://43.139.90.182:8888/csdnArticleInfo/multiTriplet', articleIds)
}, },
async onDelete(id) { async onDelete(id) {
return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/delete', { return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/delete', {
params: { params: {
id: id id: id,
} },
}) })
} },
} }
export default ApiService; export default ApiService
...@@ -92,17 +92,6 @@ ...@@ -92,17 +92,6 @@
</el-dialog> </el-dialog>
</el-form-item> </el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="prepareMeaasge">私信点赞收藏</el-button>
<el-dialog title="提示" :visible.sync="messageDialogVisible" width="30%" :before-close="handleClose">
<span>确认处理私信点赞收藏吗?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="messageDialogVisible = false">取 消</el-button>
<el-button type="primary" @click.prevent="messageDeal()">确 定</el-button>
</span>
</el-dialog>
</el-form-item>
<el-form-item> <el-form-item>
<el-button size="small" type="warning" @click="prepareResetLikesComment">核验状态</el-button> <el-button size="small" type="warning" @click="prepareResetLikesComment">核验状态</el-button>
<el-dialog title="提示" :visible.sync="resetLikesCommentDialogVisible" width="30%" :before-close="handleClose"> <el-dialog title="提示" :visible.sync="resetLikesCommentDialogVisible" width="30%" :before-close="handleClose">
...@@ -319,7 +308,6 @@ export default { ...@@ -319,7 +308,6 @@ export default {
resetUserDayStatusVisible: false, resetUserDayStatusVisible: false,
blog10DialogVisible: false, blog10DialogVisible: false,
resetLikesCommentDialogVisible: false, resetLikesCommentDialogVisible: false,
messageDialogVisible: false,
// 用户列表数据 // 用户列表数据
csdnUserList: [], csdnUserList: [],
loading: false, loading: false,
...@@ -370,9 +358,6 @@ export default { ...@@ -370,9 +358,6 @@ export default {
prepareAllTriplet() { prepareAllTriplet() {
this.allTripletDialogVisible = true this.allTripletDialogVisible = true
}, },
prepareMeaasge() {
this.messageDialogVisible = true
},
prepareResetUserDayStatus(userName) { prepareResetUserDayStatus(userName) {
this.resetUserDayStatusVisible = true this.resetUserDayStatusVisible = true
this.currentUserName = userName this.currentUserName = userName
...@@ -514,25 +499,6 @@ export default { ...@@ -514,25 +499,6 @@ export default {
} }
this.loading = false this.loading = false
}, },
async messageDeal() {
this.loading = true
this.messageDialogVisible = false
const { data: res1 } = await axios.get('http://43.139.90.182:8888/csdn/message/dealMessage')
if (res1.code === 200) {
this.userPage()
} else {
console.error('Received non-200 status code', res1)
}
const { data: res2 } = await axios.get('http://43.139.90.182:8888/csdn/likeCollect/dealLikeCollect')
if (res2.code === 200) {
this.userPage()
} else {
console.error('Received non-200 status code', res2)
}
this.loading = false
},
async fixUserLikesStatus() { async fixUserLikesStatus() {
this.loading = true this.loading = true
this.resetLikesCommentDialogVisible = false this.resetLikesCommentDialogVisible = false
......
<template>
<div>
<el-container>
<el-main>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item>
<el-input size="small" clearable v-model="formInline.userName" placeholder="请输入用户名" @keydown.enter.native="messagePage"></el-input>
</el-form-item>
<el-form-item>
<el-input size="small" clearable v-model="formInline.nickName" placeholder="请输入用户昵称" @keydown.enter.native="messagePage"></el-input>
</el-form-item>
<el-form-item>
<el-select size="small" v-model="formInline.hasRepliedInfo" placeholder="请选择收藏状态" @change="messagePage">
<el-option v-for="item in hasRepliedInfo" :key="item.type" :label="item.name" :value="item.type"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="messagePage">查询</el-button>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="prepareRefreshMessage">刷新私信列表</el-button>
<el-dialog title="提示" :visible.sync="refreshMessageDialogVisible" width="30%" :before-close="handleClose">
<span>确认刷新私信列表吗?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="refreshMessageDialogVisible = false">取 消</el-button>
<el-button type="primary" @click.prevent="refreshMessage()">确 定</el-button>
</span>
</el-dialog>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="prepareMeaasge">私信点赞收藏</el-button>
<el-dialog title="提示" :visible.sync="messageDialogVisible" width="30%" :before-close="handleClose">
<span>确认处理私信点赞收藏吗?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="messageDialogVisible = false">取 消</el-button>
<el-button type="primary" @click.prevent="messageDeal()">确 定</el-button>
</span>
</el-dialog>
</el-form-item>
</el-form>
<el-table ref="multipleTable" v-loading="loading" :data="csdnMessageList" tooltip-effect="dark" style="width: 100%">
<el-table-column prop="id" label="序号" width="100" sortable></el-table-column>
<el-table-column prop="userName" label="用户名称" show-overflow-tooltip></el-table-column>
<el-table-column prop="nickName" label="用户昵称" show-overflow-tooltip>
<template slot-scope="scope">
<a :href="scope.row.messageUrl" target="_blank">{{ scope.row.nickName }}</a>
</template>
</el-table-column>
<el-table-column prop="hasRepliedName" label="是否回复" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag :type="getTagType(scope.row.hasRepliedName)">{{ scope.row.hasRepliedName }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="content" label="回复内容" show-overflow-tooltip></el-table-column>
<el-table-column label="更新时间">
<template slot-scope="props">
{{ props.row.updateTime | dateFormat }}
</template>
</el-table-column>
<el-table-column prop="操作" label="操作" width="380px">
<template slot-scope="props">
<el-button type="primary" @click="prepareDealMessageOne(props.row.userName)" size="small">私信</el-button>
<el-dialog title="提示" :visible.sync="dealMessageOneVisible" width="30%" :before-close="handleClose">
<span>确认私信吗?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dealMessageOneVisible = false">取 消</el-button>
<el-button type="primary" @click.prevent="dealMessageOne(currentUserName)">确 定</el-button>
</span>
</el-dialog>
<el-button type="danger" @click="prepareDelete(props.row.id)" size="small">删除</el-button>
<el-dialog title="提示" :visible.sync="deleteDialogVisible" width="30%" :before-close="handleClose">
<span>确认删除?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="deleteDialogVisible = false">取 消</el-button>
<el-button type="primary" @click.prevent="onDelete(currentRowId)">确 定</el-button>
</span>
</el-dialog>
</template>
</el-table-column>
</el-table>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[8, 50, 100, 200, 400]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</el-main>
<el-backtop class="backtop"></el-backtop>
</el-container>
</div>
</template>
<script>
import axios from 'axios'
export default {
name: 'MyMessage',
data() {
return {
formInline: {
userName: '',
nickName: '',
hasRepliedInfo: null,
},
hasRepliedInfo: [
{
type: -1,
name: '全部',
},
{
type: 0,
name: '未回复',
},
{ type: 1, name: '已回复' },
],
deleteDialogVisible: false,
dealMessageOneVisible: false,
messageDialogVisible: false,
refreshMessageDialogVisible: false,
// 用户列表数据
csdnMessageList: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('csdnUserPage')) || 1,
pageSize: 8,
total: 0,
currentRowId: null,
currentUserName: null,
}
},
watch: {
'formInline.userName'(newVal, oldVal) {
if (newVal !== oldVal) {
this.currentPage = 1
localStorage.setItem('csdnUserPage', this.currentPage)
this.messagePage()
}
},
'formInline.nickName'(newVal, oldVal) {
if (newVal !== oldVal) {
this.currentPage = 1
localStorage.setItem('csdnUserPage', this.currentPage)
this.messagePage()
}
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('csdnUserPage', newPage.toString())
},
},
created() {
//获取问题类型的枚举
this.messagePage()
},
mounted() {
this.currentPage = 1
},
methods: {
prepareMeaasge() {
this.messageDialogVisible = true
},
prepareRefreshMessage() {
this.refreshMessageDialogVisible = true
},
prepareDelete(id) {
this.currentRowId = id
this.deleteDialogVisible = true
},
prepareDealMessageOne(userName) {
this.currentUserName = userName
this.dealMessageOneVisible = true
},
handleClose(done) {
this.$confirm('确认关闭?')
.then((_) => {
done()
})
.catch((_) => {})
},
handleConfirm(addType) {
this.dialogFormVisible = false // 关闭对话框
this.dialogMutiFormVisible = false
this.addUser(addType) // 发送请求
},
async messagePage() {
this.loading = true
const { data: res } = await axios.post('http://43.139.90.182:8888/csdn/message/page', {
page: this.currentPage,
pageSize: this.pageSize,
userName: this.formInline.userName,
nickName: this.formInline.nickName,
hasReplied: this.formInline.hasRepliedInfo == -1 ? null : this.formInline.hasRepliedInfo,
})
if (res.code === 200) {
this.total = res.result.totalElements
const userWeightMap = {}
this.hasRepliedInfo.forEach((option) => {
userWeightMap[option.type] = option.name
})
res.result.content.forEach((item) => {
item.hasRepliedName = userWeightMap[item.hasReplied]
})
this.csdnMessageList = res.result.content
}
this.loading = false
},
async dealMessageOne(userName) {
this.loading = true
this.dealMessageOneVisible = false
const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/message/dealMessageOne?userName=' + userName)
if (res.code === 200) {
this.currentUserName = null
this.messagePage()
} else {
console.error('Received non-200 status code', res)
}
this.loading = false
},
async messageDeal() {
this.loading = true
this.messageDialogVisible = false
const { data: res1 } = await axios.get('http://43.139.90.182:8888/csdn/message/dealMessage')
if (res1.code === 200) {
this.messagePage()
} else {
console.error('Received non-200 status code', res1)
}
const { data: res2 } = await axios.get('http://43.139.90.182:8888/csdn/likeCollect/dealLikeCollect')
if (res2.code === 200) {
this.messagePage()
} else {
console.error('Received non-200 status code', res2)
}
this.loading = false
},
async refreshMessage() {
this.loading = true
this.refreshMessageDialogVisible = false
const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/message/acquireMessage')
if (res.code === 200) {
this.messagePage()
} else {
console.error('Received non-200 status code', res)
}
this.loading = false
},
async onDelete(id) {
this.loading = true
const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/user/delete', {
params: {
id: id,
},
})
this.deleteDialogVisible = false
this.messagePage()
this.loading = false
},
refreshPage() {
//获取问题类型的枚举
this.messagePage()
location.reload()
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.messagePage()
},
handleSizeChange(currentSize) {
this.pageSize = currentSize
this.messagePage()
},
getTagType(hasRepliedName) {
if (hasRepliedName == '未回复') {
return 'warning'
} else {
return 'success'
}
},
},
}
</script>
<style lang="less" scoped>
.el-header {
background-color: #b3c0d1;
color: #333;
line-height: 60px;
}
.el-aside {
color: #333;
}
.pagination {
margin-top: 16px;
text-align: right;
}
.header-button-item {
margin-right: 15px;
font-size: 20px;
}
.red-title {
line-height: 24px;
font-size: 18px;
color: red;
}
.backtop {
position: fixed;
bottom: 50px;
right: 50px;
height: 40px;
width: 40px;
line-height: 40px;
text-align: center;
border-radius: 20px;
background-color: #007aff;
color: #fff;
cursor: pointer;
z-index: 999;
}
.custom-textarea {
width: 100%;
text-align: left;
}
.backtop:hover {
background-color: #0050a0;
}
</style>
\ No newline at end of file
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
<router-link :to="{ path: '/home/articleInfo' }"> <router-link :to="{ path: '/home/articleInfo' }">
<el-menu-item index="/home/articleInfo">文章管理</el-menu-item> <el-menu-item index="/home/articleInfo">文章管理</el-menu-item>
</router-link> </router-link>
<router-link :to="{ path: '/home/message' }">
<el-menu-item index="/home/message">私信管理</el-menu-item>
</router-link>
</el-menu-item-group> </el-menu-item-group>
</el-submenu> </el-submenu>
<el-submenu index="2"> <el-submenu index="2">
......
...@@ -12,27 +12,27 @@ import Interview from '@/components/menus/MyInterview.vue' ...@@ -12,27 +12,27 @@ import Interview from '@/components/menus/MyInterview.vue'
import Algorithmic from '@/components/menus/MyAlgorithmic.vue' import Algorithmic from '@/components/menus/MyAlgorithmic.vue'
import AphorismPoetry from '@/components/menus/MyAphorismPoetry.vue' import AphorismPoetry from '@/components/menus/MyAphorismPoetry.vue'
import MyCsdnUser from '@/components/menus/MyCsdnUser.vue' import MyCsdnUser from '@/components/menus/MyCsdnUser.vue'
import MyMessage from '@/components/menus/MyMessage.vue'
import MyArticleInfo from '@/components/menus/MyArticleInfo.vue' import MyArticleInfo from '@/components/menus/MyArticleInfo.vue'
import MyTripletDayInfo from '@/components/menus/MyTripletDayInfo.vue' import MyTripletDayInfo from '@/components/menus/MyTripletDayInfo.vue'
import MyChatDetail from '@/components/user/MyChatDetail.vue' import MyChatDetail from '@/components/user/MyChatDetail.vue'
import AddChatDetail from '@/components/user/AddChatDetail.vue' import AddChatDetail from '@/components/user/AddChatDetail.vue'
Vue.use(VueRouter) Vue.use(VueRouter)
const router = new VueRouter({ const router = new VueRouter({
routes: [ routes: [
{ {
path: '/', path: '/',
redirect: '/login' redirect: '/login',
}, },
// 登录的路由规则 // 登录的路由规则
{ {
path: '/login', path: '/login',
component: Login, component: Login,
meta: { meta: {
title: '登录' // 设置默认标题 title: '登录', // 设置默认标题
} },
}, },
// 后台主页的路由规则 // 后台主页的路由规则
{ {
...@@ -44,70 +44,83 @@ const router = new VueRouter({ ...@@ -44,70 +44,83 @@ const router = new VueRouter({
path: 'interview', path: 'interview',
component: Interview, component: Interview,
meta: { meta: {
title: '面试题' // 设置默认标题 title: '面试题', // 设置默认标题
} },
}, },
{ {
path: 'algorithmic', path: 'algorithmic',
component: Algorithmic, component: Algorithmic,
meta: { meta: {
title: '算法题' // 设置默认标题 title: '算法题', // 设置默认标题
} },
}, },
{ {
path: 'aphorismpoetry', path: 'aphorismpoetry',
component: AphorismPoetry, component: AphorismPoetry,
meta: { meta: {
title: '名言警句' // 设置默认标题 title: '名言警句', // 设置默认标题
} },
}, },
{ {
path: 'chat', path: 'chat',
component: Chat, component: Chat,
meta: { meta: {
title: 'chatgpt记录' // 设置默认标题 title: 'chatgpt记录', // 设置默认标题
} },
}, { },
{
path: 'pic', path: 'pic',
component: Pic, component: Pic,
meta: { meta: {
title: '图片' // 设置默认标题 title: '图片', // 设置默认标题
} },
}, { },
{
path: 'csdnUser', path: 'csdnUser',
component: MyCsdnUser, component: MyCsdnUser,
meta: { meta: {
title: '用户管理' // 设置默认标题 title: '用户管理', // 设置默认标题
} },
}, { },
{
path: 'tripletDayInfo', path: 'tripletDayInfo',
component: MyTripletDayInfo, component: MyTripletDayInfo,
meta: { meta: {
title: '三连管理' // 设置默认标题 title: '三连管理', // 设置默认标题
} },
}, { },
{
path: 'articleInfo', path: 'articleInfo',
component: MyArticleInfo, component: MyArticleInfo,
meta: { meta: {
title: '文章管理' // 设置默认标题 title: '文章管理', // 设置默认标题
} },
}, { },
{
path: 'message',
component: MyMessage,
meta: {
title: '私信管理', // 设置默认标题
},
},
{
path: 'chatinfo/:id', path: 'chatinfo/:id',
component: MyChatDetail, component: MyChatDetail,
props: true, props: true,
meta: { meta: {
title: 'chat信息' // 设置默认标题 title: 'chat信息', // 设置默认标题
} },
}, { },
{
path: 'addChat', path: 'addChat',
component: AddChatDetail, component: AddChatDetail,
meta: { meta: {
title: '添加chat信息' // 设置默认标题 title: '添加chat信息', // 设置默认标题
}
}, },
] },
} ],
] },
],
}) })
// 全局前置守卫 // 全局前置守卫
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册