整理

上级 604ac946
.login-container[data-v-1be4e8ce]{background-color:#35495e;height:100%}.login-container .login-box[data-v-1be4e8ce]{width:400px;height:250px;background-color:#fff;border-radius:3px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);box-shadow:0 0 6px hsla(0,0%,100%,.5)}.login-container .login-box .form-login[data-v-1be4e8ce]{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box}.form-control[data-v-1be4e8ce]{flex:1}.avatar-box[data-v-1be4e8ce]{position:absolute;width:100%;top:-65px;left:0}.avatar-box .avatar[data-v-1be4e8ce]{width:120px;height:120px;border-radius:50%!important;box-shadow:0 0 6px #efefef}.layout-header-left-img[data-v-5afb0e6e]{height:50px}.layout-aside-container[data-v-5b66f297]{width:200px;height:100%;border-right:1px solid #eaeaea}.left-aside-item[data-v-5b66f297]{font-size:20px}.el-main{padding:20px 3px!important}.el-header[data-v-5503bb7a]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-5503bb7a]{color:#333}.pagination[data-v-5503bb7a]{margin-top:16px;text-align:right}.arrow-button[data-v-5503bb7a]{display:flex;align-items:center;justify-content:center;border:none;background-color:transparent;cursor:pointer}.custom-icon[data-v-5503bb7a]{font-size:24px;color:#f90;margin-right:6px}.arrow-button.disabled[data-v-5503bb7a]{pointer-events:none;opacity:.1}.el-header[data-v-46e73c50]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-46e73c50]{color:#333}.pagination[data-v-46e73c50]{margin-top:16px;text-align:right}.header-button-item[data-v-46e73c50]{margin-right:15px;font-size:20px}.backtop[data-v-46e73c50]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.backtop[data-v-46e73c50]:hover{background-color:#0050a0}.el-header[data-v-a05e897a]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-a05e897a]{color:#333}.pagination[data-v-a05e897a]{margin-top:16px;text-align:right}.header-button-item[data-v-a05e897a]{margin-right:15px;font-size:20px}.red-title[data-v-a05e897a]{line-height:24px;font-size:18px;color:red}.backtop[data-v-a05e897a]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-a05e897a]{width:100%;text-align:left}.backtop[data-v-a05e897a]:hover{background-color:#0050a0}.el-header[data-v-277bc25c]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-277bc25c]{color:#333}.pagination[data-v-277bc25c]{margin-top:16px;text-align:right}.header-button-item[data-v-277bc25c]{margin-right:15px;font-size:20px}.red-title[data-v-277bc25c]{line-height:24px;font-size:18px;color:red}.backtop[data-v-277bc25c]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-277bc25c]{width:100%;text-align:left}.backtop[data-v-277bc25c]:hover{background-color:#0050a0}.el-header[data-v-7f9d4b2f]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-7f9d4b2f]{color:#333}.pagination[data-v-7f9d4b2f]{margin-top:16px;text-align:right}.header-button-item[data-v-7f9d4b2f]{margin-right:15px;font-size:20px}.red-title[data-v-7f9d4b2f]{line-height:24px;font-size:18px;color:red}.backtop[data-v-7f9d4b2f]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-7f9d4b2f]{width:100%;text-align:left}.backtop[data-v-7f9d4b2f]:hover{background-color:#0050a0}.el-header[data-v-5d8ab6e3]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-5d8ab6e3]{color:#333}.pagination[data-v-5d8ab6e3]{margin-top:16px;text-align:right}.header-button-item[data-v-5d8ab6e3]{margin-right:15px;font-size:20px}.red-title[data-v-5d8ab6e3]{line-height:24px;font-size:18px;color:red}.backtop[data-v-5d8ab6e3]{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-5d8ab6e3]{width:100%;text-align:left}.backtop[data-v-5d8ab6e3]: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-24382b29]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-24382b29]{color:#333}.pagination[data-v-24382b29]{margin-top:16px;text-align:right}.header-button-item[data-v-24382b29]{margin-right:15px;font-size:20px}.red-title[data-v-24382b29]{line-height:24px;font-size:18px;color:red}.backtop[data-v-24382b29]{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-24382b29]{width:100%;text-align:left}.backtop[data-v-24382b29]:hover{background-color:#0050a0}.el-header[data-v-5bb1b962]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-5bb1b962]{color:#333}.pagination[data-v-5bb1b962]{margin-top:16px;text-align:right}.header-button-item[data-v-5bb1b962]{margin-right:15px;font-size:20px}.red-title[data-v-5bb1b962]{line-height:24px;font-size:18px;color:red}.backtop[data-v-5bb1b962]{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-5bb1b962]{width:100%;text-align:left}.backtop[data-v-5bb1b962]: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-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-36bb177a]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-36bb177a]{color:#333}.pagination[data-v-36bb177a]{margin-top:16px;text-align:right}.header-button-item[data-v-36bb177a]{margin-right:15px;font-size:20px}.red-title[data-v-36bb177a]{line-height:24px;font-size:18px;color:red}.backtop[data-v-36bb177a]{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-36bb177a]{width:100%;text-align:left}.backtop[data-v-36bb177a]: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-33dea8c5]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-33dea8c5]{color:#333}.pagination[data-v-33dea8c5]{margin-top:16px;text-align:right}.header-button-item[data-v-33dea8c5]{margin-right:15px;font-size:20px}.red-title[data-v-33dea8c5]{line-height:24px;font-size:18px;color:red}.backtop[data-v-33dea8c5]{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-33dea8c5]{width:100%;text-align:left}.backtop[data-v-33dea8c5]:hover{background-color:#0050a0}.el-header[data-v-c811429e]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-c811429e]{color:#333}.pagination[data-v-c811429e]{margin-top:16px;text-align:right}.header-button-item[data-v-c811429e]{margin-right:15px;font-size:20px}.red-title[data-v-c811429e]{line-height:24px;font-size:18px;color:red}.backtop[data-v-c811429e]{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-c811429e]{width:100%;text-align:left}.backtop[data-v-c811429e]:hover{background-color:#0050a0}.el-header[data-v-461f0053]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-461f0053]{color:#333}.pagination[data-v-461f0053]{margin-top:16px;text-align:right}.header-button-item[data-v-461f0053]{margin-right:15px;font-size:20px}.red-title[data-v-461f0053]{line-height:24px;font-size:18px;color:red}.backtop[data-v-461f0053]{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-461f0053]{width:100%;text-align:left}.backtop[data-v-461f0053]:hover{background-color:#0050a0}.button-container[data-v-bdbc2b14]{position:fixed;bottom:0;right:0;margin:16px}.container[data-v-19e0b810]{display:flex;justify-content:center;align-items:center;height:30vh}
/*! /*!
* Bootstrap v4.5.0 (https://getbootstrap.com/) * Bootstrap v4.5.0 (https://getbootstrap.com/)
......
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/kwan.png"><title>kwan</title><link href="/css/app.c5754650.css" rel="preload" as="style"><link href="/css/chunk-vendors.0bfa23eb.css" rel="preload" as="style"><link href="/js/app.45354752.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.c5754650.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.45354752.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.e30453d0.css" rel="preload" as="style"><link href="/css/chunk-vendors.0bfa23eb.css" rel="preload" as="style"><link href="/js/app.bd87eb2c.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.e30453d0.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.bd87eb2c.js"></script></body></html>
\ No newline at end of file \ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -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')
......
<template>
<div>
<el-container>
<el-main>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item>
<el-input size="small" clearable v-model="formInline.nickName" placeholder="请输入用户昵称" @keydown.enter.native="redPackagePage"></el-input>
</el-form-item>
<el-form-item>
<el-input size="small" clearable v-model="formInline.myAmount" placeholder="请输入最小金额" @keydown.enter.native="redPackagePage"></el-input>
</el-form-item>
<el-form-item>
<el-select size="small" v-model="formInline.itemType" placeholder="请选择红包类型" @change="redPackagePage">
<el-option v-for="type in itemType" :key="type" :label="type" :value="type"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-select size="small" v-model="formInline.msg" placeholder="请选择当前状态" @change="redPackagePage">
<el-option v-for="type in msg" :key="type" :label="type" :value="type"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="redPackagePage">查询</el-button>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="prepareGetToday">今日所得</el-button>
<el-dialog v-loading="loading" title="质量分查询" :visible.sync="getTodayDialogVisible" style="width: 100%">
<el-form :model="form" class="custom-form">
<el-row :gutter="20">
<el-col :span="12">
<el-input v-model="form.todayGet" placeholder="今日所得" autocomplete="off"></el-input>
<el-input v-model="form.allGet" placeholder="累计所得" autocomplete="off"></el-input>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="getTodayDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="getToday">查 询</el-button>
</div>
</el-dialog>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="prepareViewCountAll">浏览量</el-button>
<el-dialog title="提示" :visible.sync="viewCountAllDialogVisible" width="30%" :before-close="handleClose">
<span>确认处理浏览量吗?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="viewCountAllDialogVisible = false">取 消</el-button>
<el-button type="primary" @click.prevent="viewCountAll()">确 定</el-button>
</span>
</el-dialog>
</el-form-item>
</el-form>
<el-table ref="multipleTable" v-loading="loading" :data="csdnRedPackageList" tooltip-effect="dark" style="width: 100%">
<el-table-column prop="id" label="序号" width="100" sortable></el-table-column>
<el-table-column prop="nickName" label="用户昵称" show-overflow-tooltip>
<template slot-scope="scope">
<a :href="scope.row.shareUrl" target="_blank">{{ scope.row.nickName }}</a>
</template>
</el-table-column>
<el-table-column prop="viewCount" label="浏览量" show-overflow-tooltip></el-table-column>
<el-table-column prop="itemType" label="类型" show-overflow-tooltip></el-table-column>
<el-table-column prop="myAmount" label="我的金额" show-overflow-tooltip></el-table-column>
<el-table-column prop="myAmount" label="我的金额" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag :type="getTagType(scope.row.myAmount)">{{ scope.row.myAmount }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="msg" label="详情" show-overflow-tooltip></el-table-column>
<el-table-column label="更新时间">
<template slot-scope="props">{{ props.row.updateTime | dateFormat }}</template>
</el-table-column>
<el-table-column prop="操作" label="操作" width="380px">
<template slot-scope="props">
<el-button type="primary" @click="prepareViewCount(props.row.id)" size="small">浏览量</el-button>
<el-dialog title="提示" :visible.sync="viewCountVisible" width="30%" :before-close="handleClose">
<span>确认查询浏览量吗?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="viewCountVisible = false">取 消</el-button>
<el-button type="primary" @click.prevent="dealViewCount(currentRowId)">确 定</el-button>
</span>
</el-dialog>
<!-- <el-button type="danger" @click="prepareDelete(props.row.id)" size="small">删除</el-button>
<el-dialog title="提示" :visible.sync="deleteDialogVisible" width="30%" :before-close="handleClose">
<span>确认删除?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="deleteDialogVisible = false">取 消</el-button>
<el-button type="primary" @click.prevent="onDelete(currentRowId)">确 定</el-button>
</span>
</el-dialog> -->
</template>
</el-table-column>
</el-table>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[8, 50, 100, 200, 400]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</el-main>
<el-backtop class="backtop"></el-backtop>
</el-container>
</div>
</template>
<script>
import axios from 'axios'
export default {
name: 'MyRedPackage',
data() {
return {
form: {
todayGet: '',
allGet: '',
},
formInline: {
nickName: '',
itemType: '',
myAmount: '',
msg: '',
},
itemType: ['全部', 'article', 'blink', 'topic'],
msg: ['全部', 'received', 'completed'],
deleteDialogVisible: false,
viewCountVisible: false,
viewCountAllDialogVisible: false,
getTodayDialogVisible: false,
// 用户列表数据
csdnRedPackageList: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('csdnUserPage')) || 1,
pageSize: 10,
total: 0,
currentRowId: null,
currentUserName: null,
}
},
watch: {
'formInline.userName'(newVal, oldVal) {
if (newVal !== oldVal) {
this.currentPage = 1
localStorage.setItem('csdnUserPage', this.currentPage)
this.redPackagePage()
}
},
'formInline.nickName'(newVal, oldVal) {
if (newVal !== oldVal) {
this.currentPage = 1
localStorage.setItem('csdnUserPage', this.currentPage)
this.redPackagePage()
}
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('csdnUserPage', newPage.toString())
},
},
created() {
//获取问题类型的枚举
this.redPackagePage()
},
mounted() {
this.currentPage = 1
},
methods: {
prepareViewCountAll() {
this.viewCountAllDialogVisible = true
},
prepareGetToday() {
this.form.todayGet = ''
this.form.allGet = ''
this.getTodayDialogVisible = true
},
prepareDelete(id) {
this.currentRowId = id
this.deleteDialogVisible = true
},
prepareViewCount(id) {
this.currentRowId = id
this.viewCountVisible = true
},
handleClose(done) {
this.$confirm('确认关闭?')
.then((_) => {
done()
})
.catch((_) => {})
},
handleConfirm(addType) {
this.dialogFormVisible = 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,
myAmount: this.formInline.myAmount,
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) {
this.loading = true
this.viewCountVisible = false
const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/redPackage/getViewCountById?id=' + id)
if (res.code === 200) {
this.currentRowId = null
this.redPackagePage()
} else {
console.error('Received non-200 status code', res)
}
this.loading = false
},
async viewCountAll() {
this.loading = true
this.viewCountAllDialogVisible = false
const { data: res1 } = await axios.get('http://43.139.90.182:8888/csdn/redPackage/getViewCountAll')
if (res1.code === 200) {
this.redPackagePage()
} else {
console.error('Received non-200 status code', res1)
}
this.loading = false
},
async getToday() {
this.loading = true
// this.getTodayDialogVisible = false
const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/redPackage/getMyAmount')
if (res.code === 200) {
this.form.todayGet = res.result.todayGet
this.form.allGet = res.result.allGet
} else {
console.error('Received non-200 status code', res)
}
this.loading = false
},
async onDelete(id) {
this.loading = true
const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/user/delete', {
params: {
id: id,
},
})
this.deleteDialogVisible = false
this.redPackagePage()
this.loading = false
},
refreshPage() {
//获取问题类型的枚举
this.redPackagePage()
location.reload()
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.redPackagePage()
},
handleSizeChange(currentSize) {
this.pageSize = currentSize
this.redPackagePage()
},
getTagType(myAmount) {
if (myAmount >= 0.2) {
return 'success'
} else if (myAmount < 0.1) {
return 'danger'
}
},
},
}
</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
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
CSDN管理 CSDN管理
</template> </template>
<el-menu-item-group> <el-menu-item-group>
<router-link :to="{ path: '/home/redPackage' }">
<el-menu-item index="/home/redPackage">红包管理</el-menu-item>
</router-link>
<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>
......
...@@ -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 MyMessage from '@/components/menus/MyMessage.vue' import MyMessage from '@/components/menus/MyMessage.vue'
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'
...@@ -38,69 +39,76 @@ const router = new VueRouter({ ...@@ -38,69 +39,76 @@ const router = new VueRouter({
{ {
path: '/home', path: '/home',
component: Home, component: Home,
redirect: '/home/interview', redirect: '/home/redPackage',
children: [ children: [
{ {
path: 'interview', path: 'redPackage',
component: Interview, component: MyRedPackage,
meta: { meta: {
title: '面试题', // 设置默认标题 title: '红包管理', // 设置默认标题
}, },
}, },
{ {
path: 'algorithmic', path: 'csdnUser',
component: Algorithmic, component: MyCsdnUser,
meta: { meta: {
title: '算法题', // 设置默认标题 title: '用户管理', // 设置默认标题
}, },
}, },
{ {
path: 'aphorismpoetry', path: 'tripletDayInfo',
component: AphorismPoetry, component: MyTripletDayInfo,
meta: { meta: {
title: '名言警句', // 设置默认标题 title: '三连管理', // 设置默认标题
}, },
}, },
{ {
path: 'chat', path: 'articleInfo',
component: Chat, component: MyArticleInfo,
meta: { meta: {
title: 'chatgpt记录', // 设置默认标题 title: '文章管理', // 设置默认标题
}, },
}, },
{ {
path: 'pic', path: 'message',
component: Pic, component: MyMessage,
meta: { meta: {
title: '图片', // 设置默认标题 title: '私信管理', // 设置默认标题
}, },
}, },
{ {
path: 'csdnUser', path: 'interview',
component: MyCsdnUser, component: Interview,
meta: { meta: {
title: '用户管理', // 设置默认标题 title: '面试题', // 设置默认标题
}, },
}, },
{ {
path: 'tripletDayInfo', path: 'algorithmic',
component: MyTripletDayInfo, component: Algorithmic,
meta: { meta: {
title: '三连管理', // 设置默认标题 title: '算法题', // 设置默认标题
}, },
}, },
{ {
path: 'articleInfo', path: 'aphorismpoetry',
component: MyArticleInfo, component: AphorismPoetry,
meta: { meta: {
title: '文章管理', // 设置默认标题 title: '名言警句', // 设置默认标题
}, },
}, },
{ {
path: 'message', path: 'chat',
component: MyMessage, component: Chat,
meta: { meta: {
title: '私信管理', // 设置默认标题 title: 'chatgpt记录', // 设置默认标题
},
},
{
path: 'pic',
component: Pic,
meta: {
title: '图片', // 设置默认标题
}, },
}, },
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册