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

整理

上级 b04e4482
.login-container[data-v-bca4874e]{background-color:#35495e;height:100%}.login-container .login-box[data-v-bca4874e]{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-bca4874e]{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box}.form-control[data-v-bca4874e]{flex:1}.avatar-box[data-v-bca4874e]{position:absolute;width:100%;top:-65px;left:0}.avatar-box .avatar[data-v-bca4874e]{width:120px;height:120px;border-radius:50%!important;box-shadow:0 0 6px #efefef}.layout-header-left-img[data-v-003b0f4a]{height:50px}.layout-aside-container[data-v-4b966958]{width:200px;height:100%;border-right:1px solid #eaeaea}.left-aside-item[data-v-4b966958]{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-3db5ae18]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-3db5ae18]{color:#333}.pagination[data-v-3db5ae18]{margin-top:16px;text-align:right}.header-button-item[data-v-3db5ae18]{margin-right:15px;font-size:20px}.red-title[data-v-3db5ae18]{line-height:24px;font-size:18px;color:red}.backtop[data-v-3db5ae18]{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-3db5ae18]{width:100%;text-align:left}.backtop[data-v-3db5ae18]: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-3bb7c941]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-3bb7c941]{color:#333}.pagination[data-v-3bb7c941]{margin-top:16px;text-align:right}.header-button-item[data-v-3bb7c941]{margin-right:15px;font-size:20px}.red-title[data-v-3bb7c941]{line-height:24px;font-size:18px;color:red}.backtop[data-v-3bb7c941]{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-3bb7c941]{width:100%;text-align:left}.backtop[data-v-3bb7c941]:hover{background-color:#0050a0}.el-header[data-v-163aa726]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-163aa726]{color:#333}.pagination[data-v-163aa726]{margin-top:16px;text-align:right}.header-button-item[data-v-163aa726]{margin-right:15px;font-size:20px}.red-title[data-v-163aa726]{line-height:24px;font-size:18px;color:red}.backtop[data-v-163aa726]{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-163aa726]{width:100%;text-align:left}.backtop[data-v-163aa726]:hover{background-color:#0050a0}.el-header[data-v-ca8219b2]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-ca8219b2]{color:#333}.pagination[data-v-ca8219b2]{margin-top:16px;text-align:right}.header-button-item[data-v-ca8219b2]{margin-right:15px;font-size:20px}.red-title[data-v-ca8219b2]{line-height:24px;font-size:18px;color:red}.backtop[data-v-ca8219b2]{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-ca8219b2]{width:100%;text-align:left}.backtop[data-v-ca8219b2]: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-bca4874e]{background-color:#35495e;height:100%}.login-container .login-box[data-v-bca4874e]{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-bca4874e]{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box}.form-control[data-v-bca4874e]{flex:1}.avatar-box[data-v-bca4874e]{position:absolute;width:100%;top:-65px;left:0}.avatar-box .avatar[data-v-bca4874e]{width:120px;height:120px;border-radius:50%!important;box-shadow:0 0 6px #efefef}.layout-header-left-img[data-v-003b0f4a]{height:50px}.layout-aside-container[data-v-4b966958]{width:200px;height:100%;border-right:1px solid #eaeaea}.left-aside-item[data-v-4b966958]{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-1755a7d8]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-1755a7d8]{color:#333}.pagination[data-v-1755a7d8]{margin-top:16px;text-align:right}.header-button-item[data-v-1755a7d8]{margin-right:15px;font-size:20px}.backtop[data-v-1755a7d8]{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-1755a7d8]: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-55b17565]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-55b17565]{color:#333}.pagination[data-v-55b17565]{margin-top:16px;text-align:right}.header-button-item[data-v-55b17565]{margin-right:15px;font-size:20px}.red-title[data-v-55b17565]{line-height:24px;font-size:18px;color:red}.backtop[data-v-55b17565]{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-55b17565]{width:100%;text-align:left}.backtop[data-v-55b17565]: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-b80b1460]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-b80b1460]{color:#333}.pagination[data-v-b80b1460]{margin-top:16px;text-align:right}.header-button-item[data-v-b80b1460]{margin-right:15px;font-size:20px}.red-title[data-v-b80b1460]{line-height:24px;font-size:18px;color:red}.backtop[data-v-b80b1460]{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-b80b1460]{width:100%;text-align:left}.backtop[data-v-b80b1460]:hover{background-color:#0050a0}.el-header[data-v-13369e18]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-13369e18]{color:#333}.pagination[data-v-13369e18]{margin-top:16px;text-align:right}.header-button-item[data-v-13369e18]{margin-right:15px;font-size:20px}.red-title[data-v-13369e18]{line-height:24px;font-size:18px;color:red}.backtop[data-v-13369e18]{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-13369e18]{width:100%;text-align:left}.backtop[data-v-13369e18]:hover{background-color:#0050a0}.el-header[data-v-539ccef8]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-539ccef8]{color:#333}.pagination[data-v-539ccef8]{margin-top:16px;text-align:right}.header-button-item[data-v-539ccef8]{margin-right:15px;font-size:20px}.red-title[data-v-539ccef8]{line-height:24px;font-size:18px;color:red}.backtop[data-v-539ccef8]{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-539ccef8]{width:100%;text-align:left}.backtop[data-v-539ccef8]:hover{background-color:#0050a0}.button-container[data-v-05a32c50],.button-container[data-v-e0115e9c]{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.4e2e3706.css" rel="preload" as="style"><link href="/css/chunk-vendors.0bfa23eb.css" rel="preload" as="style"><link href="/js/app.3b25d88b.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.4e2e3706.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.3b25d88b.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.b5d8bce4.css" rel="preload" as="style"><link href="/css/chunk-vendors.0bfa23eb.css" rel="preload" as="style"><link href="/js/app.83cee471.js" rel="preload" as="script"><link href="/js/chunk-vendors.16212b87.js" rel="preload" as="script"><link href="/css/chunk-vendors.0bfa23eb.css" rel="stylesheet"><link href="/css/app.b5d8bce4.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.16212b87.js"></script><script src="/js/app.83cee471.js"></script></body></html>
\ No newline at end of file \ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -4,6 +4,10 @@ const ApiService = { ...@@ -4,6 +4,10 @@ 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 dealViewCount(id) {
return await axios.get('http://43.139.90.182:8888/csdn/redPackage/getViewCountById?id=' + id)
},
async syncMyBlog() { async syncMyBlog() {
return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/syncMyBlog') return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/syncMyBlog')
}, },
...@@ -20,5 +24,26 @@ const ApiService = { ...@@ -20,5 +24,26 @@ const ApiService = {
}, },
}) })
}, },
async redPackagePage(currentPage, pageSize, formInline) {
return await axios.post('http://43.139.90.182:8888/csdn/redPackage/page', {
page: currentPage,
pageSize: pageSize,
nickName: formInline.nickName,
myAmountStart: formInline.myAmountStart,
myAmountEnd: formInline.myAmountEnd,
startDate: formInline.startDate,
itemType: formInline.itemType == '全部' ? null : formInline.itemType,
msg: formInline.msg == '全部' ? null : formInline.msg,
})
},
async redPackageDetailList(currentPage, pageSize, orderNo, communityId, postId) {
return await axios.post('http://43.139.90.182:8888/csdn/redPackage/detail/page', {
page: currentPage,
pageSize: pageSize,
orderNo: orderNo,
communityId: communityId,
postId: postId,
})
},
} }
export default ApiService export default ApiService
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
{{ 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="操作" width="180">
<template slot-scope="props"> <template slot-scope="props">
<el-button type="success" @click.prevent="gotoDetail(props.row.id)">详情</el-button> <el-button type="success" @click.prevent="gotoDetail(props.row.id)">详情</el-button>
<el-button type="danger" @click="onDelete(props.row.id)">删除</el-button> <el-button type="danger" @click="onDelete(props.row.id)">删除</el-button>
......
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </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-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[8, 10, 50, 100, 200, 400]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</el-main> </el-main>
<el-backtop class="backtop"></el-backtop> <el-backtop class="backtop"></el-backtop>
</el-container> </el-container>
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
<el-container> <el-container>
<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-date-picker v-model="formInline.startDate" type="date" placeholder="选择开始日期" :value-format="'yyyy-MM-dd'"></el-date-picker>
</el-form-item>
<el-form-item> <el-form-item>
<el-input size="small" clearable v-model="formInline.nickName" placeholder="请输入用户昵称" @keydown.enter.native="redPackagePage"></el-input> <el-input size="small" clearable v-model="formInline.nickName" placeholder="请输入用户昵称" @keydown.enter.native="redPackagePage"></el-input>
</el-form-item> </el-form-item>
...@@ -35,13 +38,14 @@ ...@@ -35,13 +38,14 @@
<el-button size="small" type="primary" @click="prepareGetToday">今日所得</el-button> <el-button size="small" type="primary" @click="prepareGetToday">今日所得</el-button>
<el-dialog v-loading="loading" title="今日所得查询" :visible.sync="getTodayDialogVisible" style="width: 100%"> <el-dialog v-loading="loading" title="今日所得查询" :visible.sync="getTodayDialogVisible" style="width: 100%">
<el-form :model="form" class="custom-form"> <el-form :model="form" class="custom-form">
<el-row :gutter="20"> <el-form-item label="今日所得" class="form-item">
<el-col :span="12"> <el-input v-model="form.todayGet" autocomplete="off" style="width: 100%"></el-input>
<el-input v-model="form.todayGet" placeholder="今日所得" autocomplete="off"></el-input> </el-form-item>
<el-input v-model="form.allGet" placeholder="累计所得" autocomplete="off"></el-input> <el-form-item label="累计所得" class="form-item">
</el-col> <el-input v-model="form.allGet" autocomplete="off" style="width: 100%"></el-input>
</el-row> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="getTodayDialogVisible = false">取 消</el-button> <el-button @click="getTodayDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="getToday">查 询</el-button> <el-button type="primary" @click="getToday">查 询</el-button>
...@@ -104,13 +108,14 @@ ...@@ -104,13 +108,14 @@
<template slot-scope="props">{{ props.row.createTime | dateFormat }}</template> <template slot-scope="props">{{ props.row.createTime | dateFormat }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="操作" label="操作" width="250"> <el-table-column prop="操作" label="操作" width="310">
<template slot-scope="props"> <template slot-scope="props">
<el-button type="success" @click="dealViewCount(props.row.id)" size="small">浏览量</el-button> <el-button size="small" type="success" @click="dealViewCount(props.row.id)">浏览量</el-button>
<el-button type="success" @click="syncDetailInfo(props.row.id)" size="small">同步详情</el-button> <el-button size="small" type="success" @click="syncDetailInfo(props.row.id)">同步详情</el-button>
<el-button size="small" type="primary" @click.prevent="preEdit(props.row.id, props.row.nickName, props.row.myAmount, props.row.msg)" width="200">编辑</el-button> <el-button size="small" type="primary" @click.prevent="preEdit(props.row.id, props.row.nickName, props.row.myAmount, props.row.msg)">编辑</el-button>
<el-dialog title="编辑红包信息" :visible.sync="editVisible"> <el-button size="small" type="success" @click.prevent="gotoDetail(props.row.orderNo, props.row.communityId, props.row.postId)">详情</el-button>
<el-form :model="form"> <el-dialog title="编辑红包信息" :visible.sync="editVisible" style="width: 100%">
<el-form :model="form" class="custom-form">
<el-form-item label="用户名称" class="form-item"> <el-form-item label="用户名称" class="form-item">
<el-input v-model="form.nickName" autocomplete="off" style="width: 100%"></el-input> <el-input v-model="form.nickName" autocomplete="off" style="width: 100%"></el-input>
</el-form-item> </el-form-item>
...@@ -118,7 +123,9 @@ ...@@ -118,7 +123,9 @@
<el-input v-model="form.myAmount" autocomplete="off" style="width: 100%"></el-input> <el-input v-model="form.myAmount" autocomplete="off" style="width: 100%"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="详细信息" class="form-item"> <el-form-item label="详细信息" class="form-item">
<el-input v-model="form.msg" autocomplete="off" style="width: 100%"></el-input> <el-select v-model="form.msg" placeholder="请选择" style="width: 100%">
<el-option v-for="item in msg" :key="item" :label="item" :value="item"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -129,7 +136,7 @@ ...@@ -129,7 +136,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </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-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[8, 10, 50, 100, 200, 400]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</el-main> </el-main>
<el-backtop class="backtop"></el-backtop> <el-backtop class="backtop"></el-backtop>
</el-container> </el-container>
...@@ -138,248 +145,247 @@ ...@@ -138,248 +145,247 @@
<script> <script>
import axios from 'axios' import axios from 'axios'
import ApiService from '../../api/ApiService'
export default { export default {
name: 'MyRedPackage', name: 'MyRedPackage',
data() {
return {
form: {
todayGet: '',
allGet: '',
myAmount: '',
nickName: '',
msg: '',
},
formInline: {
nickName: '',
itemType: '',
myAmount: '',
msg: '',
myAmountStart: '',
myAmountEnd: '',
startDate: '',
},
itemType: ['全部', 'article', 'blink', 'topic'],
msg: ['全部', 'received', 'completed', '其它'],
deleteDialogVisible: false,
editVisible: false,
viewCountAllDialogVisible: false,
getTodayDialogVisible: false,
detailsInfoDialogVisible: false,
// 用户列表数据
csdnRedPackageList: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('redPackagePage')) || 1,
pageSize: 10,
total: 0,
currentRowId: null,
currentUserName: null,
}
},
watch: {
formInline: {
handler(newVal, oldVal) {
this.currentPage = 1
localStorage.setItem('redPackagePage', this.currentPage)
this.redPackagePage()
},
deep: true,
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('redPackagePage', newPage.toString())
},
},
created() {
//获取问题类型的枚举
this.redPackagePage()
},
mounted() {
this.currentPage = 1
},
methods: {
prepareViewCountAll() {
this.viewCountAllDialogVisible = true
},
prepareDetailsInfo() {
this.detailsInfoDialogVisible = true
},
prepareGetToday() {
this.form.todayGet = ''
this.form.allGet = ''
this.getTodayDialogVisible = true
},
prepareDelete(id) {
this.currentRowId = id
this.deleteDialogVisible = true
},
data() { preEdit(id, nickName, myAmount, msg) {
return { this.form.nickName = nickName
form: { this.form.myAmount = myAmount
todayGet: '', this.form.msg = msg
allGet: '', this.currentRowId = id
myAmount: '', this.editVisible = true
nickName: '', },
msg: '', gotoDetail(orderNo, communityId, postId) {
}, this.$router.push(`/home/redPackageDetail/${orderNo}/${communityId}/${postId}`)
formInline: { // this.$router.push('/home/redPackageDetail/' + orderNo)
nickName: '', },
itemType: '', handleClose(done) {
myAmount: '', this.$confirm('确认关闭?')
msg: '', .then((_) => {
myAmountStart: '', done()
myAmountEnd: '', })
}, .catch((_) => {})
itemType: ['全部', 'article', 'blink', 'topic'], },
msg: ['全部', 'received', 'completed', '其它'], handleConfirm(addType) {
deleteDialogVisible: false, this.dialogFormVisible = false // 关闭对话框
editVisible: false, this.dialogMutiFormVisible = false
viewCountAllDialogVisible: false, this.addUser(addType) // 发送请求
getTodayDialogVisible: false, },
detailsInfoDialogVisible: false,
// 用户列表数据
csdnRedPackageList: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('redPackagePage')) || 1,
pageSize: 10,
total: 0,
currentRowId: null,
currentUserName: null,
}
},
watch: {
formInline: {
handler(newVal, oldVal) {
this.currentPage = 1
localStorage.setItem('redPackagePage', this.currentPage)
this.redPackagePage()
},
deep: true,
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('redPackagePage', newPage.toString())
},
},
created() {
//获取问题类型的枚举
this.redPackagePage()
},
mounted() {
this.currentPage = 1
},
methods: {
prepareViewCountAll() {
this.viewCountAllDialogVisible = true
},
prepareDetailsInfo() {
this.detailsInfoDialogVisible = true
},
prepareGetToday() {
this.form.todayGet = ''
this.form.allGet = ''
this.getTodayDialogVisible = true
},
prepareDelete(id) {
this.currentRowId = id
this.deleteDialogVisible = true
},
preEdit(id, nickName, myAmount, msg) { async redPackagePage() {
this.form.nickName = nickName this.loading = true
this.form.myAmount = myAmount const { data: res } = await ApiService.redPackagePage(this.currentPage, this.pageSize, this.formInline)
this.form.msg = msg if (res.code === 200) {
this.currentRowId = id this.total = res.result.totalElements
this.editVisible = true this.csdnRedPackageList = res.result.content
}, }
this.loading = false
},
handleClose(done) { async dealViewCount(id) {
this.$confirm('确认关闭?') this.loading = true
.then((_) => { const { data: res } = await ApiService.dealViewCount(id)
done() if (res.code === 200) {
}) this.redPackagePage()
.catch((_) => {}) } else {
}, console.error('Received non-200 status code', res)
handleConfirm(addType) { }
this.dialogFormVisible = false // 关闭对话框 this.loading = false
this.dialogMutiFormVisible = false },
this.addUser(addType) // 发送请求
},
async redPackagePage() {
this.loading = true
const { data: res } = await axios.post('http://43.139.90.182:8888/csdn/redPackage/page', {
page: this.currentPage,
pageSize: this.pageSize,
nickName: this.formInline.nickName,
myAmountStart: this.formInline.myAmountStart,
myAmountEnd: this.formInline.myAmountEnd,
itemType: this.formInline.itemType == '全部' ? null : this.formInline.itemType,
msg: this.formInline.msg == '全部' ? null : this.formInline.msg,
})
if (res.code === 200) {
this.total = res.result.totalElements
this.csdnRedPackageList = res.result.content
}
this.loading = false
},
async dealViewCount(id) { async syncDetailInfo(id) {
this.loading = true this.loading = true
const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/redPackage/getViewCountById?id=' + id) const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/redPackage/detail/syncDetailInfo?id=' + id)
if (res.code === 200) { if (res.code === 200) {
this.redPackagePage() this.redPackagePage()
} else { } else {
console.error('Received non-200 status code', res) console.error('Received non-200 status code', res)
} }
this.loading = false this.loading = false
}, },
async syncDetailInfo(id) {
this.loading = true
const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/redPackage/syncDetailInfo?id=' + id)
if (res.code === 200) {
this.redPackagePage()
} else {
console.error('Received non-200 status code', res)
}
this.loading = false
},
async detailsInfo() { async detailsInfo() {
this.loading = true this.loading = true
this.detailsInfoDialogVisible = false this.detailsInfoDialogVisible = false
const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/redPackage/getRedPackageDetailInfo') const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/redPackage/detail/getTodayRedPackageDetailInfo')
if (res.code === 200) { if (res.code === 200) {
this.redPackagePage() this.redPackagePage()
} else { } else {
console.error('Received non-200 status code', res) console.error('Received non-200 status code', res)
} }
this.loading = false this.loading = false
}, },
async editConfirm() { async editConfirm() {
try { try {
this.loading = true this.loading = true
const { data: res } = await axios.post('http://43.139.90.182:8888/csdn/redPackage/update', { const { data: res } = await axios.post('http://43.139.90.182:8888/csdn/redPackage/update', {
id: this.currentRowId, id: this.currentRowId,
nickName: this.form.nickName, nickName: this.form.nickName,
myAmount: this.form.myAmount, myAmount: this.form.myAmount,
msg: this.form.msg, msg: this.form.msg,
}) })
if (res.code === 200) { if (res.code === 200) {
this.form.nickName = '' this.form.nickName = ''
this.form.myAmount = '' this.form.myAmount = ''
this.form.msg = '' this.form.msg = ''
this.editVisible = false this.editVisible = false
currentRowId: null currentRowId: null
this.redPackagePage() this.redPackagePage()
} else { } else {
console.error('Received non-200 status code', res) console.error('Received non-200 status code', res)
} }
} catch (error) { } catch (error) {
console.error('An error occurred while adding the questionName:', error) console.error('An error occurred while adding the questionName:', error)
// 异常处理逻辑 // 异常处理逻辑
} finally { } finally {
this.loading = false this.loading = false
} }
}, },
async viewCountAll() { async viewCountAll() {
this.loading = true this.loading = true
this.viewCountAllDialogVisible = false this.viewCountAllDialogVisible = false
const { data: res1 } = await axios.get('http://43.139.90.182:8888/csdn/redPackage/getViewCountAll') const { data: res1 } = await axios.get('http://43.139.90.182:8888/csdn/redPackage/getViewCountAll')
if (res1.code === 200) { if (res1.code === 200) {
this.redPackagePage() this.redPackagePage()
} else { } else {
console.error('Received non-200 status code', res1) console.error('Received non-200 status code', res1)
} }
this.loading = false this.loading = false
}, },
async getToday() { async getToday() {
const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/redPackage/getMyAmount') const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/redPackage/getMyAmount')
if (res.code === 200) { if (res.code === 200) {
this.form.todayGet = res.result.todayGet this.form.todayGet = res.result.todayGet
this.form.allGet = res.result.allGet this.form.allGet = res.result.allGet
} else { } else {
console.error('Received non-200 status code', res) console.error('Received non-200 status code', res)
} }
}, },
async onDelete(id) { async onDelete(id) {
this.loading = true this.loading = true
const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/user/delete', { const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/user/delete', {
params: { params: {
id: id, id: id,
}, },
}) })
this.deleteDialogVisible = false this.deleteDialogVisible = false
this.redPackagePage() this.redPackagePage()
this.loading = false this.loading = false
}, },
refreshPage() { refreshPage() {
//获取问题类型的枚举 //获取问题类型的枚举
this.redPackagePage() this.redPackagePage()
location.reload() location.reload()
}, },
handleCurrentChange(currentPage) { handleCurrentChange(currentPage) {
this.currentPage = currentPage this.currentPage = currentPage
this.redPackagePage() this.redPackagePage()
}, },
handleSizeChange(currentSize) { handleSizeChange(currentSize) {
this.pageSize = currentSize this.pageSize = currentSize
this.redPackagePage() this.redPackagePage()
}, },
newRedPackage() { newRedPackage() {
// 新页面打开 // 新页面打开
window.open('https://bbs.csdn.net/?type=4&header=0&utm_source=wwwtab') window.open('https://bbs.csdn.net/?type=4&header=0&utm_source=wwwtab')
}, },
getTagType(myAmount) { getTagType(myAmount) {
if (myAmount >= 0.3) { if (myAmount >= 0.3) {
return 'success' return 'success'
} else if (myAmount >= 0.2) { } else if (myAmount >= 0.2) {
return 'primary' return 'primary'
} else if (myAmount >= 0.1) { } else if (myAmount >= 0.1) {
return 'warning' return 'warning'
} else { } else {
return 'danger' return 'danger'
} }
}, },
getMsgType(msg) { getMsgType(msg) {
if (msg == 'received' || msg == 'completed') { if (msg == 'received' || msg == 'completed') {
return 'success' return 'success'
} else { } else {
return 'danger' return 'danger'
} }
}, },
}, },
} }
</script> </script>
......
...@@ -65,178 +65,178 @@ ...@@ -65,178 +65,178 @@
<script> <script>
import axios from 'axios' import axios from 'axios'
export default { export default {
name: 'MyTripletDayInfo', name: 'MyTripletDayInfo',
data() { data() {
return { return {
formInline: { formInline: {
startDate: null, startDate: null,
endDate: null, endDate: null,
}, },
// 用户列表数据 // 用户列表数据
tripletDayInfoList: [], tripletDayInfoList: [],
likeStatus: [ likeStatus: [
{ {
type: -1, type: -1,
name: '全部', name: '全部',
}, },
{ {
type: 0, type: 0,
name: '未处理', name: '未处理',
}, },
{ type: 1, name: '已经点过赞' }, { type: 1, name: '已经点过赞' },
{ type: 2, name: '点赞已满' }, { type: 2, name: '点赞已满' },
{ type: 3, name: '取消点赞' }, { type: 3, name: '取消点赞' },
{ type: 4, name: '文章状态不能点赞' }, { type: 4, name: '文章状态不能点赞' },
{ type: 8, name: '其他错误' }, { type: 8, name: '其他错误' },
{ type: 9, name: '点赞成功' }, { type: 9, name: '点赞成功' },
], ],
collectStatus: [ collectStatus: [
{ {
type: -1, type: -1,
name: '全部', name: '全部',
}, },
{ {
type: 0, type: 0,
name: '未处理', name: '未处理',
}, },
{ type: 1, name: '已经收藏过' }, { type: 1, name: '已经收藏过' },
{ type: 2, name: '收藏已满' }, { type: 2, name: '收藏已满' },
{ type: 3, name: '参数缺失' }, { type: 3, name: '参数缺失' },
{ type: 4, name: '收藏夹不存在' }, { type: 4, name: '收藏夹不存在' },
{ type: 8, name: '其他错误' }, { type: 8, name: '其他错误' },
{ type: 9, name: '收藏成功' }, { type: 9, name: '收藏成功' },
], ],
commentStatus: [ commentStatus: [
{ {
type: -1, type: -1,
name: '全部', name: '全部',
}, },
{ {
type: 0, type: 0,
name: '未处理', name: '未处理',
}, },
{ type: 1, name: '已经评论过' }, { type: 1, name: '已经评论过' },
{ type: 2, name: '评论已满' }, { type: 2, name: '评论已满' },
{ type: 3, name: '禁言' }, { type: 3, name: '禁言' },
{ type: 4, name: '评论太快' }, { type: 4, name: '评论太快' },
{ type: 5, name: '评论已经到了45条' }, { type: 5, name: '评论已经到了45条' },
{ type: 8, name: '其他错误' }, { type: 8, name: '其他错误' },
{ type: 9, name: '评论成功' }, { type: 9, name: '评论成功' },
], ],
loading: false, loading: false,
resetDialogVisible: false, resetDialogVisible: false,
elementui_page_component_key: 0, elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('csdnTripletDayInfoPage')) || 1, currentPage: Number(localStorage.getItem('csdnTripletDayInfoPage')) || 1,
pageSize: 9, pageSize: 9,
total: 0, total: 0,
} }
}, },
watch: { watch: {
'formInline.startDate'(newVal, oldVal) { 'formInline.startDate'(newVal, oldVal) {
if (newVal !== oldVal) { if (newVal !== oldVal) {
this.currentPage = 1 this.currentPage = 1
localStorage.setItem('csdnTripletDayInfoPage', this.currentPage) localStorage.setItem('csdnTripletDayInfoPage', this.currentPage)
this.tripletDayInfoPage() this.tripletDayInfoPage()
} }
}, },
'formInline.endDate'(newVal, oldVal) { 'formInline.endDate'(newVal, oldVal) {
if (newVal !== oldVal) { if (newVal !== oldVal) {
this.currentPage = 1 this.currentPage = 1
localStorage.setItem('csdnTripletDayInfoPage', this.currentPage) localStorage.setItem('csdnTripletDayInfoPage', this.currentPage)
this.tripletDayInfoPage() this.tripletDayInfoPage()
} }
}, },
// 监听currentPage的变化,将新值保存到localStorage中 // 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) { currentPage(newPage) {
localStorage.setItem('csdnTripletDayInfoPage', newPage.toString()) localStorage.setItem('csdnTripletDayInfoPage', newPage.toString())
}, },
}, },
created() { created() {
//获取问题类型的枚举 //获取问题类型的枚举
this.tripletDayInfoPage() this.tripletDayInfoPage()
}, },
mounted() { mounted() {
this.currentPage = 1 this.currentPage = 1
}, },
methods: { methods: {
prepareReset() { prepareReset() {
this.resetDialogVisible = true this.resetDialogVisible = true
}, },
async tripletDayInfoPage() { async tripletDayInfoPage() {
this.loading = true this.loading = true
const { data: res } = await axios.post('http://43.139.90.182:8888/dayInfo/page', { const { data: res } = await axios.post('http://43.139.90.182:8888/dayInfo/page', {
page: this.currentPage, page: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
startDate: this.formInline.startDate, startDate: this.formInline.startDate,
endDate: this.formInline.endDate, endDate: this.formInline.endDate,
}) })
if (res.code === 200) { if (res.code === 200) {
this.total = res.result.totalElements this.total = res.result.totalElements
const likeStatusMap = {} const likeStatusMap = {}
this.likeStatus.forEach((option) => { this.likeStatus.forEach((option) => {
likeStatusMap[option.type] = option.name likeStatusMap[option.type] = option.name
}) })
res.result.content.forEach((item) => { res.result.content.forEach((item) => {
item.likeStatusName = likeStatusMap[item.likeStatus] item.likeStatusName = likeStatusMap[item.likeStatus]
}) })
const collectStatusMap = {} const collectStatusMap = {}
this.collectStatus.forEach((option) => { this.collectStatus.forEach((option) => {
collectStatusMap[option.type] = option.name collectStatusMap[option.type] = option.name
}) })
res.result.content.forEach((item) => { res.result.content.forEach((item) => {
item.collectStatusName = collectStatusMap[item.collectStatus] item.collectStatusName = collectStatusMap[item.collectStatus]
}) })
const commentStatusMap = {} const commentStatusMap = {}
this.commentStatus.forEach((option) => { this.commentStatus.forEach((option) => {
commentStatusMap[option.type] = option.name commentStatusMap[option.type] = option.name
}) })
res.result.content.forEach((item) => { res.result.content.forEach((item) => {
item.commentStatusName = commentStatusMap[item.commentStatus] item.commentStatusName = commentStatusMap[item.commentStatus]
}) })
this.tripletDayInfoList = res.result.content this.tripletDayInfoList = res.result.content
} }
this.loading = false this.loading = false
}, },
async reset() { async reset() {
this.loading = true this.loading = true
const { data: res } = await axios.get('http://43.139.90.182:8888/dayInfo/add') const { data: res } = await axios.get('http://43.139.90.182:8888/dayInfo/add')
this.resetDialogVisible = false this.resetDialogVisible = false
this.tripletDayInfoPage() this.tripletDayInfoPage()
this.loading = false this.loading = false
}, },
refreshPage() { refreshPage() {
//获取问题类型的枚举 //获取问题类型的枚举
this.tripletDayInfoPage() this.tripletDayInfoPage()
location.reload() location.reload()
}, },
getTagType(statusName) { getTagType(statusName) {
if (statusName == '未处理') { if (statusName == '未处理') {
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 == '评论已经到了45条') { } else if (statusName == '文章状态不能点赞' || statusName == '收藏已满' || statusName == '收藏夹不存在' || statusName == '评论已满' || statusName == '禁言' || statusName == '评论已经到了45条') {
return 'danger' return 'danger'
} else if (statusName == '点赞成功' || statusName == '收藏成功' || statusName == '评论成功') { } else if (statusName == '点赞成功' || statusName == '收藏成功' || statusName == '评论成功') {
return 'success' return 'success'
} else if (statusName == '点赞已满' || statusName == '参数缺失' || statusName == '其他错误' || statusName == '取消点赞' || statusName == '评论太快') { } else if (statusName == '点赞已满' || statusName == '参数缺失' || statusName == '其他错误' || statusName == '取消点赞' || statusName == '评论太快') {
return 'warning' return 'warning'
} }
}, },
handleCurrentChange(currentPage) { handleCurrentChange(currentPage) {
this.currentPage = currentPage this.currentPage = currentPage
this.tripletDayInfoPage() this.tripletDayInfoPage()
}, },
handleSizeChange(currentSize) { handleSizeChange(currentSize) {
this.pageSize = currentSize this.pageSize = currentSize
this.tripletDayInfoPage() this.tripletDayInfoPage()
}, },
}, },
} }
</script> </script>
......
...@@ -47,7 +47,6 @@ export default { ...@@ -47,7 +47,6 @@ export default {
created() { created() {
// 调用请求数据的方法 // 调用请求数据的方法
this.initChatList() this.initChatList()
print()
}, },
methods: { methods: {
goBack() { goBack() {
......
<template>
<div>
<el-button type="primary" plain size="medium" @click="goBack">后退</el-button>
<h4 class="text-center">红包订单号{{ orderNo }}领取详情</h4>
<el-container>
<el-main>
<el-table ref="multipleTable" v-loading="loading" :data="csdnRedPackageDetailList" tooltip-effect="dark" style="width: 100%">
<el-table-column prop="id" label="序号" width="100" sortable></el-table-column>
<el-table-column prop="orderNo" label="订单号" show-overflow-tooltip></el-table-column>
<el-table-column prop="communityId" label="社区id" show-overflow-tooltip></el-table-column>
<el-table-column prop="postId" label="发布id" show-overflow-tooltip></el-table-column>
<el-table-column prop="receiverNickName" label="用户昵称" show-overflow-tooltip></el-table-column>
<el-table-column prop="receivedMoney" label="抢到金额" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="领取时间">
<template slot-scope="props">{{ props.row.receiveTime | dateFormat }}</template>
</el-table-column>
</el-table>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[8, 10, 50, 100, 200, 400]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</el-main>
</el-container>
</div>
</template>
<script>
// 导入 axios 请求库
import ApiService from '../../api/ApiService'
export default {
name: 'MyRedPackageDetail',
props: ['orderNo', 'communityId', 'postId'],
data() {
return {
csdnRedPackageDetailList: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('redPackagePage')) || 1,
pageSize: 50,
total: 0,
}
},
watch: {
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('redPackagePage', newPage.toString())
},
},
created() {
// 调用请求数据的方法
this.redPackageDetailList()
},
methods: {
goBack() {
// 使用 $router.push() 导航到前一个页面
this.$router.push({
path: '/home/redPackage', // 前一个页面的路径
})
},
// 封装请求列表数据的方法
async redPackageDetailList() {
this.loading = true
const { data: res } = await ApiService.redPackageDetailList(this.currentPage, this.pageSize, this.$route.params.orderNo, this.$route.params.communityId, this.$route.params.postId)
if (res.code === 200) {
this.total = res.result.totalElements
this.csdnRedPackageDetailList = res.result.content
}
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.redPackageDetailList()
},
handleSizeChange(currentSize) {
this.pageSize = currentSize
this.redPackageDetailList()
},
},
}
</script>
<style lang="less" scoped>
.button-container {
position: fixed;
bottom: 0;
right: 0;
margin: 16px;
}
</style>
\ No newline at end of file
...@@ -17,6 +17,7 @@ import MyRedPackage from '@/components/menus/MyRedPackage.vue' ...@@ -17,6 +17,7 @@ import MyRedPackage from '@/components/menus/MyRedPackage.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 MyRedPackageDetail from '@/components/user/MyRedPackageDetail.vue'
import AddChatDetail from '@/components/user/AddChatDetail.vue' import AddChatDetail from '@/components/user/AddChatDetail.vue'
Vue.use(VueRouter) Vue.use(VueRouter)
...@@ -119,6 +120,14 @@ const router = new VueRouter({ ...@@ -119,6 +120,14 @@ const router = new VueRouter({
title: 'chat信息', // 设置默认标题 title: 'chat信息', // 设置默认标题
}, },
}, },
{
path: 'redPackageDetail/:orderNo/:communityId/:postId',
component: MyRedPackageDetail,
props: true,
meta: {
title: '红包详情', // 设置默认标题
},
},
{ {
path: 'addChat', path: 'addChat',
component: AddChatDetail, component: AddChatDetail,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册