提交 231cfdce 编写于 作者: 檀越@新空间's avatar 檀越@新空间 🐭

优化

上级 d485919d
此差异已折叠。
因为 它太大了无法显示 source diff 。你可以改为 查看blob
<!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.a37ee1e7.css" rel="preload" as="style"><link href="/css/chunk-vendors.0bfa23eb.css" rel="preload" as="style"><link href="/js/app.fea40924.js" rel="preload" as="script"><link href="/js/chunk-vendors.02cd1fa9.js" rel="preload" as="script"><link href="/css/chunk-vendors.0bfa23eb.css" rel="stylesheet"><link href="/css/app.a37ee1e7.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.02cd1fa9.js"></script><script src="/js/app.fea40924.js"></script></body></html>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
<template> <template>
<!-- 占位符 --> <!-- 占位符 -->
<router-view></router-view> <keep-alive>
<router-view></router-view>
</keep-alive>
</template> </template>
<script> <script>
export default { export default {
name: 'MyApp', name: 'MyApp',
} }
</script> </script>
......
import axios from 'axios' import axios from 'axios'
const BASE_URL = 'http://localhost:80'
// 创建一个名为 ApiService 的对象,包含您的异步方法 // 创建一个名为 ApiService 的对象,包含您的异步方法
const ApiService = { const ApiService = {
// 三连日管理 // 三连日管理
async tripletDayInfoPage(currentPage, pageSize, tripletDate) { async tripletDayInfoPage(currentPage, pageSize, formInline) {
return await axios.post('http://localhost:80/dayInfo/page', { return await axios.post(BASE_URL + '/dayInfo/page', {
page: currentPage,
pageSize: pageSize,
startDate: formInline.tripletDate != null ? formInline.tripletDate[0] : '',
endDate: formInline.tripletDate != null ? formInline.tripletDate[1] : '',
weekInfo: formInline.weekInfo != null ? formInline.weekInfo : '',
})
},
async dayRedPackageInfoPage(currentPage, pageSize, tripletDate) {
return await axios.post(BASE_URL + '/csdn/csdnDayInfoRedPackage/page', {
page: currentPage, page: currentPage,
pageSize: pageSize, pageSize: pageSize,
startDate: tripletDate != null ? tripletDate[0] : '', startDate: tripletDate != null ? tripletDate[0] : '',
...@@ -12,24 +22,27 @@ const ApiService = { ...@@ -12,24 +22,27 @@ const ApiService = {
}, },
async tripletDayReset() { async tripletDayReset() {
return await axios.get('http://localhost:80/dayInfo/add') return await axios.get(BASE_URL + '/dayInfo/add')
},
async sevenDay() {
return await axios.get(BASE_URL + '/dayInfo/sevenDayOverview')
}, },
// 文章管理 // 文章管理
async triplet(articleId) { async triplet(articleId) {
return await axios.get('http://localhost:80/csdnArticleInfo/triplet?articleId=' + articleId) return await axios.get(BASE_URL + '/csdnArticleInfo/triplet?articleId=' + articleId)
}, },
async syncMyBlog() { async syncMyBlog() {
return await axios.get('http://localhost:80/csdnArticleInfo/syncMyBlog') return await axios.get(BASE_URL + '/csdnArticleInfo/syncMyBlog')
}, },
async resetLikes() { async resetLikes() {
return await axios.get('http://localhost:80/csdnArticleInfo/fixLikesStatus') return await axios.get(BASE_URL + '/csdnArticleInfo/fixLikesStatus')
}, },
async allTriplet(articleIds) { async allTriplet(articleIds) {
return await axios.post('http://localhost:80/csdnArticleInfo/multiTriplet', articleIds) return await axios.post(BASE_URL + '/csdnArticleInfo/multiTriplet', articleIds)
}, },
async articleInfoDelete(id) { async articleInfoDelete(id) {
return await axios.get('http://localhost:80/csdnArticleInfo/delete', { return await axios.get(BASE_URL + '/csdnArticleInfo/delete', {
params: { params: {
id: id, id: id,
}, },
...@@ -38,16 +51,16 @@ const ApiService = { ...@@ -38,16 +51,16 @@ const ApiService = {
//红包管理 //红包管理
async dealViewCount(id) { async dealViewCount(id) {
return await axios.get('http://localhost:80/csdn/redPackage/getViewCountById?id=' + id) return await axios.get(BASE_URL + '/csdn/redPackage/getViewCountById?id=' + id)
}, },
async getTodayRedPackageDetailInfo() { async receiveRedPacketByOrderNo(id) {
return await axios.get('http://localhost:80/csdn/redPackage/detail/getTodayRedPackageDetailInfo') return await axios.get(BASE_URL + '/csdn/redPackage/receiveRedPacketByOrderNo?id=' + id)
}, },
async syncDetailInfo(id) { async syncDetailInfo(id) {
return await axios.get('http://localhost:80/csdn/redPackage/detail/syncDetailInfo?id=' + id) return await axios.get(BASE_URL + '/csdn/redPackage/detail/syncDetailInfo?id=' + id)
}, },
async redPackagePage(currentPage, pageSize, formInline) { async redPackagePage(currentPage, pageSize, formInline) {
return await axios.post('http://localhost:80/csdn/redPackage/page', { return await axios.post(BASE_URL + '/csdn/redPackage/page', {
page: currentPage, page: currentPage,
pageSize: pageSize, pageSize: pageSize,
nickName: formInline.nickName, nickName: formInline.nickName,
...@@ -59,8 +72,11 @@ const ApiService = { ...@@ -59,8 +72,11 @@ const ApiService = {
msg: formInline.msg == '全部' ? null : formInline.msg, msg: formInline.msg == '全部' ? null : formInline.msg,
}) })
}, },
async getTodayRedPackageDetailInfo(ids) {
return await axios.post(BASE_URL + '/csdn/redPackage/detail/getTodayRedPackageDetailInfo', ids)
},
async redPackageDetailList(currentPage, pageSize, orderNo, communityId, postId) { async redPackageDetailList(currentPage, pageSize, orderNo, communityId, postId) {
return await axios.post('http://localhost:80/csdn/redPackage/detail/page', { return await axios.post(BASE_URL + '/csdn/redPackage/detail/page', {
page: currentPage, page: currentPage,
pageSize: pageSize, pageSize: pageSize,
orderNo: orderNo, orderNo: orderNo,
...@@ -70,25 +86,29 @@ const ApiService = { ...@@ -70,25 +86,29 @@ const ApiService = {
}, },
//粉丝管理 //粉丝管理
async fansInfoPage(currentPage, pageSize, relationType) { async fansInfoPage(currentPage, pageSize, formInline) {
return await axios.post('http://localhost:80/csdn/followFans/page', { return await axios.post(BASE_URL + '/csdn/followFans/page', {
page: currentPage, page: currentPage,
pageSize: pageSize, pageSize: pageSize,
relationType: relationType == '全部' ? '' : relationType, relationType: formInline.relationType,
userName: formInline.userName,
}) })
}, },
async syncFansInfo() { async syncFansInfo() {
return await axios.get('http://localhost:80/csdn/followFans/saveFans') return await axios.get(BASE_URL + '/csdn/followFans/saveFans')
},
async cancleFansNoArticle() {
return await axios.get(BASE_URL + '/csdn/followFans/deleteNoArticle')
}, },
async syncFollowInfo() { async syncFollowInfo() {
return await axios.get('http://localhost:80/csdn/followFans/saveFollow') return await axios.get(BASE_URL + '/csdn/followFans/saveFollow')
}, },
async cancleFollowInfo() { async cancleFollowInfo() {
return await axios.get('http://localhost:80/csdn/followFans/deleteFollow') return await axios.get(BASE_URL + '/csdn/followFans/deleteFollow')
}, },
//我的图片 //我的图片
async queryPic(currentPage, pageSize, picType) { async queryPic(currentPage, pageSize, picType) {
return await axios.get('http://localhost:80/picInfo/page', { return await axios.get(BASE_URL + '/picInfo/page', {
params: { params: {
page: currentPage, page: currentPage,
pageSize: pageSize, pageSize: pageSize,
...@@ -97,10 +117,37 @@ const ApiService = { ...@@ -97,10 +117,37 @@ const ApiService = {
}) })
}, },
async editPicConfirm(currentRowId, type) { async editPicConfirm(currentRowId, type) {
return await axios.post('http://localhost:80/picInfo/update', { return await axios.post(BASE_URL + '/picInfo/update', {
id: currentRowId, id: currentRowId,
type: type, type: type,
}) })
}, },
//余额管理
async accountManagementPage(currentPage, pageSize, formInline) {
return await axios.post(BASE_URL + '/csdnAccountManagement/page', {
page: currentPage,
pageSize: pageSize,
startDate: formInline.accountDate != null ? formInline.accountDate[0] : '',
endDate: formInline.accountDate != null ? formInline.accountDate[1] : '',
operateType: formInline.operateType != -1 ? formInline.operateType : null,
productName: formInline.productName != '全部' ? formInline.productName : null,
code: formInline.code,
})
},
async addAccountInfo() {
return await axios.get(BASE_URL + '/csdnAccountManagement/addAccountInfo')
},
async add5AccountInfo() {
return await axios.get(BASE_URL + '/csdnAccountManagement/add5AccountInfo')
},
//累计红包管理
async totalIncomePage(currentPage, pageSize, formInline) {
return await axios.post(BASE_URL + '/csdn/totalIncome/page', {
page: currentPage,
pageSize: pageSize,
startDate: formInline.accountDate != null ? formInline.accountDate[0] : '',
endDate: formInline.accountDate != null ? formInline.accountDate[1] : '',
})
},
} }
export default ApiService export default ApiService
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
<MyAside></MyAside> <MyAside></MyAside>
</el-aside> </el-aside>
<el-main style="padding: 0"> <el-main style="padding: 0">
<router-view></router-view> <keep-alive>
<router-view></router-view>
</keep-alive>
</el-main> </el-main>
</el-container> </el-container>
</el-container> </el-container>
......
...@@ -43,7 +43,7 @@ export default { ...@@ -43,7 +43,7 @@ export default {
this.password = '' this.password = ''
}, },
login() { login() {
if (this.username === 'admin' && this.password === '666666') { if (this.username === 'admin' && this.password === '888888') {
// 登录成功 // 登录成功
// 1. 存储 token // 1. 存储 token
localStorage.setItem('token', 'Bearer xxxx') localStorage.setItem('token', 'Bearer xxxx')
...@@ -52,8 +52,16 @@ export default { ...@@ -52,8 +52,16 @@ export default {
} else { } else {
// 登录失败 // 登录失败
localStorage.removeItem('token') localStorage.removeItem('token')
this.errorMsg('登录失败,请检查您的用户名或密码;由于用户名密码是写死的,需要在项目中查看!!!')
} }
}, },
errorMsg(msg) {
this.$message({
showClose: true,
message: msg,
type: 'error',
})
},
}, },
} }
</script> </script>
......
<template>
<div>
<el-container>
<el-main>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item>
<el-date-picker v-model="formInline.accountDate" type="daterange" align="right" unlink-panels range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期" :value-format="'yyyy-MM-dd'" :picker-options="pickerOptions"></el-date-picker>
</el-form-item>
<el-form-item>
<el-select v-model="formInline.operateType" placeholder="请选择类型" @change="accountManagementPage">
<el-option v-for="item in operateTypeArray" :key="item.type" :label="item.name" :value="item.type"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="formInline.productName" placeholder="请选择业务" @change="accountManagementPage">
<el-option v-for="type in productName" :key="type" :label="type" :value="type"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="formInline.code" placeholder="请选择code" @change="accountManagementPage">
<el-option v-for="type in code" :key="type" :label="type" :value="type"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="accountManagementPage">查询</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="add5AccountInfo">同步5页</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="addAccountInfo">同步全部</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="mall">商城</el-button>
</el-form-item>
<br />
<el-form-item label="当前余额:" class="form-item">
<el-tag style="width: 55px">{{ form.currentAmount }}</el-tag>
</el-form-item>
<el-form-item label="永久有效:" class="form-item">
<el-tag style="width: 55px">{{ form.normalAmount }}</el-tag>
</el-form-item>
<el-form-item label="可过期:" class="form-item">
<el-tag style="width: 55px">{{ form.expireAmount }}</el-tag>
</el-form-item>
<el-form-item label="总收入:" class="form-item">
<el-tag type="success" style="width: 55px">{{ form.totalGetAmount }}</el-tag>
</el-form-item>
<el-form-item label="总支出:" class="form-item">
<el-tag type="warning" style="width: 55px">{{ form.totalPayAmount }}</el-tag>
</el-form-item>
<el-form-item label="当页累计:" class="form-item">
<el-tag style="width: 55px">{{ form.currentTotal }}</el-tag>
</el-form-item>
</el-form>
<el-table border :data="accountManagementList" v-loading="loading">
<el-table-column sortable align="center" prop="id" label="序号" width="100"></el-table-column>
<el-table-column sortable align="center" prop="amount" label="金额" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag :type="isMaxValue(scope.row.amount, 'amount')">{{ scope.row.amount }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="product" label="业务类型" show-overflow-tooltip></el-table-column>
<el-table-column prop="productName" label="业务名称" show-overflow-tooltip></el-table-column>
<el-table-column prop="code" label="业务code" show-overflow-tooltip></el-table-column>
<el-table-column prop="orderNo" label="订单号" show-overflow-tooltip></el-table-column>
<el-table-column sortable prop="expireTime" label="过期时间" show-overflow-tooltip></el-table-column>
<el-table-column align="center" prop="operateType" label="收入支出" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag :type="getTagType(scope.row.operateTypeName)">{{ scope.row.operateTypeName }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="description" label="详情" show-overflow-tooltip></el-table-column>
<el-table-column label="业务时间">
<template slot-scope="props">{{ props.row.time | dateFormat }}</template>
</el-table-column>
</el-table>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[10, 20, 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'
import ApiService from '../../api/ApiService'
export default {
name: 'MyAccountManagement',
data() {
return {
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now()
},
shortcuts: [
{
text: '最近一周',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', [start, end])
},
},
{
text: '最近一个月',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
picker.$emit('pick', [start, end])
},
},
{
text: '最近三个月',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
picker.$emit('pick', [start, end])
},
},
],
},
productName: ['全部', '红包', '盲盒', '商城iOS支付', 'proceeds_balance', 'VIP'],
code: [7000, 7002],
formInline: {
accountDate: null,
operateType: null,
productName: null,
code: null,
},
form: {
currentAmount: '',
totalGetAmount: '',
totalPayAmount: '',
expireAmount: '',
normalAmount: '',
currentTotal: '',
},
operateTypeArray: [
{
type: -1,
name: '全部',
},
{
type: 1,
name: '收入',
},
{ type: 2, name: '支出' },
],
accountManagementList: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('accountManagementPage')) || 1,
pageSize: 10,
total: 0,
}
},
watch: {
formInline: {
handler(newVal, oldVal) {
this.currentPage = 1
localStorage.setItem('accountManagementPage', this.currentPage)
this.accountManagementPage()
},
deep: true,
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('accountManagementPage', newPage.toString())
},
},
created() {
//获取问题类型的枚举
this.accountManagementPage()
},
mounted() {
this.currentPage = 1
},
activated() {
this.accountManagementPage()
},
methods: {
async accountManagementPage() {
this.loading = true
const { data: res } = await ApiService.accountManagementPage(this.currentPage, this.pageSize, this.formInline)
if (res.code === 200) {
this.total = res.result.from.totalElements
const userWeightMap = {}
this.operateTypeArray.forEach((option) => {
userWeightMap[option.type] = option.name
})
res.result.from.content.forEach((item) => {
item.operateTypeName = userWeightMap[item.operateType]
})
this.accountManagementList = res.result.from.content
this.form.currentAmount = res.result.currentAmount
this.form.totalGetAmount = res.result.totalGetAmount
this.form.totalPayAmount = res.result.totalPayAmount
this.form.expireAmount = res.result.expireAmount
this.form.normalAmount = res.result.normalAmount
this.form.currentTotal = res.result.currentTotal
}
this.loading = false
},
async addAccountInfo() {
this.loading = true
const { data: res } = await ApiService.addAccountInfo()
if (res.code === 200) {
this.accountManagementPage()
}
this.loading = false
},
async add5AccountInfo() {
this.loading = true
const { data: res } = await ApiService.add5AccountInfo()
if (res.code === 200) {
this.accountManagementPage()
}
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.accountManagementPage()
},
handleSizeChange(currentSize) {
this.pageSize = currentSize
this.accountManagementPage()
},
isMaxValue(value, tag) {
const maxValue = this.getMaxValue(tag)[tag]
if (value === maxValue) {
if (tag === 'loseRedPackageCount') {
return 'danger'
} else {
return 'success'
}
}
const minValue = this.getMinValue(tag)[tag]
if (value === minValue) {
if (tag === 'loseRedPackageCount') {
return 'success'
} else {
return 'danger'
}
}
return 'primary'
},
getMaxValue(_tag) {
return this.accountManagementList.reduce((maxObj, currentObj) => {
const tagValue = currentObj[_tag]
if (tagValue !== undefined && tagValue > maxObj[_tag]) {
return currentObj
} else {
return maxObj
}
}, this.accountManagementList[0])
},
getMinValue(_tag) {
return this.accountManagementList.reduce((maxObj, currentObj) => {
const tagValue = currentObj[_tag]
if (tagValue !== undefined && tagValue < maxObj[_tag]) {
return currentObj
} else {
return maxObj
}
}, this.accountManagementList[0])
},
refreshPage() {
//获取问题类型的枚举
this.accountManagementPage()
location.reload()
},
getTagType(operateTypeName) {
if (operateTypeName == '收入') {
return 'success'
} else {
return 'danger'
}
},
mall() {
// 新页面打开
window.open('https://mall.csdn.net/search?cat1=379&cat2=385&cat3=431&sort=salesVolume&asc=desc&page=1')
},
},
}
</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
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<el-input v-model="form.questionName" autocomplete="off" style="width: 100%"></el-input> <el-input v-model="form.questionName" autocomplete="off" style="width: 100%"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="问题类型" :label-width="formLabelWidth" class="form-item"> <el-form-item label="问题类型" :label-width="formLabelWidth" class="form-item">
<el-select v-model="form.questionType" placeholder="请选择活动区域"> <el-select v-model="form.questionType" placeholder="请选择问题类型">
<el-option v-for="item in allOptions" :key="item.questionType" :label="item.name" :value="item.questionType"></el-option> <el-option v-for="item in allOptions" :key="item" :label="item" :value="item"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="重要程度" :label-width="formLabelWidth" class="form-item"> <el-form-item label="重要程度" :label-width="formLabelWidth" class="form-item">
...@@ -66,13 +66,13 @@ ...@@ -66,13 +66,13 @@
</el-dialog> </el-dialog>
<el-form :inline="true" :model="formInline" class="demo-form-inline"> <el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item> <el-form-item>
<el-input clearable v-model="formInline.questionName" placeholder="请输入问题" @keydown.enter.native="interviewPage"></el-input> <el-input clearable v-model="formInline.questionName" placeholder="请输入问题" @keydown.enter.native="algorithmPage"></el-input>
</el-form-item> </el-form-item>
<el-select v-model="questionType" placeholder="请选择" @change="interviewPage"> <el-select v-model="formInline.questionType" placeholder="请选择" @change="algorithmPage">
<el-option v-for="item in options" :key="item.questionType" :label="item.name" :value="item.questionType"></el-option> <el-option v-for="item in allOptions" :key="item" :label="item" :value="item"></el-option>
</el-select> </el-select>
<el-form-item> <el-form-item>
<el-button type="primary" @click="interviewPage">查询</el-button> <el-button type="primary" @click="algorithmPage">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="prepareRandom">随机一题</el-button> <el-button type="primary" @click="prepareRandom">随机一题</el-button>
...@@ -85,30 +85,30 @@ ...@@ -85,30 +85,30 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table border :data="algorithmicList" v-loading="loading"> <el-table border :data="algorithmicList" v-loading="loading">
<el-table-column prop="id" label="序号" width="80" sortable></el-table-column> <el-table-column prop="id" label="序号" sortable width="80"></el-table-column>
<el-table-column prop="questionName" label="算法问题" show-overflow-tooltip></el-table-column> <el-table-column align="center" prop="questionName" label="算法问题" show-overflow-tooltip>
<el-table-column prop="questionTypeName" label="问题类型" show-overflow-tooltip align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{ color: getColorForValue(scope.row.questionTypeName) }" v-html="scope.row.questionTypeName"></span> <a :href="scope.row.leetcodeLink" target="_blank">{{ scope.row.questionName }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="degreeOfImportance" label="重要程度" show-overflow-tooltip :width="50"></el-table-column> <el-table-column prop="leetcodeNumber" label="力扣题号" width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="degreeOfDifficulty" label="难易程度" show-overflow-tooltip :width="50"></el-table-column> <el-table-column prop="questionType" label="问题类型" show-overflow-tooltip align="center">
<el-table-column prop="difficultyOfScore" label="难易分数" show-overflow-tooltip :width="80"></el-table-column>
<el-table-column prop="leetcodeNumber" label="力扣题号" show-overflow-tooltip :width="50"></el-table-column>
<el-table-column label="力扣链接" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<a :href="scope.row.leetcodeLink" target="_blank">{{ scope.row.leetcodeLink }}</a> <span :style="{ color: getColorForValue(scope.row.questionType) }" v-html="scope.row.questionType"></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" width="170"> <el-table-column sortable prop="degreeOfImportance" label="重要程度" show-overflow-tooltip></el-table-column>
<el-table-column prop="degreeOfDifficulty" label="难易程度" show-overflow-tooltip></el-table-column>
<el-table-column prop="difficultyOfScore" label="难易分数" show-overflow-tooltip></el-table-column>
<el-table-column label="创建时间">
<template slot-scope="props"> <template slot-scope="props">
{{ props.row.createTime | dateFormat }} {{ props.row.createTime | dateFormat }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="操作" label="操作" width="180"> <el-table-column prop="操作" label="操作">
<template slot-scope="props"> <template slot-scope="props">
<el-button type="success" @click.prevent="preEdit(props.row.id, props.row.questionName, props.row.questionTypeName, props.row.degreeOfImportance, props.row.degreeOfDifficulty, props.row.difficultyOfScore, props.row.leetcodeNumber, props.row.leetcodeLink)" width="200">编辑</el-button> <el-button type="success" @click.prevent="preEdit(props.row.id, props.row.questionName, props.row.questionType, props.row.degreeOfImportance, props.row.degreeOfDifficulty, props.row.difficultyOfScore, props.row.leetcodeNumber, props.row.leetcodeLink)" width="200">编辑</el-button>
<el-dialog title="编辑算法问题" :visible.sync="editVisible"> <el-dialog title="编辑算法问题" :visible.sync="editVisible">
<el-form :model="form"> <el-form :model="form">
<el-form-item label="算法问题" :label-width="formLabelWidth" class="form-item"> <el-form-item label="算法问题" :label-width="formLabelWidth" class="form-item">
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
</el-form-item> </el-form-item>
<el-form-item label="问题类型" :label-width="formLabelWidth" class="form-item"> <el-form-item label="问题类型" :label-width="formLabelWidth" class="form-item">
<el-select v-model="form.questionType" placeholder="请选择活动区域"> <el-select v-model="form.questionType" placeholder="请选择活动区域">
<el-option v-for="item in allOptions" :key="item.questionType" :label="item.name" :value="item.questionType"></el-option> <el-option v-for="item in allOptions" :key="item" :label="item" :value="item"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="重要程度" :label-width="formLabelWidth" class="form-item"> <el-form-item label="重要程度" :label-width="formLabelWidth" class="form-item">
...@@ -179,17 +179,16 @@ export default { ...@@ -179,17 +179,16 @@ export default {
total: 0, total: 0,
formInline: { formInline: {
questionName: '', questionName: '',
questionType: '',
}, },
options: [], allOptions: ['hash表', '回溯', '双指针', '二分法', '滑动窗口', '动态规划', '链表', '二叉树'],
allOptions: [],
questionType: 0,
// 新增的内容 // 新增的内容
dialogFormVisible: false, dialogFormVisible: false,
randomFormVisible: false, randomFormVisible: false,
dialogMutiFormVisible: false, dialogMutiFormVisible: false,
form: { form: {
questionName: '', questionName: '',
questionType: 0, questionType: '',
degreeOfImportance: 5, degreeOfImportance: 5,
degreeOfDifficulty: 1, degreeOfDifficulty: 1,
difficultyOfScore: 1200, difficultyOfScore: 1200,
...@@ -204,12 +203,13 @@ export default { ...@@ -204,12 +203,13 @@ export default {
} }
}, },
watch: { watch: {
'formInline.questionName'(newVal, oldVal) { formInline: {
if (newVal !== oldVal) { handler(newVal, oldVal) {
this.currentPage = 1 this.currentPage = 1
localStorage.setItem('algorithmLastPage', this.currentPage) localStorage.setItem('algorithmLastPage', this.currentPage)
this.getQuestionType() this.algorithmPage()
} },
deep: true,
}, },
// 监听currentPage的变化,将新值保存到localStorage中 // 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) { currentPage(newPage) {
...@@ -218,9 +218,7 @@ export default { ...@@ -218,9 +218,7 @@ export default {
}, },
created() { created() {
//获取问题类型的枚举 //获取问题类型的枚举
this.getQuestionType() this.algorithmPage()
//获取问题类型的枚举
this.getAllQuestionType()
}, },
mounted() { mounted() {
this.currentPage = 1 this.currentPage = 1
...@@ -228,10 +226,8 @@ export default { ...@@ -228,10 +226,8 @@ export default {
methods: { methods: {
prepareAdd() { prepareAdd() {
this.form.questionName = '' this.form.questionName = ''
this.form.questionType = 0 this.form.questionType = ''
this.dialogFormVisible = true this.dialogFormVisible = true
//获取问题类型的枚举
this.getAllQuestionType()
}, },
prepareRandom() { prepareRandom() {
this.randomAlgorithmic = [] this.randomAlgorithmic = []
...@@ -240,7 +236,7 @@ export default { ...@@ -240,7 +236,7 @@ export default {
}, },
prepareMutiAdd() { prepareMutiAdd() {
this.form.questionName = '' this.form.questionName = ''
this.form.questionType = 0 this.form.questionType = ''
this.dialogMutiFormVisible = true this.dialogMutiFormVisible = true
}, },
...@@ -248,20 +244,14 @@ export default { ...@@ -248,20 +244,14 @@ export default {
this.currentRowId = id this.currentRowId = id
this.dialogVisible = true this.dialogVisible = true
}, },
preEdit(id, questionName, questionTypeName, degreeOfImportance, degreeOfDifficulty, difficultyOfScore, leetcodeNumber, leetcodeLink) { preEdit(id, questionName, questionType, degreeOfImportance, degreeOfDifficulty, difficultyOfScore, leetcodeNumber, leetcodeLink) {
this.form.questionName = questionName this.form.questionName = questionName
this.form.degreeOfImportance = degreeOfImportance this.form.degreeOfImportance = degreeOfImportance
this.form.degreeOfDifficulty = degreeOfDifficulty this.form.degreeOfDifficulty = degreeOfDifficulty
this.form.difficultyOfScore = difficultyOfScore this.form.difficultyOfScore = difficultyOfScore
this.form.leetcodeNumber = leetcodeNumber this.form.leetcodeNumber = leetcodeNumber
this.form.leetcodeLink = leetcodeLink this.form.leetcodeLink = leetcodeLink
this.form.questionType = questionType
// 定义一个映射(map)来存储 questionType 到 name 的转换
const questionTypeToNameMap = {}
this.options.forEach((option) => {
questionTypeToNameMap[option.name] = option.questionType
})
this.form.questionType = questionTypeToNameMap[questionTypeName]
this.currentRowId = id this.currentRowId = id
this.editVisible = true this.editVisible = true
}, },
...@@ -300,7 +290,7 @@ export default { ...@@ -300,7 +290,7 @@ export default {
this.form.difficultyOfScore = 1200 this.form.difficultyOfScore = 1200
this.form.leetcodeNumber = '' this.form.leetcodeNumber = ''
this.form.leetcodeLink = '' this.form.leetcodeLink = ''
this.getQuestionType() this.algorithmPage()
} else { } else {
console.error('Received non-200 status code', res) console.error('Received non-200 status code', res)
this.errorMsg(res.message) this.errorMsg(res.message)
...@@ -337,7 +327,7 @@ export default { ...@@ -337,7 +327,7 @@ export default {
this.form.questionType = 0 this.form.questionType = 0
this.editVisible = false this.editVisible = false
currentRowId: null currentRowId: null
this.getQuestionType() this.algorithmPage()
} else { } else {
console.error('Received non-200 status code', res) console.error('Received non-200 status code', res)
} }
...@@ -357,52 +347,27 @@ export default { ...@@ -357,52 +347,27 @@ export default {
id: id, id: id,
}, },
}) })
this.getQuestionType() this.algorithmPage()
this.loading = false this.loading = false
}, },
refreshPage() { refreshPage() {
//获取问题类型的枚举 //获取问题类型的枚举
this.getQuestionType() this.algorithmPage()
location.reload() location.reload()
}, },
async getQuestionType() { async algorithmPage() {
const { data: res } = await axios.get('http://localhost:80/algorithmicProblem/questionType', { params: {} })
if (res.code === 200) {
this.options = res.result
//获取问题列表
this.interviewPage()
}
},
async getAllQuestionType() {
const { data: res } = await axios.get('http://localhost:80/algorithmicProblem/allQuestionType', { params: {} })
if (res.code === 200) {
this.allOptions = res.result
}
},
async interviewPage() {
this.loading = true this.loading = true
const { data: res } = await axios.get('http://localhost:80/algorithmicProblem/page', { const { data: res } = await axios.get('http://localhost:80/algorithmicProblem/page', {
params: { params: {
page: this.currentPage, page: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
questionName: this.formInline.questionName, questionName: this.formInline.questionName,
questionType: this.questionType, questionType: this.formInline.questionType,
}, },
}) })
if (res.code === 200) { if (res.code === 200) {
this.total = res.result.totalElements this.total = res.result.totalElements
// 定义一个映射(map)来存储 questionType 到 name 的转换
const questionTypeToNameMap = {}
this.options.forEach((option) => {
questionTypeToNameMap[option.questionType] = option.name
})
// 修改 algorithmicList 中的每一个元素,将 questionType 转换为 name
res.result.content.forEach((item) => {
item.questionTypeName = questionTypeToNameMap[item.questionType]
})
this.algorithmicList = res.result.content this.algorithmicList = res.result.content
} }
this.loading = false this.loading = false
...@@ -419,7 +384,7 @@ export default { ...@@ -419,7 +384,7 @@ export default {
}, },
handleCurrentChange(currentPage) { handleCurrentChange(currentPage) {
this.currentPage = currentPage this.currentPage = currentPage
this.getQuestionType() this.algorithmPage()
}, },
getColorForValue(value) { getColorForValue(value) {
// 检查颜色映射关系中是否已经有该值对应的颜色 // 检查颜色映射关系中是否已经有该值对应的颜色
...@@ -436,36 +401,26 @@ export default { ...@@ -436,36 +401,26 @@ export default {
'red', 'red',
'blue', 'blue',
'green', 'green',
'yellow',
'purple', 'purple',
'orange', 'orange',
'pink', 'pink',
'brown', 'brown',
'cyan',
'magenta', 'magenta',
'maroon', 'maroon',
'navy', 'navy',
'olive', 'olive',
'teal', 'teal',
'lime',
'aqua',
'silver', 'silver',
'gray', 'gray',
'white',
'indigo', 'indigo',
'violet', 'violet',
'lavender',
'coral', 'coral',
'gold',
'salmon', 'salmon',
'turquoise',
'orchid', 'orchid',
'khaki',
'slategray', 'slategray',
'thistle', 'thistle',
'burlywood', 'burlywood',
'cadetblue', 'cadetblue',
'chartreuse',
'chocolate', 'chocolate',
'crimson', 'crimson',
'darkblue', 'darkblue',
...@@ -491,13 +446,9 @@ export default { ...@@ -491,13 +446,9 @@ export default {
'firebrick', 'firebrick',
'forestgreen', 'forestgreen',
'fuchsia', 'fuchsia',
'gold',
'greenyellow',
'hotpink', 'hotpink',
'indianred', 'indianred',
'lawngreen',
'lightcoral', 'lightcoral',
'lightgreen',
'lightpink', 'lightpink',
'lightsalmon', 'lightsalmon',
'lightseagreen', 'lightseagreen',
...@@ -508,30 +459,22 @@ export default { ...@@ -508,30 +459,22 @@ export default {
'mediumblue', 'mediumblue',
'mediumorchid', 'mediumorchid',
'mediumpurple', 'mediumpurple',
'mediumseagreen',
'mediumslateblue', 'mediumslateblue',
'mediumspringgreen',
'mediumturquoise', 'mediumturquoise',
'mediumvioletred', 'mediumvioletred',
'midnightblue', 'midnightblue',
'orangered', 'orangered',
'palegoldenrod',
'palegreen',
'paleturquoise',
'palevioletred', 'palevioletred',
'peru', 'peru',
'powderblue',
'rosybrown', 'rosybrown',
'saddlebrown', 'saddlebrown',
'seagreen', 'seagreen',
'sienna', 'sienna',
'skyblue', 'skyblue',
'slateblue', 'slateblue',
'springgreen',
'tan', 'tan',
'thistle', 'thistle',
'tomato', 'tomato',
'turquoise',
'violet', 'violet',
] ]
const randomIndex = Math.floor(Math.random() * colorArray.length) const randomIndex = Math.floor(Math.random() * colorArray.length)
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</el-dialog> </el-dialog>
<el-form :inline="true" :model="formInline" class="demo-form-inline"> <el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item> <el-form-item>
<el-input clearable v-model="formInline.poetryText" placeholder="请输入问题" @keydown.enter.native="interviewPage"></el-input> <el-input clearable v-model="formInline.poetryText" placeholder="请输入关键字" @keydown.enter.native="interviewPage"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="interviewPage">查询</el-button> <el-button type="primary" @click="interviewPage">查询</el-button>
......
...@@ -282,7 +282,7 @@ export default { ...@@ -282,7 +282,7 @@ export default {
{ type: 2, name: '评论已满' }, { type: 2, name: '评论已满' },
{ type: 3, name: '禁言' }, { type: 3, name: '禁言' },
{ type: 4, name: '评论太快' }, { type: 4, name: '评论太快' },
{ type: 5, name: '评论已经到了42' }, { type: 5, name: '评论已经到了40' },
{ type: 8, name: '其他错误' }, { type: 8, name: '其他错误' },
{ type: 9, name: '评论成功' }, { type: 9, name: '评论成功' },
], ],
...@@ -605,7 +605,7 @@ export default { ...@@ -605,7 +605,7 @@ export default {
return 'info' return 'info'
} else if (statusName == '已经点过赞' || statusName == '已经收藏过' || statusName == '已经评论过') { } else if (statusName == '已经点过赞' || statusName == '已经收藏过' || statusName == '已经评论过') {
return 'success' return 'success'
} else if (statusName == '文章状态不能点赞' || statusName == '收藏已满' || statusName == '收藏夹不存在' || statusName == '评论已满' || statusName == '禁言' || statusName == '评论已经到了42') { } else if (statusName == '文章状态不能点赞' || statusName == '收藏已满' || statusName == '收藏夹不存在' || statusName == '评论已满' || statusName == '禁言' || statusName == '评论已经到了40') {
return 'danger' return 'danger'
} else if (statusName == '点赞成功' || statusName == '收藏成功' || statusName == '评论成功') { } else if (statusName == '点赞成功' || statusName == '收藏成功' || statusName == '评论成功') {
return 'success' return 'success'
......
...@@ -296,7 +296,7 @@ export default { ...@@ -296,7 +296,7 @@ export default {
{ type: 2, name: '评论已满' }, { type: 2, name: '评论已满' },
{ type: 3, name: '禁言' }, { type: 3, name: '禁言' },
{ type: 4, name: '评论太快' }, { type: 4, name: '评论太快' },
{ type: 5, name: '评论已经到了42' }, { type: 5, name: '评论已经到了40' },
{ type: 8, name: '其他错误' }, { type: 8, name: '其他错误' },
{ type: 9, name: '评论成功' }, { type: 9, name: '评论成功' },
], ],
...@@ -325,19 +325,13 @@ export default { ...@@ -325,19 +325,13 @@ export default {
} }
}, },
watch: { watch: {
'formInline.userName'(newVal, oldVal) { formInline: {
if (newVal !== oldVal) { handler(newVal, oldVal) {
this.currentPage = 1 this.currentPage = 1
localStorage.setItem('csdnUserPage', this.currentPage) localStorage.setItem('csdnUserPage', this.currentPage)
this.userPage() this.userPage()
} },
}, deep: true,
'formInline.nickName'(newVal, oldVal) {
if (newVal !== oldVal) {
this.currentPage = 1
localStorage.setItem('csdnUserPage', this.currentPage)
this.userPage()
}
}, },
// 监听currentPage的变化,将新值保存到localStorage中 // 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) { currentPage(newPage) {
...@@ -617,7 +611,7 @@ export default { ...@@ -617,7 +611,7 @@ export default {
return 'info' return 'info'
} else if (statusName == '已经点过赞' || statusName == '已经收藏过' || statusName == '已经评论过') { } else if (statusName == '已经点过赞' || statusName == '已经收藏过' || statusName == '已经评论过') {
return 'success' return 'success'
} else if (statusName == '文章状态不能点赞' || statusName == '收藏已满' || statusName == '收藏夹不存在' || statusName == '评论已满' || statusName == '禁言' || statusName == '评论已经到了42') { } else if (statusName == '文章状态不能点赞' || statusName == '收藏已满' || statusName == '收藏夹不存在' || statusName == '评论已满' || statusName == '禁言' || statusName == '评论已经到了40') {
return 'danger' return 'danger'
} else if (statusName == '点赞成功' || statusName == '收藏成功' || statusName == '评论成功') { } else if (statusName == '点赞成功' || statusName == '收藏成功' || statusName == '评论成功') {
return 'success' return 'success'
......
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
<el-main> <el-main>
<el-form :inline="true" :model="formInline" class="demo-form-inline"> <el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item> <el-form-item>
<el-select size="small" v-model="formInline.relationType" placeholder="请选择关系类型" @change="fansInfoPage"> <el-input size="small" clearable v-model="formInline.userName" placeholder="请输入用户名" @keydown.enter.native="userPage"></el-input>
</el-form-item>
<el-form-item>
<el-select size="small" v-model="formInline.relationType" multiple placeholder="请选择关系类型" @change="fansInfoPage">
<el-option v-for="type in relationType" :key="type" :label="type" :value="type"></el-option> <el-option v-for="type in relationType" :key="type" :label="type" :value="type"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -41,6 +44,16 @@ ...@@ -41,6 +44,16 @@
</span> </span>
</el-dialog> </el-dialog>
</el-form-item> </el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="prepareCancleNoArticle">取消关注无文章</el-button>
<el-dialog title="提示" :visible.sync="noArticleDialogVisible" width="30%" :before-close="handleClose">
<span>确认取消关注无文章吗?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="noArticleDialogVisible = false">取 消</el-button>
<el-button type="primary" @click.prevent="cancleFansNoArticle()">确 定</el-button>
</span>
</el-dialog>
</el-form-item>
</el-form> </el-form>
<el-table border :data="fansInfoList" v-loading="loading"> <el-table border :data="fansInfoList" v-loading="loading">
<el-table-column prop="id" label="序号" width="100" sortable></el-table-column> <el-table-column prop="id" label="序号" width="100" sortable></el-table-column>
...@@ -64,117 +77,137 @@ ...@@ -64,117 +77,137 @@
<script> <script>
import ApiService from '../../api/ApiService' import ApiService from '../../api/ApiService'
export default { export default {
name: 'MyTripletDayInfo', name: 'MyTripletDayInfo',
data() {
return {
formInline: {
relationType: null,
},
relationType: ['全部', '互关', '粉丝', '已关注'],
// 用户列表数据
fansInfoList: [],
loading: false,
syncFansInfoDialogVisible: false,
syncFollowInfoDialogVisible: false,
cancleFollowInfoDialogVisible: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('csdnFansInfoPage')) || 1,
pageSize: 9,
total: 0,
}
},
watch: { data() {
'formInline.relationType'(newVal, oldVal) { return {
if (newVal !== oldVal) { formInline: {
this.currentPage = 1 relationType: [],
localStorage.setItem('csdnFansInfoPage', this.currentPage) userName: '',
this.fansInfoPage() },
} relationType: ['互关', '粉丝', '已关注'],
}, // 用户列表数据
// 监听currentPage的变化,将新值保存到localStorage中 fansInfoList: [],
currentPage(newPage) { loading: false,
localStorage.setItem('csdnFansInfoPage', newPage.toString()) syncFansInfoDialogVisible: false,
}, syncFollowInfoDialogVisible: false,
}, cancleFollowInfoDialogVisible: false,
created() { noArticleDialogVisible: false,
//获取问题类型的枚举 elementui_page_component_key: 0,
this.fansInfoPage() currentPage: Number(localStorage.getItem('csdnFansInfoPage')) || 1,
}, pageSize: 9,
mounted() { total: 0,
this.currentPage = 1 }
}, },
methods: {
prepareSyncFansInfo() {
this.syncFansInfoDialogVisible = true
},
prepareSyncFollowInfo() {
this.syncFollowInfoDialogVisible = true
},
prepareCancleFollowInfo() {
this.cancleFollowInfoDialogVisible = true
},
handleClose(done) {
this.$confirm('确认关闭?')
.then((_) => {
done()
})
.catch((_) => {})
},
async fansInfoPage() {
this.loading = true
const { data: res } = await ApiService.fansInfoPage(this.currentPage, this.pageSize, this.formInline.relationType)
if (res.code === 200) {
this.total = res.result.totalElements
this.fansInfoList = res.result.content
}
this.loading = false
},
async syncFansInfo() { watch: {
this.loading = true 'formInline.relationType'(newVal, oldVal) {
this.syncFansInfoDialogVisible = false if (newVal !== oldVal) {
const { data: res } = await ApiService.syncFansInfo() this.currentPage = 1
if (res.code === 200) { localStorage.setItem('csdnFansInfoPage', this.currentPage)
this.fansInfoPage() this.fansInfoPage()
} }
this.loading = false },
}, 'formInline.userName'(newVal, oldVal) {
if (newVal !== oldVal) {
this.currentPage = 1
localStorage.setItem('csdnFansInfoPage', this.currentPage)
this.fansInfoPage()
}
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('csdnFansInfoPage', newPage.toString())
},
},
created() {
//获取问题类型的枚举
this.fansInfoPage()
},
mounted() {
this.currentPage = 1
},
methods: {
prepareSyncFansInfo() {
this.syncFansInfoDialogVisible = true
},
prepareCancleNoArticle() {
this.noArticleDialogVisible = true
},
prepareSyncFollowInfo() {
this.syncFollowInfoDialogVisible = true
},
prepareCancleFollowInfo() {
this.cancleFollowInfoDialogVisible = true
},
handleClose(done) {
this.$confirm('确认关闭?')
.then((_) => {
done()
})
.catch((_) => {})
},
async fansInfoPage() {
this.loading = true
const { data: res } = await ApiService.fansInfoPage(this.currentPage, this.pageSize, this.formInline)
if (res.code === 200) {
this.total = res.result.totalElements
this.fansInfoList = res.result.content
}
this.loading = false
},
async syncFollowInfo() { async syncFansInfo() {
this.loading = true this.loading = true
this.syncFollowInfoDialogVisible = false this.syncFansInfoDialogVisible = false
const { data: res } = await ApiService.syncFollowInfo() const { data: res } = await ApiService.syncFansInfo()
if (res.code === 200) { if (res.code === 200) {
this.fansInfoPage() this.fansInfoPage()
} }
this.loading = false this.loading = false
}, },
async cancleFollowInfo() { async cancleFansNoArticle() {
this.loading = true this.loading = true
this.cancleFollowInfoDialogVisible = false this.noArticleDialogVisible = false
const { data: res } = await ApiService.cancleFollowInfo() const { data: res } = await ApiService.cancleFansNoArticle()
if (res.code === 200) { if (res.code === 200) {
this.fansInfoPage() this.fansInfoPage()
} }
this.loading = false this.loading = false
}, },
refreshPage() { async syncFollowInfo() {
//获取问题类型的枚举 this.loading = true
this.fansInfoPage() this.syncFollowInfoDialogVisible = false
location.reload() const { data: res } = await ApiService.syncFollowInfo()
}, if (res.code === 200) {
handleCurrentChange(currentPage) { this.fansInfoPage()
this.currentPage = currentPage }
this.fansInfoPage() this.loading = false
}, },
handleSizeChange(currentSize) { async cancleFollowInfo() {
this.pageSize = currentSize this.loading = true
this.fansInfoPage() this.cancleFollowInfoDialogVisible = false
}, const { data: res } = await ApiService.cancleFollowInfo()
}, if (res.code === 200) {
this.fansInfoPage()
}
this.loading = false
},
refreshPage() {
//获取问题类型的枚举
this.fansInfoPage()
location.reload()
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.fansInfoPage()
},
handleSizeChange(currentSize) {
this.pageSize = currentSize
this.fansInfoPage()
},
},
} }
</script> </script>
......
...@@ -2,60 +2,59 @@ ...@@ -2,60 +2,59 @@
<div> <div>
<el-container> <el-container>
<el-main> <el-main>
<el-dialog title="新增面试问题" :visible.sync="dialogFormVisible" style="width: 100%">
<el-form :model="form" class="custom-form">
<el-form-item label="面试问题" :label-width="formLabelWidth" class="form-item">
<el-input v-model="form.question" autocomplete="off" style="width: 100%"></el-input>
</el-form-item>
<br />
<el-form-item label="问题类型" :label-width="formLabelWidth" class="form-item">
<el-select v-model="form.questionType" placeholder="请选择活动区域">
<el-option v-for="item in options" :key="item.questionType" :label="item.name" :value="item.questionType"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="handleConfirm(0)">确 定</el-button>
</div>
</el-dialog>
<el-dialog class="red-title" :visible.sync="dialogMutiFormVisible">
<div class="red-title" slot="title">批量新增面试问题(多个问题换行填写)</div>
<el-form :model="form" class="custom-form">
<el-form-item label="面试问题" :label-width="formLabelWidth" class="form-item">
<el-input type="textarea" v-model="form.question" autocomplete="off" :rows="5" :cols="30" style="width: 100%"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogMutiFormVisible = false">取 消</el-button>
<el-button type="primary" @click="handleConfirm(1)">确 定</el-button>
</div>
</el-dialog>
<el-form :inline="true" :model="formInline" class="demo-form-inline"> <el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item> <el-form-item>
<el-input clearable v-model="formInline.question" placeholder="请输入问题" @keydown.enter.native="interviewPage"></el-input> <el-input clearable v-model="formInline.question" placeholder="请输入问题" @keydown.enter.native="interviewPage"></el-input>
</el-form-item> </el-form-item>
<el-select v-model="questionType" placeholder="请选择" @change="interviewPage"> <el-select v-model="formInline.questionType" placeholder="请选择" @change="interviewPage">
<el-option v-for="item in options" :key="item.questionType" :label="item.name" :value="item.questionType"></el-option> <el-option v-for="item in options" :key="item" :label="item" :value="item"></el-option>
</el-select> </el-select>
<el-form-item> <el-form-item>
<el-button type="primary" @click="interviewPage">查询</el-button> <el-button type="primary" @click="interviewPage">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="prepareAdd">新增</el-button> <el-button type="primary" @click="prepareAdd">新增</el-button>
<el-dialog title="新增面试问题" :visible.sync="dialogFormVisible" style="width: 100%">
<el-form :model="form" class="custom-form">
<el-form-item label="面试问题" :label-width="formLabelWidth" class="form-item">
<el-input v-model="form.question" autocomplete="off" style="width: 100%"></el-input>
</el-form-item>
<br />
<el-form-item label="问题类型" :label-width="formLabelWidth" class="form-item">
<el-select v-model="form.questionType" placeholder="请选择问题类型">
<el-option v-for="item in options" :key="item" :label="item" :value="item"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="handleConfirm(0)">确 定</el-button>
</div>
</el-dialog>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="prepareMutiAdd">批量新增</el-button> <el-button type="primary" @click="prepareMutiAdd">批量新增</el-button>
<el-dialog class="red-title" :visible.sync="dialogMutiFormVisible">
<div class="red-title" slot="title">批量新增面试问题(多个问题换行填写)</div>
<el-form :model="form" class="custom-form">
<el-form-item label="面试问题" :label-width="formLabelWidth" class="form-item">
<el-input type="textarea" v-model="form.question" autocomplete="off" :rows="5" :cols="30" style="width: 100%"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogMutiFormVisible = false">取 消</el-button>
<el-button type="primary" @click="handleConfirm(1)">确 定</el-button>
</div>
</el-dialog>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table border :data="userlist" v-loading="loading"> <el-table border :data="userlist" v-loading="loading">
<el-table-column prop="id" label="序号" width="100" sortable></el-table-column> <el-table-column prop="id" label="序号" width="100" sortable></el-table-column>
<el-table-column prop="question" label="面试问题" show-overflow-tooltip></el-table-column> <el-table-column prop="question" label="面试问题" show-overflow-tooltip></el-table-column>
<!-- <el-table-column prop="questionTypeName" label="问题类型" show-overflow-tooltip align="center"></el-table-column> -->
<el-table-column prop="questionTypeName" label="问题类型" show-overflow-tooltip align="center"> <el-table-column prop="questionType" label="问题类型" show-overflow-tooltip align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{ color: getColorForValue(scope.row.questionTypeName) }" v-html="scope.row.questionTypeName"></span> <span :style="{ color: getColorForValue(scope.row.questionType) }" v-html="scope.row.questionType"></span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -66,7 +65,7 @@ ...@@ -66,7 +65,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="操作" label="操作" width="180"> <el-table-column prop="操作" label="操作" width="180">
<template slot-scope="props"> <template slot-scope="props">
<el-button type="success" @click.prevent="preEdit(props.row.id, props.row.question, props.row.questionTypeName)" width="200">编辑</el-button> <el-button type="success" @click.prevent="preEdit(props.row.id, props.row.question, props.row.questionType)" width="200">编辑</el-button>
<el-dialog title="编辑面试问题" :visible.sync="editVisible"> <el-dialog title="编辑面试问题" :visible.sync="editVisible">
<el-form :model="form"> <el-form :model="form">
<el-form-item label="面试问题" :label-width="formLabelWidth"> <el-form-item label="面试问题" :label-width="formLabelWidth">
...@@ -74,7 +73,7 @@ ...@@ -74,7 +73,7 @@
</el-form-item> </el-form-item>
<el-form-item label="问题类型" :label-width="formLabelWidth"> <el-form-item label="问题类型" :label-width="formLabelWidth">
<el-select v-model="form.questionType" placeholder="请选择问题类型" style="text-align: left"> <el-select v-model="form.questionType" placeholder="请选择问题类型" style="text-align: left">
<el-option v-for="item in options" :key="item.questionType" :label="item.name" :value="item.questionType"></el-option> <el-option v-for="item in options" :key="item" :label="item" :value="item"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -118,15 +117,15 @@ export default { ...@@ -118,15 +117,15 @@ export default {
total: 0, total: 0,
formInline: { formInline: {
question: '', question: '',
questionType: '',
}, },
options: [], options: ['MySQL', 'JVM', '并发编程', '微服务'],
questionType: 0,
// 新增的内容 // 新增的内容
dialogFormVisible: false, dialogFormVisible: false,
dialogMutiFormVisible: false, dialogMutiFormVisible: false,
form: { form: {
question: '', question: '',
questionType: 0, questionType: '',
}, },
formLabelWidth: '120px', formLabelWidth: '120px',
dialogVisible: false, dialogVisible: false,
...@@ -140,7 +139,7 @@ export default { ...@@ -140,7 +139,7 @@ export default {
if (newVal !== oldVal) { if (newVal !== oldVal) {
this.currentPage = 1 this.currentPage = 1
localStorage.setItem('interviewLastPage', this.currentPage) localStorage.setItem('interviewLastPage', this.currentPage)
this.getQuestionType() this.interviewPage()
} }
}, },
// 监听currentPage的变化,将新值保存到localStorage中 // 监听currentPage的变化,将新值保存到localStorage中
...@@ -150,25 +149,20 @@ export default { ...@@ -150,25 +149,20 @@ export default {
}, },
created() { created() {
//获取问题列表 //获取问题列表
this.getQuestionType() this.interviewPage()
}, },
mounted() { mounted() {
this.currentPage = 1 this.currentPage = 1
// // 在页面加载时从localStorage中获取currentPage的值
// const storedPage = localStorage.getItem('interviewLastPage')
// if (storedPage) {
// this.currentPage = parseInt(storedPage)
// }
}, },
methods: { methods: {
prepareAdd() { prepareAdd() {
this.form.question = '' this.form.question = ''
this.form.questionType = 0 this.form.questionType = ''
this.dialogFormVisible = true this.dialogFormVisible = true
}, },
prepareMutiAdd() { prepareMutiAdd() {
this.form.question = '' this.form.question = ''
this.form.questionType = 0 this.form.questionType = ''
this.dialogMutiFormVisible = true this.dialogMutiFormVisible = true
}, },
...@@ -176,15 +170,9 @@ export default { ...@@ -176,15 +170,9 @@ export default {
this.currentRowId = id this.currentRowId = id
this.dialogVisible = true this.dialogVisible = true
}, },
preEdit(id, question, questionTypeName) { preEdit(id, question, questionType) {
this.form.question = question this.form.question = question
this.form.questionType = questionType
// 定义一个映射(map)来存储 questionType 到 name 的转换
const questionTypeToNameMap = {}
this.options.forEach((option) => {
questionTypeToNameMap[option.name] = option.questionType
})
this.form.questionType = questionTypeToNameMap[questionTypeName]
this.currentRowId = id this.currentRowId = id
this.editVisible = true this.editVisible = true
}, },
...@@ -213,8 +201,8 @@ export default { ...@@ -213,8 +201,8 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.currentPage = 1 this.currentPage = 1
this.form.question = '' this.form.question = ''
this.form.questionType = 0 this.form.questionType = ''
this.getQuestionType() // 确保这个方法是有效的 this.interviewPage() // 确保这个方法是有效的
} else { } else {
console.error('Received non-200 status code', res) console.error('Received non-200 status code', res)
this.errorMsg(res.message) this.errorMsg(res.message)
...@@ -247,7 +235,7 @@ export default { ...@@ -247,7 +235,7 @@ export default {
this.form.questionType = 0 this.form.questionType = 0
this.editVisible = false this.editVisible = false
currentRowId: null currentRowId: null
this.getQuestionType() // 确保这个方法是有效的 this.interviewPage() // 确保这个方法是有效的
} else { } else {
console.error('Received non-200 status code', res) console.error('Received non-200 status code', res)
} }
...@@ -267,24 +255,15 @@ export default { ...@@ -267,24 +255,15 @@ export default {
id: id, id: id,
}, },
}) })
this.getQuestionType() this.interviewPage()
this.loading = false this.loading = false
}, },
refreshPage() { refreshPage() {
//获取问题类型的枚举 //获取问题类型的枚举
this.getQuestionType() this.interviewPage()
location.reload() location.reload()
}, },
async getQuestionType() {
const { data: res } = await axios.get('http://localhost:80/interviewQuestion/questionType', { params: {} })
if (res.code === 200) {
this.options = res.result
this.interviewPage()
}
},
async interviewPage() { async interviewPage() {
this.loading = true this.loading = true
const { data: res } = await axios.get('http://localhost:80/interviewQuestion/page', { const { data: res } = await axios.get('http://localhost:80/interviewQuestion/page', {
...@@ -292,27 +271,18 @@ export default { ...@@ -292,27 +271,18 @@ export default {
page: this.currentPage, page: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
question: this.formInline.question, question: this.formInline.question,
questionType: this.questionType, questionType: this.formInline.questionType,
}, },
}) })
if (res.code === 200) { if (res.code === 200) {
this.total = res.result.totalElements this.total = res.result.totalElements
// 定义一个映射(map)来存储 questionType 到 name 的转换
const questionTypeToNameMap = {}
this.options.forEach((option) => {
questionTypeToNameMap[option.questionType] = option.name
})
// 修改 userlist 中的每一个元素,将 questionType 转换为 name
res.result.content.forEach((user) => {
user.questionTypeName = questionTypeToNameMap[user.questionType] || 'Unknown'
})
this.userlist = res.result.content this.userlist = res.result.content
} }
this.loading = false this.loading = false
}, },
handleCurrentChange(currentPage) { handleCurrentChange(currentPage) {
this.currentPage = currentPage this.currentPage = currentPage
this.getQuestionType() this.interviewPage()
}, },
getColorForValue(value) { getColorForValue(value) {
// 检查颜色映射关系中是否已经有该值对应的颜色 // 检查颜色映射关系中是否已经有该值对应的颜色
...@@ -329,36 +299,26 @@ export default { ...@@ -329,36 +299,26 @@ export default {
'red', 'red',
'blue', 'blue',
'green', 'green',
'yellow',
'purple', 'purple',
'orange', 'orange',
'pink', 'pink',
'brown', 'brown',
'cyan',
'magenta', 'magenta',
'maroon', 'maroon',
'navy', 'navy',
'olive', 'olive',
'teal', 'teal',
'lime',
'aqua',
'silver', 'silver',
'gray', 'gray',
'white',
'indigo', 'indigo',
'violet', 'violet',
'lavender',
'coral', 'coral',
'gold',
'salmon', 'salmon',
'turquoise',
'orchid', 'orchid',
'khaki',
'slategray', 'slategray',
'thistle', 'thistle',
'burlywood', 'burlywood',
'cadetblue', 'cadetblue',
'chartreuse',
'chocolate', 'chocolate',
'crimson', 'crimson',
'darkblue', 'darkblue',
...@@ -384,13 +344,9 @@ export default { ...@@ -384,13 +344,9 @@ export default {
'firebrick', 'firebrick',
'forestgreen', 'forestgreen',
'fuchsia', 'fuchsia',
'gold',
'greenyellow',
'hotpink', 'hotpink',
'indianred', 'indianred',
'lawngreen',
'lightcoral', 'lightcoral',
'lightgreen',
'lightpink', 'lightpink',
'lightsalmon', 'lightsalmon',
'lightseagreen', 'lightseagreen',
...@@ -401,30 +357,22 @@ export default { ...@@ -401,30 +357,22 @@ export default {
'mediumblue', 'mediumblue',
'mediumorchid', 'mediumorchid',
'mediumpurple', 'mediumpurple',
'mediumseagreen',
'mediumslateblue', 'mediumslateblue',
'mediumspringgreen',
'mediumturquoise', 'mediumturquoise',
'mediumvioletred', 'mediumvioletred',
'midnightblue', 'midnightblue',
'orangered', 'orangered',
'palegoldenrod',
'palegreen',
'paleturquoise',
'palevioletred', 'palevioletred',
'peru', 'peru',
'powderblue',
'rosybrown', 'rosybrown',
'saddlebrown', 'saddlebrown',
'seagreen', 'seagreen',
'sienna', 'sienna',
'skyblue', 'skyblue',
'slateblue', 'slateblue',
'springgreen',
'tan', 'tan',
'thistle', 'thistle',
'tomato', 'tomato',
'turquoise',
'violet', 'violet',
] ]
const randomIndex = Math.floor(Math.random() * colorArray.length) const randomIndex = Math.floor(Math.random() * colorArray.length)
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="queryPic">查询</el-button>
</el-form-item>
<el-form-item> <el-form-item>
<el-button size="small" type="primary" @click="prepareAddPic">新增图片</el-button> <el-button size="small" type="primary" @click="prepareAddPic">新增图片</el-button>
<el-dialog title="新增图片" :visible.sync="addPicVisible" style="width: 100%"> <el-dialog title="新增图片" :visible.sync="addPicVisible" style="width: 100%">
......
...@@ -6,20 +6,30 @@ ...@@ -6,20 +6,30 @@
CSDN管理 CSDN管理
</template> </template>
<el-menu-item-group> <el-menu-item-group>
<template slot="title">常用功能</template>
<router-link :to="{ path: '/home/tripletDayInfo' }"> <router-link :to="{ path: '/home/tripletDayInfo' }">
<el-menu-item index="/home/tripletDayInfo">三连管理</el-menu-item> <el-menu-item index="/home/tripletDayInfo">阈值管理</el-menu-item>
</router-link> </router-link>
<router-link :to="{ path: '/home/accountManagement' }">
<el-menu-item index="/home/accountManagement">余额管理</el-menu-item>
</router-link>
</el-menu-item-group>
<el-menu-item-group>
<template slot="title">用户相关</template>
<router-link :to="{ path: '/home/csdnUser' }"> <router-link :to="{ path: '/home/csdnUser' }">
<el-menu-item index="/home/csdnUser">用户管理</el-menu-item> <el-menu-item index="/home/csdnUser">用户管理</el-menu-item>
</router-link> </router-link>
<router-link :to="{ path: '/home/fansInfo' }">
<el-menu-item index="/home/fansInfo">粉丝管理</el-menu-item>
</router-link>
</el-menu-item-group>
<el-menu-item-group>
<template slot="title">三连相关</template>
<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' }"> <router-link :to="{ path: '/home/message' }">
<el-menu-item index="/home/message">私信管理</el-menu-item> <el-menu-item index="/home/message">私信管理</el-menu-item>
</router-link>
<router-link :to="{ path: '/home/fansInfo' }">
<el-menu-item index="/home/fansInfo">粉丝管理</el-menu-item>
</router-link> </router-link>
</el-menu-item-group> </el-menu-item-group>
</el-submenu> </el-submenu>
......
...@@ -13,6 +13,7 @@ import Algorithmic from '@/components/menus/MyAlgorithmic.vue' ...@@ -13,6 +13,7 @@ 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 MyFansInfo from '@/components/menus/MyFansInfo.vue' import MyFansInfo from '@/components/menus/MyFansInfo.vue'
import MyAccountManagement from '@/components/menus/MyAccountManagement.vue'
import MyMessage from '@/components/menus/MyMessage.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'
...@@ -32,83 +33,90 @@ const router = new VueRouter({ ...@@ -32,83 +33,90 @@ const router = new VueRouter({
path: '/login', path: '/login',
component: Login, component: Login,
meta: { meta: {
title: '登录', // 设置默认标题 title: '登录',
}, },
}, },
// 后台主页的路由规则 // 后台主页的路由规则
{ {
path: '/home', path: '/home',
component: Home, component: Home,
redirect: '/home/csdnUser', redirect: '/home/tripletDayInfo',
children: [ children: [
{ {
path: 'csdnUser', path: 'tripletDayInfo',
component: MyCsdnUser, component: MyTripletDayInfo,
meta: { meta: {
title: '用户管理', // 设置默认标题 title: '三连管理',
}, },
}, },
{ {
path: 'tripletDayInfo', path: 'csdnUser',
component: MyTripletDayInfo, component: MyCsdnUser,
meta: { meta: {
title: '三连管理', // 设置默认标题 title: '用户管理',
}, },
}, },
{ {
path: 'articleInfo', path: 'articleInfo',
component: MyArticleInfo, component: MyArticleInfo,
meta: { meta: {
title: '文章管理', // 设置默认标题 title: '文章管理',
},
},
{
path: 'accountManagement',
component: MyAccountManagement,
meta: {
title: '余额管理',
}, },
}, },
{ {
path: 'message', path: 'message',
component: MyMessage, component: MyMessage,
meta: { meta: {
title: '私信管理', // 设置默认标题 title: '私信管理',
}, },
}, },
{ {
path: 'fansInfo', path: 'fansInfo',
component: MyFansInfo, component: MyFansInfo,
meta: { meta: {
title: '粉丝管理', // 设置默认标题 title: '粉丝管理',
}, },
}, },
{ {
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: '图片',
}, },
}, },
{ {
...@@ -116,14 +124,14 @@ const router = new VueRouter({ ...@@ -116,14 +124,14 @@ const router = new VueRouter({
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信息',
}, },
}, },
], ],
......
export default['/home', '/home/pic'] export default['/home']
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册