整理

上级 967904f2
.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-730b29cc],.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}
.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-e96f312a]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-e96f312a]{color:#333}.pagination[data-v-e96f312a]{margin-top:16px;text-align:right}.header-button-item[data-v-e96f312a]{margin-right:15px;font-size:20px}.red-title[data-v-e96f312a]{line-height:24px;font-size:18px;color:red}.backtop[data-v-e96f312a]{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-e96f312a]{width:100%;text-align:left}.backtop[data-v-e96f312a]: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-4ba2a316],.button-container[data-v-6f0d75be]{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/)
......
<!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.51557fe1.css" rel="preload" as="style"><link href="/css/chunk-vendors.0bfa23eb.css" rel="preload" as="style"><link href="/js/app.01c3aeb5.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.51557fe1.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.01c3aeb5.js"></script></body></html>
\ No newline at end of file
<!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.50463e21.css" rel="preload" as="style"><link href="/css/chunk-vendors.0bfa23eb.css" rel="preload" as="style"><link href="/js/app.2990a030.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.50463e21.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.2990a030.js"></script></body></html>
\ No newline at end of file
因为 它太大了无法显示 source diff 。你可以改为 查看blob
因为 它太大了无法显示 source diff 。你可以改为 查看blob
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -14,6 +14,12 @@ const ApiService = {
async resetLikes() {
return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/fixLikesStatus')
},
async getTodayRedPackageDetailInfo() {
return await axios.get('http://43.139.90.182:8888/csdn/redPackage/detail/getTodayRedPackageDetailInfo')
},
async syncDetailInfo(id) {
return await axios.get('http://43.139.90.182:8888/csdn/redPackage/detail/syncDetailInfo?id=' + id)
},
async allTriplet(articleIds) {
return await axios.post('http://43.139.90.182:8888/csdnArticleInfo/multiTriplet', articleIds)
},
......
......@@ -70,7 +70,7 @@
<span>确认同步红包详情吗?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="detailsInfoDialogVisible = false">取 消</el-button>
<el-button type="primary" @click.prevent="detailsInfo()">确 定</el-button>
<el-button type="primary" @click.prevent="getTodayRedPackageDetailInfo()">确 定</el-button>
</span>
</el-dialog>
</el-form-item>
......@@ -113,7 +113,7 @@
<el-button size="small" type="success" @click="dealViewCount(props.row.id)">浏览量</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)">编辑</el-button>
<el-button size="small" type="success" @click.prevent="gotoDetail(props.row.orderNo, props.row.communityId, props.row.postId)">详情</el-button>
<el-button size="small" type="success" @click.prevent="gotoDetail(props.row.id, props.row.orderNo, props.row.communityId, props.row.postId)">详情</el-button>
<el-dialog title="编辑红包信息" :visible.sync="editVisible" style="width: 100%">
<el-form :model="form" class="custom-form">
<el-form-item label="用户名称" class="form-item">
......@@ -201,10 +201,18 @@ export default {
},
created() {
//获取问题类型的枚举
this.redPackagePage()
this.$nextTick(() => {
const foo = this.$route.query.back
if (foo === 'back') {
this.currentPage = Number(localStorage.getItem('redPackagePage')) || 1
}
// 调用请求数据的方法
this.redPackagePage()
})
},
mounted() {
this.currentPage = 1
this.currentPage = Number(localStorage.getItem('redPackagePage')) || 1
this.elementui_page_component_key++
},
methods: {
prepareViewCountAll() {
......@@ -230,9 +238,8 @@ export default {
this.currentRowId = id
this.editVisible = true
},
gotoDetail(orderNo, communityId, postId) {
this.$router.push(`/home/redPackageDetail/${orderNo}/${communityId}/${postId}`)
// this.$router.push('/home/redPackageDetail/' + orderNo)
gotoDetail(id, orderNo, communityId, postId) {
this.$router.push(`/home/redPackageDetail/${id}/${orderNo}/${communityId}/${postId}`)
},
handleClose(done) {
this.$confirm('确认关闭?')
......@@ -270,7 +277,7 @@ export default {
async syncDetailInfo(id) {
this.loading = true
const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/redPackage/detail/syncDetailInfo?id=' + id)
const { data: res } = await ApiService.syncDetailInfo(id)
if (res.code === 200) {
this.redPackagePage()
} else {
......@@ -279,10 +286,10 @@ export default {
this.loading = false
},
async detailsInfo() {
async getTodayRedPackageDetailInfo() {
this.loading = true
this.detailsInfoDialogVisible = false
const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/redPackage/detail/getTodayRedPackageDetailInfo')
const { data: res } = await ApiService.getTodayRedPackageDetailInfo()
if (res.code === 200) {
this.redPackagePage()
} else {
......
......@@ -54,7 +54,6 @@ export default {
const params = {
// 参数名: 参数值
back: 'back',
// baz: "qux",
}
// 使用 $router.push() 导航到前一个页面
......
......@@ -4,6 +4,11 @@
<h4 class="text-center">红包订单号{{ orderNo }}领取详情</h4>
<el-container>
<el-main>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item>
<el-button size="small" type="primary" @click="syncDetailInfo">同步详情</el-button>
</el-form-item>
</el-form>
<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>
......@@ -13,6 +18,12 @@
<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 prop="luckyName" label="幸运王" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag :type="getTagType(scope.row.luckyName)">{{ scope.row.luckyName }}</el-tag>
</template>
</el-table-column>
<el-table-column label="领取时间">
<template slot-scope="props">{{ props.row.receiveTime | dateFormat }}</template>
</el-table-column>
......@@ -27,49 +38,77 @@
import ApiService from '../../api/ApiService'
export default {
name: 'MyRedPackageDetail',
props: ['orderNo', 'communityId', 'postId'],
props: ['id', 'orderNo', 'communityId', 'postId'],
data() {
return {
csdnRedPackageDetailList: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('redPackagePageDetail')) || 1,
currentPage: 1,
pageSize: 50,
total: 0,
allOptions: [
{
type: 0,
name: '',
},
{
type: 1,
name: '',
},
],
}
},
watch: {
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('redPackagePageDetail', newPage.toString())
},
},
created() {
// 调用请求数据的方法
this.redPackageDetailList()
},
mounted() {
this.currentPage = 1
localStorage.setItem('redPackagePageDetail', this.currentPage)
this.pageSize = 50
},
methods: {
goBack() {
// 传递参数到前一个页面
const params = {
// 参数名: 参数值
back: 'back',
}
// 使用 $router.push() 导航到前一个页面
this.$router.push({
path: '/home/redPackage', // 前一个页面的路径
query: params, // 参数对象
})
},
// 封装请求列表数据的方法
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
const userWeightMap = {}
this.allOptions.forEach((option) => {
userWeightMap[option.type] = option.name
})
res.result.content.forEach((item) => {
item.luckyName = userWeightMap[item.lucky]
})
this.csdnRedPackageDetailList = res.result.content
}
this.loading = false
},
async syncDetailInfo() {
this.loading = true
const { data: res } = await ApiService.syncDetailInfo(this.$route.params.id)
if (res.code === 200) {
this.redPackageDetailList()
}
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.redPackageDetailList()
......@@ -78,6 +117,13 @@ export default {
this.pageSize = currentSize
this.redPackageDetailList()
},
getTagType(luckyName) {
if (luckyName == '') {
return 'danger'
} else {
return 'success'
}
},
},
}
</script>
......
......@@ -121,7 +121,7 @@ const router = new VueRouter({
},
},
{
path: 'redPackageDetail/:orderNo/:communityId/:postId',
path: 'redPackageDetail/:id/:orderNo/:communityId/:postId',
component: MyRedPackageDetail,
props: true,
meta: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册