Compare commits

...

No commits in common. 'master' and 'main' have entirely different histories.
master ... main

@ -1,4 +0,0 @@
> 1%
last 2 versions
not dead

@ -1,6 +0,0 @@
[*.{js,jsx,ts,tsx,vue}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true

@ -1,17 +0,0 @@
module.exports = {
root: true,
env: {
node: true
},
extends: [
'plugin:vue/essential'
],
parserOptions: {
parser: 'babel-eslint'
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
}
}

24
.gitignore vendored

@ -1,24 +0,0 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

@ -1,202 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

@ -1,11 +1,2 @@
## 技术栈 # DDI2
前端技术Vue2博客系统Vue3IM 聊天室系统Element UIVue2Element-Plus UIVue3Naive UIVue3
后端技术JavaSpring Bootspring-boot-starter-mailMysqlMybatis-Plust-ioqiniu-java-sdk
## 网站简介
这是一个 Spring Boot + Vue2 + Vue3 的产物。
网站分两个模块:
- 博客系统:具有文章,留言,友链,时间线,后台管理等功能。
- 聊天室系统:具有朋友圈(时间线),好友,群等功能。

@ -1,15 +0,0 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
],
plugins: [
[
'component',
{
libraryName: 'element-ui',
styleLibraryName: 'theme-chalk'
}
]
]
}

@ -1,43 +0,0 @@
{
"name": "poetry-ui",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@achrinza/node-ipc": "^10.1.10",
"axios": "^0.21.1",
"core-js": "^3.6.5",
"crypto-js": "^4.1.1",
"element-ui": "^2.4.5",
"markdown-it": "^12.2.0",
"mavon-editor": "^2.9.1",
"qs": "^6.10.3",
"vue": "^2.6.11",
"vue-baberrage": "^3.2.4",
"vue-router": "^3.2.0",
"vue-seamless-scroll": "^1.1.23",
"vuex": "^3.4.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-standard": "^5.1.2",
"babel-eslint": "^10.1.0",
"babel-plugin-component": "^1.1.1",
"eslint": "^6.7.2",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^6.2.2",
"vue-cli-plugin-element": "^1.0.1",
"vue-template-compiler": "^2.6.11"
}
}

@ -1,29 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="icon" href="./poetize.jpg" sizes="16x16">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>药药相互</title>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/animejs/2.2.0/anime.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/highlight.js/11.2.0/highlight.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/wow/1.1.2/wow.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/highlightjs-line-numbers.js/2.8.0/highlightjs-line-numbers.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/clipboard.js/2.0.8/clipboard.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/qiniu-js/3.4.0/qiniu.min.js"></script>
<style>
body {
margin: 0;
}
</style>
</head>
<body>
<div id="app"></div>
</body>
<script>
new WOW().init();
</script>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

@ -1,32 +0,0 @@
<template>
<div id="app">
<router-view/>
</div>
</template>
<script>
export default {
data() {
return {}
},
computed: {},
watch: {},
created() {
},
mounted() {
},
methods: {}
}
</script>
<style scoped>
</style>

@ -1,211 +0,0 @@
/* 以my-animation-开头的class */
[class*=my-animation-] {
animation-duration: 1s;
animation-timing-function: ease-out;
animation-fill-mode: both;
}
.my-animation-slide-top {
animation-name: slide-top
}
.my-animation-slide-bottom {
animation-name: slide-bottom
}
.my-animation-hideToShow {
animation-name: hideToShow
}
/* 上移 */
@keyframes slide-top {
0% {
opacity: 0;
transform: translateY(-20%)
}
100% {
opacity: 1;
transform: translateY(0)
}
}
/* 下移 */
@keyframes slide-bottom {
0% {
opacity: 0;
transform: translateY(20%)
}
100% {
opacity: 1;
transform: translateY(0)
}
}
/* 首图动画:下移 */
@keyframes header-effect {
0% {
opacity: 0;
transform: translateY(-50px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
/* 旋转 */
@keyframes rotate {
0% {
opacity: 1;
transform: rotate(0deg);
}
100% {
opacity: 1;
transform: rotate(360deg);
}
}
/* 显示 */
@keyframes hideToShow {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* 下移 */
@keyframes my-shake {
0% {
opacity: 1;
transform: translateY(0px);
}
30% {
opacity: 0.5;
transform: translateY(25px);
}
100% {
opacity: 1;
transform: translateY(0px);
}
}
/* 上移 */
@keyframes scatter {
0% {
top: 0;
}
50% {
top: -15px;
}
100% {
top: 0;
}
}
/* 放大 */
@keyframes scale {
0% {
transform: scale(1);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(1);
}
}
/* 放大 */
@keyframes imgScale {
0% {
transform: scale(0.8, 0.8);
}
70% {
transform: scale(1.3, 1.3);
}
100% {
transform: scale(0.8, 0.8);
}
}
/* 渐变 */
@keyframes jianBian {
to {
background-position: -2000rem;
}
}
/* 背景位置移动 */
@keyframes gradientBG {
0% {
background-position: 0 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0 50%;
}
}
/* 阴影变化 */
@keyframes weiYanShadowFlashing {
0% {
box-shadow: none;
}
50% {
box-shadow: 0 0 15px var(--red);
}
100% {
box-shadow: none;
}
}
/* 有小变大 */
@keyframes zoomIn {
0% {
opacity: 0;
transform: scale3d(.3, .3, .3);
}
50% {
opacity: 1;
}
}
/* 由左开向右 */
@keyframes passing {
0% {
transform: translateX(-150%);
opacity: 0
}
50% {
transform: translateX(0);
opacity: 1
}
100% {
transform: translateX(150%);
opacity: 0
}
}

@ -1,88 +0,0 @@
:root {
/* 背景 */
--background: white;
--gradualBackground: linear-gradient(to right bottom, #ee7752, #e73c7e, #23a6d5, #23d5ab);
--favoriteBg: #f7f9fe;
/* 字体 */
--fontColor: black;
/* 边框 */
--borderColor: rgba(0, 0, 0, 0.5);
/* 边框 */
--borderHoverColor: rgba(110, 110, 110, 0.4);
/* 文章字体 */
--articleFontColor: #1f1f1f;
/* 文章灰色字体 */
--articleGreyFontColor: #616161;
/* 评论背景颜色 */
--commentContent: #F7F9FE;
/* 主题背景 */
--themeBackground: orange;
/* 主题悬停背景 */
--gradualRed: linear-gradient(to right, #ff4b2b, #ff416c);
/* 导航栏字体 */
--toolbarFont: #333333;
/* 导航栏背景 */
--toolbarBackground: rgba(255, 255, 255, 1);
/* 灰色字体 */
--greyFont: #797979;
--maxGreyFont: #595A5A;
/* footer背景 */
--gradientBG: linear-gradient(-90deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
/* 白色遮罩 */
--whiteMask: rgba(255, 255, 255, 0.3);
/* max白色遮罩 */
--maxWhiteMask: rgba(255, 255, 255, 0.5);
--maxMaxWhiteMask: rgba(255, 255, 255, 0.7);
/* mini白色遮罩 */
--miniWhiteMask: rgba(255, 255, 255, 0.15);
/* 透明 */
--transparent: rgba(0, 0, 0, 0);
/* mini黑色遮罩 */
--miniMask: rgba(0, 0, 0, 0.15);
/* 黑色遮罩 */
--mask: rgba(0, 0, 0, 0.3);
/* 半透明 */
--translucent: rgba(0, 0, 0, 0.5);
/* 深黑遮罩 */
--maxMask: rgba(0, 0, 0, 0.7);
--white: white;
--red: red;
--lightRed: #ff4b2b;
--maxLightRed: #ff416c;
--orangeRed: #EF794F;
--azure: #ECF7FE;
--blue: rgb(3, 169, 244);
--lightGray: #DDDDDD;
--maxLightGray: #EEEEEE;
--maxMaxLightGray: rgba(242, 242, 242, 0.5);
--lightGreen: #39c5bb;
--green: #67C23A;
--black: black;
--lightYellow: #F4E1C0;
--globalFont: SmileySans;
--commentURL: url(../file/comment.jpg);
--springBg: url(../file/bg1.jpg);
--admireImage: url(../file/bg2.jpg);
--toTop: url(../file/top.jpg);
--bannerWave1: url(../file/bannerwave1.png) repeat-x;
--bannerWave2: url(../file/bannerwave2.png) repeat-x;
--verifyImage: url(../file/bg1.jpg);
--toolbar: url(../file/bg.jpg);
--love: url(../file/bg.jpg);
}

File diff suppressed because one or more lines are too long

@ -1,334 +0,0 @@
/* 通用css */
* {
box-sizing: border-box;
}
body {
color: var(--fontColor);
font-family: var(--globalFont), serif;
word-break: break-word;
}
@font-face {
font-family: SmileySans;
src: url(../fonts/SmileySans.otf);
font-display: swap;
}
/* 图片 */
.background-image {
width: 100vw;
height: 100vh;
/* 固定位置,不随滚动条滚动 */
position: fixed;
z-index: -1;
}
.background-image::before {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .2);
content: '';
}
.background-image-error {
background-color: var(--lightGreen);
width: 100vw;
height: 100vh;
/* 固定位置,不随滚动条滚动 */
position: fixed;
z-index: -1;
}
/* 模块化背景色及透明度 */
.background-opacity {
background-color: var(--background);
opacity: 0.88;
}
.my-el-image {
width: 100%;
height: 100%;
}
.my-el-image .image-slot {
width: 100%;
height: 100%;
}
/* 遮罩 */
.poem-image::before {
position: absolute;
width: 100%;
height: 100%;
background-color: var(--translucent);
content: "";
}
.user-avatar {
cursor: pointer;
transition: all 0.3s;
user-select: none;
}
.user-avatar:hover {
transform: rotate(360deg);
}
/* 滚动条 */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background-color: rgba(73, 177, 245, 0.2);
}
::-webkit-scrollbar-thumb {
background-color: #49b1f5;
background-image: linear-gradient(
45deg,
rgba(255, 255, 255, 0.4) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, 0.4) 50%,
rgba(255, 255, 255, 0.4) 75%,
transparent 75%,
transparent
);
border-radius: 1em;
}
.el-select-dropdown.el-popper ::-webkit-scrollbar {
display: none;
}
/* 选中样式 */
::selection {
background: var(--lightYellow);
color: var(--black);
}
/* 居中 */
.myCenter {
display: flex;
justify-content: center;
align-items: center;
}
.transformCenter {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
/* 两边 */
.myBetween {
display: flex;
justify-content: space-between;
align-items: center;
}
/* 阴影 */
.shadow-box-mini {
box-shadow: 1px 1px 3px var(--mask);
}
.shadow-box {
box-shadow: 0 1px 20px -6px var(--borderColor);
transition: all 0.3s ease;
}
.shadow-box:hover {
box-shadow: 0 5px 10px 5px var(--borderHoverColor);
}
/* el弹出框样式 */
.el-message {
top: 80px !important;
border: 0;
}
.el-message * {
color: var(--white) !important;
font-weight: 600;
}
.el-message--success {
background: var(--themeBackground);
}
.el-message--warning {
background: var(--gradientBG);
}
.el-message--error {
background: var(--gradualRed);
}
/* 看板娘 */
#waifu-toggle, #waifu {
z-index: 100;
}
#waifu-tips {
border: unset;
animation: unset;
width: 200px;
min-height: 60px;
}
#waifu-tool {
right: -10px;
bottom: 20px;
top: unset;
}
#waifu #live2d {
height: 250px;
width: 250px;
}
/* 图标旋转 */
.iconRotate {
animation: rotate 2s linear infinite;
}
/* 树洞留言 */
.baberrage-item .baberrage-msg {
padding-right: 5px;
}
.baberrage-item .normal .baberrage-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
.el-upload.el-upload--picture, .el-upload.el-upload--text {
width: 100%;
}
.el-upload-dragger {
width: 100% !important;
height: 100px !important;
}
/* 导航栏 */
.toolbarDrawer {
position: relative;
background: var(--toolbar) center center / cover no-repeat;
letter-spacing: 3px;
}
.toolbarDrawer .el-drawer__header {
font-size: 22px;
color: var(--white);
text-align: center;
position: relative;
}
.toolbarDrawer::before {
position: absolute;
width: 100%;
height: 100%;
background-color: var(--maxMask);
content: "";
}
.small-menu {
color: var(--white);
font-size: 20px;
user-select: none;
position: relative;
}
.small-menu > li {
list-style: none;
height: 50px;
line-height: 50px;
cursor: pointer;
}
.el-tooltip__popper.is-light {
background: var(--lightGreen);
border-radius: 10px;
color: var(--white);
padding: 12px 20px;
letter-spacing: 1px;
font-weight: 600;
line-height: 1.5;
font-size: 1.2rem;
border: unset;
}
.el-tooltip__popper .popper__arrow {
border-style: unset;
}
@media screen and (max-width: 800px) {
.el-dialog {
width: 70% !important;
}
}
@media screen and (max-width: 600px) {
.el-dialog {
width: 80% !important;
}
}
@media screen and (max-width: 400px) {
.el-dialog {
width: 90% !important;
}
}
/* 背景*/
.dark-mode-sky,
.dark-mode-sky::before{
content: "";
position: fixed;
width: 100vw;
height: 100vh;
/* 固定位置,不随滚动条滚动 */
position: fixed;
z-index: -1;
transition: 2s ease all;
}
.dark-mode-sky{
background: linear-gradient(#fcd5ce,#f8edeb);
}
.dark-mode-sky::before{
opacity: 0;
background: linear-gradient(#001233,#002855,#0466c8);
}
.dark-mode .dark-mode-sky::before{
opacity: 1;
}
/*日月*/
.dark-mode-planet {
z-index: 19999999999;
position: fixed;
left: -50%;
top: -50%;
width: 200%;
height: 200%;
transition: 2s cubic-bezier(.7,0,0,1) all;
transform-origin: center bottom;
}
.dark-mode-planet::after{
position: absolute;
left: 35%;
top: 40%;
width: 150px;
height: 150px;
border-radius: 50%;
content: "";
background: linear-gradient(#ffffff,#f1f3b7);
}

@ -1,380 +0,0 @@
/* markdown样式 */
.entry-content {
position: relative;
}
.entry-content blockquote {
margin: 0;
padding: 15px 50px;
position: relative;
word-break: break-word;
text-align: center;
}
.entry-content blockquote:before {
content: "\f10d";
font-size: 1.5rem;
position: absolute;
top: 0;
left: 0;
color: orange;
font-family: FontAwesome;
}
.entry-content blockquote:after {
content: '\f10e';
font-size: 1.5rem;
position: absolute;
bottom: 0;
right: 0;
color: orange;
font-family: FontAwesome;
}
.entry-content code:not(.hljs) {
background: #fefac7;
color: #e67474;
word-break: break-word;
padding: 4px 6px;
border-radius: 5px;
}
.entry-content ul {
list-style: disc;
padding: 0 10px 0 35px;
color: var(--articleGreyFontColor);
border-radius: 10px;
}
.entry-content ol {
list-style: decimal;
padding: 0 10px 0 35px;
color: var(--articleGreyFontColor);
border-radius: 10px;
}
.entry-content ol li,
.entry-content ul li {
padding: 8px 0;
Letter-spacing: 1px;
line-height: 24px;
}
.entry-content h3 {
padding-bottom: 8px;
border-bottom: 1px dashed #ddd;
}
.entry-content h1,
.entry-content h2,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
margin-top: 30px;
margin-bottom: 20px;
}
.entry-content h2 {
padding-left: 40px;
}
.entry-content h3 {
padding-left: 20px;
font-size: 22px;
}
.entry-content h4 {
padding-left: 20px;
font-size: 20px;
}
.entry-content h5 {
font-size: 18px;
padding-left: 28px;
}
.entry-content h2:before {
content: "🌺";
position: absolute;
left: 0;
font-size: 1.03em;
margin-top: -2px;
}
.entry-content h3:before {
content: "#";
left: 0;
position: absolute;
margin-top: 2px;
color: #ff6d6d;
}
.entry-content h4:before {
content: "▌";
left: 0;
position: absolute;
color: #ff6d6d;
}
.entry-content h5:before {
content: "🌷";
left: 0;
position: absolute;
}
.entry-content a {
color: #e67474;
position: relative;
text-decoration: none;
}
.entry-content a:hover {
color: orange;
}
.entry-content a:after {
content: '';
position: absolute;
width: 100%;
transform: scaleX(0);
height: 1.5px;
bottom: -2px;
left: 0;
background-color: orange;
transform-origin: bottom right;
transition: transform 0.25s ease-out;
}
.entry-content a:hover:after {
transform: scaleX(1);
transform-origin: bottom left;
}
.entry-content p {
color: var(--articleFontColor);
line-height: 35px;
word-break: break-word;
font-size: 18px;
}
.entry-content hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0.5px dashed #fc625d;
}
.entry-content img {
max-width: 100%;
border-radius: 5px;
}
/* 高亮代码块 */
.highlight-wrap {
position: relative;
background: #21252b;
border-radius: 5px;
font: 15px/22px "Microsoft YaHei", "Arial";
line-height: 1.6;
margin-bottom: 1.6em;
width: 100%;
padding-top: 30px;
box-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.4);
}
.highlight-wrap:before {
content: "";
position: absolute;
border-radius: 50%;
background: #fc625d;
width: 12px;
height: 12px;
left: 12px;
margin-top: -18px;
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
z-index: 2;
}
.highlight-wrap .copy-code {
color: #fff;
position: absolute;
right: 10px;
top: 5px;
font-size: 16px;
z-index: 2;
}
.highlight-wrap .copy-code:hover {
color: rgba(255, 255, 255, 0.5);
}
.highlight-wrap code::-webkit-scrollbar {
height: 6px;
width: 6px;
}
.highlight-wrap code {
word-break: break-word;
border-radius: 0 0 5px 5px;
}
.highlight-wrap code[data-rel]:before {
color: #fff;
content: attr(data-rel);
height: 30px;
line-height: 23px;
background: #21252b;
font-size: 16px;
position: absolute;
left: 0;
margin-top: -30px;
width: 100%;
font-family: Ubuntu;
font-weight: 700;
text-align: center;
pointer-events: none;
z-index: 1;
}
.hljs {
color: #a9b7c6;
background: #1d1f21;
display: block;
overflow-x: auto;
padding: 0.5em;
}
.hljs-ln-line span::selection,
.hljs-ln-line::selection {
background: #fff;
color: #21252b;
}
.hljs-ln {
margin: 6px 0 0;
width: 100%;
}
.hljs-ln-line.hljs-ln-code {
padding-left: 25px;
padding-right: 10px;
}
.hljs-ln-line.hljs-ln-code:hover {
background-color: rgba(255, 255, 255, 0.1);
}
.hljs-ln-line.hljs-ln-numbers {
user-select: none;
text-align: center;
color: #888f96;
position: absolute;
left: 0;
width: 30px;
background: #1d1f21;
}
.hljs-comment,
.hljs-quote {
color: #888f96;
font-style: italic;
}
.hljs-doctag,
.hljs-formula,
.hljs-keyword {
color: #c678dd;
}
.hljs-deletion,
.hljs-name,
.hljs-section,
.hljs-selector-tag,
.hljs-subst {
color: #e06c75;
}
.hljs-literal {
color: #56b6c2;
}
.hljs-addition,
.hljs-attribute,
.hljs-meta-string,
.hljs-regexp,
.hljs-string {
color: #98c379;
}
.hljs-built_in,
.hljs-class .hljs-title {
color: #e6c07b;
}
.hljs-attr,
.hljs-number,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-pseudo,
.hljs-template-variable,
.hljs-type,
.hljs-variable {
color: #d19a66;
}
.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-symbol,
.hljs-title {
color: #61aeee;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: 700;
}
.hljs-link {
text-decoration: underline;
}
/* 表格 */
.table-wrapper::-webkit-scrollbar {
height: 6px;
width: 6px;
}
.table-wrapper > table {
border-collapse: collapse;
}
.table-wrapper > table th {
background-color: rgba(0, 0, 0, 0.1);
}
.table-wrapper > table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.table-wrapper > table td,
.table-wrapper > table th {
padding: 8px 16px;
border: 1px solid #dfe2e5;
line-height: 1.5;
font-size: 90%;
text-align: center;
}
.table-wrapper > table tbody > tr {
transition: all 0.28s ease;
}
.table-wrapper > table tbody > tr:hover {
background-color: rgba(0, 0, 0, 0.2);
}

@ -1,66 +0,0 @@
.toc {
overflow-y: auto;
width: 150px;
max-height: 300px;
position: fixed;
top: 50vh;
right: 50px;
background: var(--background);
border-radius: 5px;
z-index: 100;
transition: all 1s;
}
.toc::-webkit-scrollbar {
display: none;
}
.toc > .toc-list {
overflow: hidden;
position: relative;
}
.toc > .toc-list li {
list-style: none;
}
.toc .toc-list {
margin: 0;
padding: 4px 4px 4px 10px;
}
.toc a.toc-link {
color: currentColor;
height: 100%;
text-decoration: none;
}
.toc .is-collapsible {
max-height: 1000px;
overflow: hidden;
transition: all 300ms ease-in-out;
}
.toc .is-collapsed {
max-height: 0;
}
.toc .is-active-link {
font-weight: 700;
color: var(--green) !important;
}
.toc .toc-link::before {
background-color: #EEE;
content: ' ';
display: inline-block;
height: inherit;
left: 0;
margin-top: -1px;
position: absolute;
width: 2px;
}
.toc .is-active-link::before {
background-color: var(--green);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 893 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 555 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

@ -1,113 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" width="200px" height="200px" viewBox="0 0 200 200" enable-background="new 0 0 200 200"
xml:space="preserve">
<image id="image0" width="200" height="200" x="0" y="0"
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAABGdBTUEAALGPC/xhBQAAACBjSFJN
AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAW
j0lEQVR42u3df3gcdZ0H8PdndpNNaJNN2t1trfwQFRFOFA9F2zRQjyKCFBFNggUUnhM88TnQBk9o
NrAlP1oOw6NyDzyHx8lxCk0X8XmEE44D6dEkpUK9U4RTqFBQ2iabNNlNodlk5/u5P0gxLbub3WRm
vzOzn9fz8PB0Z3fmPZN973d2d3aGILTYODZWb05iNYiuAKiaYW5oD9dv1Z1LHM7QHaBcmRnjOhBt
AXAuwKsIxpPdidT5unOJw0lBdGG+7MibFHCV7ljicFIQDToSo6sAHPPOKbxGdzZxOCmIEHlIQYTI
QwoiRB5SECHykIIIkYcURIg8pCBC5CEFESIPv+4A8xV7/vlKLF0aqVC+SFu47te685SLW/ftWzBZ
ueD4qUkMxZbWDOnOYxdXjyCxfeMRf+ToHX7l/xODdnYmkps3vjpWrzuX13UPJz+R9lf/kk31nN+n
BjuHUz/Snckuri5IhY9/CODUGTe1ZKrxROwVrtKdzau6R1LLFeNpME5/+0bmyzuHU126s9nB1QVh
cOORtxHRRysWJFt1Z/Mqxci1bU/Qnc0Ori4IAS9nu52JWruHUx/UnS+X9nD9VhB2v2N9mB7UnS2f
mxPJtWD+QtaJzK/rzmcHVxcEhKdzTKnP80rnCEqpDUfeVp2uuVR3rlx+8BIHfMC6XNOZ+Xe6M9rB
1QVRfu4BsC/7VP5qx0jyM7oz5nJjpP4eA3QigXpAdEM0HKR1x9BB3blySQWTrQycln0q/aI9Une3
7ox2IN0B5qszkboO4FtzrN3j0VDwbN0Z3a4jkToR4AECFmWbbpq8+qaldU/ozmkHV48gANAWqukB
59jVYqzuGBz7uu6MbkdQrbnKAcIdXi0H4IGCEBEzuCfnChq0LrZvPKI7p1t1jSTPAejKHJMHff5A
T1EzdBnXFwQA2iN1DzDz5mzTGHi/32c6+g27k7GZ+8MOAvXcUFf1cjHzcxtPFAQAiNADoskcU1s7
h5OnFzdH0Z0Y/xoIWd/DMbBjKlTj6dED8FBBouG6ZwnI9QfzscM/9nWa7r3jYQWVe/Rg7okRKd05
7eaZggDA1OSB2wC8mG0aAc2xZHJRkbMsW8pnrkLOb8e5Nxqpi+vOWAqeKkhs2bJhgpFz2K/MGEt1
Z3QLMijrtiKiKUXk+V2rQzxVEABoC9fcBcZj75jAGM5kMhW687lIMtuNSqnbbgwFn9EdrlQ8VxAA
IPJfDqKfHnabgdYbl9T/Rnc2t2gLBe8lwvcPu5FpU3uk7nrd2UrJ9d+k59MxOBqD4d/rA7++Plz7
sO48btQ5NNY0vbs12hYK/lh3HiGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCePv3IIVKrfpS
qHIqs1gZFOIpOmgYUyPjlb6RyNb4Ad3ZrDS2cm19lTIXGT7f4kxmCoavYvjNg1Mji3bGk/OfuzeV
VUHebGxuIEXnE9AIIARg8fT/c0kDGAFhBIwREOLM6uHq/vhrutcl73oubzrd5zMuYMYqAIsZWEyM
xaCcvyCdAmgY4BEAw2D+GUD/UTXQ+0fd66LbnArSNXhgCRvm3QBWEPAyCE8rP/e019W9onuFZhpa
1bRw4RSdZ4A+DeDTAI6xaNZbQfxwBvT4wr5eR/yMd6Kh5VwAh/57vxXzJKJfgfGwgvlkdX+8T/c6
HqlzaPwMItXKwIkATiTm9W2Ruo1WLqPogsSYK/2J5DMg+vARk/YB1NMWqukhIta54dKNX/owK3U1
gC8g/wgxbwzsIMK/VvX13lXq9eTGS981YU5+jYgugUWlyOMPBPpJuoLurN16/3Cp13Wmm/bvP7Yi
42sF4Zosk++PhoNrrVpW0QXZtP/gsRlz8tWcd2A8zeCe9kjdA6XZXH8xccbaE2CaVxPwdQYCJV78
ThDuKkVRZhTjSgDLSryeryjgzuoFlXfQY//+RomXjY7E6LcM8q1j5qOzTSfQi23h2hOtWl7RBbl5
X/IThi/nhWvexsybidATDdc9a+8mA9484+JjyMTXiflqEIJ2L28WthVFczGO9AKAOwNnn3QHxWK2
n2Gxezh14VsXReKV+e9JE9FwbbVVy53Te5DORHIzgJbZ506TBPRMTR64LbZsmS3D8sEVF18O4o0E
OO2kcDuZ6Lrqvs1brZhZekXzpUx0C/QX4zAE7GTi66v6tjxux/y7hg6cqshsJaCgq28x4/b2SPCa
Qu5b4PoVb+OrY/WZajxBRB8t8CEvEoyetnCNpa+q6YbmGxjUbeU8LXaQgWuq+3v/ZT4zmVjRfA2I
vj+fediKoUBorerv/Z5Vs4yNjtb5TaMVzK0AFTwiRMNBSz+ZnfPMYq9wVcWCZCsTtQIo7NrkjMeI
/Je3hRfsnW/wiYaWHwL4qpUbwy4E2hjo37x+Lo9Nr2i+iYliutehQHdX9ffO+2/SlUh+loFbAZxU
6GOY+Or2UN2dVq/QvNvWPZz64PS+YWEbhuin0VDtF+e6PD79y4vTFemdAI6zemPYiYB7A/29Xynm
MRMrWx4F4xzd2Ytczx2B/t5PzvXxnXtGj+MK4ykCji3oAUybopHaG2xcH2t0jCQ/Q4xWMFbPuk5K
bWhfUh8rdhlvrmhabpAxYNfGsB3jiaqB3tm3T1OTL73H2A+gVnfkOXqjqr934Vwe2DWc+ikzXzTb
/Ri4j/yV66P11a8WMt+5suzcvO2Lg49GQ8GzWfHVBOzKu1CfUfRVibipyefqcgAA4ayJhpYn867n
yrX16T3Gm3BvOQBgQbqhZU4nuGaosVnu0kfEq9vDwUvsLgdgw8mr25fU3TllGg0A/yMAM9t9lMJQ
sfNN7zF22r0xSmRVrpIcXLH2uDSbuwFU6g45Xwx8LN1w8Rw+QDGyXtabgdcY/HfRcLCxLVS6i4ba
eixW53DydGa0EtA8vbhBsLo2GqnrLWY+EysvvgvMVxbzGBfYGiDfRdR33ygApJc3naIMepxAnrrg
KDNdUT2w+Z5iHtM5nFoP5q4Zc/luoMp367draop+YZ2vkhysGEsmF1VmjKWcmfK3LVn022Iee3BF
85VEVPLDOEpkK8j3txmYNT7Gzwt+Y+o2jHOqBnofK+YhNw/tb6wI+Pam0+l9sUhE21HVjj6ad3Jl
y0dMxuNk8/FUmu0EUAPgA7qD2Gh3RqkLFm6PP6c7SLEcfQEdVmj1eDkA4DR4uxwA8B6/YVyrO8Rc
OHYEmVjecj4MPKQ7h7COz+CVFdu29OvOUQznjiCEb+qOIKyVUXS17gzFcmRBJpa3XAXCWbpzCGsR
sHZiZfOsX5Q6ieMKwqc1BWX08DCGq0YRxxVkIkDfAhV+kJpwG/r89M+DXcFxBSGiT+nOIGz3ad0B
CuWogkycsfYEAGfoziFsJwWZE9P8G90RREmcPNm49nTdIQrhqIIQ8FndGURpmCpzvu4MhXBMQXhV
00IG1ujOIUrDAJ2nO0NhOR3i4JRPRo8ywsBpbzRc7KgTUGTjmIL4iP9adwZRWj6oU3VnmI1jCgJF
Xj8oURzBIGOx7gyzZtQd4BAmJQUpM4qd/zd3TEEAcvyribAWkfP/5g4qiOd/9yGOwOz8v7mTCuL4
VxNhOSlIERy/sYTlHP+i6JiCEGhEdwZRWgQ4/m/umILwW5f/EmWESQpSMBlByg8z9uvOMBvHFAQk
I0i5IRfsNTimIMoFrybCWszO32twTEHc8GoirEUkBSkc0a75z0S4CTEXfZb/UnNMQQJU8TPdGURJ
7QoM9P5Od4jZOKYgtO3HewFs1Z1DlAq54qyZjikIAIBIRpEywYSf685QCEcVhMi05VLCwnF2WXV5
bLs5qiCBbfEXAOrTnUPY7hHdAQrlqIIAALGSUcT7XFMQ/8x/dCRGVxU7g/Zw/VYrA6UzU/9UWVF5
KYD3a90ywhYEPBTo77W8IHY9d6lr8MASZUxdSvB9GeAPz2GNdyulNtwYqb/HqpWdWNlyLRjfs2p+
wkEIa6r6eh+2YlaleO4abKjLCMZ357QAAGC8xyDjR92JlGVXSQr0nXQ7A89aNT/hDAQ8ZFU5AKAU
z10DrC6zJCxwlVUrTogpEG63an7CGZhg7cVYS/DcNUCGJQcJMpQ5/7n8RXVf770A/5eV8xT6WD16
vDVT+5+7BsPcYMVCouG671i68gBkFPEOy0cPAKV47hrt4fqtBmjNnL/6Z9xRG6qtsnrlAaCqb8tD
zGzJRhD6MPNVlo8eeOtTKLufu469yu1MEw3NDwL0ed05RPEU8/VHDWy5RXeOuXJFQQBgoqFlF4D3
6c4hinJ3VX/vV3WHmA/HfZOeS4B8H9edQRSOgOfdXg7ARQWhvvtGlcErdecQhQn0935IdwYruKYg
AHDUti39zHym7hwiLw7097rqeZWP61akemDLUz4ZSZxKBfpP8hPAuoNYxXUFAYCKbVv6FasVunOI
w5iBZaqSEFO6g1jJlQUBgKMG4tsNw/cJ3TkEAMAMVJxURfG4pUdTOIFrPubNZbLh4o8p8DO6c5Sx
TGBULaAX4pO6g9jBtSPIIZX9m581TZymO0eZmgrUphZ6tRyABwoCAAue7v21QThVd44yMxmoqK6l
Rx5J6w5iJ9fvYs10YHnTKX7D+K3uHF5HQLpSqXraHj+oO4vdPDGCHLJwe/w5MtRf6c7hbZyunAgu
KodyAB4rCPDWmVGkJLaZSFVwiHbe9abuIKXiqV2smdKNTSezMp7XncNDDo7j4JJw/8/HdQcpJc8W
BJCSWOjNQMb/Ltrxk5TuIKXmuV2smWR3a/6I8EagWi0rx3IAHi8IICWZpzcq/dVH0+PxpO4gunh6
F2sm2d0q2oG0UscFt8fL+spfZVMQQEpShPHJqcnja3/1M8dfAcpunt/Fmkl2twqSmqww3ivleEtZ
jSCHyEiSHQHJSkOdQNviCd1ZnKKsRpBDZCR5JwLGKrnyA1KOw5XlCHKIjCSH8Fhmkk9a+Ex8n+4k
TlOWI8ghMpIAAEZNI3OylCO7si4IUN4lIWC/CfrQgm0P7tWdxanKehdrpnLb3SLQiKnMjxy1Pf66
7ixOVvYjyCFlNpIMV1b4TpVyzE5GkCN4fSRhYBhQp1X3x1/TncUNpCBZeLUkDCTAUx+vHnjwVd1Z
3EJ2sbJ4e3eL4aFzPNEQTDpdylEcKUgOgW3xF8inTgEwpTuLBQbZZ36y+unNu3UHcRspSB7TI8mp
ANx75g7CPpBvRfVT8Vd0R3EjeQ9SgHRj08lQxjMMHKU7SzEY2EdKNVZtj+/SncWtbC9I997xsOnP
LDdAERBNtoWC9+pe6bmYfuO+A8BC3VkKw3uR8Z9ZteO+l3QnmYuOwdGY4TNeVgpD7ZHgo7py2FqQ
7sT41xRUK4AT3l4g4fttoeA3da3wfEyPJAMMBHVnmcUeED5V1df7ou4gxYqNjBztV/5/BnDeoduY
0U/g26ORut5S57GlIF0jyXPYRCsIZ2e9A3NzNFIXL/XKWmG6JH0M1OvOksPrgDqrqj/+B91B5qJr
ePx7zOraHJMfgkGbootrB0qVx9I36R2J1ImdibG7WOHRnOUAQAYtLdUKWi2wLf4CDLWSwc77QRHR
n0kZq91aDgBgVu/JM3kNFPd3Dqd+VKo8lhTkBy9xoHNobD3AAwBdWcBDXH0SgMC2+AuGwWcANKQ7
yyHM/OcpMs8JbL//97qzzNMfC1jZy7uGU5Odw8kOu8PMexfr5kRyrQ9YxyjsDOtufg9ypHRj08lK
GU8QoHtE/BPBODfQf78nvv3vSCSfIqCxwLsPEuOKtkjwETuyzLkg3SOp5YrRCuYvFLQgoiml1G3t
kbrr7VgRXaY/3XoMwLs1RXiNGJ8NDPT+Tve2sEpHInUigdsBXFLoYwjY6UuZZ13/vkWW7p3MqSA3
J8ZOM0DPFv4I7lVEPTeGgp680M10SR4FcEyJF/0qKbUmsD3+nO5tYIeOwdGLDMO3jsENhT4mGg5a
+sFT0TOL7eGj/BWp/wQw64U0GdhBzD1u/cSqGNO7W78g4LgSLXI3GcbnAtvu9/zlHjoTo+sYRisB
y2a9M1E8GqpttmrZRb9Jr6g68F7MXo5BAv2DGapdUQ7lAA69cVfnAXjZ7mUxY7dBuLAcygEA0XD9
beRXK4hx+6x3Zj67gFkWrOiCTE0i/yc3hDt8FYEVbeHaW2NEHjoadnbTx26tAWDnoR2vKKaLKvt6
f6N7fUspWl//alskeI0BYxWAh/LcdbeVyy26ILGlNUME3PnOKfQL0+TV0VDwGzfUVdn+KupU0yX5
HAA7vot42TTwxQXbN/+P7vXUZX245r+j4eAFILocRO9872Xg36xc3pzf0HQlxq5i0IUA/YlZ/ao9
Und36TeXc6Ubm05m03gAhJMsmuUfDVItlX3xnbrXzSluSSRqJpW/1fD5jmfmdzMZ3e2hml9auQw5
mtdG04elbGFgvr9132UYaKnc1vtr3etUbqQgNrOgJLsMRc2VZbxbpZP8YMpm08duNRNQ/LfcjJdM
KYdWMoKUyBxGkhczrFoWDsT/V3f2ciYFKaEiSvIHg9BSbh/lOpHsYpVQgbtbvyfDaJZyOIOMIBrk
GUl+T0o1e/XYKjeSEUSDrCMJ4/8yUg7HkRFEoxkjCRGjxUuHrAthiXRj08nphi+Vy0mzhRBCCCGE
EEIIIYQQQohS8uwXhR1jY8dTxugB1Chg7IuGatt0Z3KbrsQb72JMrWPQ0QTsiYaDrbozlZonC9KR
GL2A4LsD4L+czI2oLRqq7dadzU06h1MPzDwxIAPbALqyPVzr2nP/Fstzx2LFRkfrCMamw8oBAMxd
Nw+mCj4BWbnrGByNHXnWTAIap894WDY8VxC/abQC2U+UQAG1R3c+tzB8Rq4z01zSMTh6ke58JdsO
ugNYqWvowKlgzrmfXDUx4ZizsTudUrnPf2YYvnW685WKpwqiyGwFqDrbNGbc/u2lS9/QndEt2iPB
R5nRn20agxs6E6NlURLPFKR7OHUhAZfmmLzfH8APdGd0GwLnPNUnw2jtHB0t1XmItfFMQRQj564V
K3X7DcGgXOm1SNPXBMx6mk8CltGU4fmPfT1RkI7E6LcAzn5Cbcau9iX1Md0ZXcugTbkmMeHvuxPj
Z+qOaOvq6w4wXzft33+sQbnfNJIhu1bzEV1cOwCie3JNn76KsWe5viAVGV8rMx+dbRoRdrSFgrOf
Ml/kFQ3VXkFEUzkmr+kcTn1Fd0a7+HUHmI/OofEzQOqaXNNN5m/ozpjLxrGxenMSq0F0BUDVDHND
e7h+q+5cuTD4FgDRHJNbb0kkHvxOODyuO6fVXD2CEOUd3h+5MVzn2DOhmxnjOhBtAXAuwKsIxpPd
idT5unPlEg0F2wEMZp3IfMqk8ntyV8vVBWHgQ7mmRcPB83Tnyx+eLzvyJgVcpTtWPsS4Itc0w+c7
Xnc+O7i6IADem/VWhqOPF+pIjK5C1gt+8hrd2fJpiwQfISDrqMzMuq7yaytXF4SY12e7PRoJdurO
5lW+lHlWttuZ8V3d2ezg6oK0Reo2ArifQC8CNMFKbbD6MsDicNe/b1EyGg4SiOIAkiB+DqBvt0eC
j+rOZgd5MmnQkRhdRTCezDZNCu4srh5BhLCbFESIPKQgQuQhBREiDymIEHlIQYTIQwoiRB5SECHy
kIIIkYcURIP2cP1WEHYfeTsxPag7mzicFEQTpdSGI2+rTtdcOpd5CfvIcT8adSdSH2DgKiYMR0O1
m+Y/RyGEEEIIIYQQQgghRPn5f41djiAkRysiAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTExLTAx
VDA5OjU4OjAwKzAwOjAw2zRjowAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0xMS0wMVQwOTo1ODow
MCswMDowMKpp2x8AAAAASUVORK5CYII="/>
</svg>

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 434 KiB

@ -1,209 +0,0 @@
<template>
<div>
<!-- 两句诗 -->
<div class="my-animation-slide-top">
<twoPoem :isHitokoto="false"></twoPoem>
</div>
<div style="background: var(--background)" class="my-animation-slide-bottom">
<div class="about-wrap">
<h1 style="font-size: 40px;font-weight: 500;letter-spacing: 5px;">两只毛驴鸣翠柳</h1>
<!-- 对话框 -->
<div class="about-box">
<h4> {{$store.state.webInfo.webName}} 对话中...</h4>
<div v-if="sayShow" id="say-container"></div>
</div>
</div>
<!-- 页脚 -->
<myFooter></myFooter>
</div>
</div>
</template>
<script>
const twoPoem = () => import( "./common/twoPoem");
const myFooter = () => import( "./common/myFooter");
export default {
components: {
twoPoem,
myFooter
},
data() {
return {
sayShow: false,
// sayContent: [
// {
// "talk": ["Hi, there👋", " Vue2 Vue3 SpringBoot ~"],
// "reply": [" 😃", " 🙄"]
// }, {
// "talk": ["😘",
// "",
// ""],
// "reply": [" 😂"]
// }, {
// "talk": ["🚀",
// "👋",
// "🥝"],
// "reply": []
// }
// ],
sayContent: [
{
"talk": ["大家好👋", "欢迎来到查询药物相互作用,病友间相互交流的平台~"],
"reply": ["然后呢? 😃", "别废话! 🙄"]
}, {
"talk": ["😘",
"这个平台是一个温暖的港湾,让我们可以相互倾听、相互支持",
"在这里,我们可以分享经验、交流心情,共同战胜疾病的困难和挑战"],
"reply": ["这个平台有什么用吗? 😂"]
}, {
"talk": ["拥有一个专属的交流平台,我们能够找到理解和同伴🚀",
"一起度过艰难时刻,分享希望和勇气👋",
"病友们请在聊天室集合🥝"],
"reply": []
}
],
sayIndex: 0
}
},
computed: {},
watch: {},
created() {
setTimeout(() => {
this.sayShow = true;
this.say();
}, 2000);
},
mounted() {
},
methods: {
answer(index, value) {
$(".say-select").remove();
let htmlStr = `<div class="say-right my-animation-slide-bottom"><span class="say-item-right">${value}</span></div>`;
let frag = document.createRange().createContextualFragment(htmlStr);
document.getElementById("say-container").appendChild(frag);
if (index === 0) {
setTimeout(() => {
this.say();
}, 500);
} else {
let htmlStr = `<div class="say-left my-animation-slide-bottom"><span class="say-item-left">👋 👋 👋</span></div>`;
let frag = document.createRange().createContextualFragment(htmlStr);
document.getElementById("say-container").appendChild(frag);
}
},
say() {
if (!this.$common.isEmpty(this.sayContent[this.sayIndex]) && !this.$common.isEmpty(this.sayContent[this.sayIndex].talk)) {
this.sayContent[this.sayIndex].talk.forEach((value, index, talk) => {
setTimeout(() => {
let htmlStr = `<div class="say-left my-animation-slide-bottom"><span class="say-item-left">${value}</span></div>`;
let frag = document.createRange().createContextualFragment(htmlStr);
document.getElementById("say-container").appendChild(frag);
if (talk.length === index + 1) {
if (!this.$common.isEmpty(this.sayContent[this.sayIndex].reply)) {
setTimeout(() => {
if (this.sayContent[this.sayIndex].reply.length === 2) {
let reply0 = this.sayContent[this.sayIndex].reply[0];
let reply1 = this.sayContent[this.sayIndex].reply[1];
let htmlStr = `<div class="say-left my-animation-slide-bottom"><span class="say-select">${reply0}</span><span class="say-select">${reply1}</span></div>`;
let frag = document.createRange().createContextualFragment(htmlStr);
document.getElementById("say-container").appendChild(frag);
document.getElementsByClassName("say-select")[0].onclick = () => {
this.answer(0, reply0);
}
document.getElementsByClassName("say-select")[1].onclick = () => {
this.answer(1, reply1);
}
} else if (this.sayContent[this.sayIndex].reply.length === 1) {
let reply0 = this.sayContent[this.sayIndex].reply[0];
let htmlStr = `<div class="say-left my-animation-slide-bottom"><span class="say-select">${reply0}</span></div>`;
let frag = document.createRange().createContextualFragment(htmlStr);
document.getElementById("say-container").appendChild(frag);
document.getElementsByClassName("say-select")[0].onclick = () => {
this.answer(0, reply0);
}
}
this.sayIndex += 1;
}, 500);
}
}
}, index * 500);
});
}
}
}
}
</script>
<style>
.about-wrap {
text-align: center;
width: 95%;
max-width: 800px;
margin: 0 auto;
padding: 40px 20px 80px;
}
.about-box {
min-height: 450px;
padding: 5px;
background-color: var(--maxMaxLightGray);
border-radius: 10px;
}
.say-item-left {
padding: 5px 12px;
border-radius: 1rem;
color: var(--maxGreyFont);
background-color: var(--lightGray);
}
.say-item-right {
padding: 5px 12px;
border-radius: 1rem;
color: var(--white);
background-color: var(--translucent);
}
.say-left {
display: flex;
justify-content: left;
margin: 15px;
}
.say-right {
display: flex;
justify-content: right;
margin: 15px;
}
.say-select {
cursor: pointer;
background: var(--black);
border-radius: 5px;
padding: 5px 10px;
margin-right: 12px;
margin-top: 20px;
color: var(--white);
border: 1px solid var(--black);
}
.say-select:hover {
border: 1px solid var(--themeBackground);
color: var(--themeBackground);
box-shadow: 0 0 5px var(--themeBackground);
}
</style>

@ -1,61 +0,0 @@
<template>
<div>
<myHeader></myHeader>
<sidebar></sidebar>
<div class="content-box">
<div class="content">
<router-view></router-view>
</div>
</div>
</div>
</template>
<script>
import myHeader from "./common/myHeader.vue";
import sidebar from "./common/sidebar.vue";
export default {
components: {
myHeader,
sidebar
},
data() {
return {}
},
computed: {},
watch: {},
created() {
},
mounted() {
},
methods: {}
}
</script>
<style scoped>
.content-box {
position: absolute;
left: 200px;
right: 0;
top: 70px;
bottom: 0;
transition: left .3s ease-in-out;
}
.content {
width: auto;
height: 100%;
padding: 30px;
overflow-y: scroll;
}
</style>

@ -1,159 +0,0 @@
<template>
<div>
<div style="margin-bottom: 20px">
<el-select v-if="isBoss" v-model="pagination.commentType" placeholder="评论来源类型" style="margin-right: 10px">
<el-option key="1" label="文章评论" value="article"></el-option>
<el-option key="2" label="树洞留言" value="message"></el-option>
</el-select>
<el-input class="my-input" type="number" style="width: 140px;margin-right: 10px" v-model="pagination.source"
placeholder="评论来源标识"></el-input>
<el-button type="primary" icon="el-icon-search" @click="searchComments()"></el-button>
<el-button type="danger" @click="clearSearch()"></el-button>
</div>
<el-table :data="comments" border class="table" header-cell-class-name="table-header">
<el-table-column prop="id" label="ID" width="55" align="center"></el-table-column>
<el-table-column prop="source" label="评论来源标识" align="center"></el-table-column>
<el-table-column prop="type" label="评论来源类型" align="center"></el-table-column>
<el-table-column prop="userId" label="发表用户ID" align="center"></el-table-column>
<el-table-column prop="likeCount" label="点赞数" align="center"></el-table-column>
<el-table-column prop="commentContent" label="评论内容" align="center"></el-table-column>
<el-table-column prop="commentInfo" label="评论额外信息" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button type="text" icon="el-icon-delete" style="color: var(--orangeRed)" @click="handleDelete(scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next"
:current-page="pagination.current"
:page-size="pagination.size"
:total="pagination.total"
@current-change="handlePageChange">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
data() {
return {
isBoss: this.$store.state.currentAdmin.isBoss,
pagination: {
current: 1,
size: 10,
total: 0,
source: null,
commentType: ""
},
comments: []
}
},
computed: {},
watch: {},
created() {
this.getComments();
},
mounted() {
},
methods: {
clearSearch() {
this.pagination = {
current: 1,
size: 10,
total: 0,
source: null,
commentType: ""
}
this.getComments();
},
getComments() {
let url = "";
if (this.isBoss) {
url = "/admin/comment/boss/list";
} else {
url = "/admin/comment/user/list";
}
this.$http.post(this.$constant.baseURL + url, this.pagination, true)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.comments = res.data.records;
this.pagination.total = res.data.total;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
handlePageChange(val) {
this.pagination.current = val;
this.getComments();
},
searchComments() {
this.pagination.total = 0;
this.pagination.current = 1;
this.getComments();
},
handleDelete(item) {
let url = "";
if (this.isBoss) {
url = "/admin/comment/boss/deleteComment";
} else {
url = "/admin/comment/user/deleteComment";
}
this.$confirm('删除评论后,所有该评论的回复均不可见。确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
center: true
}).then(() => {
this.$http.get(this.$constant.baseURL + url, {id: item.id}, true)
.then((res) => {
this.pagination.current = 1;
this.getComments();
this.$message({
message: "删除成功!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}).catch(() => {
this.$message({
type: 'success',
message: '已取消删除!'
});
});
}
}
}
</script>
<style scoped>
.pagination {
margin: 20px 0;
text-align: right;
}
.my-input >>> input::-webkit-inner-spin-button {
appearance: none;
}
</style>

@ -1,116 +0,0 @@
<template>
<div class="my-header myBetween">
<div class="logo">后台管理</div>
<div class="header-right">
<div class="admin-index" @click="$router.push({path: '/'})">
<svg viewBox="0 0 1024 1024" width="25" height="25" style="vertical-align: -6px;">
<path d="M221.4 152.6h141.8V396h-141.8V152.6z" fill="#FAD996"></path>
<path
d="M363.4 152.6c-9-16.6-138.2-14.2-142 0-3 11.4-23.6 287 15.8 182.4 10.4-27.4 22.6-47.6 37.2-78.6 10.6-22.6 22-42.4 32.6-54.4 16.6-18.6 18 9.6 33.6 22.6 41.6 34.4 31.8-55.6 22.8-72z"
fill="#F9F8F7"></path>
<path
d="M834.2 851c0 24.8-20.2 45-45 45H234.8c-24.8 0-45-20.2-45-45v-370h1.2l321.2-270 321.2 270h0.6l0.2 370z"
fill="#FAD996"></path>
<path d="M833.4 481l-321.2-270-1.8 1.6V896h278.8c24.8 0 45-20.2 45-45l-0.2-370h-0.6z"
fill="#F7C872"></path>
<path
d="M62 548L432.6 166.2s81.2-90.6 171.8 0c79 79 343.6 400 343.6 400s-55.4 41-125.2 14.2c-37.8-14.4-118.2-68-133.4-150.8-11-60.2-45.8 29-60.8-38.2-9.4-42.2-67.2-96.6-67.2-96.6s-48.4-55.4-100.2 0c-13.8 14.8-11.4 134.6-44 128-26.4-5.2-20-105.6-27-81.2-9.6 33-25 61-54.4 47.2-33.2-15.6-42.4 79.6-64.8 112.8-17.2 25.4-23.8-45.8-40.4-29.2-21.2 21-2.4 94-39.4 108s-132.8-2-129.2-32.4z"
fill="#F9F8F7"></path>
<path
d="M512 126.2v144c28.8 1 49.4 24.6 49.4 24.6s57.8 54.4 67.2 96.6c15 67.2 49.8-22 60.8 38.2 15.2 82.8 95.6 136.4 133.4 150.8 69.8 26.8 125.2-14.2 125.2-14.2s-264.6-321-343.6-400c-33.2-33.2-65.2-42-92.4-40z"
fill="#EFEBE8"></path>
<path d="M405.2 495h99.8v99.8h-99.8v-99.8zM405.2 609.2h99.8v99.8h-99.8v-99.8z" fill="#FB8A5D"></path>
<path d="M519 495h99.8v99.8h-99.8v-99.8zM519 609.2h99.8v99.8h-99.8v-99.8z" fill="#EA6D4B"></path>
</svg>
<span>&nbsp;首页</span>
</div>
<!--头像-->
<div class="header-user-con">
<el-dropdown placement="bottom">
<el-avatar class="user-avatar" :size="40"
:src="$store.state.currentAdmin.avatar">
</el-avatar>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="logout()">退出</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {}
},
computed: {},
watch: {},
created() {
},
mounted() {
},
methods: {
logout() {
this.$http.get(this.$constant.baseURL + "/user/logout", {}, true)
.then((res) => {
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
this.$store.commit("loadCurrentAdmin", {});
localStorage.removeItem("adminToken");
this.$router.push({path: '/'});
}
}
}
</script>
<style scoped>
.my-header {
position: relative;
width: 100%;
height: 70px;
color: black;
background-color: #ebf1f6;
}
.my-header .logo {
line-height: 70px;
margin-left: 70PX;
font-size: 22px;
}
.header-right {
display: flex;
justify-content: flex-end;
margin-right: 40px;
}
.admin-index {
height: 70px;
line-height: 70px;
font-size: 15px;
margin-right: 20px;
cursor: pointer;
}
.header-user-con {
display: flex;
align-items: center;
}
</style>

@ -1,147 +0,0 @@
<template>
<div class="sidebar">
<el-menu class="sidebar-el-menu"
background-color="#ebf1f6"
text-color="#606266"
active-text-color="#20a0ff"
unique-opened
router>
<template v-for="item in items">
<template v-if="isBoss || !item.isBoss">
<template v-if="item.subs">
<el-submenu :index="item.index" :key="item.index">
<template slot="title">
<i :class="item.icon"></i>
<span>{{ item.title }}</span>
</template>
<template v-for="subItem in item.subs">
<el-submenu v-if="subItem.subs" :index="subItem.index" :key="subItem.index">
<template slot="title">
{{ subItem.title }}
</template>
<el-menu-item v-for="threeItem in subItem.subs" :key="threeItem.index" :index="threeItem.index">
{{ threeItem.title }}
</el-menu-item>
</el-submenu>
<el-menu-item v-else :index="subItem.index" :key="subItem.index">
{{ subItem.title }}
</el-menu-item>
</template>
</el-submenu>
</template>
<template v-else>
<el-menu-item :index="item.index" :key="item.index">
<i :class="item.icon"></i>
{{ item.title }}
</el-menu-item>
</template>
</template>
</template>
</el-menu>
</div>
</template>
<script>
export default {
data() {
return {
isBoss: this.$store.state.currentAdmin.isBoss,
items: [{
icon: "el-icon-s-home",
index: "/main",
title: "系统首页",
isBoss: true
}, {
icon: "el-icon-s-tools",
index: "/webEdit",
title: "网站设置",
isBoss: true
}, {
icon: "el-icon-user-solid",
index: "/userList",
title: "用户管理",
isBoss: true
}, {
icon: "el-icon-first-aid-kit",
index: "/drugReaction",
title: "药品管理",
isBoss: false
}, {
icon: "el-icon-postcard",
index: "/postList",
title: "文章管理",
isBoss: false
}, {
icon: "el-icon-notebook-2",
index: "/sortList",
title: "分类管理",
isBoss: true
}, {
icon: "el-icon-edit-outline",
index: "/commentList",
title: "评论管理",
isBoss: false
}, {
icon: "el-icon-s-comment",
index: "/treeHoleList",
title: "留言管理",
isBoss: true
}, {
icon: "el-icon-paperclip",
index: "/resourceList",
title: "资源管理",
isBoss: true
}, {
icon: "el-icon-bank-card",
index: "/resourcePathList",
title: "资源路径管理",
isBoss: true
}, {
icon: "el-icon-sugar",
index: "/loveList",
title: "科研项目管理",
isBoss: true
}]
}
},
computed: {},
watch: {},
created() {
},
mounted() {
},
methods: {}
}
</script>
<style scoped>
.sidebar {
display: block;
position: absolute;
left: 0;
top: 70px;
bottom: 0;
overflow-y: scroll;
}
.sidebar::-webkit-scrollbar {
width: 0;
}
.sidebar-el-menu {
width: 200px;
}
.sidebar > ul {
height: 100%;
}
</style>

@ -1,324 +0,0 @@
<template>
<div>
<div>
<div class="handle-box">
<el-input v-model="queryParams.drug1" placeholder="药品A名称" class="handle-input mrb10"></el-input>
<el-input v-model="queryParams.drug2" placeholder="药品B名称" class="handle-input mrb10"></el-input>
<el-input v-model="queryParams.reaction" placeholder="相互作用效果" class="handle-input mrb10"></el-input>
<el-button type="primary" icon="el-icon-search" @click="handleQuery()"></el-button>
<el-button type="danger" @click="clearSearch()"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addDrugs()"></el-button>
</div>
<el-table :data="table1List" border class="table" header-cell-class-name="table-header">
<el-table-column prop="id" label="ID" width="55" align="center"></el-table-column>
<el-table-column prop="drug1" label="药品A名称" align="center"></el-table-column>
<el-table-column prop="drug2" label="药品B名称" align="center"></el-table-column>
<el-table-column prop="reaction" label="相互作用效果" align="center"></el-table-column>
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button type="text" icon="el-icon-edit" @click="handleEdit(scope.row)"></el-button>
<el-button type="text" icon="el-icon-delete" style="color: var(--orangeRed)" @click="handleDelete(scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog title="新增药品作用" :visible.sync="dialogVisible">
<el-form :model="formData" :rules="rules" ref="drugForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="药品A名称" prop="drug1">
<el-input v-model="formData.drug1"></el-input>
</el-form-item>
<el-form-item label="药品B名称" prop="drug2">
<el-input v-model="formData.drug2"></el-input>
</el-form-item>
<el-form-item label="相互作用效果" prop="reaction">
<el-input v-model="formData.reaction"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('drugForm')"> </el-button>
</div>
</el-dialog>
<el-dialog title="编辑药品作用" :visible.sync="editVisible">
<el-form :model="changeUser" :rules="editRules" ref="editForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="药品A名称" prop="drug1">
<el-input v-model="changeUser.drug1"></el-input>
</el-form-item>
<el-form-item label="药品B名称" prop="drug2">
<el-input v-model="changeUser.drug2"></el-input>
</el-form-item>
<el-form-item label="相互作用效果" prop="reaction">
<el-input v-model="changeUser.reaction"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="editVisible = false"> </el-button>
<el-button type="primary" @click="submitEditForm('editForm')"> </el-button>
</div>
</el-dialog>
<div class="pagination">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="1"
:page-sizes="[10, 15, 20, 25]"
:page-size="10"
layout="total, sizes, prev, pager, next, jumper"
:total=this.pagination.total>
</el-pagination>
</div>
</div>
</div>
</template>
<script>
import {addTable1, listTable1, listTotal} from "../../utils/table1";
import axios from "axios";
export default {
data() {
return {
pagination: {
current: 1,
size: 10,
total: 0,
searchKey: "",
userStatus: null,
userType: null
},
users: [],
table1List: [
],
//
queryParams: {
pageNum: 1,
pageSize: 10,
drug1: null,
drug2: null,
reaction: null
},
//
formData: {
drug1: "",
drug2: "",
reaction: ""
},
dialogVisible: false,
rules: {
drug1: [
{ required: true, message: "请输入药品A名称", trigger: "blur" }
],
drug2: [
{ required: true, message: "请输入药品B名称", trigger: "blur" }
],
reaction: [
{ required: true, message: "请输入相互作用效果", trigger: "blur" }
]
},
editVisible: false,
changeUser: {
id: null,
drug1: null,
drug2: null,
reaction: null
},
editRules: {
drug1: [
{ required: true, message: "请输入药品A名称", trigger: "blur" }
],
drug2: [
{ required: true, message: "请输入药品B名称", trigger: "blur" }
],
reaction: [
{ required: true, message: "请输入相互作用效果", trigger: "blur" }
]
}
}
},
computed: {},
watch: {},
created() {
// this.getUsers();
this.handleQuery();
},
mounted() {
},
methods: {
//
addDrugs(){
this.dialogVisible = true;
},
/** 查询药品作用列表条数 */
getTotal() {
listTotal(this.queryParams).then(response => {
this.pagination.total = parseInt(response);
console.log(this.pagination.total);
});
},
handleSizeChange(val) {
this.queryParams.pageSize = val; //
this.getList();
},
handleCurrentChange(val) {
this.queryParams.pageNum = val; //
this.getList();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.getTotal();
},
/** 查询药品作用管理列表 */
getList() {
// this.loading = true;
this.table1List = []; //
listTable1(this.queryParams).then(response => {
this.table1List = response;
});
},
clearSearch() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
drug1: null,
drug2: null,
reaction: null
}
},
handlePageChange(val) {
this.pagination.current = val;
this.getUsers();
},
//
submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
addTable1(this.formData).then(() => {
this.dialogVisible = false;
this.getList();
this.getTotal();
this.$message({
message: "新增成功",
type: "success"
});
}).catch((error) => {
this.$message.error(error);
});
} else {
return false;
}
});
},
//
handleEdit(row) {
this.changeUser.id = row.id;
this.changeUser.drug1 = row.drug1;
this.changeUser.drug2 = row.drug2;
this.changeUser.reaction = row.reaction;
this.editVisible = true;
},
submitEditForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
axios.put(`/system/table1/`, this.changeUser)
.then(() => {
this.editVisible = false; //
this.getList(); //
this.getTotal(); //
this.$message({
message: "编辑成功",
type: "success"
});
})
.catch(error => {
this.$message.error("编辑失败:" + error.message);
});
} else {
return false;
}
});
},
//
handleDelete(row) {
this.$confirm("此操作将永久删除该药品作用, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
axios.delete(`/system/table1/${row.id}`)
.then(() => {
this.getList();
this.getTotal();
this.$message({
message: "删除成功",
type: "success"
});
})
.catch(error => {
this.$message.error("删除失败:" + error.message);
});
}).catch(() => {});
}
}
}
</script>
<style scoped>
.handle-box {
margin-bottom: 20px;
}
.handle-select {
width: 120px;
}
.handle-input {
width: 160px;
display: inline-block;
}
.table {
width: 100%;
font-size: 14px;
}
.mrb10 {
margin-right: 10px;
margin-bottom: 10px;
}
.table-td-thumb {
display: block;
margin: auto;
width: 40px;
height: 40px;
}
.pagination {
margin: 20px 0;
text-align: right;
}
.el-switch {
margin: 5px;
}
</style>

@ -1,212 +0,0 @@
<template>
<div>
<div>
<div class="handle-box">
<el-select clearable v-model="pagination.status" placeholder="状态" class="handle-select mrb10">
<el-option key="1" label="启用" :value="true"></el-option>
<el-option key="2" label="禁用" :value="false"></el-option>
</el-select>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
</div>
<el-table :data="loves" border class="table" header-cell-class-name="table-header">
<el-table-column prop="id" label="ID" width="55" align="center"></el-table-column>
<el-table-column prop="userId" label="用户ID" align="center"></el-table-column>
<el-table-column prop="manName" label="科研人员" align="center"></el-table-column>
<el-table-column prop="womanName" label="项目" align="center"></el-table-column>
<el-table-column label="背景封面" align="center">
<template slot-scope="scope">
<el-image lazy :preview-src-list="[scope.row.bgCover]" class="table-td-thumb" :src="scope.row.bgCover"
fit="cover"></el-image>
</template>
</el-table-column>
<el-table-column label="男生头像" align="center">
<template slot-scope="scope">
<el-image lazy :preview-src-list="[scope.row.manCover]" class="table-td-thumb" :src="scope.row.manCover"
fit="cover"></el-image>
</template>
</el-table-column>
<el-table-column label="女生头像" align="center">
<template slot-scope="scope">
<el-image lazy :preview-src-list="[scope.row.womanCover]" class="table-td-thumb" :src="scope.row.womanCover"
fit="cover"></el-image>
</template>
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<el-tag :type="scope.row.status === false ? 'danger' : 'success'"
disable-transitions>
{{scope.row.status === false ? '禁用' : '启用'}}
</el-tag>
<el-switch @click.native="changeStatus(scope.row)" v-model="scope.row.status"></el-switch>
</template>
</el-table-column>
<el-table-column prop="timing" label="计时" align="center"></el-table-column>
<el-table-column prop="countdownTitle" label="倒计时标题" align="center"></el-table-column>
<el-table-column prop="countdownTime" label="倒计时时间" align="center"></el-table-column>
<el-table-column prop="familyInfo" label="额外信息" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column prop="updateTime" label="最终修改时间" align="center"></el-table-column>
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button type="text" icon="el-icon-delete" style="color: var(--orangeRed)"
@click="handleDelete(scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next"
:current-page="pagination.current"
:page-size="pagination.size"
:total="pagination.total"
@current-change="handlePageChange">
</el-pagination>
</div>
</div>
</div>
</template>
<script>
export default {
components: {},
data() {
return {
pagination: {
current: 1,
size: 10,
total: 0,
status: null
},
loves: []
}
},
computed: {},
watch: {},
created() {
this.getLoves();
},
mounted() {
},
methods: {
handleDelete(item) {
this.$confirm('确认删除资源?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
center: true
}).then(() => {
this.$http.get(this.$constant.baseURL + "/family/deleteFamily", {id: item.id}, true)
.then((res) => {
this.pagination.current = 1;
this.getLoves();
this.$message({
message: "删除成功!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}).catch(() => {
this.$message({
type: 'success',
message: '已取消删除!'
});
});
},
search() {
this.pagination.total = 0;
this.pagination.current = 1;
this.getLoves();
},
getLoves() {
this.$http.post(this.$constant.baseURL + "/family/listFamily", this.pagination, true)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.loves = res.data.records;
this.pagination.total = res.data.total;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
changeStatus(item) {
this.$http.get(this.$constant.baseURL + "/family/changeLoveStatus", {
id: item.id,
flag: item.status
}, true)
.then((res) => {
this.$message({
message: "修改成功!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
handlePageChange(val) {
this.pagination.current = val;
this.getLoves();
}
}
}
</script>
<style scoped>
.handle-box {
margin-bottom: 20px;
}
.handle-select {
width: 200px;
}
.table {
width: 100%;
font-size: 14px;
}
.mrb10 {
margin-right: 10px;
margin-bottom: 10px;
}
.table-td-thumb {
display: block;
margin: auto;
width: 40px;
height: 40px;
}
.pagination {
margin: 20px 0;
text-align: right;
}
.el-switch {
margin: 5px;
}
</style>

@ -1,274 +0,0 @@
<template>
<div>
<div>
<el-tag effect="dark" class="my-tag">
<svg viewBox="0 0 1024 1024" width="20" height="20" style="vertical-align: -4px;">
<path
d="M767.1296 808.6528c16.8448 0 32.9728 2.816 48.0256 8.0384 20.6848 7.1168 43.52 1.0752 57.1904-15.9744a459.91936 459.91936 0 0 0 70.5024-122.88c7.8336-20.48 1.0752-43.264-15.9744-57.088-49.6128-40.192-65.0752-125.3888-31.3856-185.856a146.8928 146.8928 0 0 1 30.3104-37.9904c16.2304-14.5408 22.1696-37.376 13.9264-57.6a461.27104 461.27104 0 0 0-67.5328-114.9952c-13.6192-16.9984-36.4544-22.9376-57.0368-15.8208a146.3296 146.3296 0 0 1-48.0256 8.0384c-70.144 0-132.352-50.8928-145.2032-118.7328-4.096-21.6064-20.736-38.5536-42.4448-41.8304-22.0672-3.2768-44.6464-5.0176-67.6864-5.0176-21.4528 0-42.5472 1.536-63.232 4.4032-22.3232 3.1232-40.2432 20.48-43.52 42.752-6.912 46.6944-36.0448 118.016-145.7152 118.4256-17.3056 0.0512-33.8944-2.9696-49.3056-8.448-21.0432-7.4752-44.3904-1.4848-58.368 15.9232A462.14656 462.14656 0 0 0 80.4864 348.16c-7.6288 20.0192-2.7648 43.008 13.4656 56.9344 55.5008 47.8208 71.7824 122.88 37.0688 185.1392a146.72896 146.72896 0 0 1-31.6416 39.168c-16.8448 14.7456-23.0912 38.1952-14.5408 58.9312 16.896 41.0112 39.5776 79.0016 66.9696 113.0496 13.9264 17.3056 37.2736 23.1936 58.2144 15.7184 15.4112-5.4784 32-8.4992 49.3056-8.4992 71.2704 0 124.7744 49.408 142.1312 121.2928 4.9664 20.48 21.4016 36.0448 42.24 39.168 22.2208 3.328 44.9536 5.0688 68.096 5.0688 23.3984 0 46.4384-1.792 68.864-5.1712 21.3504-3.2256 38.144-19.456 42.7008-40.5504 14.8992-68.8128 73.1648-119.7568 143.7696-119.7568z"
fill="#8C7BFD"></path>
<path
d="M511.8464 696.3712c-101.3248 0-183.7568-82.432-183.7568-183.7568s82.432-183.7568 183.7568-183.7568 183.7568 82.432 183.7568 183.7568-82.432 183.7568-183.7568 183.7568z m0-265.1648c-44.8512 0-81.3568 36.5056-81.3568 81.3568S466.9952 593.92 511.8464 593.92s81.3568-36.5056 81.3568-81.3568-36.5056-81.3568-81.3568-81.3568z"
fill="#FFE37B"></path>
</svg>
统计信息
</el-tag>
<!-- 总览 -->
<div>
<div class="history-title">总览</div>
<div>
<div style="width: 400px;margin: 0 auto;display: flex;justify-content: center">
<div class="history-name" style="line-height: 35px">总访问量每个IP每天记一次:</div>
<div style="color:var(--maxLightRed);font-weight: bold;font-size: 30px;line-height: 35px">
{{historyInfo.ip_history_count}}
</div>
</div>
<div class="history-info" style="width: 640px">
<div style="margin-right: 40px">
<div class="history-name">省份访问TOP10</div>
<div>
<el-table :data="historyInfo.ip_history_province">
<el-table-column
type="index"
align="center"
width="60">
</el-table-column>
<el-table-column
prop="province"
align="center"
label="省份"
width="140">
</el-table-column>
<el-table-column
prop="num"
align="center"
label="数量"
width="100">
</el-table-column>
</el-table>
</div>
</div>
<div>
<div class="history-name">IP访问TOP10</div>
<div>
<el-table :data="historyInfo.ip_history_ip">
<el-table-column
type="index"
align="center"
width="60">
</el-table-column>
<el-table-column
prop="ip"
align="center"
label="IP"
width="140">
</el-table-column>
<el-table-column
prop="num"
align="center"
label="数量"
width="100">
</el-table-column>
</el-table>
</div>
</div>
</div>
</div>
</div>
<!-- 今日访问 -->
<div>
<div class="history-title">今日访问</div>
<div>
<div style="width: 250px;margin: 0 auto;display: flex;justify-content: center">
<div class="history-name" style="line-height: 35px">今日访问量</div>
<div style="color:var(--maxLightRed);font-weight: bold;font-size: 30px;line-height: 35px">
{{historyInfo.ip_count_today}}
</div>
</div>
<div class="history-info" style="width: 640px">
<div style="margin-right: 40px">
<div class="history-name">今日访问省份统计</div>
<div>
<el-table :data="historyInfo.province_today">
<el-table-column
type="index"
align="center"
width="60">
</el-table-column>
<el-table-column
prop="province"
align="center"
label="省份"
width="140">
</el-table-column>
<el-table-column
prop="num"
align="center"
label="数量"
width="100">
</el-table-column>
</el-table>
</div>
</div>
<div>
<div class="history-name">今日访问用户</div>
<div class="history-avatar">
<el-table :data="historyInfo.username_today">
<el-table-column
align="center"
label="头像"
width="100">
<template slot-scope="scope">
<el-avatar class="user-avatar" :size="30"
:src="scope.row.avatar">
</el-avatar>
</template>
</el-table-column>
<el-table-column
prop="username"
align="center"
label="用户"
width="200">
</el-table-column>
</el-table>
</div>
</div>
</div>
</div>
</div>
<!-- 昨日访问 -->
<div>
<div class="history-title">昨日访问</div>
<div>
<div style="width: 250px;margin: 0 auto;display: flex;justify-content: center">
<div class="history-name" style="line-height: 35px">昨日访问量</div>
<div style="color:var(--maxLightRed);font-weight: bold;font-size: 30px;line-height: 35px">
{{historyInfo.ip_count_yest}}
</div>
</div>
<div class="history-info" style="width: 300px">
<div>
<div class="history-name">昨日访问用户</div>
<div class="history-avatar">
<el-table :data="historyInfo.username_yest">
<el-table-column
align="center"
label="头像"
width="100">
<template slot-scope="scope">
<el-avatar class="user-avatar" :size="30"
:src="scope.row.avatar">
</el-avatar>
</template>
</el-table-column>
<el-table-column
prop="username"
align="center"
label="用户"
width="200">
</el-table-column>
</el-table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
historyInfo: {}
}
},
computed: {},
watch: {},
created() {
this.getHistoryInfo();
},
mounted() {
},
methods: {
getHistoryInfo() {
this.$http.get(this.$constant.baseURL + "/webInfo/getHistoryInfo", {}, true)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.historyInfo = res.data;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}
}
}
</script>
<style scoped>
.my-tag {
width: 100%;
text-align: left;
background: var(--lightYellow);
border: none;
height: 40px;
line-height: 40px;
font-size: 16px;
color: var(--black);
}
.el-tag {
margin: 10px;
}
.history-title {
margin: 15px auto 15px;
width: 120px;
text-align: center;
padding: 10px 20px;
background: var(--lightGreen);
color: var(--white);
font-weight: bold;
border-radius: 5px;
}
.history-name {
font-size: 18px;
font-weight: bold;
margin: 0 10px 10px 0;
text-align: center;
}
.history-info {
display: flex;
text-align: center;
margin: 20px auto 0;
}
.history-info >>> .el-table .cell {
line-height: unset;
}
.history-avatar >>> .el-table .el-table__row .el-table__cell {
padding: 3.5px 0;
}
.history-info >>> .el-table::before {
height: unset;
}
</style>

@ -1,369 +0,0 @@
<template>
<div>
<el-tag effect="dark" class="my-tag">
<svg viewBox="0 0 1024 1024" width="20" height="20" style="vertical-align: -3px;">
<path d="M0 0h1024v1024H0V0z" fill="#202425" opacity=".01"></path>
<path
d="M682.666667 204.8h238.933333a34.133333 34.133333 0 0 1 34.133333 34.133333v648.533334a68.266667 68.266667 0 0 1-68.266666 68.266666h-204.8V204.8z"
fill="#FFAA44"></path>
<path
d="M68.266667 921.6a34.133333 34.133333 0 0 0 34.133333 34.133333h785.066667a68.266667 68.266667 0 0 1-68.266667-68.266666V102.4a34.133333 34.133333 0 0 0-34.133333-34.133333H102.4a34.133333 34.133333 0 0 0-34.133333 34.133333v819.2z"
fill="#11AA66"></path>
<path
d="M238.933333 307.2a34.133333 34.133333 0 0 0 0 68.266667h136.533334a34.133333 34.133333 0 1 0 0-68.266667H238.933333z m0 204.8a34.133333 34.133333 0 1 0 0 68.266667h409.6a34.133333 34.133333 0 1 0 0-68.266667H238.933333z m0 204.8a34.133333 34.133333 0 1 0 0 68.266667h204.8a34.133333 34.133333 0 1 0 0-68.266667H238.933333z"
fill="#FFFFFF"></path>
</svg>
文章信息
</el-tag>
<el-form :model="article" :rules="rules" ref="ruleForm" label-width="150px"
class="demo-ruleForm">
<el-form-item label="标题" prop="articleTitle">
<el-input maxlength="30" v-model="article.articleTitle"></el-input>
</el-form-item>
<el-form-item label="内容" prop="articleContent">
<mavon-editor ref="md" @imgAdd="imgAdd" v-model="article.articleContent"/>
</el-form-item>
<el-form-item label="是否启用评论" prop="commentStatus">
<el-tag :type="article.commentStatus === false ? 'danger' : 'success'"
disable-transitions>
{{article.commentStatus === false ? '否' : '是'}}
</el-tag>
<el-switch v-model="article.commentStatus"></el-switch>
</el-form-item>
<el-form-item label="是否推荐" prop="recommendStatus">
<el-tag :type="article.recommendStatus === false ? 'danger' : 'success'"
disable-transitions>
{{article.recommendStatus === false ? '否' : '是'}}
</el-tag>
<el-switch v-model="article.recommendStatus"></el-switch>
</el-form-item>
<el-form-item label="是否可见" prop="viewStatus">
<el-tag :type="article.viewStatus === false ? 'danger' : 'success'"
disable-transitions>
{{article.viewStatus === false ? '否' : '是'}}
</el-tag>
<el-switch v-model="article.viewStatus"></el-switch>
</el-form-item>
<el-form-item v-if="article.viewStatus === false" label="不可见时的访问密码" prop="password">
<el-input maxlength="30" v-model="article.password"></el-input>
</el-form-item>
<el-form-item v-if="article.viewStatus === false" label="密码提示" prop="tips">
<el-input maxlength="60" v-model="article.tips"></el-input>
</el-form-item>
<el-form-item label="封面" prop="articleCover">
<div style="display: flex">
<el-input v-model="article.articleCover"></el-input>
<el-image class="table-td-thumb"
lazy
style="margin-left: 10px"
:preview-src-list="[article.articleCover]"
:src="article.articleCover"
fit="cover"></el-image>
</div>
<uploadPicture :isAdmin="true" :prefix="'articleCover'" style="margin-top: 10px" @addPicture="addArticleCover"
:maxSize="2"
:maxNumber="1"></uploadPicture>
</el-form-item>
<el-form-item label="分类" prop="sortId">
<el-select v-model="article.sortId" placeholder="请选择分类">
<el-option
v-for="item in sorts"
:key="item.id"
:label="item.sortName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="标签" prop="labelId">
<el-select v-model="article.labelId" placeholder="请选择标签">
<el-option
v-for="item in labelsTemp"
:key="item.id"
:label="item.labelName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
<div class="myCenter" style="margin-bottom: 22px">
<el-button type="primary" @click="submitForm('ruleForm')"></el-button>
<el-button type="danger" @click="resetForm('ruleForm')"></el-button>
</div>
</div>
</template>
<script>
const uploadPicture = () => import( "../common/uploadPicture");
export default {
components: {
uploadPicture
},
data() {
return {
id: this.$route.query.id,
article: {
articleTitle: "",
articleContent: "",
commentStatus: true,
recommendStatus: false,
viewStatus: true,
password: "",
tips: "",
articleCover: "",
sortId: null,
labelId: null
},
sorts: [],
labels: [],
labelsTemp: [],
rules: {
articleTitle: [
{required: true, message: '请输入标题', trigger: 'change'}
],
articleContent: [
{required: true, message: '请输入内容', trigger: 'change'}
],
commentStatus: [
{required: true, message: '是否启用评论', trigger: 'change'}
],
recommendStatus: [
{required: true, message: '是否推荐', trigger: 'change'}
],
viewStatus: [
{required: true, message: '是否可见', trigger: 'change'}
],
articleCover: [
{required: true, message: '封面', trigger: 'change'}
],
sortId: [
{required: true, message: '分类', trigger: 'change'}
],
labelId: [
{required: true, message: '标签', trigger: 'blur'}
]
}
}
},
computed: {},
watch: {
'article.sortId'(newVal, oldVal) {
if (oldVal !== null) {
this.article.labelId = null;
}
if (!this.$common.isEmpty(newVal) && !this.$common.isEmpty(this.labels)) {
this.labelsTemp = this.labels.filter(l => l.sortId === newVal);
}
}
},
created() {
this.getSortAndLabel();
},
mounted() {
},
methods: {
imgAdd(pos, file) {
let suffix = "";
if (file.name.lastIndexOf('.') !== -1) {
suffix = file.name.substring(file.name.lastIndexOf('.'));
}
let key = "articlePicture" + "/" + this.$store.state.currentAdmin.username.replace(/[^a-zA-Z]/g, '') + this.$store.state.currentAdmin.id + new Date().getTime() + Math.floor(Math.random() * 1000) + suffix;
let storeType = localStorage.getItem("defaultStoreType");
let fd = new FormData();
fd.append("file", file);
fd.append("key", key);
fd.append("relativePath", key);
fd.append("type", "articlePicture");
fd.append("storeType", storeType);
if (storeType === "local") {
this.saveLocal(pos, fd);
} else if (storeType === "qiniu") {
this.saveQiniu(pos, fd);
}
},
saveLocal(pos, fd) {
this.$http.upload(this.$constant.baseURL + "/resource/upload", fd, true)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
let url = res.data;
this.$refs.md.$img2Url(pos, url);
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
saveQiniu(pos, fd) {
this.$http.get(this.$constant.baseURL + "/qiniu/getUpToken", {key: fd.get("key")}, true)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
fd.append("token", res.data);
this.$http.uploadQiniu(this.$constant.qiniuUrl, fd)
.then((res) => {
if (!this.$common.isEmpty(res.key)) {
let url = this.$constant.qiniuDownload + res.key;
let file = fd.get("file");
this.$common.saveResource(this, "articlePicture", url, file.size, file.type, "qiniu", true);
this.$refs.md.$img2Url(pos, url);
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
addArticleCover(res) {
this.article.articleCover = res;
},
getSortAndLabel() {
this.$http.get(this.$constant.baseURL + "/webInfo/listSortAndLabel")
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.sorts = res.data.sorts;
this.labels = res.data.labels;
if (!this.$common.isEmpty(this.id)) {
this.getArticle();
}
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
getArticle() {
this.$http.get(this.$constant.baseURL + "/admin/article/getArticleById", {id: this.id}, true)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.article = res.data;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
submitForm(formName) {
if (this.article.viewStatus === false && this.$common.isEmpty(this.article.password)) {
this.$message({
message: "文章不可见时必须输入密码!",
type: "error"
});
return;
}
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.$common.isEmpty(this.id)) {
this.saveArticle(this.article, "/article/saveArticle")
} else {
this.article.id = this.id;
this.saveArticle(this.article, "/article/updateArticle")
}
} else {
this.$message({
message: "请完善必填项!",
type: "error"
});
}
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
if (!this.$common.isEmpty(this.id)) {
this.getArticle();
}
},
saveArticle(value, url) {
this.$confirm('确认保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
center: true
}).then(() => {
this.$http.post(this.$constant.baseURL + url, value, true)
.then((res) => {
this.$message({
message: "保存成功!",
type: "success"
});
this.$router.push({path: '/postList'});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}).catch(() => {
this.$message({
type: 'success',
message: '已取消保存!'
});
});
}
}
}
</script>
<style scoped>
.my-tag {
margin-bottom: 20px;
width: 100%;
text-align: left;
background: var(--lightYellow);
border: none;
height: 40px;
line-height: 40px;
font-size: 16px;
color: var(--black);
}
.table-td-thumb {
border-radius: 2px;
width: 40px;
height: 40px;
}
.el-switch {
margin-left: 10px;
}
.el-form-item {
margin-bottom: 40px;
}
</style>

@ -1,304 +0,0 @@
<template>
<div>
<div class="handle-box">
<el-select v-model="pagination.recommendStatus" placeholder="是否推荐" style="width: 120px" class="mrb10">
<el-option key="1" label="是" :value="true"></el-option>
<el-option key="2" label="否" :value="false"></el-option>
</el-select>
<el-select style="width: 140px" class="mrb10" v-model="pagination.sortId" placeholder="请选择分类">
<el-option
v-for="item in sorts"
:key="item.id"
:label="item.sortName"
:value="item.id">
</el-option>
</el-select>
<el-select style="width: 140px" class="mrb10" v-model="pagination.labelId" placeholder="请选择标签">
<el-option
v-for="item in labelsTemp"
:key="item.id"
:label="item.labelName"
:value="item.id">
</el-option>
</el-select>
<el-input v-model="pagination.searchKey" placeholder="文章标题" class="handle-input mrb10"></el-input>
<el-button type="primary" icon="el-icon-search" @click="searchArticles()"></el-button>
<el-button type="danger" @click="clearSearch()"></el-button>
<el-button type="primary" @click="$router.push({path: '/postEdit'})">新增文章</el-button>
</div>
<el-table :data="articles" border class="table" header-cell-class-name="table-header">
<el-table-column prop="id" label="ID" width="55" align="center"></el-table-column>
<el-table-column prop="username" label="作者" align="center"></el-table-column>
<el-table-column prop="articleTitle" label="文章标题" align="center"></el-table-column>
<el-table-column prop="sort.sortName" label="分类" align="center"></el-table-column>
<el-table-column prop="label.labelName" label="标签" align="center"></el-table-column>
<el-table-column prop="viewCount" label="浏览量" align="center"></el-table-column>
<el-table-column prop="likeCount" label="点赞数" align="center"></el-table-column>
<el-table-column label="是否可见" align="center">
<template slot-scope="scope">
<el-tag :type="scope.row.viewStatus === false ? 'danger' : 'success'"
disable-transitions>
{{scope.row.viewStatus === false ? '不可见' : '可见'}}
</el-tag>
<el-switch @click.native="changeStatus(scope.row, 1)" v-model="scope.row.viewStatus"></el-switch>
</template>
</el-table-column>
<el-table-column label="封面" align="center">
<template slot-scope="scope">
<el-image lazy class="table-td-thumb" :src="scope.row.articleCover" fit="cover"></el-image>
</template>
</el-table-column>
<el-table-column label="是否启用评论" align="center">
<template slot-scope="scope">
<el-tag :type="scope.row.commentStatus === false ? 'danger' : 'success'"
disable-transitions>
{{scope.row.commentStatus === false ? '否' : '是'}}
</el-tag>
<el-switch @click.native="changeStatus(scope.row, 2)" v-model="scope.row.commentStatus"></el-switch>
</template>
</el-table-column>
<el-table-column label="是否推荐" align="center">
<template slot-scope="scope">
<el-tag :type="scope.row.recommendStatus === false ? 'danger' : 'success'"
disable-transitions>
{{scope.row.recommendStatus === false ? '否' : '是'}}
</el-tag>
<el-switch @click.native="changeStatus(scope.row, 3)" v-model="scope.row.recommendStatus"></el-switch>
</template>
</el-table-column>
<el-table-column prop="commentCount" label="评论数" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column prop="updateTime" label="最终修改时间" align="center"></el-table-column>
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button type="text" icon="el-icon-edit" @click="handleEdit(scope.row)"></el-button>
<el-button type="text" icon="el-icon-delete" style="color: var(--orangeRed)" @click="handleDelete(scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next"
:current-page="pagination.current"
:page-size="pagination.size"
:total="pagination.total"
@current-change="handlePageChange">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
data() {
return {
isBoss: this.$store.state.currentAdmin.isBoss,
pagination: {
current: 1,
size: 10,
total: 0,
searchKey: "",
recommendStatus: null,
sortId: null,
labelId: null
},
articles: [],
sorts: [],
labels: [],
labelsTemp: []
}
},
computed: {},
watch: {
'pagination.sortId'(newVal) {
this.pagination.labelId = null;
if (!this.$common.isEmpty(newVal) && !this.$common.isEmpty(this.labels)) {
this.labelsTemp = this.labels.filter(l => l.sortId === newVal);
}
}
},
created() {
this.getArticles();
this.getSortAndLabel();
},
mounted() {
},
methods: {
getSortAndLabel() {
this.$http.get(this.$constant.baseURL + "/webInfo/listSortAndLabel")
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.sorts = res.data.sorts;
this.labels = res.data.labels;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
clearSearch() {
this.pagination = {
current: 1,
size: 10,
total: 0,
searchKey: "",
recommendStatus: null,
sortId: null,
labelId: null
}
this.getArticles();
},
getArticles() {
let url = "";
if (this.isBoss) {
url = "/admin/article/boss/list";
} else {
url = "/admin/article/user/list";
}
this.$http.post(this.$constant.baseURL + url, this.pagination, true)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.articles = res.data.records;
this.pagination.total = res.data.total;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
handlePageChange(val) {
this.pagination.current = val;
this.getArticles();
},
searchArticles() {
this.pagination.total = 0;
this.pagination.current = 1;
this.getArticles();
},
changeStatus(article, flag) {
let param;
if (flag === 1) {
param = {
articleId: article.id,
viewStatus: article.viewStatus
}
} else if (flag === 2) {
param = {
articleId: article.id,
commentStatus: article.commentStatus
}
} else if (flag === 3) {
param = {
articleId: article.id,
recommendStatus: article.recommendStatus
}
}
this.$http.get(this.$constant.baseURL + "/admin/article/changeArticleStatus", param, true)
.then((res) => {
if (flag === 1) {
this.$message({
duration: 0,
showClose: true,
message: "修改成功!注意,文章不可见时必须设置密码才能访问!",
type: "warning"
});
} else {
this.$message({
message: "修改成功!",
type: "success"
});
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
handleDelete(item) {
this.$confirm('确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
center: true
}).then(() => {
this.$http.get(this.$constant.baseURL + "/article/deleteArticle", {id: item.id}, true)
.then((res) => {
this.pagination.current = 1;
this.getArticles();
this.$message({
message: "删除成功!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}).catch(() => {
this.$message({
type: 'success',
message: '已取消删除!'
});
});
},
handleEdit(item) {
this.$router.push({path: '/postEdit', query: {id: item.id}});
}
}
}
</script>
<style scoped>
.handle-box {
margin-bottom: 20px;
}
.handle-input {
width: 160px;
display: inline-block;
}
.table {
width: 100%;
font-size: 14px;
}
.mrb10 {
margin-right: 10px;
margin-bottom: 10px;
}
.table-td-thumb {
display: block;
margin: auto;
width: 40px;
height: 40px;
}
.pagination {
margin: 20px 0;
text-align: right;
}
.el-switch {
margin: 5px;
}
</style>

@ -1,270 +0,0 @@
<template>
<div>
<div>
<div class="handle-box">
<el-select clearable v-model="pagination.resourceType" placeholder="资源类型" class="handle-select mrb10">
<el-option key="20" label="公共资源" value="assets"></el-option>
<el-option key="10" label="表情包" value="internetMeme"></el-option>
<el-option key="1" label="用户头像" value="userAvatar"></el-option>
<el-option key="2" label="文章封面" value="articleCover"></el-option>
<el-option key="3" label="文章图片" value="articlePicture"></el-option>
<el-option key="5" label="网站头像" value="webAvatar"></el-option>
<el-option key="4" label="背景图片" value="webBackgroundImage"></el-option>
<el-option key="6" label="随机头像" value="randomAvatar"></el-option>
<el-option key="7" label="随机封面" value="randomCover"></el-option>
<el-option key="8" label="画笔图片" value="graffiti"></el-option>
<el-option key="9" label="评论图片" value="commentPicture"></el-option>
<el-option key="11" label="聊天群头像" value="im/groupAvatar"></el-option>
<el-option key="12" label="群聊天图片" value="im/groupMessage"></el-option>
<el-option key="13" label="朋友聊天图片" value="im/friendMessage"></el-option>
<el-option key="14" label="音乐声音" value="funnyUrl"></el-option>
<el-option key="15" label="音乐封面" value="funnyCover"></el-option>
<el-option key="16" label="Love.Cover" value="love/bgCover"></el-option>
<el-option key="17" label="Love.Man" value="love/manCover"></el-option>
<el-option key="18" label="Love.Woman" value="love/womanCover"></el-option>
<el-option key="19" label="收藏夹封面" value="favoritesCover"></el-option>
</el-select>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button type="primary" @click="addResources()"></el-button>
</div>
<el-table :data="resources" border class="table" header-cell-class-name="table-header">
<el-table-column prop="id" label="ID" width="55" align="center"></el-table-column>
<el-table-column prop="userId" label="用户ID" align="center"></el-table-column>
<el-table-column prop="type" label="资源类型" align="center"></el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<el-tag :type="scope.row.status === false ? 'danger' : 'success'"
disable-transitions>
{{scope.row.status === false ? '禁用' : '启用'}}
</el-tag>
<el-switch @click.native="changeStatus(scope.row)" v-model="scope.row.status"></el-switch>
</template>
</el-table-column>
<el-table-column label="路径" align="center">
<template slot-scope="scope">
<template v-if="!$common.isEmpty(scope.row.mimeType) && scope.row.mimeType.includes('image')">
<el-image lazy :preview-src-list="[scope.row.path]" class="table-td-thumb" :src="scope.row.path"
fit="cover"></el-image>
</template>
<template v-else>
{{scope.row.path}}
</template>
</template>
</el-table-column>
<el-table-column label="大小(KB)" align="center">
<template slot-scope="scope">
{{Math.round(scope.row.size / 1024)}}
</template>
</el-table-column>
<el-table-column prop="mimeType" label="类型" align="center"></el-table-column>
<el-table-column prop="storeType" label="存储平台" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button type="text" icon="el-icon-delete" style="color: var(--orangeRed)"
@click="handleDelete(scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next"
:current-page="pagination.current"
:page-size="pagination.size"
:total="pagination.total"
@current-change="handlePageChange">
</el-pagination>
</div>
</div>
<el-dialog title="图片"
:visible.sync="resourceDialog"
width="25%"
:append-to-body="true"
destroy-on-close
center>
<div>
<div style="display: flex;margin-bottom: 10px">
<div style="line-height: 40px">存储平台</div>
<el-select v-model="storeType" placeholder="存储平台" style="width: 120px">
<el-option
v-for="(item, i) in storeTypes"
:key="i"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<uploadPicture :isAdmin="true" :prefix="pagination.resourceType" @addPicture="addPicture" :maxSize="5"
:storeType="storeType"
:maxNumber="10"></uploadPicture>
</div>
</el-dialog>
</div>
</template>
<script>
const uploadPicture = () => import( "../common/uploadPicture");
export default {
components: {
uploadPicture
},
data() {
return {
pagination: {
current: 1,
size: 10,
total: 0,
resourceType: ""
},
resources: [],
resourceDialog: false,
storeTypes: [
{label: "服务器", value: "local"},
{label: "七牛云", value: "qiniu"}
],
storeType: localStorage.getItem("defaultStoreType")
}
},
computed: {},
watch: {},
created() {
this.getResources();
},
mounted() {
},
methods: {
handleDelete(item) {
this.$confirm('确认删除资源?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
center: true
}).then(() => {
this.$http.post(this.$constant.baseURL + "/resource/deleteResource", {path: item.path}, true, false)
.then((res) => {
this.pagination.current = 1;
this.getResources();
this.$message({
message: "删除成功!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}).catch(() => {
this.$message({
type: 'success',
message: '已取消删除!'
});
});
},
addPicture(res) {
},
addResources() {
if (this.$common.isEmpty(this.pagination.resourceType)) {
this.$message({
message: "请选择资源类型!",
type: "error"
});
return;
}
this.resourceDialog = true;
},
search() {
this.pagination.total = 0;
this.pagination.current = 1;
this.getResources();
},
getResources() {
this.$http.post(this.$constant.baseURL + "/resource/listResource", this.pagination, true)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.resources = res.data.records;
this.pagination.total = res.data.total;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
changeStatus(item) {
this.$http.get(this.$constant.baseURL + "/resource/changeResourceStatus", {
id: item.id,
flag: item.status
}, true)
.then((res) => {
this.$message({
message: "修改成功!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
handlePageChange(val) {
this.pagination.current = val;
this.getResources();
}
}
}
</script>
<style scoped>
.handle-box {
margin-bottom: 20px;
}
.handle-select {
width: 200px;
}
.table {
width: 100%;
font-size: 14px;
}
.mrb10 {
margin-right: 10px;
margin-bottom: 10px;
}
.table-td-thumb {
display: block;
margin: auto;
width: 40px;
height: 40px;
}
.pagination {
margin: 20px 0;
text-align: right;
}
.el-switch {
margin: 5px;
}
</style>

@ -1,392 +0,0 @@
<template>
<div>
<div>
<div class="handle-box">
<el-select clearable v-model="pagination.resourceType" placeholder="资源路径类型" class="handle-select mrb10">
<el-option
v-for="(item, i) in resourceTypes"
:key="i"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select clearable v-model="pagination.status" placeholder="状态" class="handle-select mrb10">
<el-option key="1" label="启用" :value="true"></el-option>
<el-option key="2" label="禁用" :value="false"></el-option>
</el-select>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button type="primary" @click="addResourcePathDialog = true">新增资源路径</el-button>
</div>
<el-table :data="resourcePaths" border class="table" header-cell-class-name="table-header">
<el-table-column prop="id" label="ID" width="55" align="center"></el-table-column>
<el-table-column prop="title" label="标题" align="center"></el-table-column>
<el-table-column prop="classify" label="分类" align="center"></el-table-column>
<el-table-column prop="introduction" label="简介" align="center"></el-table-column>
<el-table-column label="封面" align="center">
<template slot-scope="scope">
<el-image lazy :preview-src-list="[scope.row.cover]" class="table-td-thumb" :src="scope.row.cover"
fit="cover"></el-image>
</template>
</el-table-column>
<el-table-column prop="url" label="链接" align="center"></el-table-column>
<el-table-column prop="type" label="资源类型" align="center"></el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<el-tag :type="scope.row.status === false ? 'danger' : 'success'"
disable-transitions>
{{scope.row.status === false ? '禁用' : '启用'}}
</el-tag>
<el-switch @click.native="changeStatus(scope.row)" v-model="scope.row.status"></el-switch>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button type="text" icon="el-icon-edit" @click="handleEdit(scope.row)"></el-button>
<el-button type="text" icon="el-icon-delete" style="color: var(--orangeRed)"
@click="handleDelete(scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next"
:current-page="pagination.current"
:page-size="pagination.size"
:total="pagination.total"
@current-change="handlePageChange">
</el-pagination>
</div>
</div>
<el-dialog title="图片"
:visible.sync="coverDialog"
width="25%"
:append-to-body="true"
destroy-on-close
center>
<div>
<uploadPicture :isAdmin="true" :prefix="resourcePath.type + 'Cover'" @addPicture="addPicture" :maxSize="5"
:maxNumber="1"></uploadPicture>
</div>
</el-dialog>
<el-dialog title="文件"
:visible.sync="uploadDialog"
width="25%"
:append-to-body="true"
destroy-on-close
center>
<div>
<uploadPicture :isAdmin="true" :prefix="resourcePath.type + 'Url'" @addPicture="addFile" :maxSize="10"
:maxNumber="1" :listType="'text'" :accept="'image/*, video/*, audio/*'"></uploadPicture>
</div>
</el-dialog>
<el-dialog title="资源路径"
:visible.sync="addResourcePathDialog"
width="50%"
:before-close="clearDialog"
:append-to-body="true"
:close-on-click-modal="false"
center>
<div>
<div>
<div style="margin-bottom: 5px">标题</div>
<el-input maxlength="60" v-model="resourcePath.title"></el-input>
<div style="margin-top: 10px;margin-bottom: 5px">分类</div>
<el-input :disabled="!['friendUrl', 'lovePhoto', 'funny', 'favorites'].includes(resourcePath.type)"
maxlength="30" v-model="resourcePath.classify"></el-input>
<div style="margin-top: 10px;margin-bottom: 5px">简介</div>
<el-input :disabled="!['friendUrl', 'favorites'].includes(resourcePath.type)"
maxlength="1000" v-model="resourcePath.introduction"></el-input>
<div style="margin-top: 10px;margin-bottom: 5px">封面</div>
<div style="display: flex">
<el-input v-model="resourcePath.cover"></el-input>
<div style="width: 66px;margin: 3.5px 0 0 10px">
<proButton :info="'上传封面'"
@click.native="addResourcePathCover()"
:before="$constant.before_color_1"
:after="$constant.after_color_1">
</proButton>
</div>
</div>
<div style="margin-top: 10px;margin-bottom: 5px">链接</div>
<div style="display: flex">
<el-input :disabled="!['friendUrl', 'funny', 'favorites'].includes(resourcePath.type)"
v-model="resourcePath.url"></el-input>
<div style="width: 66px;margin: 3.5px 0 0 10px">
<proButton :info="'上传文件'"
@click.native="addResourcePathUrl()"
:before="$constant.before_color_1"
:after="$constant.after_color_1">
</proButton>
</div>
</div>
<div style="margin-top: 10px;margin-bottom: 5px">资源类型</div>
<el-select v-model="resourcePath.type" placeholder="资源路径类型" class="handle-select mrb10">
<el-option
v-for="(item, i) in resourceTypes"
:key="i"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<div style="margin-top: 10px;margin-bottom: 5px">备注</div>
<el-input :disabled="![].includes(resourcePath.type)"
maxlength="1000" v-model="resourcePath.remark" type="textarea"></el-input>
</div>
<div style="display: flex;margin-top: 30px" class="myCenter">
<proButton :info="'提交'"
@click.native="addResourcePath()"
:before="$constant.before_color_2"
:after="$constant.after_color_2">
</proButton>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
const uploadPicture = () => import( "../common/uploadPicture");
const proButton = () => import( "../common/proButton");
export default {
components: {
uploadPicture,
proButton
},
data() {
return {
resourceTypes: [
{label: "友链", value: "friendUrl"},
{label: "恋爱图片", value: "lovePhoto"},
{label: "音乐", value: "funny"},
{label: "收藏夹", value: "favorites"}
],
pagination: {
current: 1,
size: 10,
total: 0,
resourceType: "",
status: null
},
resourcePaths: [],
coverDialog: false,
uploadDialog: false,
addResourcePathDialog: false,
isUpdate: false,
resourcePath: {
title: "",
classify: "",
introduction: "",
cover: "",
url: "",
type: "",
remark: ""
}
}
},
computed: {},
watch: {},
created() {
this.getResourcePaths();
},
mounted() {
},
methods: {
addPicture(res) {
this.resourcePath.cover = res;
this.coverDialog = false;
},
addFile(res) {
this.resourcePath.url = res;
this.uploadDialog = false;
},
addResourcePathUrl() {
if (this.addResourcePathDialog === false) {
return;
}
if (!['funny'].includes(this.resourcePath.type)) {
this.$message({
message: "请选择有效资源类型!",
type: "error"
});
return;
}
this.uploadDialog = true;
},
addResourcePathCover() {
if (this.addResourcePathDialog === false) {
return;
}
if (this.$common.isEmpty(this.resourcePath.type)) {
this.$message({
message: "请选择资源类型!",
type: "error"
});
return;
}
this.coverDialog = true;
},
addResourcePath() {
if (this.$common.isEmpty(this.resourcePath.title) || this.$common.isEmpty(this.resourcePath.type)) {
this.$message({
message: "标题和资源类型不能为空!",
type: "error"
});
return;
}
this.$http.post(this.$constant.baseURL + "/webInfo/" + (this.isUpdate ? "updateResourcePath" : "saveResourcePath"), this.resourcePath, true)
.then((res) => {
this.$message({
message: "保存成功!",
type: "success"
});
this.addResourcePathDialog = false;
this.clearDialog();
this.search();
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
search() {
this.pagination.total = 0;
this.pagination.current = 1;
this.getResourcePaths();
},
getResourcePaths() {
this.$http.post(this.$constant.baseURL + "/webInfo/listResourcePath", this.pagination, true)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.resourcePaths = res.data.records;
this.pagination.total = res.data.total;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
changeStatus(item) {
this.$http.post(this.$constant.baseURL + "/webInfo/updateResourcePath", item, true)
.then((res) => {
this.$message({
message: "修改成功!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
handlePageChange(val) {
this.pagination.current = val;
this.getResourcePaths();
},
handleDelete(item) {
this.$confirm('确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
center: true
}).then(() => {
this.$http.get(this.$constant.baseURL + "/webInfo/deleteResourcePath", {id: item.id}, true)
.then((res) => {
this.search();
this.$message({
message: "删除成功!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}).catch(() => {
this.$message({
type: 'success',
message: '已取消删除!'
});
});
},
handleEdit(item) {
this.resourcePath = JSON.parse(JSON.stringify(item));
this.addResourcePathDialog = true;
this.isUpdate = true;
},
clearDialog() {
this.isUpdate = false;
this.addResourcePathDialog = false;
this.resourcePath = {
title: "",
classify: "",
introduction: "",
cover: "",
url: "",
type: "",
remark: ""
}
}
}
}
</script>
<style scoped>
.handle-box {
margin-bottom: 20px;
}
.handle-select {
width: 200px;
}
.table {
width: 100%;
font-size: 14px;
}
.mrb10 {
margin-right: 10px;
margin-bottom: 10px;
}
.table-td-thumb {
display: block;
margin: auto;
width: 40px;
height: 40px;
}
.pagination {
margin: 20px 0;
text-align: right;
}
.el-switch {
margin: 5px;
}
</style>

@ -1,323 +0,0 @@
<template>
<div>
<div style="margin-bottom: 20px">
<el-button type="primary" @click="sortDialog = true">新增分类</el-button>
</div>
<el-table :data="sortInfo" border class="table" header-cell-class-name="table-header">
<el-table-column prop="id" label="ID" width="55" align="center"></el-table-column>
<el-table-column prop="sortName" label="分类名称" align="center"></el-table-column>
<el-table-column prop="sortDescription" label="分类描述" align="center"></el-table-column>
<el-table-column label="分类类型" align="center">
<template slot-scope="scope">
<span v-if="scope.row.sortType === 0"></span>
<span v-else-if="scope.row.sortType === 1">普通分类</span>
</template>
</el-table-column>
<el-table-column prop="priority" label="分类优先级" align="center"></el-table-column>
<el-table-column prop="countOfSort" label="文章总数" align="center"></el-table-column>
<el-table-column label="操作" width="380" align="center">
<template slot-scope="scope">
<el-button type="text" icon="el-icon-edit" @click="editSort(scope.row)">
编辑分类
</el-button>
<el-button type="text" icon="el-icon-edit" @click="sayLabel(scope.row)">
查看标签
</el-button>
<el-button type="text" icon="el-icon-edit" @click="insertLabel(scope.row)">
新增标签
</el-button>
<el-button type="text" icon="el-icon-delete" style="color: var(--orangeRed)"
@click="deleteHandle(scope.row.id, 1)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-table v-if="!$common.isEmpty(sort)" :data="sort.labels" border class="table"
style="margin-top: 40px"
header-cell-class-name="table-header">
<el-table-column prop="id" label="ID" width="55" align="center"></el-table-column>
<el-table-column label="分类名称" align="center">
<span>{{sort.sortName}}</span>
</el-table-column>
<el-table-column prop="labelName" label="标签名称" align="center"></el-table-column>
<el-table-column prop="labelDescription" label="标签描述" align="center"></el-table-column>
<el-table-column prop="countOfLabel" label="文章总数" align="center"></el-table-column>
<el-table-column label="操作" width="320" align="center">
<template slot-scope="scope">
<el-button type="text" icon="el-icon-edit" @click="editLabel(scope.row)">
编辑标签
</el-button>
<el-button type="text" icon="el-icon-delete" style="color: var(--orangeRed)"
@click="deleteHandle(scope.row.id, 2)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog title="分类"
:visible.sync="sortDialog"
width="30%"
:before-close="handleClose"
:append-to-body="true"
destroy-on-close
center>
<div class="my-dialog">
<div class="myCenter">
<el-radio-group v-model="sortForHttp.sortType">
<el-radio-button :label="0">导航栏分类</el-radio-button>
<el-radio-button :label="1">普通分类</el-radio-button>
</el-radio-group>
</div>
<el-input placeholder="请输入分类名称" v-model="sortForHttp.sortName">
<template slot="prepend">分类名称</template>
</el-input>
<el-input placeholder="请输入分类描述" v-model="sortForHttp.sortDescription">
<template slot="prepend">分类描述</template>
</el-input>
<el-input type="number" placeholder="请输入整数,数字小的在前面"
v-model="sortForHttp.priority">
<template slot="prepend">分类优先级</template>
</el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose()"> </el-button>
<el-button type="primary" @click="saveSortEdit()"> </el-button>
</span>
</el-dialog>
<el-dialog title="标签"
:visible.sync="labelDialog"
width="30%"
:before-close="handleClose"
:append-to-body="true"
destroy-on-close
center>
<div class="my-dialog">
<el-input placeholder="请输入标签名称" v-model="labelForHttp.labelName">
<template slot="prepend">标签名称</template>
</el-input>
<el-input placeholder="请输入标签描述" v-model="labelForHttp.labelDescription">
<template slot="prepend">标签描述</template>
</el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose()"> </el-button>
<el-button type="primary" @click="saveLabelEdit()"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
sortDialog: false,
labelDialog: false,
sortInfo: [],
sort: {},
sortForHttp: {
id: null,
sortName: "",
sortDescription: "",
sortType: null,
priority: null
},
labelForHttp: {
id: null,
sortId: null,
labelName: "",
labelDescription: ""
}
}
},
computed: {},
watch: {},
created() {
this.getSortInfo();
},
mounted() {
},
methods: {
deleteHandle(id, flag) {
let url;
if (flag === 1) {
url = "/webInfo/deleteSort";
} else if (flag === 2) {
url = "/webInfo/deleteLabel";
} else {
return;
}
this.$confirm('确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
center: true
}).then(() => {
this.$http.get(this.$constant.baseURL + url, {id: id}, true)
.then((res) => {
this.$message({
message: "删除成功!",
type: "success"
});
this.getSortInfo();
this.sort = {};
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}).catch(() => {
this.$message({
type: 'success',
message: '已取消删除!'
});
});
},
saveSortEdit() {
if (this.$common.isEmpty(this.sortForHttp.sortType) ||
this.$common.isEmpty(this.sortForHttp.priority) ||
this.$common.isEmpty(this.sortForHttp.sortName) ||
this.$common.isEmpty(this.sortForHttp.sortDescription)) {
this.$message({
message: "请完善所有分类信息!",
type: "error"
});
return;
}
let url;
if (this.$common.isEmpty(this.sortForHttp.id)) {
url = "/webInfo/saveSort";
} else {
url = "/webInfo/updateSort";
}
this.$http.post(this.$constant.baseURL + url, this.sortForHttp, true)
.then((res) => {
this.$message({
message: "保存成功!",
type: "success"
});
this.getSortInfo();
this.handleClose();
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
saveLabelEdit() {
if (this.$common.isEmpty(this.labelForHttp.labelName) ||
this.$common.isEmpty(this.labelForHttp.labelDescription)) {
this.$message({
message: "请完善所有标签信息!",
type: "error"
});
return;
}
let url;
if (this.$common.isEmpty(this.labelForHttp.id)) {
url = "/webInfo/saveLabel";
} else {
url = "/webInfo/updateLabel";
}
this.$http.post(this.$constant.baseURL + url, this.labelForHttp, true)
.then((res) => {
this.$message({
message: "保存成功!",
type: "success"
});
this.getSortInfo();
this.handleClose();
this.sort = {};
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
editSort(sort) {
this.sortDialog = true;
this.sortForHttp.id = sort.id;
this.sortForHttp.sortName = sort.sortName;
this.sortForHttp.sortDescription = sort.sortDescription;
this.sortForHttp.sortType = sort.sortType;
this.sortForHttp.priority = sort.priority;
},
editLabel(label) {
this.labelDialog = true;
this.labelForHttp.id = label.id;
this.labelForHttp.sortId = label.sortId;
this.labelForHttp.labelName = label.labelName;
this.labelForHttp.labelDescription = label.labelDescription;
},
insertLabel(sort) {
this.labelForHttp.sortId = sort.id;
this.labelDialog = true;
},
handleClose() {
this.labelForHttp = {
id: null,
sortId: null,
labelName: "",
labelDescription: ""
};
this.sortForHttp = {
id: null,
sortName: "",
sortDescription: "",
sortType: null,
priority: null
};
this.sortDialog = false;
this.labelDialog = false;
},
sayLabel(sort) {
this.sort = sort;
},
getSortInfo() {
this.$http.get(this.$constant.baseURL + "/webInfo/getSortInfo")
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.sortInfo = res.data;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}
}
}
</script>
<style scoped>
.my-dialog > div {
margin: 12px;
}
.my-dialog >>> input::-webkit-inner-spin-button {
appearance: none;
}
</style>

@ -1,137 +0,0 @@
<template>
<div>
<el-tag effect="dark" class="my-tag">
<svg viewBox="0 0 1024 1024" width="20" height="20" style="vertical-align: -3px;">
<path d="M0 0h1024v1024H0V0z" fill="#202425" opacity=".01"></path>
<path
d="M682.666667 204.8h238.933333a34.133333 34.133333 0 0 1 34.133333 34.133333v648.533334a68.266667 68.266667 0 0 1-68.266666 68.266666h-204.8V204.8z"
fill="#FFAA44"></path>
<path
d="M68.266667 921.6a34.133333 34.133333 0 0 0 34.133333 34.133333h785.066667a68.266667 68.266667 0 0 1-68.266667-68.266666V102.4a34.133333 34.133333 0 0 0-34.133333-34.133333H102.4a34.133333 34.133333 0 0 0-34.133333 34.133333v819.2z"
fill="#11AA66"></path>
<path
d="M238.933333 307.2a34.133333 34.133333 0 0 0 0 68.266667h136.533334a34.133333 34.133333 0 1 0 0-68.266667H238.933333z m0 204.8a34.133333 34.133333 0 1 0 0 68.266667h409.6a34.133333 34.133333 0 1 0 0-68.266667H238.933333z m0 204.8a34.133333 34.133333 0 1 0 0 68.266667h204.8a34.133333 34.133333 0 1 0 0-68.266667H238.933333z"
fill="#FFFFFF"></path>
</svg>
留言列表
</el-tag>
<el-table :data="treeHoles" border class="table" header-cell-class-name="table-header">
<el-table-column prop="id" label="ID" width="55" align="center"></el-table-column>
<el-table-column prop="message" label="留言内容" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button type="text" icon="el-icon-delete" style="color: var(--orangeRed)" @click="handleDelete(scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next"
:current-page="pagination.current"
:page-size="pagination.size"
:total="pagination.total"
@current-change="handlePageChange">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
data() {
return {
pagination: {
current: 1,
size: 10,
total: 0
},
treeHoles: []
}
},
computed: {},
watch: {},
created() {
this.getTreeHoles()
},
mounted() {
},
methods: {
getTreeHoles() {
this.$http.post(this.$constant.baseURL + "/admin/treeHole/boss/list", this.pagination, true)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.treeHoles = res.data.records;
this.pagination.total = res.data.total;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
handlePageChange(val) {
this.pagination.current = val;
this.getTreeHoles();
},
handleDelete(item) {
this.$confirm('确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
center: true
}).then(() => {
this.$http.get(this.$constant.baseURL + "/webInfo/deleteTreeHole", {id: item.id}, true)
.then((res) => {
this.pagination.current = 1;
this.getTreeHoles();
this.$message({
message: "删除成功!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}).catch(() => {
this.$message({
type: 'success',
message: '已取消删除!'
});
});
}
}
}
</script>
<style scoped>
.my-tag {
margin-bottom: 40px;
width: 100%;
text-align: left;
background: var(--lightYellow);
border: none;
height: 40px;
line-height: 40px;
font-size: 16px;
color: var(--black);
}
.pagination {
margin: 20px 0;
text-align: right;
}
</style>

@ -1,319 +0,0 @@
<template>
<div>
<div>
<div class="handle-box">
<el-select v-model="pagination.userType" placeholder="用户类型" class="handle-select mrb10">
<el-option key="1" label="Boss" :value="0"></el-option>
<el-option key="2" label="管理员" :value="1"></el-option>
<el-option key="3" label="普通用户" :value="2"></el-option>
</el-select>
<el-select v-model="pagination.userStatus" placeholder="用户状态" class="handle-select mrb10">
<el-option key="1" label="启用" :value="true"></el-option>
<el-option key="2" label="禁用" :value="false"></el-option>
</el-select>
<el-input v-model="pagination.searchKey" placeholder="用户名/手机号" class="handle-input mrb10"></el-input>
<el-button type="primary" icon="el-icon-search" @click="searchUser()"></el-button>
<el-button type="danger" @click="clearSearch()"></el-button>
</div>
<el-table :data="users" border class="table" header-cell-class-name="table-header">
<el-table-column prop="id" label="ID" width="55" align="center"></el-table-column>
<el-table-column prop="username" label="用户名" align="center"></el-table-column>
<el-table-column prop="phoneNumber" label="手机号" align="center"></el-table-column>
<el-table-column prop="email" label="邮箱" align="center"></el-table-column>
<el-table-column label="援助" width="100" align="center">
<template slot-scope="scope">
<el-input size="medium" maxlength="30" v-model="scope.row.admire"
@blur="changeUserAdmire(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column label="用户状态" align="center">
<template slot-scope="scope">
<el-tag :type="scope.row.userStatus === false ? 'danger' : 'success'"
disable-transitions>
{{scope.row.userStatus === false ? '禁用' : '启用'}}
</el-tag>
<el-switch @click.native="changeUserStatus(scope.row)" v-model="scope.row.userStatus"></el-switch>
</template>
</el-table-column>
<el-table-column label="头像" align="center">
<template slot-scope="scope">
<el-image lazy class="table-td-thumb" :src="scope.row.avatar" fit="cover"></el-image>
</template>
</el-table-column>
<el-table-column label="性别" align="center">
<template slot-scope="scope">
<el-tag type="success"
v-if="scope.row.gender === 1"
disable-transitions>
</el-tag>
<el-tag type="success"
v-else-if="scope.row.gender === 2"
disable-transitions>
</el-tag>
<el-tag type="success"
v-else
disable-transitions>
保密
</el-tag>
</template>
</el-table-column>
<el-table-column prop="introduction" label="简介" align="center"></el-table-column>
<el-table-column label="用户类型" width="100" align="center">
<template slot-scope="scope">
<el-tag type="success"
v-if="scope.row.userType === 0"
style="cursor: pointer"
@click.native="editUser(scope.row)"
disable-transitions>
Boss
</el-tag>
<el-tag type="success"
v-else-if="scope.row.userType === 1"
style="cursor: pointer"
@click.native="editUser(scope.row)"
disable-transitions>
管理员
</el-tag>
<el-tag type="success"
v-else
style="cursor: pointer"
@click.native="editUser(scope.row)"
disable-transitions>
普通用户
</el-tag>
</template>
</el-table-column>
<el-table-column prop="createTime" label="注册时间" align="center"></el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next"
:current-page="pagination.current"
:page-size="pagination.size"
:total="pagination.total"
@current-change="handlePageChange">
</el-pagination>
</div>
</div>
<!-- 编辑弹出框 -->
<el-dialog title="修改用户类型"
:visible.sync="editVisible"
width="30%"
:before-close="handleClose"
:append-to-body="true"
destroy-on-close
center>
<div class="myCenter">
<el-radio-group v-model="changeUser.userType">
<el-radio-button :label="0">Boss</el-radio-button>
<el-radio-button :label="1">管理员</el-radio-button>
<el-radio-button :label="2">普通用户</el-radio-button>
</el-radio-group>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose()"> </el-button>
<el-button type="primary" @click="saveEdit()"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
pagination: {
current: 1,
size: 10,
total: 0,
searchKey: "",
userStatus: null,
userType: null
},
users: [],
changeUser: {
id: null,
userType: null
},
editVisible: false
}
},
computed: {},
watch: {},
created() {
this.getUsers();
},
mounted() {
},
methods: {
clearSearch() {
this.pagination = {
current: 1,
size: 10,
total: 0,
searchKey: "",
userStatus: null,
userType: null
}
this.getUsers();
},
getUsers() {
this.$http.post(this.$constant.baseURL + "/admin/user/list", this.pagination, true)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.users = res.data.records;
this.pagination.total = res.data.total;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
changeUserStatus(user) {
this.$http.get(this.$constant.baseURL + "/admin/user/changeUserStatus", {
userId: user.id,
flag: user.userStatus
}, true)
.then((res) => {
this.$message({
message: "修改成功!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
changeUserAdmire(user) {
if (!this.$common.isEmpty(user.admire)) {
this.$confirm('确认保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
center: true
}).then(() => {
this.$http.get(this.$constant.baseURL + "/admin/user/changeUserAdmire", {
userId: user.id,
admire: user.admire
}, true)
.then((res) => {
this.$message({
message: "修改成功!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}).catch(() => {
this.$message({
type: 'success',
message: '已取消保存!'
});
});
}
},
editUser(user) {
this.changeUser.id = user.id;
this.changeUser.userType = user.userType;
this.editVisible = true;
},
handlePageChange(val) {
this.pagination.current = val;
this.getUsers();
},
searchUser() {
this.pagination.total = 0;
this.pagination.current = 1;
this.getUsers();
},
handleClose() {
this.changeUser = {
id: null,
userType: null
};
this.editVisible = false;
},
saveEdit() {
this.$http.get(this.$constant.baseURL + "/admin/user/changeUserType", {
userId: this.changeUser.id,
userType: this.changeUser.userType
}, true)
.then((res) => {
this.handleClose();
this.getUsers();
this.$message({
message: "修改成功!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}
}
}
</script>
<style scoped>
.handle-box {
margin-bottom: 20px;
}
.handle-select {
width: 120px;
}
.handle-input {
width: 160px;
display: inline-block;
}
.table {
width: 100%;
font-size: 14px;
}
.mrb10 {
margin-right: 10px;
margin-bottom: 10px;
}
.table-td-thumb {
display: block;
margin: auto;
width: 40px;
height: 40px;
}
.pagination {
margin: 20px 0;
text-align: right;
}
.el-switch {
margin: 5px;
}
</style>

@ -1,111 +0,0 @@
<template>
<div class="myCenter verify-container">
<div class="verify-content">
<div>
<el-avatar :size="50" :src="$store.state.webInfo.avatar"></el-avatar>
</div>
<div>
<el-input v-model="account">
<template slot="prepend">账号</template>
</el-input>
</div>
<div>
<el-input v-model="password" type="password">
<template slot="prepend">密码</template>
</el-input>
</div>
<div>
<proButton :info="'提交'"
@click.native="login()"
:before="$constant.before_color_2"
:after="$constant.after_color_2">
</proButton>
</div>
</div>
</div>
</template>
<script>
const proButton = () => import( "../common/proButton");
export default {
components: {
proButton
},
data() {
return {
redirect: this.$route.query.redirect,
account: "",
password: ""
}
},
computed: {},
created() {
},
methods: {
login() {
if (this.$common.isEmpty(this.account) || this.$common.isEmpty(this.password)) {
this.$message({
message: "请输入账号或密码!",
type: "error"
});
return;
}
let user = {
account: this.account.trim(),
password: this.$common.encrypt(this.password.trim()),
isAdmin: true
};
this.$http.post(this.$constant.baseURL + "/user/login", user, true, false)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
localStorage.setItem("adminToken", res.data.accessToken);
this.$store.commit("loadCurrentAdmin", res.data);
this.account = "";
this.password = "";
this.$router.push({path: this.redirect});
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}
}
}
</script>
<style scoped>
.verify-container {
height: 100vh;
background: var(--verifyImage) center center / cover repeat;
}
.verify-content {
background: var(--maxWhiteMask);
padding: 30px 40px 5px;
position: relative;
}
.verify-content > div:first-child {
position: absolute;
left: 50%;
transform: translate(-50%);
top: -25px;
}
.verify-content > div:not(:first-child) {
margin: 25px 0;
}
.verify-content > div:last-child > div {
margin: 0 auto;
}
</style>

@ -1,552 +0,0 @@
<template>
<div>
<div>
<el-tag effect="dark" class="my-tag">
<svg viewBox="0 0 1024 1024" width="20" height="20" style="vertical-align: -4px;">
<path
d="M767.1296 808.6528c16.8448 0 32.9728 2.816 48.0256 8.0384 20.6848 7.1168 43.52 1.0752 57.1904-15.9744a459.91936 459.91936 0 0 0 70.5024-122.88c7.8336-20.48 1.0752-43.264-15.9744-57.088-49.6128-40.192-65.0752-125.3888-31.3856-185.856a146.8928 146.8928 0 0 1 30.3104-37.9904c16.2304-14.5408 22.1696-37.376 13.9264-57.6a461.27104 461.27104 0 0 0-67.5328-114.9952c-13.6192-16.9984-36.4544-22.9376-57.0368-15.8208a146.3296 146.3296 0 0 1-48.0256 8.0384c-70.144 0-132.352-50.8928-145.2032-118.7328-4.096-21.6064-20.736-38.5536-42.4448-41.8304-22.0672-3.2768-44.6464-5.0176-67.6864-5.0176-21.4528 0-42.5472 1.536-63.232 4.4032-22.3232 3.1232-40.2432 20.48-43.52 42.752-6.912 46.6944-36.0448 118.016-145.7152 118.4256-17.3056 0.0512-33.8944-2.9696-49.3056-8.448-21.0432-7.4752-44.3904-1.4848-58.368 15.9232A462.14656 462.14656 0 0 0 80.4864 348.16c-7.6288 20.0192-2.7648 43.008 13.4656 56.9344 55.5008 47.8208 71.7824 122.88 37.0688 185.1392a146.72896 146.72896 0 0 1-31.6416 39.168c-16.8448 14.7456-23.0912 38.1952-14.5408 58.9312 16.896 41.0112 39.5776 79.0016 66.9696 113.0496 13.9264 17.3056 37.2736 23.1936 58.2144 15.7184 15.4112-5.4784 32-8.4992 49.3056-8.4992 71.2704 0 124.7744 49.408 142.1312 121.2928 4.9664 20.48 21.4016 36.0448 42.24 39.168 22.2208 3.328 44.9536 5.0688 68.096 5.0688 23.3984 0 46.4384-1.792 68.864-5.1712 21.3504-3.2256 38.144-19.456 42.7008-40.5504 14.8992-68.8128 73.1648-119.7568 143.7696-119.7568z"
fill="#8C7BFD"></path>
<path
d="M511.8464 696.3712c-101.3248 0-183.7568-82.432-183.7568-183.7568s82.432-183.7568 183.7568-183.7568 183.7568 82.432 183.7568 183.7568-82.432 183.7568-183.7568 183.7568z m0-265.1648c-44.8512 0-81.3568 36.5056-81.3568 81.3568S466.9952 593.92 511.8464 593.92s81.3568-36.5056 81.3568-81.3568-36.5056-81.3568-81.3568-81.3568z"
fill="#FFE37B"></path>
</svg>
基础信息
</el-tag>
<el-form :model="webInfo" :rules="rules" ref="ruleForm" label-width="100px"
class="demo-ruleForm">
<el-form-item label="网站名称" prop="webName">
<el-input v-model="webInfo.webName"></el-input>
</el-form-item>
<el-form-item label="网站标题" prop="webTitle">
<el-input v-model="webInfo.webTitle"></el-input>
</el-form-item>
<el-form-item label="页脚" prop="footer">
<el-input v-model="webInfo.footer"></el-input>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-switch @click.native="changeWebStatus(webInfo)" v-model="webInfo.status"></el-switch>
</el-form-item>
<el-form-item label="背景" prop="backgroundImage">
<div style="display: flex">
<el-input v-model="webInfo.backgroundImage"></el-input>
<el-image lazy class="table-td-thumb"
style="margin-left: 10px"
:preview-src-list="[webInfo.backgroundImage]"
:src="webInfo.backgroundImage"
fit="cover"></el-image>
</div>
<uploadPicture :isAdmin="true" :prefix="'webBackgroundImage'" style="margin-top: 15px"
@addPicture="addBackgroundImage"
:maxSize="5"
:maxNumber="1"></uploadPicture>
</el-form-item>
<el-form-item label="头像" prop="avatar">
<div style="display: flex">
<el-input v-model="webInfo.avatar"></el-input>
<el-image lazy class="table-td-thumb"
style="margin-left: 10px"
:preview-src-list="[webInfo.avatar]"
:src="webInfo.avatar"
fit="cover"></el-image>
</div>
<uploadPicture :isAdmin="true" :prefix="'webAvatar'" style="margin-top: 15px" @addPicture="addAvatar"
:maxSize="5"
:maxNumber="1"></uploadPicture>
</el-form-item>
<el-form-item label="提示" prop="waifuJson">
<div style="display: flex">
<el-input :disabled="disabled" :rows="6" type="textarea" v-model="webInfo.waifuJson"></el-input>
<i class="el-icon-edit my-icon" @click="disabled = !disabled"></i>
</div>
</el-form-item>
</el-form>
<div class="myCenter" style="margin-bottom: 22px">
<el-button type="primary" @click="submitForm('ruleForm')"></el-button>
</div>
</div>
<div>
<el-tag effect="dark" class="my-tag">
<svg viewBox="0 0 1024 1024" width="20" height="20" style="vertical-align: -4px;">
<path
d="M767.1296 808.6528c16.8448 0 32.9728 2.816 48.0256 8.0384 20.6848 7.1168 43.52 1.0752 57.1904-15.9744a459.91936 459.91936 0 0 0 70.5024-122.88c7.8336-20.48 1.0752-43.264-15.9744-57.088-49.6128-40.192-65.0752-125.3888-31.3856-185.856a146.8928 146.8928 0 0 1 30.3104-37.9904c16.2304-14.5408 22.1696-37.376 13.9264-57.6a461.27104 461.27104 0 0 0-67.5328-114.9952c-13.6192-16.9984-36.4544-22.9376-57.0368-15.8208a146.3296 146.3296 0 0 1-48.0256 8.0384c-70.144 0-132.352-50.8928-145.2032-118.7328-4.096-21.6064-20.736-38.5536-42.4448-41.8304-22.0672-3.2768-44.6464-5.0176-67.6864-5.0176-21.4528 0-42.5472 1.536-63.232 4.4032-22.3232 3.1232-40.2432 20.48-43.52 42.752-6.912 46.6944-36.0448 118.016-145.7152 118.4256-17.3056 0.0512-33.8944-2.9696-49.3056-8.448-21.0432-7.4752-44.3904-1.4848-58.368 15.9232A462.14656 462.14656 0 0 0 80.4864 348.16c-7.6288 20.0192-2.7648 43.008 13.4656 56.9344 55.5008 47.8208 71.7824 122.88 37.0688 185.1392a146.72896 146.72896 0 0 1-31.6416 39.168c-16.8448 14.7456-23.0912 38.1952-14.5408 58.9312 16.896 41.0112 39.5776 79.0016 66.9696 113.0496 13.9264 17.3056 37.2736 23.1936 58.2144 15.7184 15.4112-5.4784 32-8.4992 49.3056-8.4992 71.2704 0 124.7744 49.408 142.1312 121.2928 4.9664 20.48 21.4016 36.0448 42.24 39.168 22.2208 3.328 44.9536 5.0688 68.096 5.0688 23.3984 0 46.4384-1.792 68.864-5.1712 21.3504-3.2256 38.144-19.456 42.7008-40.5504 14.8992-68.8128 73.1648-119.7568 143.7696-119.7568z"
fill="#8C7BFD"></path>
<path
d="M511.8464 696.3712c-101.3248 0-183.7568-82.432-183.7568-183.7568s82.432-183.7568 183.7568-183.7568 183.7568 82.432 183.7568 183.7568-82.432 183.7568-183.7568 183.7568z m0-265.1648c-44.8512 0-81.3568 36.5056-81.3568 81.3568S466.9952 593.92 511.8464 593.92s81.3568-36.5056 81.3568-81.3568-36.5056-81.3568-81.3568-81.3568z"
fill="#FFE37B"></path>
</svg>
公告
</el-tag>
<el-tag
:key="i"
v-for="(notice, i) in notices"
closable
:disable-transitions="false"
@close="handleClose(notices, notice)">
{{notice}}
</el-tag>
<el-input
class="input-new-tag"
v-if="inputNoticeVisible"
v-model="inputNoticeValue"
ref="saveNoticeInput"
size="small"
@keyup.enter.native="handleInputNoticeConfirm"
@blur="handleInputNoticeConfirm">
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showNoticeInput()">+ </el-button>
<div class="myCenter" style="margin-bottom: 22px">
<el-button type="primary" @click="saveNotice()"></el-button>
</div>
</div>
<div>
<el-tag effect="dark" class="my-tag">
<svg viewBox="0 0 1024 1024" width="20" height="20" style="vertical-align: -4px;">
<path
d="M767.1296 808.6528c16.8448 0 32.9728 2.816 48.0256 8.0384 20.6848 7.1168 43.52 1.0752 57.1904-15.9744a459.91936 459.91936 0 0 0 70.5024-122.88c7.8336-20.48 1.0752-43.264-15.9744-57.088-49.6128-40.192-65.0752-125.3888-31.3856-185.856a146.8928 146.8928 0 0 1 30.3104-37.9904c16.2304-14.5408 22.1696-37.376 13.9264-57.6a461.27104 461.27104 0 0 0-67.5328-114.9952c-13.6192-16.9984-36.4544-22.9376-57.0368-15.8208a146.3296 146.3296 0 0 1-48.0256 8.0384c-70.144 0-132.352-50.8928-145.2032-118.7328-4.096-21.6064-20.736-38.5536-42.4448-41.8304-22.0672-3.2768-44.6464-5.0176-67.6864-5.0176-21.4528 0-42.5472 1.536-63.232 4.4032-22.3232 3.1232-40.2432 20.48-43.52 42.752-6.912 46.6944-36.0448 118.016-145.7152 118.4256-17.3056 0.0512-33.8944-2.9696-49.3056-8.448-21.0432-7.4752-44.3904-1.4848-58.368 15.9232A462.14656 462.14656 0 0 0 80.4864 348.16c-7.6288 20.0192-2.7648 43.008 13.4656 56.9344 55.5008 47.8208 71.7824 122.88 37.0688 185.1392a146.72896 146.72896 0 0 1-31.6416 39.168c-16.8448 14.7456-23.0912 38.1952-14.5408 58.9312 16.896 41.0112 39.5776 79.0016 66.9696 113.0496 13.9264 17.3056 37.2736 23.1936 58.2144 15.7184 15.4112-5.4784 32-8.4992 49.3056-8.4992 71.2704 0 124.7744 49.408 142.1312 121.2928 4.9664 20.48 21.4016 36.0448 42.24 39.168 22.2208 3.328 44.9536 5.0688 68.096 5.0688 23.3984 0 46.4384-1.792 68.864-5.1712 21.3504-3.2256 38.144-19.456 42.7008-40.5504 14.8992-68.8128 73.1648-119.7568 143.7696-119.7568z"
fill="#8C7BFD"></path>
<path
d="M511.8464 696.3712c-101.3248 0-183.7568-82.432-183.7568-183.7568s82.432-183.7568 183.7568-183.7568 183.7568 82.432 183.7568 183.7568-82.432 183.7568-183.7568 183.7568z m0-265.1648c-44.8512 0-81.3568 36.5056-81.3568 81.3568S466.9952 593.92 511.8464 593.92s81.3568-36.5056 81.3568-81.3568-36.5056-81.3568-81.3568-81.3568z"
fill="#FFE37B"></path>
</svg>
随机名称
</el-tag>
<el-tag
:key="i"
effect="dark"
v-for="(name, i) in randomName"
closable
:disable-transitions="false"
:type="types[Math.floor(Math.random() * 5)]"
@close="handleClose(randomName, name)">
{{name}}
</el-tag>
<el-input
class="input-new-tag"
v-if="inputRandomNameVisible"
v-model="inputRandomNameValue"
ref="saveRandomNameInput"
size="small"
@keyup.enter.native="handleInputRandomNameConfirm"
@blur="handleInputRandomNameConfirm">
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showRandomNameInput">+ </el-button>
<div class="myCenter" style="margin-bottom: 22px">
<el-button type="primary" @click="saveRandomName()"></el-button>
</div>
</div>
<div>
<el-tag effect="dark" class="my-tag">
<svg viewBox="0 0 1024 1024" width="20" height="20" style="vertical-align: -4px;">
<path
d="M767.1296 808.6528c16.8448 0 32.9728 2.816 48.0256 8.0384 20.6848 7.1168 43.52 1.0752 57.1904-15.9744a459.91936 459.91936 0 0 0 70.5024-122.88c7.8336-20.48 1.0752-43.264-15.9744-57.088-49.6128-40.192-65.0752-125.3888-31.3856-185.856a146.8928 146.8928 0 0 1 30.3104-37.9904c16.2304-14.5408 22.1696-37.376 13.9264-57.6a461.27104 461.27104 0 0 0-67.5328-114.9952c-13.6192-16.9984-36.4544-22.9376-57.0368-15.8208a146.3296 146.3296 0 0 1-48.0256 8.0384c-70.144 0-132.352-50.8928-145.2032-118.7328-4.096-21.6064-20.736-38.5536-42.4448-41.8304-22.0672-3.2768-44.6464-5.0176-67.6864-5.0176-21.4528 0-42.5472 1.536-63.232 4.4032-22.3232 3.1232-40.2432 20.48-43.52 42.752-6.912 46.6944-36.0448 118.016-145.7152 118.4256-17.3056 0.0512-33.8944-2.9696-49.3056-8.448-21.0432-7.4752-44.3904-1.4848-58.368 15.9232A462.14656 462.14656 0 0 0 80.4864 348.16c-7.6288 20.0192-2.7648 43.008 13.4656 56.9344 55.5008 47.8208 71.7824 122.88 37.0688 185.1392a146.72896 146.72896 0 0 1-31.6416 39.168c-16.8448 14.7456-23.0912 38.1952-14.5408 58.9312 16.896 41.0112 39.5776 79.0016 66.9696 113.0496 13.9264 17.3056 37.2736 23.1936 58.2144 15.7184 15.4112-5.4784 32-8.4992 49.3056-8.4992 71.2704 0 124.7744 49.408 142.1312 121.2928 4.9664 20.48 21.4016 36.0448 42.24 39.168 22.2208 3.328 44.9536 5.0688 68.096 5.0688 23.3984 0 46.4384-1.792 68.864-5.1712 21.3504-3.2256 38.144-19.456 42.7008-40.5504 14.8992-68.8128 73.1648-119.7568 143.7696-119.7568z"
fill="#8C7BFD"></path>
<path
d="M511.8464 696.3712c-101.3248 0-183.7568-82.432-183.7568-183.7568s82.432-183.7568 183.7568-183.7568 183.7568 82.432 183.7568 183.7568-82.432 183.7568-183.7568 183.7568z m0-265.1648c-44.8512 0-81.3568 36.5056-81.3568 81.3568S466.9952 593.92 511.8464 593.92s81.3568-36.5056 81.3568-81.3568-36.5056-81.3568-81.3568-81.3568z"
fill="#FFE37B"></path>
</svg>
随机头像
</el-tag>
<div :key="i"
style="display: flex"
v-for="(avatar, i) in randomAvatar">
<el-tag
style="white-space: normal;height: unset"
closable
:disable-transitions="false"
@close="handleClose(randomAvatar, avatar)">
{{avatar}}
</el-tag>
<div>
<el-image lazy class="table-td-thumb"
style="margin: 10px"
:preview-src-list="[avatar]"
:src="avatar"
fit="cover"></el-image>
</div>
</div>
<el-input
class="input-new-tag"
v-if="inputRandomAvatarVisible"
v-model="inputRandomAvatarValue"
ref="saveRandomAvatarInput"
size="small"
@keyup.enter.native="handleInputRandomAvatarConfirm"
@blur="handleInputRandomAvatarConfirm">
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showRandomAvatarInput">+ </el-button>
<uploadPicture :isAdmin="true" :prefix="'randomAvatar'" style="margin: 10px" @addPicture="addRandomAvatar"
:maxSize="1"
:maxNumber="5"></uploadPicture>
<div class="myCenter" style="margin-bottom: 22px">
<el-button type="primary" @click="saveRandomAvatar()"></el-button>
</div>
</div>
<div>
<el-tag effect="dark" class="my-tag">
<svg viewBox="0 0 1024 1024" width="20" height="20" style="vertical-align: -4px;">
<path
d="M767.1296 808.6528c16.8448 0 32.9728 2.816 48.0256 8.0384 20.6848 7.1168 43.52 1.0752 57.1904-15.9744a459.91936 459.91936 0 0 0 70.5024-122.88c7.8336-20.48 1.0752-43.264-15.9744-57.088-49.6128-40.192-65.0752-125.3888-31.3856-185.856a146.8928 146.8928 0 0 1 30.3104-37.9904c16.2304-14.5408 22.1696-37.376 13.9264-57.6a461.27104 461.27104 0 0 0-67.5328-114.9952c-13.6192-16.9984-36.4544-22.9376-57.0368-15.8208a146.3296 146.3296 0 0 1-48.0256 8.0384c-70.144 0-132.352-50.8928-145.2032-118.7328-4.096-21.6064-20.736-38.5536-42.4448-41.8304-22.0672-3.2768-44.6464-5.0176-67.6864-5.0176-21.4528 0-42.5472 1.536-63.232 4.4032-22.3232 3.1232-40.2432 20.48-43.52 42.752-6.912 46.6944-36.0448 118.016-145.7152 118.4256-17.3056 0.0512-33.8944-2.9696-49.3056-8.448-21.0432-7.4752-44.3904-1.4848-58.368 15.9232A462.14656 462.14656 0 0 0 80.4864 348.16c-7.6288 20.0192-2.7648 43.008 13.4656 56.9344 55.5008 47.8208 71.7824 122.88 37.0688 185.1392a146.72896 146.72896 0 0 1-31.6416 39.168c-16.8448 14.7456-23.0912 38.1952-14.5408 58.9312 16.896 41.0112 39.5776 79.0016 66.9696 113.0496 13.9264 17.3056 37.2736 23.1936 58.2144 15.7184 15.4112-5.4784 32-8.4992 49.3056-8.4992 71.2704 0 124.7744 49.408 142.1312 121.2928 4.9664 20.48 21.4016 36.0448 42.24 39.168 22.2208 3.328 44.9536 5.0688 68.096 5.0688 23.3984 0 46.4384-1.792 68.864-5.1712 21.3504-3.2256 38.144-19.456 42.7008-40.5504 14.8992-68.8128 73.1648-119.7568 143.7696-119.7568z"
fill="#8C7BFD"></path>
<path
d="M511.8464 696.3712c-101.3248 0-183.7568-82.432-183.7568-183.7568s82.432-183.7568 183.7568-183.7568 183.7568 82.432 183.7568 183.7568-82.432 183.7568-183.7568 183.7568z m0-265.1648c-44.8512 0-81.3568 36.5056-81.3568 81.3568S466.9952 593.92 511.8464 593.92s81.3568-36.5056 81.3568-81.3568-36.5056-81.3568-81.3568-81.3568z"
fill="#FFE37B"></path>
</svg>
随机封面
</el-tag>
<div :key="i"
style="display: flex"
v-for="(cover, i) in randomCover">
<el-tag
style="white-space: normal;height: unset"
closable
:disable-transitions="false"
@close="handleClose(randomCover, cover)">
{{cover}}
</el-tag>
<div>
<el-image lazy class="table-td-thumb"
style="margin: 10px"
:preview-src-list="[cover]"
:src="cover"
fit="cover"></el-image>
</div>
</div>
<el-input
class="input-new-tag"
v-if="inputRandomCoverVisible"
v-model="inputRandomCoverValue"
ref="saveRandomCoverInput"
size="small"
@keyup.enter.native="handleInputRandomCoverConfirm"
@blur="handleInputRandomCoverConfirm">
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showRandomCoverInput">+ </el-button>
<uploadPicture :isAdmin="true" :prefix="'randomCover'" style="margin: 10px" @addPicture="addRandomCover"
:maxSize="5"
:maxNumber="5"></uploadPicture>
<div class="myCenter" style="margin-bottom: 40px">
<el-button type="primary" @click="saveRandomCover()"></el-button>
</div>
</div>
<div>
<el-button type="danger" @click="resetForm('ruleForm')"></el-button>
</div>
</div>
</template>
<script>
const uploadPicture = () => import( "../common/uploadPicture");
export default {
components: {
uploadPicture
},
data() {
return {
disabled: true,
types: ['', 'success', 'info', 'danger', 'warning'],
inputNoticeVisible: false,
inputNoticeValue: "",
inputRandomNameVisible: false,
inputRandomNameValue: "",
inputRandomAvatarVisible: false,
inputRandomAvatarValue: "",
inputRandomCoverVisible: false,
inputRandomCoverValue: "",
webInfo: {
id: null,
webName: "",
webTitle: "",
footer: "",
backgroundImage: "",
avatar: "",
waifuJson: "",
status: false
},
notices: [],
randomAvatar: [],
randomName: [],
randomCover: [],
rules: {
webName: [
{required: true, message: '请输入网站名称', trigger: 'blur'},
{min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: 'change'}
],
webTitle: [
{required: true, message: '请输入网站标题', trigger: 'blur'}
],
footer: [
{required: true, message: '请输入页脚', trigger: 'blur'}
],
backgroundImage: [
{required: true, message: '请输入背景', trigger: 'change'}
],
status: [
{required: true, message: '请设置网站状态', trigger: 'change'}
],
avatar: [
{required: true, message: '请上传头像', trigger: 'change'}
]
}
}
},
computed: {},
watch: {},
created() {
this.getWebInfo();
},
mounted() {
},
methods: {
addBackgroundImage(res) {
this.webInfo.backgroundImage = res;
},
addAvatar(res) {
this.webInfo.avatar = res;
},
addRandomAvatar(res) {
this.randomAvatar.push(res);
},
addRandomCover(res) {
this.randomCover.push(res);
},
changeWebStatus(webInfo) {
this.$http.post(this.$constant.baseURL + "/webInfo/updateWebInfo", {
id: webInfo.id,
status: webInfo.status
}, true)
.then((res) => {
this.getWebInfo();
this.$message({
message: "保存成功!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
getWebInfo() {
this.$http.get(this.$constant.baseURL + "/admin/webInfo/getAdminWebInfo", {}, true)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.webInfo.id = res.data.id;
this.webInfo.webName = res.data.webName;
this.webInfo.webTitle = res.data.webTitle;
this.webInfo.footer = res.data.footer;
this.webInfo.backgroundImage = res.data.backgroundImage;
this.webInfo.avatar = res.data.avatar;
this.webInfo.waifuJson = res.data.waifuJson;
this.webInfo.status = res.data.status;
this.notices = JSON.parse(res.data.notices);
this.randomAvatar = JSON.parse(res.data.randomAvatar);
this.randomName = JSON.parse(res.data.randomName);
this.randomCover = JSON.parse(res.data.randomCover);
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.updateWebInfo(this.webInfo)
} else {
this.$message({
message: "请完善必填项!",
type: "error"
});
}
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
this.getWebInfo();
},
handleClose(array, item) {
array.splice(array.indexOf(item), 1);
},
handleInputNoticeConfirm() {
if (this.inputNoticeValue) {
this.notices.push(this.inputNoticeValue);
}
this.inputNoticeVisible = false;
this.inputNoticeValue = '';
},
showNoticeInput() {
this.inputNoticeVisible = true;
this.$nextTick(() => {
this.$refs.saveNoticeInput.$refs.input.focus();
});
},
saveNotice() {
let param = {
id: this.webInfo.id,
notices: JSON.stringify(this.notices)
}
this.updateWebInfo(param);
},
handleInputRandomNameConfirm() {
if (this.inputRandomNameValue) {
this.randomName.push(this.inputRandomNameValue);
}
this.inputRandomNameVisible = false;
this.inputRandomNameValue = '';
},
showRandomNameInput() {
this.inputRandomNameVisible = true;
this.$nextTick(() => {
this.$refs.saveRandomNameInput.$refs.input.focus();
});
},
saveRandomName() {
let param = {
id: this.webInfo.id,
randomName: JSON.stringify(this.randomName)
}
this.updateWebInfo(param);
},
handleInputRandomAvatarConfirm() {
if (this.inputRandomAvatarValue) {
this.randomAvatar.push(this.inputRandomAvatarValue);
}
this.inputRandomAvatarVisible = false;
this.inputRandomAvatarValue = '';
},
showRandomAvatarInput() {
this.inputRandomAvatarVisible = true;
this.$nextTick(() => {
this.$refs.saveRandomAvatarInput.$refs.input.focus();
});
},
saveRandomAvatar() {
let param = {
id: this.webInfo.id,
randomAvatar: JSON.stringify(this.randomAvatar)
}
this.updateWebInfo(param);
},
handleInputRandomCoverConfirm() {
if (this.inputRandomCoverValue) {
this.randomCover.push(this.inputRandomCoverValue);
}
this.inputRandomCoverVisible = false;
this.inputRandomCoverValue = '';
},
showRandomCoverInput() {
this.inputRandomCoverVisible = true;
this.$nextTick(() => {
this.$refs.saveRandomCoverInput.$refs.input.focus();
});
},
saveRandomCover() {
let param = {
id: this.webInfo.id,
randomCover: JSON.stringify(this.randomCover)
}
this.updateWebInfo(param);
},
updateWebInfo(value) {
this.$confirm('确认保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
center: true
}).then(() => {
this.$http.post(this.$constant.baseURL + "/webInfo/updateWebInfo", value, true)
.then((res) => {
this.getWebInfo();
this.$message({
message: "保存成功!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}).catch(() => {
this.$message({
type: 'success',
message: '已取消保存!'
});
});
}
}
}
</script>
<style scoped>
.my-tag {
margin-bottom: 20px !important;
width: 100%;
text-align: left;
background: var(--lightYellow);
border: none;
height: 40px;
line-height: 40px;
font-size: 16px;
color: var(--black);
}
.el-tag {
margin: 10px;
}
.button-new-tag {
margin: 10px;
height: 32px;
line-height: 32px;
padding-top: 0;
padding-bottom: 0;
}
.input-new-tag {
width: 200px;
margin: 10px;
}
.my-icon {
cursor: pointer;
margin-left: 10px;
font-size: 18px;
font-weight: bold;
color: var(--blue);
}
.table-td-thumb {
border-radius: 2px;
width: 40px;
height: 40px;
}
</style>

@ -1,126 +0,0 @@
<template>
<div class="home">
<h1>欢迎来到后台管理界面</h1>
<p>这里你能够管理所有的配置</p>
<div class="stats-container">
<div class="stat-card">
<div class="stat-icon">
<i class="fas fa-users"></i>
</div>
<div class="stat-info">
<h2>网站今日访问量</h2>
<p>{{historyInfo.ip_count_today}}</p>
</div>
</div>
<div class="stats-container">
<div class="stat-card">
<div class="stat-icon">
<i class="fas fa-users"></i>
</div>
<div class="stat-info">
<h2>网站昨日访问量</h2>
<p>{{historyInfo.ip_count_yest}}</p>
</div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon">
<i class="fas fa-shopping-cart"></i>
</div>
<div class="stat-info">
<h2>网站总访问量</h2>
<p>{{historyInfo.ip_history_count}}</p>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
historyInfo: {}
};
},
computed: {},
watch: {},
created() {
this.getHistoryInfo();
},
mounted() {},
methods: {
getHistoryInfo() {
this.$http.get(this.$constant.baseURL + "/webInfo/getHistoryInfo", {}, true)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.historyInfo = res.data;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}
}
};
</script>
<style scoped>
.home {
text-align: center;
padding: 20px;
}
h1 {
font-size: 32px;
color: #333;
margin-bottom: 20px;
}
p {
font-size: 18px;
color: #666;
margin-bottom: 40px;
}
.stats-container {
display: flex;
justify-content: space-around;
}
.stat-card {
background-color: #f2f2f2;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.stat-icon {
font-size: 24px;
color: #333;
margin-bottom: 10px;
}
.stat-info h2 {
font-size: 18px;
color: #333;
margin-bottom: 5px;
}
.stat-info p {
font-size: 14px;
color: #666;
}
</style>

@ -1,713 +0,0 @@
<template>
<div>
<div v-if="!$common.isEmpty(article)">
<!-- 封面 -->
<div class="article-head my-animation-slide-top">
<!-- 背景图片 -->
<el-image class="article-image my-el-image"
v-once
lazy
:src="!$common.isEmpty(article.articleCover)?article.articleCover:$constant.random_image+new Date()+Math.floor(Math.random()*10)"
fit="cover">
<div slot="error" class="image-slot">
<div class="article-image"></div>
</div>
</el-image>
<!-- 文章信息 -->
<div class="article-info-container">
<div class="article-title">{{ article.articleTitle }}</div>
<div class="article-info">
<svg viewBox="0 0 1024 1024" width="14" height="14" style="vertical-align: -2px;">
<path
d="M510.4 65.5l259.69999999 0 1e-8 266.89999999c0 147.50000001-116.2 266.89999999-259.7 266.90000001-143.4 0-259.7-119.5-259.7-266.90000001 0.1-147.5 116.3-266.9 259.7-266.89999999z"
fill="#FF9FCF"></path>
<path
d="M698.4 525.2l-13 0c53-48.4 86.5-117.8 86.5-195.20000001 0-10.2-0.7-20.3-1.8-30.19999999C613.8 377.50000001 438.6 444.9 266 437.7c15 33.4 36.7 63.1 63.5 87.5l-5.3 0c-122.6 0-225.5 88.1-248.8 204.1C340 677.2 597.7 609.2 862.2 585.7c-44.3-37.6-101.5-60.5-163.8-60.5z"
fill="#FF83BB"></path>
<path
d="M862.2 585.7C597.7 609.2 340 677.2 75.4 729.3c-3.2 16.1-5 32.6-5 49.6 0 99.8 81.7 181.5 181.5 181.5l518.6 0c99.8 0 181.5-81.7 181.5-181.5 0.1-77.2-35-146.5-89.8-193.2z"
fill="#FF5390"></path>
<path
d="M770.1 299.8C755.1 168 643.3 65.5 507.4 65.5c-146.1 0-264.5 118.4-264.5 264.5 0 38.4 8.3 74.8 23.1 107.7 172.6 7.2 347.8-60.2 504.1-137.9z"
fill="#FF9FCF"></path>
<path
d="M436.4 282.1c0 24.1-19.6 43.7-43.7 43.7S349 306.2 349 282.1s19.6-43.7 43.7-43.7c24.19999999 0 43.7 19.6 43.7 43.7z"
fill="#FFFFFF"></path>
<path d="M625 282.1m-43.7 0a43.7 43.7 0 1 0 87.4 0 43.7 43.7 0 1 0-87.4 0Z" fill="#FFFFFF"></path>
</svg>
<span>&nbsp;{{ article.username }}</span>
<span>·</span>
<svg viewBox="0 0 1024 1024" width="14" height="14" style="vertical-align: -2px;">
<path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#409EFF"></path>
<path
d="M654.222222 256c-17.066667 0-28.444444 11.377778-28.444444 28.444444v56.888889c0 17.066667 11.377778 28.444444 28.444444 28.444445s28.444444-11.377778 28.444445-28.444445v-56.888889c0-17.066667-11.377778-28.444444-28.444445-28.444444zM369.777778 256c-17.066667 0-28.444444 11.377778-28.444445 28.444444v56.888889c0 17.066667 11.377778 28.444444 28.444445 28.444445s28.444444-11.377778 28.444444-28.444445v-56.888889c0-17.066667-11.377778-28.444444-28.444444-28.444444z"
fill="#FFFFFF"></path>
<path
d="M725.333333 312.888889H711.111111v28.444444c0 31.288889-25.6 56.888889-56.888889 56.888889s-56.888889-25.6-56.888889-56.888889v-28.444444h-170.666666v28.444444c0 31.288889-25.6 56.888889-56.888889 56.888889s-56.888889-25.6-56.888889-56.888889v-28.444444h-14.222222c-22.755556 0-42.666667 19.911111-42.666667 42.666667v341.333333c0 22.755556 19.911111 42.666667 42.666667 42.666667h426.666666c22.755556 0 42.666667-19.911111 42.666667-42.666667v-341.333333c0-22.755556-19.911111-42.666667-42.666667-42.666667zM426.666667 654.222222h-56.888889c-17.066667 0-28.444444-11.377778-28.444445-28.444444s11.377778-28.444444 28.444445-28.444445h56.888889c17.066667 0 28.444444 11.377778 28.444444 28.444445s-11.377778 28.444444-28.444444 28.444444z m227.555555 0h-56.888889c-17.066667 0-28.444444-11.377778-28.444444-28.444444s11.377778-28.444444 28.444444-28.444445h56.888889c17.066667 0 28.444444 11.377778 28.444445 28.444445s-11.377778 28.444444-28.444445 28.444444z m0-113.777778h-56.888889c-17.066667 0-28.444444-11.377778-28.444444-28.444444s11.377778-28.444444 28.444444-28.444444h56.888889c17.066667 0 28.444444 11.377778 28.444445 28.444444s-11.377778 28.444444-28.444445 28.444444z"
fill="#FFFFFF"></path>
</svg>
<span>&nbsp;{{ article.createTime }}</span>
<span>·</span>
<svg viewBox="0 0 1024 1024" width="14" height="14" style="vertical-align: -2px;">
<path d="M14.656 512a497.344 497.344 0 1 0 994.688 0 497.344 497.344 0 1 0-994.688 0z"
fill="#FF0000"></path>
<path
d="M374.976 872.64c-48.299-100.032-22.592-157.44 14.421-211.37 40.448-58.966 51.115-117.611 51.115-117.611s31.659 41.386 19.115 106.005c56.149-62.72 66.816-162.133 58.325-200.405 127.317 88.746 181.59 281.002 108.181 423.381C1016 652.501 723.093 323.2 672.277 285.867c16.939 37.333 20.054 100.032-14.101 130.474-58.027-219.84-201.664-265.002-201.664-265.002 16.96 113.536-61.781 237.397-137.344 330.24-2.816-45.163-5.632-76.544-29.483-119.808-5.333 82.176-68.373 149.269-85.29 231.445-22.912 111.637 17.237 193.173 170.581 279.424z"
fill="#FFFFFF"></path>
</svg>
<span>&nbsp;{{ article.viewCount }}</span>
<span>·</span>
<svg viewBox="0 0 1024 1024" width="14" height="14" style="vertical-align: -2px;">
<path
d="M113.834667 291.84v449.194667a29.013333 29.013333 0 0 0 28.842666 29.013333h252.928v90.453333l160.597334-90.453333h252.928a29.013333 29.013333 0 0 0 29.013333-29.013333V291.84a29.013333 29.013333 0 0 0-29.013333-29.013333h-665.6a29.013333 29.013333 0 0 0-29.696 29.013333z"
fill="#FFDEAD"></path>
<path
d="M809.130667 262.826667h-665.6a29.013333 29.013333 0 0 0-28.842667 29.013333v40.106667a29.013333 29.013333 0 0 1 28.842667-29.013334h665.6a29.013333 29.013333 0 0 1 29.013333 29.013334V291.84a29.013333 29.013333 0 0 0-29.013333-29.013333z"
fill="#FFF3DB"></path>
<path
d="M556.202667 770.048h252.928a29.013333 29.013333 0 0 0 29.013333-29.013333V362.837333s-59.733333 392.533333-724.309333 314.709334v63.488a29.013333 29.013333 0 0 0 28.842666 29.013333h253.098667v90.453333z"
fill="#F2C182"></path>
<path
d="M619.008 632.32l101.888-35.157333-131.754667-76.117334 29.866667 111.274667zM891.904 148.992a61.44 61.44 0 0 0-84.138667 22.528l-19.968 34.133333 106.666667 61.610667 19.968-34.133333a61.781333 61.781333 0 0 0-22.528-84.138667z"
fill="#69BAF9"></path>
<path d="M775.338667 198.775467l131.669333 76.032-186.026667 322.218666-131.6864-76.032z"
fill="#F7FBFF"></path>
<path
d="M775.168 198.826667l-5.290667 9.216 59.221334 34.133333a34.133333 34.133333 0 0 1 12.458666 46.592l-139.946666 242.346667a34.133333 34.133333 0 0 1-46.762667 12.629333l-59.050667-34.133333-6.656 11.434666 88.746667 51.2L720.896 597.333333l186.026667-322.56z"
fill="#D8E3F0"></path>
<path
d="M616.448 622.592l2.56 9.728 101.888-35.157333-44.885333-25.941334-59.562667 51.370667zM891.904 148.992c-1.024 0-2.218667-0.853333-3.242667-1.536A61.610667 61.610667 0 0 1 887.466667 204.8l-19.968 34.133333-73.728-42.496-5.12 8.704 106.666666 61.610667 19.968-34.133333a61.781333 61.781333 0 0 0-23.381333-83.626667z"
fill="#599ED4"></path>
<path
d="M265.898667 417.621333H494.933333a17.066667 17.066667 0 1 0 0-34.133333H265.898667a17.066667 17.066667 0 1 0 0 34.133333zM265.898667 533.504H494.933333a17.066667 17.066667 0 0 0 0-34.133333H265.898667a17.066667 17.066667 0 0 0 0 34.133333z"
fill="#3D3D63"></path>
<path
d="M959.488 354.645333a99.84 99.84 0 0 0-23.722667-127.488 78.677333 78.677333 0 0 0-142.848-64.170666l-11.605333 20.138666a17.066667 17.066667 0 0 0-20.821333 7.168l-32.085334 55.466667H142.677333a46.250667 46.250667 0 0 0-45.909333 46.08v449.194667a46.08 46.08 0 0 0 45.909333 46.08h236.032v73.386666a17.066667 17.066667 0 0 0 8.362667 14.848 17.066667 17.066667 0 0 0 8.704 2.218667 17.066667 17.066667 0 0 0 8.362667-2.218667l156.672-88.234666h248.32a46.08 46.08 0 0 0 46.08-46.08V398.677333L921.6 283.306667a17.066667 17.066667 0 0 0-4.266667-21.504l1.877334-3.413334a65.365333 65.365333 0 0 1 10.410666 79.189334l-53.077333 91.989333a56.832 56.832 0 0 0 20.821333 77.653333 17.066667 17.066667 0 0 0 24.234667-6.314666 17.066667 17.066667 0 0 0-6.997333-23.04 23.04 23.04 0 0 1-8.362667-31.061334z m-138.410667 386.389334a11.946667 11.946667 0 0 1-11.946666 11.946666H556.202667a17.066667 17.066667 0 0 0-8.362667 2.218667l-134.997333 76.117333v-61.269333a17.066667 17.066667 0 0 0-17.066667-17.066667H142.677333a11.946667 11.946667 0 0 1-11.776-11.946666V291.84a11.946667 11.946667 0 0 1 11.776-11.946667h565.930667L574.464 512a17.066667 17.066667 0 0 0-1.706667 12.970667L597.333333 615.253333H265.898667a17.066667 17.066667 0 1 0 0 34.133334h352.938666a17.066667 17.066667 0 0 0 5.802667 0l102.4-35.328a17.066667 17.066667 0 0 0 9.216-7.509334l85.333333-147.968z m-204.8-184.661334l63.829334 36.864-49.322667 17.066667z m206.848-170.666666v1.365333l-108.373333 186.709333-102.4-59.050666L781.482667 221.866667l102.4 59.050666z m76.458667-161.28L887.466667 244.224l-76.970667-44.373333 11.264-19.797334a44.544 44.544 0 1 1 77.141333 44.544z"
fill="#3D3D63"></path>
</svg>
<span>&nbsp;{{ article.commentCount }}</span>
<span>·</span>
<svg viewBox="0 0 1024 1024" width="14" height="14" style="vertical-align: -2px;">
<path
d="M510.671749 348.792894S340.102978 48.827055 134.243447 254.685563C-97.636714 486.565724 510.671749 913.435858 510.671749 913.435858s616.107079-419.070494 376.428301-658.749272c-194.095603-194.096626-376.428302 94.106308-376.428301 94.106308z"
fill="#FF713C"></path>
<path
d="M510.666632 929.674705c-3.267417 0-6.534833-0.983397-9.326413-2.950192-16.924461-11.872399-414.71121-293.557896-435.220312-529.448394-5.170766-59.482743 13.879102-111.319341 56.643068-154.075121 51.043536-51.043536 104.911398-76.930113 160.095231-76.930114 112.524796 0 196.878996 106.48115 228.475622 153.195078 33.611515-45.214784 122.406864-148.20646 234.04343-148.20646 53.930283 0 105.46603 24.205285 153.210428 71.941496 45.063335 45.063335 64.954361 99.200326 59.133795 160.920016C935.306982 641.685641 536.758893 915.327952 519.80271 926.859589a16.205077 16.205077 0 0 1-9.136078 2.815116zM282.857183 198.75574c-46.25344 0-92.396363 22.682605-137.127124 67.413365-36.149315 36.157501-51.614541 78.120218-47.25321 128.291898 17.575284 202.089671 352.199481 455.119525 412.332023 499.049037 60.434417-42.86732 395.406538-289.147446 414.567947-492.458945 4.933359-52.344159-11.341303-96.465029-49.759288-134.88199-41.431621-41.423435-85.24243-62.424748-130.242319-62.424748-122.041544 0-220.005716 152.203494-220.989114 153.742547-3.045359 4.806469-8.53335 7.883551-14.101159 7.534603a16.257266 16.257266 0 0 1-13.736863-8.184403c-0.902556-1.587148-91.569532-158.081365-213.690893-158.081364z"
fill="#885F44"></path>
</svg>
<span>&nbsp;{{ article.likeCount }}</span>
</div>
</div>
<div class="article-info-news"
@click="weiYanDialogVisible = true"
v-if="!$common.isEmpty($store.state.currentUser) && $store.state.currentUser.id === article.userId">
<svg width="30" height="30" viewBox="0 0 1024 1024">
<path d="M0 0h1024v1024H0V0z" fill="#202425" opacity=".01"></path>
<path
d="M989.866667 512c0 263.918933-213.947733 477.866667-477.866667 477.866667S34.133333 775.918933 34.133333 512 248.081067 34.133333 512 34.133333s477.866667 213.947733 477.866667 477.866667z"
fill="#FF7744"></path>
<path
d="M512 221.866667A51.2 51.2 0 0 1 563.2 273.066667v187.733333H750.933333a51.2 51.2 0 0 1 0 102.4h-187.733333V750.933333a51.2 51.2 0 0 1-102.4 0v-187.733333H273.066667a51.2 51.2 0 0 1 0-102.4h187.733333V273.066667A51.2 51.2 0 0 1 512 221.866667z"
fill="#FFFFFF"></path>
</svg>
</div>
</div>
<!-- 文章 -->
<div style="background: var(--background);">
<div class="article-container my-animation-slide-bottom">
<!-- 最新进展 -->
<div v-if="!$common.isEmpty(treeHoleList)" class="process-wrap">
<el-collapse accordion value="1">
<el-collapse-item title="最新进展" name="1">
<process :treeHoleList="treeHoleList" @deleteTreeHole="deleteTreeHole"></process>
</el-collapse-item>
</el-collapse>
<hr>
</div>
<!-- 文章内容 -->
<div v-html="articleContentHtml" class="entry-content"></div>
<!-- 最后更新时间 -->
<div class="article-update-time">
<span>文章最后更新于 {{ article.updateTime }}</span>
</div>
<!-- 分类 -->
<div class="article-sort">
<span @click="$router.push({path: '/sort', query: {sortId: article.sortId, labelId: article.labelId}})">{{ article.sort.sortName +" ▶ "+ article.label.labelName}}</span>
</div>
<!-- 作者信息 -->
<blockquote>
<div>
作者{{article.username}}
</div>
<div>
版权声明转载请注明文章出处
</div>
</blockquote>
<!-- 订阅 -->
<div class="myCenter" id="article-like" @click="subscribeLabel()">
<i class="el-icon-thumb article-like-icon" :class="{'article-like': subscribe}"></i>
</div>
<!-- 评论 -->
<div v-if="article.commentStatus === true">
<comment :type="'article'" :source="article.id" :userId="article.userId"></comment>
</div>
</div>
<div id="toc" class="toc"></div>
</div>
<div style="background: var(--background)">
<myFooter></myFooter>
</div>
<el-dialog title="最新进展"
:visible.sync="weiYanDialogVisible"
width="40%"
:append-to-body="true"
destroy-on-close
center>
<div>
<div class="myCenter" style="margin-bottom: 20px">
<el-date-picker
v-model="newsTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
align="center"
placeholder="选择日期时间">
</el-date-picker>
</div>
<commentBox :disableGraffiti="true"
@submitComment="submitWeiYan">
</commentBox>
</div>
</el-dialog>
</div>
<!-- 微信 -->
<el-dialog title="密码"
:modal="false"
:visible.sync="showPasswordDialog"
width="25%"
:append-to-body="true"
destroy-on-close
center>
<div>
<div>
<div class="password-content">{{tips}}</div>
</div>
<div style="margin: 20px auto">
<el-input maxlength="30" v-model="password"></el-input>
</div>
<div style="display: flex;justify-content: center">
<proButton :info="'提交'"
@click.native="submitPassword()"
:before="$constant.before_color_2"
:after="$constant.after_color_2">
</proButton>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
const myFooter = () => import( "./common/myFooter");
const comment = () => import( "./comment/comment");
const process = () => import( "./common/process");
const commentBox = () => import( "./comment/commentBox");
const proButton = () => import( "./common/proButton");
import MarkdownIt from 'markdown-it';
export default {
components: {
myFooter,
comment,
commentBox,
proButton,
process
},
data() {
return {
id: this.$route.query.id,
subscribe: false,
article: {},
articleContentHtml: "",
treeHoleList: [],
weiYanDialogVisible: false,
newsTime: "",
showPasswordDialog: false,
password: "",
tips: ""
};
},
created() {
if (!this.$common.isEmpty(this.id)) {
this.getArticle(localStorage.getItem("article_password_" + this.id));
if ("0" !== localStorage.getItem("showSubscribe")) {
this.$notify({
title: '文章订阅',
type: 'success',
message: '点击文章下方小手 - 订阅/取消订阅专栏(标签)',
duration: 0,
onClose: () => localStorage.setItem("showSubscribe", "0")
});
}
}
},
mounted() {
// window.addEventListener("scroll", this.onScrollPage);
},
methods: {
subscribeLabel() {
if (this.$common.isEmpty(this.$store.state.currentUser)) {
this.$message({
message: "请先登录!",
type: "error"
});
return;
}
this.$confirm('确认' + (this.subscribe ? '取消订阅' : '订阅') + '专栏【' + this.article.label.labelName + '】?' + (this.subscribe ? "" : "订阅专栏后,该专栏发布新文章将通过邮件通知订阅用户。"), this.subscribe ? "取消订阅" : "文章订阅", {
confirmButtonText: '确定',
cancelButtonText: '取消',
center: true
}).then(() => {
this.$http.get(this.$constant.baseURL + "/user/subscribe", {
labelId: this.article.labelId,
flag: !this.subscribe
})
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.$store.commit("loadCurrentUser", res.data);
}
this.subscribe = !this.subscribe;
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}).catch(() => {
this.$message({
type: 'success',
message: '已取消!'
});
});
},
submitPassword() {
if (this.$common.isEmpty(this.password)) {
this.$message({
message: "请先输入密码!",
type: "error"
});
return;
}
this.getArticle(this.password);
},
deleteTreeHole(id) {
if (this.$common.isEmpty(this.$store.state.currentUser)) {
this.$message({
message: "请先登录!",
type: "error"
});
return;
}
this.$confirm('确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
center: true
}).then(() => {
this.$http.get(this.$constant.baseURL + "/weiYan/deleteWeiYan", {id: id})
.then((res) => {
this.$message({
type: 'success',
message: '删除成功!'
});
this.getNews();
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}).catch(() => {
this.$message({
type: 'success',
message: '已取消删除!'
});
});
},
submitWeiYan(content) {
let weiYan = {
content: content,
createTime: this.newsTime,
source: this.article.id
};
this.$http.post(this.$constant.baseURL + "/weiYan/saveNews", weiYan)
.then((res) => {
this.weiYanDialogVisible = false;
this.newsTime = "";
this.getNews();
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
getNews() {
this.$http.post(this.$constant.baseURL + "/weiYan/listNews", {
current: 1,
size: 9999,
source: this.article.id
})
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
res.data.records.forEach(c => {
c.content = c.content.replace(/\n{2,}/g, '<div style="height: 12px"></div>');
c.content = c.content.replace(/\n/g, '<br/>');
c.content = this.$common.faceReg(c.content);
c.content = this.$common.pictureReg(c.content);
});
this.treeHoleList = res.data.records;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
onScrollPage() {
let scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
if (scrollTop < (window.innerHeight / 4)) {
$(".toc").css("top", window.innerHeight / 2);
$(".toc").css("display", "unset");
} else if (scrollTop > (window.innerHeight / 4) && scrollTop < ($("#article-like").offset().top - window.innerHeight)) {
$(".toc").css("top", "100px");
$(".toc").css("display", "unset");
} else {
$(".toc").css("display", "none");
}
},
getTocbot() {
let script = document.createElement('script');
script.type = 'text/javascript';
script.src = this.$constant.tocbot;
document.getElementsByTagName('head')[0].appendChild(script);
//
script.onload = function () {
tocbot.init({
tocSelector: '#toc',
contentSelector: '.entry-content',
headingSelector: 'h1, h2, h3, h4, h5, h6',
scrollSmooth: true,
fixedSidebarOffset: 'auto',
scrollSmoothOffset: -100,
hasInnerContainers: false
});
}
},
addId() {
let headings = $(".entry-content").find("h1, h2, h3, h4, h5, h6");
headings.attr('id', (i, id) => id || 'toc-' + i);
},
getArticle(password) {
this.$http.get(this.$constant.baseURL + "/article/getArticleById", {id: this.id, password: password})
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.article = res.data;
this.getNews();
const md = new MarkdownIt({breaks: true});
this.articleContentHtml = md.render(this.article.articleContent);
this.$nextTick(() => {
this.highlight();
this.addId();
// todo toc
// this.getTocbot();
});
if (!this.$common.isEmpty(password)) {
localStorage.setItem("article_password_" + this.id, password);
}
this.showPasswordDialog = false;
if (!this.$common.isEmpty(this.$store.state.currentUser) && !this.$common.isEmpty(this.$store.state.currentUser.subscribe)) {
this.subscribe = JSON.parse(this.$store.state.currentUser.subscribe).includes(this.article.labelId);
}
}
})
.catch((error) => {
if ("密码错误" === error.message.substr(0, 4)) {
if (!this.$common.isEmpty(password)) {
this.$message({
message: "密码错误,请重新输入!",
type: "error"
});
}
this.tips = error.message.substr(4);
this.showPasswordDialog = true;
} else {
this.$message({
message: error.message,
type: "error"
});
}
});
},
highlight() {
let attributes = {
autocomplete: "off",
autocorrect: "off",
autocapitalize: "off",
spellcheck: "false",
contenteditable: "false"
};
$("pre").each(function (i, item) {
let preCode = $(item).children("code");
let classNameStr = preCode[0].className;
let classNameArr = classNameStr.split(" ");
let lang = "";
classNameArr.some(function (className) {
if (className.indexOf("language-") > -1) {
lang = className.substring(className.indexOf("-") + 1, className.length);
return true;
}
});
//
let language = hljs.getLanguage(lang.toLowerCase());
if (language === undefined) {
//
let autoLanguage = hljs.highlightAuto(preCode.text());
preCode.removeClass("language-" + lang);
lang = autoLanguage.language;
if (lang === undefined) {
lang = "java";
}
preCode.addClass("language-" + lang);
} else {
lang = language.name;
}
$(item).addClass("highlight-wrap");
$(item).attr(attributes);
preCode.attr("data-rel", lang.toUpperCase()).addClass(lang.toLowerCase());
//
hljs.highlightBlock(preCode[0]);
//
hljs.lineNumbersBlock(preCode[0]);
});
$("pre code").each(function (i, block) {
$(block).attr({
id: "hljs-" + i,
});
$(block).after(
'<a class="copy-code" href="javascript:" data-clipboard-target="#hljs-' +
i +
'"><i class="fa fa-clipboard" aria-hidden="true"></i></a>'
);
new ClipboardJS(".copy-code");
});
if ($(".entry-content").children("table").length > 0) {
$(".entry-content")
.children("table")
.wrap("<div class='table-wrapper'></div>");
}
}
}
}
</script>
<style scoped>
.article-head {
height: 40vh;
position: relative;
}
.article-image::before {
position: absolute;
width: 100%;
height: 100%;
background-color: var(--miniMask);
content: "";
}
.article-info-container {
position: absolute;
bottom: 15px;
left: 20%;
color: var(--white);
}
.article-info-news {
position: absolute;
bottom: 10px;
right: 20%;
cursor: pointer;
animation: scale 1s ease-in-out infinite;
}
.article-title {
font-size: 28px;
margin-bottom: 15px;
}
.article-info {
font-size: 14px;
user-select: none;
}
.article-info i {
margin-right: 6px;
}
.article-info span:not(:last-child) {
margin-right: 5px;
}
.article-container {
max-width: 800px;
margin: 0 auto;
padding: 40px 20px;
}
.article-update-time {
color: var(--greyFont);
font-size: 12px;
margin: 20px 0;
user-select: none;
}
blockquote {
line-height: 2;
border-left: 0.2rem solid var(--blue);
padding: 10px 1rem;
background-color: var(--azure);
border-radius: 4px;
margin: 0 0 40px 0;
user-select: none;
color: var(--black);
}
.article-sort {
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
.article-sort span {
padding: 3px 10px;
background-color: var(--themeBackground);
border-radius: 5px;
font-size: 14px;
color: var(--white);
transition: all 0.3s;
margin-right: 25px;
cursor: pointer;
user-select: none;
}
.article-sort span:hover {
background-color: var(--red);
}
.article-like {
color: var(--red) !important;
}
.article-like-icon {
font-size: 60px;
cursor: pointer;
color: var(--greyFont);
transition: all 0.5s;
border-radius: 50%;
margin-bottom: 20px;
}
.article-like-icon:hover {
transform: rotate(360deg);
}
.process-wrap {
margin: 0 0 40px;
}
.process-wrap hr {
position: relative;
margin: 10px auto 60px;
border: 2px dashed var(--lightGreen);
overflow: visible;
}
.process-wrap hr:before {
position: absolute;
top: -14px;
left: 5%;
color: var(--lightGreen);
content: '❄';
font-size: 30px;
line-height: 1;
transition: all 1s ease-in-out;
}
.process-wrap hr:hover:before {
left: calc(95% - 20px);
}
.process-wrap >>> .el-collapse-item__header {
border-bottom: unset;
font-size: 20px;
background-color: var(--background);
color: var(--lightGreen);
}
.process-wrap >>> .el-collapse-item__wrap {
background-color: var(--background);
}
.process-wrap .el-collapse {
border-top: unset;
border-bottom: unset;
}
.process-wrap >>> .el-collapse-item__wrap {
border-bottom: unset;
}
.password-content {
font-size: 13px;
color: var(--maxGreyFont);
line-height: 1.5;
}
@media screen and (max-width: 700px) {
.article-info-container {
left: 20px;
max-width: 320px;
}
.article-info-news {
right: 20px;
}
}
</style>

@ -1,334 +0,0 @@
<template>
<div v-if="!$common.isEmpty(articleList)" class="recent-post-container">
<div class="article-first">
<svg viewBox="0 0 1024 1024" width="20" height="20" style="vertical-align: -2px;">
<path
d="M224.2 472.3c-13-5.7-3.7-23.5 8.2-19 91 34 146.8 108.7 182.4 138.5 5.6 4.7 14 2.9 17.3-3.5 16.8-32 45.8-113.7-57.1-168.6-87.3-46.5-188-53.6-247.3-82.2-14.5-7-31.1 4.6-29.9 20.7 5 69.7 28.9 124.7 62.3 181.5 67.3 114.3 140.6 132.9 216.6 104 2.2-0.9 4.5-1.8 7-3 7-3.4 8.3-12.9 2.5-18.1 0.1 0-45.7-69.3-162-150.3z"
fill="#FFD401"></path>
<path
d="M282.7 849.9c79.5-137 172.4-263.1 385.4-401.3 9.8-6.4 2.1-21.5-8.9-17.4C497.7 492.8 429.7 585 373.3 640.8c-8.7 8.7-23.4 6.3-29.1-4.6-27.2-51.8-69.5-174.1 97.3-263.1 147.7-78.8 319.9-91.4 429.7-93.3 18.9-0.3 31.5 19.4 23.3 36.4C863.7 380 842.6 478 789.9 567.6 680.8 753.1 545.5 766.7 422.2 719.8c-8.8-3.4-18.8-0.2-24 7.7-16.6 25.2-50.3 80.1-58.7 122.4-11.4 56.8-82.2 43.9-56.8 0z"
fill="#8BC03C"></path>
<path
d="M375 419.6c-30.1 28.2-45.8 57.7-52.4 86.1 40.6 32.4 70.2 67.7 92.1 85.9 1.2 1 2.5 1.6 3.9 2.1 6.5-6.7 13.3-13.7 20.4-20.7 15.2-37.9 25.3-105.7-64-153.4zM318.8 548.2c1.6 36.1 14.7 67.6 25.5 88.1 5.7 10.9 20.3 13.3 29.1 4.6 4.9-4.9 10-10 15.1-15.4-0.6-1-1.3-2-2.2-2.8 0-0.1-20.1-30.5-67.5-74.5z"
fill="#8BA000"></path>
</svg>
发现
</div>
<div class="recent-post-item shadow-box background-opacity"
v-for="(article, index) in articleList"
:key="index"
:class="{'my-animation-slide-top': index % 2 !== 0,'my-animation-slide-bottom': index % 2 === 0}"
@click="$router.push({path: '/article', query: {id: article.id}})">
<!-- 封面 -->
<div class="recent-post-item-image" :class="{ leftImage: index % 2 !== 0, rightImage: index % 2 === 0 }">
<el-image class="my-el-image"
v-once
lazy
:src="!$common.isEmpty(article.articleCover)?article.articleCover:$constant.random_image+new Date()+Math.floor(Math.random()*10)"
fit="cover">
<div slot="error" class="image-slot myCenter" style="background-color: var(--lightGreen)">
<div class="error-text">
<div>遇事不决可问春风</div>
</div>
</div>
</el-image>
</div>
<!-- 内容 -->
<div class="recent-post-item-post" :class="{ leftImage: index % 2 === 0, rightImage: index % 2 !== 0 }">
<!-- 时间 -->
<div class="post-meta">
<svg viewBox="0 0 1024 1024" width="14" height="14" style="vertical-align: -2px;">
<path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#409EFF"></path>
<path
d="M654.222222 256c-17.066667 0-28.444444 11.377778-28.444444 28.444444v56.888889c0 17.066667 11.377778 28.444444 28.444444 28.444445s28.444444-11.377778 28.444445-28.444445v-56.888889c0-17.066667-11.377778-28.444444-28.444445-28.444444zM369.777778 256c-17.066667 0-28.444444 11.377778-28.444445 28.444444v56.888889c0 17.066667 11.377778 28.444444 28.444445 28.444445s28.444444-11.377778 28.444444-28.444445v-56.888889c0-17.066667-11.377778-28.444444-28.444444-28.444444z"
fill="#FFFFFF"></path>
<path
d="M725.333333 312.888889H711.111111v28.444444c0 31.288889-25.6 56.888889-56.888889 56.888889s-56.888889-25.6-56.888889-56.888889v-28.444444h-170.666666v28.444444c0 31.288889-25.6 56.888889-56.888889 56.888889s-56.888889-25.6-56.888889-56.888889v-28.444444h-14.222222c-22.755556 0-42.666667 19.911111-42.666667 42.666667v341.333333c0 22.755556 19.911111 42.666667 42.666667 42.666667h426.666666c22.755556 0 42.666667-19.911111 42.666667-42.666667v-341.333333c0-22.755556-19.911111-42.666667-42.666667-42.666667zM426.666667 654.222222h-56.888889c-17.066667 0-28.444444-11.377778-28.444445-28.444444s11.377778-28.444444 28.444445-28.444445h56.888889c17.066667 0 28.444444 11.377778 28.444444 28.444445s-11.377778 28.444444-28.444444 28.444444z m227.555555 0h-56.888889c-17.066667 0-28.444444-11.377778-28.444444-28.444444s11.377778-28.444444 28.444444-28.444445h56.888889c17.066667 0 28.444444 11.377778 28.444445 28.444445s-11.377778 28.444444-28.444445 28.444444z m0-113.777778h-56.888889c-17.066667 0-28.444444-11.377778-28.444444-28.444444s11.377778-28.444444 28.444444-28.444444h56.888889c17.066667 0 28.444444 11.377778 28.444445 28.444444s-11.377778 28.444444-28.444445 28.444444z"
fill="#FFFFFF"></path>
</svg>
发布于 {{ article.createTime }}
</div>
<!-- 标题 -->
<el-tooltip placement="top" effect="light">
<div slot="content">{{ article.articleTitle }}</div>
<h3>{{ article.articleTitle }}</h3>
</el-tooltip>
<!-- 信息 -->
<div class="post-meta" style="margin-bottom: 15px">
<span>
<svg viewBox="0 0 1024 1024" width="14" height="14" style="vertical-align: -2px;">
<path d="M14.656 512a497.344 497.344 0 1 0 994.688 0 497.344 497.344 0 1 0-994.688 0z"
fill="#FF0000"></path>
<path
d="M374.976 872.64c-48.299-100.032-22.592-157.44 14.421-211.37 40.448-58.966 51.115-117.611 51.115-117.611s31.659 41.386 19.115 106.005c56.149-62.72 66.816-162.133 58.325-200.405 127.317 88.746 181.59 281.002 108.181 423.381C1016 652.501 723.093 323.2 672.277 285.867c16.939 37.333 20.054 100.032-14.101 130.474-58.027-219.84-201.664-265.002-201.664-265.002 16.96 113.536-61.781 237.397-137.344 330.24-2.816-45.163-5.632-76.544-29.483-119.808-5.333 82.176-68.373 149.269-85.29 231.445-22.912 111.637 17.237 193.173 170.581 279.424z"
fill="#FFFFFF"></path>
</svg> {{ article.viewCount }} 热度
</span>
<span>
<svg viewBox="0 0 1024 1024" width="14" height="14" style="vertical-align: -2px;">
<path
d="M113.834667 291.84v449.194667a29.013333 29.013333 0 0 0 28.842666 29.013333h252.928v90.453333l160.597334-90.453333h252.928a29.013333 29.013333 0 0 0 29.013333-29.013333V291.84a29.013333 29.013333 0 0 0-29.013333-29.013333h-665.6a29.013333 29.013333 0 0 0-29.696 29.013333z"
fill="#FFDEAD"></path>
<path
d="M809.130667 262.826667h-665.6a29.013333 29.013333 0 0 0-28.842667 29.013333v40.106667a29.013333 29.013333 0 0 1 28.842667-29.013334h665.6a29.013333 29.013333 0 0 1 29.013333 29.013334V291.84a29.013333 29.013333 0 0 0-29.013333-29.013333z"
fill="#FFF3DB"></path>
<path
d="M556.202667 770.048h252.928a29.013333 29.013333 0 0 0 29.013333-29.013333V362.837333s-59.733333 392.533333-724.309333 314.709334v63.488a29.013333 29.013333 0 0 0 28.842666 29.013333h253.098667v90.453333z"
fill="#F2C182"></path>
<path
d="M619.008 632.32l101.888-35.157333-131.754667-76.117334 29.866667 111.274667zM891.904 148.992a61.44 61.44 0 0 0-84.138667 22.528l-19.968 34.133333 106.666667 61.610667 19.968-34.133333a61.781333 61.781333 0 0 0-22.528-84.138667z"
fill="#69BAF9"></path>
<path d="M775.338667 198.775467l131.669333 76.032-186.026667 322.218666-131.6864-76.032z"
fill="#F7FBFF"></path>
<path
d="M775.168 198.826667l-5.290667 9.216 59.221334 34.133333a34.133333 34.133333 0 0 1 12.458666 46.592l-139.946666 242.346667a34.133333 34.133333 0 0 1-46.762667 12.629333l-59.050667-34.133333-6.656 11.434666 88.746667 51.2L720.896 597.333333l186.026667-322.56z"
fill="#D8E3F0"></path>
<path
d="M616.448 622.592l2.56 9.728 101.888-35.157333-44.885333-25.941334-59.562667 51.370667zM891.904 148.992c-1.024 0-2.218667-0.853333-3.242667-1.536A61.610667 61.610667 0 0 1 887.466667 204.8l-19.968 34.133333-73.728-42.496-5.12 8.704 106.666666 61.610667 19.968-34.133333a61.781333 61.781333 0 0 0-23.381333-83.626667z"
fill="#599ED4"></path>
<path
d="M265.898667 417.621333H494.933333a17.066667 17.066667 0 1 0 0-34.133333H265.898667a17.066667 17.066667 0 1 0 0 34.133333zM265.898667 533.504H494.933333a17.066667 17.066667 0 0 0 0-34.133333H265.898667a17.066667 17.066667 0 0 0 0 34.133333z"
fill="#3D3D63"></path>
<path
d="M959.488 354.645333a99.84 99.84 0 0 0-23.722667-127.488 78.677333 78.677333 0 0 0-142.848-64.170666l-11.605333 20.138666a17.066667 17.066667 0 0 0-20.821333 7.168l-32.085334 55.466667H142.677333a46.250667 46.250667 0 0 0-45.909333 46.08v449.194667a46.08 46.08 0 0 0 45.909333 46.08h236.032v73.386666a17.066667 17.066667 0 0 0 8.362667 14.848 17.066667 17.066667 0 0 0 8.704 2.218667 17.066667 17.066667 0 0 0 8.362667-2.218667l156.672-88.234666h248.32a46.08 46.08 0 0 0 46.08-46.08V398.677333L921.6 283.306667a17.066667 17.066667 0 0 0-4.266667-21.504l1.877334-3.413334a65.365333 65.365333 0 0 1 10.410666 79.189334l-53.077333 91.989333a56.832 56.832 0 0 0 20.821333 77.653333 17.066667 17.066667 0 0 0 24.234667-6.314666 17.066667 17.066667 0 0 0-6.997333-23.04 23.04 23.04 0 0 1-8.362667-31.061334z m-138.410667 386.389334a11.946667 11.946667 0 0 1-11.946666 11.946666H556.202667a17.066667 17.066667 0 0 0-8.362667 2.218667l-134.997333 76.117333v-61.269333a17.066667 17.066667 0 0 0-17.066667-17.066667H142.677333a11.946667 11.946667 0 0 1-11.776-11.946666V291.84a11.946667 11.946667 0 0 1 11.776-11.946667h565.930667L574.464 512a17.066667 17.066667 0 0 0-1.706667 12.970667L597.333333 615.253333H265.898667a17.066667 17.066667 0 1 0 0 34.133334h352.938666a17.066667 17.066667 0 0 0 5.802667 0l102.4-35.328a17.066667 17.066667 0 0 0 9.216-7.509334l85.333333-147.968z m-204.8-184.661334l63.829334 36.864-49.322667 17.066667z m206.848-170.666666v1.365333l-108.373333 186.709333-102.4-59.050666L781.482667 221.866667l102.4 59.050666z m76.458667-161.28L887.466667 244.224l-76.970667-44.373333 11.264-19.797334a44.544 44.544 0 1 1 77.141333 44.544z"
fill="#3D3D63"></path>
</svg> {{ article.commentCount }} 条评论
</span>
<span>
<svg viewBox="0 0 1024 1024" width="14" height="14" style="vertical-align: -2px;">
<path
d="M510.671749 348.792894S340.102978 48.827055 134.243447 254.685563C-97.636714 486.565724 510.671749 913.435858 510.671749 913.435858s616.107079-419.070494 376.428301-658.749272c-194.095603-194.096626-376.428302 94.106308-376.428301 94.106308z"
fill="#FF713C"></path>
<path
d="M510.666632 929.674705c-3.267417 0-6.534833-0.983397-9.326413-2.950192-16.924461-11.872399-414.71121-293.557896-435.220312-529.448394-5.170766-59.482743 13.879102-111.319341 56.643068-154.075121 51.043536-51.043536 104.911398-76.930113 160.095231-76.930114 112.524796 0 196.878996 106.48115 228.475622 153.195078 33.611515-45.214784 122.406864-148.20646 234.04343-148.20646 53.930283 0 105.46603 24.205285 153.210428 71.941496 45.063335 45.063335 64.954361 99.200326 59.133795 160.920016C935.306982 641.685641 536.758893 915.327952 519.80271 926.859589a16.205077 16.205077 0 0 1-9.136078 2.815116zM282.857183 198.75574c-46.25344 0-92.396363 22.682605-137.127124 67.413365-36.149315 36.157501-51.614541 78.120218-47.25321 128.291898 17.575284 202.089671 352.199481 455.119525 412.332023 499.049037 60.434417-42.86732 395.406538-289.147446 414.567947-492.458945 4.933359-52.344159-11.341303-96.465029-49.759288-134.88199-41.431621-41.423435-85.24243-62.424748-130.242319-62.424748-122.041544 0-220.005716 152.203494-220.989114 153.742547-3.045359 4.806469-8.53335 7.883551-14.101159 7.534603a16.257266 16.257266 0 0 1-13.736863-8.184403c-0.902556-1.587148-91.569532-158.081365-213.690893-158.081364z"
fill="#885F44"></path>
</svg> {{ article.likeCount }} 点赞
</span>
</div>
<!-- 内容 -->
<div class="recent-post-desc">
{{ article.articleContent }}
</div>
<!-- 分类 标签 -->
<div class="sort-label">
<span style="margin-right: 12px"
@click.stop="$router.push({path: '/sort', query: {sortId: article.sortId}})">
<svg viewBox="0 0 1024 1024" width="15" height="15" style="vertical-align: -3px;">
<path
d="M179.2 153.6m89.6 0l588.8 0q89.6 0 89.6 89.6l0 486.4q0 89.6-89.6 89.6l-588.8 0q-89.6 0-89.6-89.6l0-486.4q0-89.6 89.6-89.6Z"
fill="#FF9C55"></path>
<path
d="M25.6 193.4208A91.0208 91.0208 0 0 1 116.6208 102.4H382.592a91.0208 91.0208 0 0 1 87.5008 65.9712l24.5504 85.7216h412.7488A91.0208 91.0208 0 0 1 998.4 345.1392v485.4528A91.0208 91.0208 0 0 1 907.3792 921.6H116.608A91.0208 91.0208 0 0 1 25.6 830.5792V193.408z"
fill="#FFD977"></path>
<path
d="M128 665.6m25.6 0l76.8 0q25.6 0 25.6 25.6l0 0q0 25.6-25.6 25.6l-76.8 0q-25.6 0-25.6-25.6l0 0q0-25.6 25.6-25.6Z"
fill="#FFF1C9"></path>
<path
d="M128 768m25.6 0l179.2 0q25.6 0 25.6 25.6l0 0q0 25.6-25.6 25.6l-179.2 0q-25.6 0-25.6-25.6l0 0q0-25.6 25.6-25.6Z"
fill="#FFF1C9"></path>
<path
d="M128 486.4m51.2 0l0 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l0 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"
fill="#FFA86A"></path>
</svg> {{ article.sort.sortName }}
</span>
<span @click.stop="$router.push({path: '/sort', query: {sortId: article.sortId, labelId: article.labelId}})">
<svg viewBox="0 0 1024 1024" width="15" height="15" style="vertical-align: -3px;">
<path
d="M905.0112 560.4352l-342.784 342.784c-56.7808 56.7808-148.7872 56.7808-205.568 0l-231.5776-231.5776c-56.7808-56.7808-56.7808-148.7872 0-205.568l342.9376-342.9376a114.8928 114.8928 0 0 1 84.224-33.5872l266.3936 7.2192c60.7744 1.6384 109.7216 50.3808 111.5648 111.1552l8.2944 267.8272c1.024 31.6928-11.1104 62.3104-33.4848 84.6848z"
fill="#8C7BFD"></path>
<path
d="M675.2256 491.4688c-82.176 0-149.0432-66.8672-149.0432-149.0432s66.8672-149.0432 149.0432-149.0432 149.0432 66.8672 149.0432 149.0432-66.8672 149.0432-149.0432 149.0432z m0-192.2048c-23.808 0-43.2128 19.3536-43.2128 43.2128 0 23.808 19.3536 43.2128 43.2128 43.2128 23.808 0 43.2128-19.3536 43.2128-43.2128s-19.4048-43.2128-43.2128-43.2128z"
fill="#FFE37B"></path>
</svg> {{ article.label.labelName }}
</span>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
articleList: {
type: Array
}
},
methods: {}
}
</script>
<style scoped>
.article-first {
color: var(--greyFont);
border-bottom: 1px dashed var(--lightGray);
padding-bottom: 5px;
margin-bottom: 50px;
}
.recent-post-container {
max-width: 780px;
margin: auto;
}
.recent-post-container .recent-post-item:not(:last-child) {
margin-bottom: 40px;
}
.recent-post-item {
height: 300px;
position: relative;
display: flex;
flex-direction: row;
user-select: none;
cursor: pointer;
overflow: hidden;
border-radius: 10px;
animation: hideToShow 1s ease-in-out;
//background-color: #1d1f21;
}
.recent-post-item-image {
width: 50%;
height: 100%;
}
.recent-post-item-image >>> .el-image__inner {
transition: all 1s;
}
.recent-post-item-image >>> .el-image__inner:hover {
transform: scale(1.2);
}
.leftImage {
position: absolute;
left: 0;
}
.rightImage {
position: absolute;
right: 0;
text-align: right;
}
.recent-post-item-post {
width: 50%;
height: 100%;
display: flex;
flex-direction: column;
padding: 20px 35px;
}
.recent-post-item-post h3 {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.post-meta {
font-size: 12px;
color: var(--greyFont);
}
.post-meta i {
font-size: 15px;
}
.post-meta span:not(:last-child) {
margin-right: 10px;
}
.recent-post-desc {
font-size: 15px;
line-height: 1.7;
/* 超出4行就... */
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
}
.leftImage .sort-label {
position: absolute;
bottom: 20px;
}
.rightImage .sort-label {
position: absolute;
bottom: 20px;
right: 35px;
}
.sort-label span {
padding: 3px 10px;
background-color: var(--maxLightGray);
border-radius: 3px;
font-size: 14px;
color: var(--greyFont);
transition: all 0.3s;
cursor: pointer;
user-select: none;
}
.sort-label span:hover {
background-color: var(--themeBackground);
color: var(--white);
}
.error-text {
font-size: 20px;
line-height: 1.8;
letter-spacing: 8px;
color: var(--white);
}
@media screen and (max-width: 700px) {
.recent-post-item {
height: 450px;
position: unset;
display: block;
flex-direction: unset;
}
.recent-post-item-image {
width: 100%;
height: 200px;
}
.leftImage {
position: unset;
left: unset;
}
.rightImage {
position: unset;
right: unset;
text-align: unset;
}
.recent-post-item-post {
width: 100%;
height: 250px;
position: relative;
}
.recent-post-desc {
-webkit-line-clamp: 3;
}
.leftImage .sort-label {
position: absolute;
bottom: 20px;
}
.rightImage .sort-label {
position: absolute;
bottom: 20px;
right: unset;
}
}
</style>

File diff suppressed because it is too large Load Diff

@ -1,422 +0,0 @@
<template>
<div>
<!-- 评论框 -->
<div style="margin-bottom: 40px">
<div class="comment-head">
<i class="el-icon-edit-outline" style="font-weight: bold;font-size: 22px;"></i> 留言
</div>
<div>
<!-- 文字评论 -->
<div v-show="!isGraffiti">
<commentBox @showGraffiti="isGraffiti = !isGraffiti"
@submitComment="submitComment">
</commentBox>
</div>
<!-- 画笔 -->
<!-- <div v-show="isGraffiti">-->
<!-- <graffiti @showComment="isGraffiti = !isGraffiti"-->
<!-- @addGraffitiComment="addGraffitiComment">-->
<!-- </graffiti>-->
<!-- </div>-->
</div>
</div>
<!-- 评论内容 -->
<div v-if="comments.length > 0">
<!-- 评论数量 -->
<div class="commentInfo-title">
<span style="font-size: 1.15rem">Comments | </span>
<span>{{ total }} 条留言</span>
</div>
<!-- 评论详情 -->
<div id="comment-content" class="commentInfo-detail"
v-for="(item, index) in comments"
:key="index">
<!-- 头像 -->
<el-avatar shape="square" class="commentInfo-avatar" :size="35" :src="item.avatar"></el-avatar>
<div style="flex: 1;padding-left: 12px">
<!-- 评论信息 -->
<div style="display: flex;justify-content: space-between">
<div>
<span class="commentInfo-username">{{ item.username }}</span>
<span class="commentInfo-master" v-if="item.userId === userId"></span>
<span class="commentInfo-other">{{ $common.getDateDiff(item.createTime) }}</span>
</div>
<div class="commentInfo-reply" @click="replyDialog(item, item)">
<span v-if="item.childComments.total > 0">{{item.childComments.total}} </span><span>回复</span>
</div>
</div>
<!-- 评论内容 -->
<div class="commentInfo-content">
<span v-html="item.commentContent"></span>
</div>
<!-- 回复模块 -->
<div v-if="!$common.isEmpty(item.childComments) && !$common.isEmpty(item.childComments.records)">
<div class="commentInfo-detail" v-for="(childItem, i) in item.childComments.records" :key="i">
<!-- 头像 -->
<el-avatar shape="square" class="commentInfo-avatar" :size="30" :src="childItem.avatar"></el-avatar>
<div style="flex: 1;padding-left: 12px">
<!-- 评论信息 -->
<div style="display: flex;justify-content: space-between">
<div>
<span class="commentInfo-username-small">{{ childItem.username }}</span>
<span class="commentInfo-master" v-if="childItem.userId === userId"></span>
<span class="commentInfo-other">{{ $common.getDateDiff(childItem.createTime) }}</span>
</div>
<div>
<span class="commentInfo-reply" @click="replyDialog(childItem, item)">回复</span>
</div>
</div>
<!-- 评论内容 -->
<div class="commentInfo-content">
<template v-if="childItem.parentCommentId !== item.id &&
childItem.parentUserId !== childItem.userId">
<span style="color: var(--blue)">@{{ childItem.parentUsername }} </span>:
</template>
<span v-html="childItem.commentContent"></span>
</div>
</div>
</div>
<!-- 分页 -->
<div class="pagination-wrap" v-if="item.childComments.records.length < item.childComments.total">
<div class="pagination"
@click="toChildPage(item)">
展开
</div>
</div>
</div>
</div>
</div>
<!-- 分页 -->
<proPage :current="pagination.current"
:size="pagination.size"
:total="pagination.total"
:buttonSize="6"
:color="$constant.commentPageColor"
@toPage="toPage">
</proPage>
</div>
<div v-else class="myCenter" style="color: var(--greyFont)">
<i>来发第一个留言啦~</i>
</div>
<el-dialog title="留言"
:visible.sync="replyDialogVisible"
width="30%"
:before-close="handleClose"
:append-to-body="true"
destroy-on-close
center>
<div>
<commentBox :disableGraffiti="true"
@submitComment="submitReply">
</commentBox>
</div>
</el-dialog>
</div>
</template>
<script>
// const graffiti = () => import( "./graffiti");
const commentBox = () => import( "./commentBox");
const proPage = () => import( "../common/proPage");
export default {
components: {
// graffiti,
commentBox,
proPage
},
props: {
source: {
type: Number
},
type: {
type: String
},
userId: {
type: Number
}
},
data() {
return {
isGraffiti: false,
total: 0,
replyDialogVisible: false,
floorComment: {},
replyComment: {},
comments: [],
pagination: {
current: 1,
size: 10,
total: 0,
source: this.source,
commentType: this.type,
floorCommentId: null
}
};
},
computed: {},
created() {
this.getComments(this.pagination);
this.getTotal();
},
methods: {
toPage(page) {
this.pagination.current = page;
window.scrollTo({
top: document.getElementById('comment-content').offsetTop
});
this.getComments(this.pagination);
},
getTotal() {
this.$http.get(this.$constant.baseURL + "/comment/getCommentCount", {source: this.source, type: this.type})
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.total = res.data;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
toChildPage(floorComment) {
floorComment.childComments.current += 1;
let pagination = {
current: floorComment.childComments.current,
size: 5,
total: 0,
source: this.source,
commentType: this.type,
floorCommentId: floorComment.id
}
this.getComments(pagination, floorComment, true);
},
emoji(comments, flag) {
comments.forEach(c => {
c.commentContent = c.commentContent.replace(/\n/g, '<br/>');
c.commentContent = this.$common.faceReg(c.commentContent);
c.commentContent = this.$common.pictureReg(c.commentContent);
if (flag) {
if (!this.$common.isEmpty(c.childComments) && !this.$common.isEmpty(c.childComments.records)) {
c.childComments.records.forEach(cc => {
c.commentContent = c.commentContent.replace(/\n/g, '<br/>');
cc.commentContent = this.$common.faceReg(cc.commentContent);
cc.commentContent = this.$common.pictureReg(cc.commentContent);
});
}
}
});
},
getComments(pagination, floorComment = {}, isToPage = false) {
this.$http.post(this.$constant.baseURL + "/comment/listComment", pagination)
.then((res) => {
if (!this.$common.isEmpty(res.data) && !this.$common.isEmpty(res.data.records)) {
if (this.$common.isEmpty(floorComment)) {
this.comments = res.data.records;
pagination.total = res.data.total;
this.emoji(this.comments, true);
} else {
if (isToPage === false) {
floorComment.childComments = res.data;
} else {
floorComment.childComments.total = res.data.total;
floorComment.childComments.records = floorComment.childComments.records.concat(res.data.records);
}
this.emoji(floorComment.childComments.records, false);
}
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
addGraffitiComment(graffitiComment) {
this.submitComment(graffitiComment);
},
submitComment(commentContent) {
let comment = {
source: this.source,
type: this.type,
commentContent: commentContent
};
this.$http.post(this.$constant.baseURL + "/comment/saveComment", comment)
.then((res) => {
this.$message({
type: 'success',
message: '保存成功!'
});
this.pagination = {
current: 1,
size: 10,
total: 0,
source: this.source,
commentType: this.type,
floorCommentId: null
}
this.getComments(this.pagination);
this.getTotal();
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
submitReply(commentContent) {
let comment = {
source: this.source,
type: this.type,
floorCommentId: this.floorComment.id,
commentContent: commentContent,
parentCommentId: this.replyComment.id,
parentUserId: this.replyComment.userId
};
let floorComment = this.floorComment;
this.$http.post(this.$constant.baseURL + "/comment/saveComment", comment)
.then((res) => {
let pagination = {
current: 1,
size: 5,
total: 0,
source: this.source,
commentType: this.type,
floorCommentId: floorComment.id
}
this.getComments(pagination, floorComment);
this.getTotal();
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
this.handleClose();
},
replyDialog(comment, floorComment) {
this.replyComment = comment;
this.floorComment = floorComment;
this.replyDialogVisible = true;
},
handleClose() {
this.replyDialogVisible = false;
this.floorComment = {};
this.replyComment = {};
}
}
}
</script>
<style scoped>
.comment-head {
display: flex;
align-items: center;
font-size: 20px;
font-weight: bold;
margin: 40px 0 20px 0;
user-select: none;
color: var(--themeBackground);
}
.commentInfo-title {
margin-bottom: 20px;
color: var(--greyFont);
user-select: none;
}
.commentInfo-detail {
display: flex;
}
.commentInfo-avatar {
border-radius: 5px;
}
.commentInfo-username {
color: var(--orangeRed);
font-size: 16px;
font-weight: 600;
margin-right: 5px;
}
.commentInfo-username-small {
color: var(--orangeRed);
font-size: 14px;
font-weight: 600;
margin-right: 5px;
}
.commentInfo-master {
color: var(--green);
border: 1px solid var(--green);
border-radius: 0.2rem;
font-size: 12px;
padding: 2px 4px;
margin-right: 5px;
}
.commentInfo-other {
font-size: 12px;
color: var(--greyFont);
user-select: none;
}
.commentInfo-reply {
font-size: 12px;
cursor: pointer;
user-select: none;
color: var(--white);
background: var(--themeBackground);
border-radius: 0.2rem;
padding: 3px 6px;
}
.commentInfo-content {
margin: 15px 0 25px;
padding: 18px 20px;
background: var(--commentContent);
border-radius: 12px;
color: var(--black);
word-break: break-word;
}
.pagination-wrap {
display: flex;
justify-content: center;
margin-bottom: 10px;
}
.pagination {
padding: 6px 20px;
border: 1px solid var(--lightGray);
border-radius: 3rem;
color: var(--greyFont);
user-select: none;
cursor: pointer;
text-align: center;
font-size: 12px;
}
.pagination:hover {
border: 1px solid var(--themeBackground);
color: var(--themeBackground);
box-shadow: 0 0 5px var(--themeBackground);
}
</style>

@ -1,185 +0,0 @@
<template>
<div>
<!-- -->
<textarea
class="comment-textarea"
v-model="commentContent"
placeholder="写下点什么..."
maxlength="1000"/>
<!-- 按钮 -->
<div class="myBetween" style="margin-bottom: 10px">
<div style="display: flex">
<div :class="{'emoji-active':showEmoji}"
@click="showEmoji = !showEmoji">
<i class="el-icon-orange myEmoji"></i>
</div>
<div @click="openPicture()">
<i class="el-icon-picture myPicture"></i>
</div>
</div>
<div style="display: flex">
<!-- <proButton :info="'涂鸦'"-->
<!-- v-show="!$common.mobile() && !disableGraffiti"-->
<!-- @click.native="showGraffiti()"-->
<!-- :before="$constant.before_color_1"-->
<!-- :after="$constant.after_color_1"-->
<!-- style="margin-right: 6px">-->
<!-- </proButton>-->
<proButton :info="'提交'"
@click.native="submitComment()"
:before="$constant.before_color_2"
:after="$constant.after_color_2">
</proButton>
</div>
</div>
<!-- 表情 -->
<emoji @addEmoji="addEmoji" :showEmoji="showEmoji"></emoji>
<el-dialog title="图片"
:visible.sync="showPicture"
width="25%"
:append-to-body="true"
destroy-on-close
center>
<div>
<uploadPicture :prefix="'commentPicture'" @addPicture="addPicture" :maxSize="5"
:maxNumber="1"></uploadPicture>
</div>
</el-dialog>
</div>
</template>
<script>
const emoji = () => import( "../common/emoji");
const proButton = () => import( "../common/proButton");
const uploadPicture = () => import( "../common/uploadPicture");
export default {
components: {
emoji,
proButton,
uploadPicture
},
props: {
disableGraffiti: {
type: Boolean,
default: false
}
},
data() {
return {
commentContent: "",
showEmoji: false,
showPicture: false,
picture: {
name: this.$store.state.currentUser.username,
url: ""
}
};
},
methods: {
openPicture() {
if (this.$common.isEmpty(this.$store.state.currentUser)) {
this.$message({
message: "请先登录!",
type: "error"
});
return;
}
this.showPicture = true;
},
addPicture(res) {
this.picture.url = res;
this.savePicture();
},
savePicture() {
let img = "<" + this.picture.name + "," + this.picture.url + ">";
this.commentContent += img;
this.picture.url = "";
this.showPicture = false;
},
addEmoji(key) {
this.commentContent += key;
},
showGraffiti() {
if (this.$common.isEmpty(this.$store.state.currentUser)) {
this.$message({
message: "请先登录!",
type: "error"
});
return;
}
this.commentContent = "";
this.$emit("showGraffiti");
},
submitComment() {
if (this.$common.isEmpty(this.$store.state.currentUser)) {
this.$message({
message: "请先登录!",
type: "error"
});
return;
}
if (this.commentContent.trim() === "") {
this.$message({
message: "你还没写呢~",
type: "warning"
});
return;
}
this.$emit("submitComment", this.commentContent.trim());
this.commentContent = "";
}
}
}
</script>
<style scoped>
.comment-textarea {
border: 1px solid var(--lightGray);
width: 100%;
font-size: 14px;
padding: 15px;
min-height: 180px;
/* 不改变大小 */
resize: none;
/* 不改变边框 */
outline: none;
border-radius: 4px;
background-image: var(--commentURL);
background-size: contain;
background-repeat: no-repeat;
background-position: 100%;
margin-bottom: 10px;
}
.comment-textarea:focus {
border-color: var(--themeBackground);
}
.myEmoji {
font-size: 18px;
cursor: pointer;
transition: all 0.5s;
margin-right: 12px;
}
.myEmoji:hover {
transform: rotate(360deg);
font-size: 22px;
}
.myPicture {
font-size: 18px;
cursor: pointer;
}
.emoji-active {
color: var(--red);
}
</style>

@ -1,408 +0,0 @@
<template>
<div>
<!-- 画布 -->
<div style="padding: 5px" @mousemove="canvasOutMove($event)" @touchmove="canvasOutMove($event)">
<div class="graffiti-container">
<canvas id="canvas"
width="766"
height="400"
@mousedown="canvasDown($event)"
@mouseup="canvasUp($event)"
@mousemove="canvasMove($event)"
@touchstart="canvasDown($event)"
@touchend="canvasUp($event)"
@touchmove="canvasMove($event)">
</canvas>
</div>
</div>
<div style="padding: 10px 0 0 5px;">
<!-- 颜色 -->
<div class="graffiti-tools">
<span class="graffiti-title">画笔颜色</span>
<div class="myCenter" style="margin-left: 2rem">
<div v-for="(color, index) in colors"
:class="{ activeColor: config.lineColor === color }"
:style="{ background: color }"
@click="setColor(color)"
class="graffiti-color"
:key="index">
</div>
</div>
</div>
<!-- 大小 -->
<div class="graffiti-tools">
<span class="graffiti-title">画笔大小</span>
<div class="myCenter" style="margin-left: 2rem">
<i v-for="(pen, index) in brushSize"
:key="index"
class="graffiti-size"
:class="[pen.className, { activeSize: config.lineWidth === pen.lineWidth }]"
@click="setBrush(pen.lineWidth)">
</i>
</div>
</div>
<!-- 操作 -->
<div class="graffiti-tools">
<span class="graffiti-title">操作</span>
<div class="myCenter" style="margin-left: 3.7rem">
<i v-for="(control, index) in controls"
:title="control.title"
:class="control.className"
class="graffiti-operate"
@click="controlCanvas(control.action)"
:key="index">
</i>
</div>
</div>
<!-- 按钮 -->
<div class="graffiti-tools" style="justify-content: center">
<proButton :info="'文字'"
@click.native="showComment()"
:before="$constant.before_color_1"
:after="$constant.after_color_1"
style="margin-right: 6px">
</proButton>
<proButton :info="'提交'"
@click.native="getImage()"
:before="$constant.before_color_2"
:after="$constant.after_color_2">
</proButton>
</div>
</div>
</div>
</template>
<script>
const proButton = () => import( "../common/proButton");
export default {
components: {
proButton
},
data() {
return {
context: {},
canvasMoveUse: false,
// -
preDrawAry: [],
// -
nextDrawAry: [],
//
middleAry: [],
//
config: {
lineWidth: 5,
lineColor: "#8154A3",
shadowBlur: 2,
},
colors: ["#8154A3", "#fef4ac", "#0018ba", "#ffc200", "#f32f15", "#cccccc", "#5ab639"],
brushSize: [{
className: "small el-icon-edit",
lineWidth: 5,
}, {
className: "middle el-icon-edit",
lineWidth: 10,
}, {
className: "big el-icon-edit",
lineWidth: 15,
}]
};
},
computed: {
controls() {
return [{
title: "上一步",
action: "prev",
className: this.preDrawAry.length
? "active el-icon-arrow-left"
: "ban el-icon-arrow-left",
}, {
title: "下一步",
action: "next",
className: this.nextDrawAry.length
? "active el-icon-arrow-right"
: "ban el-icon-arrow-right",
}, {
title: "清除",
action: "clear",
className:
this.preDrawAry.length || this.nextDrawAry.length
? "active el-icon-refresh"
: "ban el-icon-refresh",
}];
}
},
mounted() {
const canvas = document.querySelector("#canvas");
this.context = canvas.getContext("2d", {willReadFrequently: true});
this.initDraw();
this.setCanvasStyle();
},
created() {
},
methods: {
canvasOutMove(e) {
const canvas = document.querySelector("#canvas");
if (e.target !== canvas) {
this.canvasMoveUse = false;
}
},
initDraw() {
const preData = this.context.getImageData(0, 0, 1200, 600);
//
this.middleAry.push(preData);
},
canvasUp(e) {
const preData = this.context.getImageData(0, 0, 1200, 600);
if (!this.nextDrawAry.length) {
//
this.middleAry.push(preData);
} else {
this.middleAry = [];
this.middleAry = this.middleAry.concat(this.preDrawAry);
this.middleAry.push(preData);
this.nextDrawAry = [];
}
this.canvasMoveUse = false;
this.context.beginPath();
},
canvasDown(e) {
this.canvasMoveUse = true;
// client
// offsetcanvas
this.setCanvasStyle();
//
this.context.beginPath();
this.context.moveTo(e.layerX, e.layerY);
//
const preData = this.context.getImageData(0, 0, 1200, 600);
//
this.preDrawAry.push(preData);
},
canvasMove(e) {
if (this.canvasMoveUse) {
this.context.lineTo(e.layerX, e.layerY);
this.context.stroke();
}
},
//
setCanvasStyle() {
this.context.lineWidth = this.config.lineWidth;
this.context.shadowBlur = this.config.shadowBlur;
this.context.shadowColor = this.config.lineColor;
this.context.strokeStyle = this.config.lineColor;
},
//
setColor(color) {
this.config.lineColor = color;
},
//
setBrush(size) {
this.config.lineWidth = size;
},
controlCanvas(action) {
switch (action) {
case "prev":
if (this.preDrawAry.length) {
const popData = this.preDrawAry.pop();
const midData = this.middleAry[this.preDrawAry.length + 1];
this.nextDrawAry.push(midData);
this.context.putImageData(popData, 0, 0);
}
break;
case "next":
if (this.nextDrawAry.length) {
const popData = this.nextDrawAry.pop();
const midData = this.middleAry[this.middleAry.length - this.nextDrawAry.length - 2];
this.preDrawAry.push(midData);
this.context.putImageData(popData, 0, 0);
}
break;
case "clear":
this.clearContext();
this.middleAry = [this.middleAry[0]];
break;
}
},
clearContext() {
this.context.clearRect(0, 0, this.context.canvas.width, this.context.canvas.height);
this.preDrawAry = [];
this.nextDrawAry = [];
},
showComment() {
this.clearContext();
this.$emit("showComment");
},
getImage() {
if (this.$common.isEmpty(this.$store.state.currentUser)) {
this.$message({
message: "请先登录!",
type: "error"
});
return;
}
if (this.preDrawAry.length < 1) {
this.$message({
message: "你还没画呢~",
type: "warning"
});
return;
}
const canvas = document.querySelector("#canvas");
const dataURL = canvas.toDataURL("image/png");
let arr = dataURL.split(","),
mine = arr[0].match(/:(.*?);/)[1],
str = atob(arr[1]),
n = str.length,
u8arr = new Uint8Array(n);
while (n--) {
u8arr[n] = str.charCodeAt(n);
}
let obj = new Blob([u8arr], {type: mine});
let key = "graffiti" + "/" + this.$store.state.currentUser.username.replace(/[^a-zA-Z]/g, '') + this.$store.state.currentUser.id + new Date().getTime() + Math.floor(Math.random() * 1000) + ".png";
let storeType = localStorage.getItem("defaultStoreType");
let fd = new FormData();
fd.append("file", obj);
fd.append("key", key);
fd.append("relativePath", key);
fd.append("type", "graffiti");
fd.append("storeType", storeType);
if (storeType === "local") {
this.saveLocal(fd);
} else if (storeType === "qiniu") {
this.saveQiniu(fd);
}
},
saveLocal(fd) {
this.$http.upload(this.$constant.baseURL + "/resource/upload", fd)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.clearContext();
let url = res.data;
let img = "<你画我猜," + url + ">";
this.$emit("addGraffitiComment", img);
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
saveQiniu(fd) {
this.$http.get(this.$constant.baseURL + "/qiniu/getUpToken", {key: fd.get("key")})
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
fd.append("token", res.data);
this.$http.uploadQiniu(this.$constant.qiniuUrl, fd)
.then((res) => {
if (!this.$common.isEmpty(res.key)) {
this.clearContext();
let url = this.$constant.qiniuDownload + res.key;
let file = fd.get("file");
this.$common.saveResource(this, "graffiti", url, file.size, file.type, "qiniu");
let img = "<你画我猜," + url + ">";
this.$emit("addGraffitiComment", img);
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}
}
}
</script>
<style scoped>
.graffiti-container {
overflow: hidden;
border: 2px var(--lightGray) solid;
border-radius: 4px;
}
.graffiti-tools {
display: flex;
align-items: center;
margin-bottom: 10px;
}
.graffiti-title {
font-size: 14px;
}
.graffiti-color {
width: 1rem;
height: 1rem;
border-radius: 50%;
float: left;
margin-right: 20px;
cursor: pointer;
transition: all 0.2s;
}
.graffiti-color:hover {
width: 1.3rem;
height: 1.3rem;
}
.activeColor {
width: 1.3rem;
height: 1.3rem;
}
.graffiti-size {
cursor: pointer;
margin-right: 20px;
}
.graffiti-size.small {
font-size: 14px;
}
.graffiti-size.middle {
font-size: 16px;
}
.graffiti-size.big {
font-size: 18px;
}
.activeSize {
background-color: var(--themeBackground);
color: var(--white);
border-radius: 50%;
padding: 2px;
}
.graffiti-operate {
margin-right: 20px;
cursor: pointer;
font-size: 18px;
}
.graffiti-operate.ban {
cursor: not-allowed
}
</style>

@ -1,161 +0,0 @@
<template>
<div class="card-container" v-if="!$common.isEmpty(resourcePathList)">
<div v-for="(resourcePath, index) in resourcePathList"
:key="index"
class="card-item shadow-box wow"
@click="clickResourcePath(resourcePath)">
<div class="card-image">
<el-image class="my-el-image"
v-once
lazy
:src="resourcePath.cover"
fit="cover">
<div slot="error" class="image-slot myCenter" style="background-color: var(--lightGreen)">
<div class="error-text">
<div>遇事不决可问春风</div>
</div>
</div>
</el-image>
</div>
<div class="card-body">
<div class="card-title">
<span v-if="resourcePath.recommendStatus">
🔥
</span>
{{resourcePath.title}}
</div>
<div class="card-desc">
{{resourcePath.introduction}}
</div>
<div class="card-time">
<svg viewBox="0 0 1024 1024" width="14" height="14" style="vertical-align: -2px;">
<path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#409EFF"></path>
<path
d="M654.222222 256c-17.066667 0-28.444444 11.377778-28.444444 28.444444v56.888889c0 17.066667 11.377778 28.444444 28.444444 28.444445s28.444444-11.377778 28.444445-28.444445v-56.888889c0-17.066667-11.377778-28.444444-28.444445-28.444444zM369.777778 256c-17.066667 0-28.444444 11.377778-28.444445 28.444444v56.888889c0 17.066667 11.377778 28.444444 28.444445 28.444445s28.444444-11.377778 28.444444-28.444445v-56.888889c0-17.066667-11.377778-28.444444-28.444444-28.444444z"
fill="#FFFFFF"></path>
<path
d="M725.333333 312.888889H711.111111v28.444444c0 31.288889-25.6 56.888889-56.888889 56.888889s-56.888889-25.6-56.888889-56.888889v-28.444444h-170.666666v28.444444c0 31.288889-25.6 56.888889-56.888889 56.888889s-56.888889-25.6-56.888889-56.888889v-28.444444h-14.222222c-22.755556 0-42.666667 19.911111-42.666667 42.666667v341.333333c0 22.755556 19.911111 42.666667 42.666667 42.666667h426.666666c22.755556 0 42.666667-19.911111 42.666667-42.666667v-341.333333c0-22.755556-19.911111-42.666667-42.666667-42.666667zM426.666667 654.222222h-56.888889c-17.066667 0-28.444444-11.377778-28.444445-28.444444s11.377778-28.444444 28.444445-28.444445h56.888889c17.066667 0 28.444444 11.377778 28.444444 28.444445s-11.377778 28.444444-28.444444 28.444444z m227.555555 0h-56.888889c-17.066667 0-28.444444-11.377778-28.444444-28.444444s11.377778-28.444444 28.444444-28.444445h56.888889c17.066667 0 28.444444 11.377778 28.444445 28.444445s-11.377778 28.444444-28.444445 28.444444z m0-113.777778h-56.888889c-17.066667 0-28.444444-11.377778-28.444444-28.444444s11.377778-28.444444 28.444444-28.444444h56.888889c17.066667 0 28.444444 11.377778 28.444445 28.444444s-11.377778 28.444444-28.444445 28.444444z"
fill="#FFFFFF"></path>
</svg>
发布于 {{ $common.getDateDiff(resourcePath.createTime) }}
</div>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
resourcePathList: {
type: Array
}
},
data() {
return {}
},
computed: {},
watch: {},
created() {
},
mounted() {
},
methods: {
clickResourcePath(resourcePath) {
this.$emit("clickResourcePath", resourcePath.url);
}
}
}
</script>
<style scoped>
.card-container {
display: flex;
flex-wrap: wrap;
}
.card-item {
position: relative;
border-radius: 10px;
background: rgba(255, 255, 255, .88);
overflow: hidden;
margin: 10px;
height: 300px;
flex-shrink: 0;
width: calc(100% / 3 - 20px);
cursor: pointer;
animation: zoomIn 0.8s ease-in-out;
}
.card-image {
width: 100%;
height: 180px;
}
.card-image >>> .el-image__inner {
transition: all 1s;
}
.card-image >>> .el-image__inner:hover {
transform: scale(1.2);
}
.card-body {
padding: 10px 20px;
}
.card-title {
font-size: 18px;
font-weight: 600;
margin-bottom: 10px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
transition: all .2s ease-in-out;
}
.card-title:hover {
color: var(--lightGreen);
}
.card-desc {
font-size: 14px;
line-height: 1.5;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
letter-spacing: 1px;
}
.card-time {
position: absolute;
bottom: 10px;
font-size: 12px;
color: var(--greyFont);
}
@media screen and (max-width: 700px) {
.card-item {
width: calc(100% / 2 - 20px);
}
}
@media screen and (max-width: 500px) {
.card-item {
width: calc(100% - 20px);
}
}
</style>

@ -1,79 +0,0 @@
<template>
<div>
<transition name="body">
<div v-show="showEmoji">
<span class="emoji-item"
v-for="(value, key, index) in emojiListURL"
:key="index"
@click="addEmoji(key)">
<img class="emoji" :src="value" :title="key" width="24px" height="24px"/>
</span>
</div>
</transition>
</div>
</template>
<script>
export default {
props: {
showEmoji: {
type: Boolean
}
},
data() {
return {
emojiList: this.$constant.emojiList,
emojiListURL: {}
};
},
created() {
this.emojiListURL = this.getEmojiList(this.emojiList);
},
methods: {
addEmoji(key) {
this.$emit("addEmoji", key);
},
getEmojiList(emojiList) {
let emojiName;
let url;
let result = {}
for (let i = 0; i < emojiList.length; i++) {
emojiName = "[" + emojiList[i] + "]";
let j = i + 1;
url = this.$constant.qiniuDownload + "emoji/q" + j + ".gif";
result[emojiName] = url;
}
return result;
}
}
}
</script>
<style scoped>
.emoji-item {
cursor: pointer;
display: inline-block;
}
.emoji-item:hover {
transition: all 0.2s;
border-radius: 0.25rem;
background: var(--lightGray);
}
.emoji {
margin: 0.25rem;
/* 把此元素放置在父元素的中部 */
vertical-align: middle;
}
.body-enter-active, .body-leave-active {
transition: all 0.3s;
}
.body-enter, .body-leave-to {
opacity: 0;
transform: scale(0.5);
}
</style>

@ -1,66 +0,0 @@
<template>
<div>
<!-- 加载动画 -->
<transition name="loader">
<div v-show="loaderVisible">
<slot name="loader"></slot>
</div>
</transition>
<!-- 内容 -->
<transition name="body">
<div v-show="bodyVisible">
<slot name="body"></slot>
</div>
</transition>
</div>
</template>
<script>
export default {
props: {
loading: {
type: Boolean,
default: false
}
},
data() {
return {
loaderVisible: this.loading,
bodyVisible: !this.loading
};
},
watch: {
loading(loading) {
this.loaderVisible = loading;
setTimeout(() => {
this.bodyVisible = !loading;
}, 300);
}
}
};
</script>
<style scoped>
/*
v-enter定义进入过渡的开始状态
v-enter-active定义进入过渡生效时的状态
v-enter-to2.1.8 版及以上定义进入过渡的结束状态
v-leave定义离开过渡的开始状态
v-leave-active定义离开过渡生效时的状态
v-leave-to2.1.8 版及以上定义离开过渡的结束状态
*/
.loader-enter-active,
.loader-leave-active,
.body-enter-active,
.body-leave-active {
transition: all 0.5s;
}
.loader-enter, .loader-leave-to {
opacity: 0;
}
.body-enter, .body-leave-to {
opacity: 0;
transform: scale(0.5) translateY(50%);
}
</style>

@ -1,65 +0,0 @@
<template>
<div class="myFooter-wrap" v-show="showFooter">
<div class="myFooter">
<div class="footer-title">{{$store.state.webInfo.footer}}</div>
<div class="icp">或许所有的努力都会失败但即使是战死在这条路上我也不要被疾病摧残而死我别无选择</div>
</div>
</div>
</template>
<script>
export default {
props: {
showFooter: {
type: Boolean,
default: true
}
},
data() {
return {}
},
created() {
}
}
</script>
<style scoped>
.myFooter-wrap {
user-select: none;
animation: hideToShow 2s;
}
.myFooter {
border-radius: 1.5rem 1.5rem 0 0;
background: var(--gradientBG);
text-align: center;
color: var(--white);
background-size: 300% 300%;
animation: gradientBG 10s ease infinite;
}
.footer-title {
padding-top: 10px;
font-size: 16px;
}
.icp, .icp a {
color: var(--maxGreyFont);
font-size: 13px;
}
.icp {
padding-top: 10px;
padding-bottom: 10px;
}
.icp a {
text-decoration: none;
transition: all 0.3s;
}
.icp a:hover {
color: var(--themeBackground);
}
</style>

@ -1,155 +0,0 @@
<template>
<div class="card-container" v-if="!$common.isEmpty(resourcePathList)">
<div v-for="(resourcePath, index) in resourcePathList"
:key="index"
class="card-item wow shadow-box-mini">
<div class="card-image">
<el-image class="my-el-image"
v-once
lazy
:preview-src-list="[resourcePath.cover]"
:src="resourcePath.cover"
fit="cover">
<div slot="error" class="image-slot"></div>
</el-image>
</div>
<div class="card-body">
<el-tooltip placement="bottom-start" effect="light">
<div slot="content">{{resourcePath.title}}</div>
<div class="card-desc">
{{resourcePath.title}}
</div>
</el-tooltip>
<div class="card-time">
Date: {{$common.getDateDiff(resourcePath.createTime)}}
</div>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
resourcePathList: {
type: Array
}
},
data() {
return {}
},
computed: {},
watch: {},
created() {
},
mounted() {
},
methods: {}
}
</script>
<style scoped>
.card-container {
display: flex;
flex-wrap: wrap;
}
.card-item {
position: relative;
overflow: hidden;
margin: 15px;
height: 550px;
flex-shrink: 0;
width: calc(100% / 3 - 30px);
cursor: pointer;
animation: zoomIn 0.8s ease-in-out;
padding: 1.3rem 1.3rem 1.5rem;
background: var(--background);
border-radius: 1.5rem;
transition: all 0.2s;
}
.card-image {
width: 100%;
height: 400px;
border-radius: 1rem;
overflow: hidden;
box-shadow: 0 2px 10px rgba(147, 147, 147, 0.61);
margin-bottom: 1rem;
}
.card-image >>> .el-image__inner {
transition: all 1s;
}
.card-image >>> .el-image__inner:hover {
transform: scale(1.2);
}
.card-body {
padding: 10px 5px;
}
.card-desc {
font-weight: 600;
font-size: 1.05rem;
color: var(--fontColor);
letter-spacing: 1px;
line-height: 1.5;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.card-time {
position: absolute;
bottom: 15px;
color: #999999;
font-weight: 500;
}
@media screen and (max-width: 1300px) {
.card-item {
width: calc(100% / 2 - 30px);
}
}
@media screen and (max-width: 1000px) {
.card-item {
height: 450px;
}
.card-image {
height: 300px;
}
}
@media screen and (max-width: 750px) {
.card-item {
width: 100%;
margin: 15px 0;
}
}
@media screen and (max-width: 450px) {
.card-item {
height: 400px;
}
.card-image {
height: 250px;
}
}
</style>

@ -1,121 +0,0 @@
<template>
<div>
<slot name="paper" :content="content"></slot>
</div>
</template>
<script>
export default {
props: {
//
printerInfo: {
type: String,
default: ""
},
//
duration: {
type: Number,
default: 100
},
//
delay: {
type: Number,
default: 3000
},
working: {
type: Boolean,
default: true
},
once: {
type: Boolean,
default: false
}
},
data() {
return {
content: "",
cursor: 0,
timer: null,
timeout: null,
print: true
};
},
created() {
if (this.working) {
//this.work
//this.work()
this.start(this.work);
} else {
this.content = this.printerInfo
}
},
watch: {
working(newVal) {
this.toBegin();
},
printerInfo(newVal) {
this.toBegin();
},
cursor(cursor) {
//slice(start,end)end
this.content = this.printerInfo.slice(0, cursor)
}
},
beforeDestroy() {
clearInterval(this.timer);
},
methods: {
/**
* 定时
*/
start(work) {
//
this.timeout = setTimeout(() => {
//
this.timer = setInterval(() => {
work();
if (this.cursor === 0 || (this.cursor === this.printerInfo.length && !this.once)) {
//
clearInterval(this.timer);
this.start(this.work);
} else if (this.cursor === this.printerInfo.length && this.once) {
clearInterval(this.timer);
}
}, this.duration);
}, this.delay)
},
/**
* 逻辑
*/
work() {
let cursor = this.cursor;
cursor += this.print ? 1 : -1;
if (this.print) {
if (cursor === this.printerInfo.length + 1) {
cursor -= 2;
this.print = !this.print;
}
} else {
if (cursor === -1) {
cursor += 2;
this.print = !this.print;
}
}
this.cursor = cursor;
},
toBegin() {
this.cursor = 0;
if (this.timeout !== null) {
clearTimeout(this.timeout);
if (this.timer !== null) {
clearInterval(this.timer);
}
}
if (this.working) {
this.start(this.work);
} else {
this.content = this.printerInfo;
}
}
}
};
</script>

@ -1,72 +0,0 @@
<template>
<div class="myButton">
<div :style="beforeColor">{{info}}</div>
<div :style="afterColor">{{info}}</div>
<div :style="afterColor">{{info}}</div>
</div>
</template>
<script>
export default {
props: {
info: {
type: String,
default: "确定"
},
before: {
type: String
},
after: {
type: String
}
},
data() {
return {
beforeColor: {"background": this.before},
afterColor: {"background": this.after}
};
}
}
</script>
<style scoped>
.myButton {
cursor: pointer;
user-select: none;
position: relative;
width: 66px;
height: 33px;
border-radius: 4px;
color: var(--white);
font-size: 14px;
overflow: hidden;
}
.myButton div {
width: 66px;
height: 33px;
line-height: 33px;
border-radius: 4px;
text-align: center;
position: absolute;
}
.myButton div:nth-child(2) {
width: 100px;
transition: all 0.3s ease;
transform: translateX(-120px) skewX(-30deg);
}
.myButton div:nth-child(3) {
transition: all 0.3s ease;
transform: translateX(-120px);
}
.myButton:hover div:nth-child(2) {
transform: translateX(20px) skewX(-30deg);
}
.myButton:hover div:nth-child(3) {
transform: translateX(0px);
}
</style>

@ -1,131 +0,0 @@
<template>
<div v-if="total > size" class="myCenter">
<ul class="page-content">
<li class="page-item" v-if="current !== 1" @click="toPage(-1)">
👈
</li>
<template v-if="current === 1">
<li class="page-item"
:style="{background: index === 1 ? color : '', color: index === 1 ? 'var(--white)' : ''}"
v-for="index of realButtonSize"
:key="index"
@click="toPage(index)">
{{index}}
</li>
</template>
<template v-else-if="current === totalSize">
<li class="page-item"
:style="{background: index === realButtonSize ? color : '', color: index === realButtonSize ? 'var(--white)' : ''}"
v-for="index of realButtonSize"
:key="index"
@click="toPage(current - (realButtonSize - index))">
{{current - (realButtonSize - index)}}
</li>
</template>
<template v-else>
<li class="page-item"
:style="{background: Math.ceil(realButtonSize/2) - index === 0 ? color : '', color: Math.ceil(realButtonSize/2) - index === 0 ? 'var(--white)' : ''}"
v-for="index of realButtonSize"
:key="index"
@click="toPage(current - (Math.ceil(realButtonSize/2) - index))">
{{current - (Math.ceil(realButtonSize/2) - index)}}
</li>
</template>
<li class="page-item" v-if="current !== totalSize" @click="toPage(-2)">
👉
</li>
</ul>
</div>
</template>
<script>
export default {
props: {
current: {
type: Number,
default: 1
},
size: {
type: Number,
default: 10
},
total: {
type: Number,
default: 0
},
buttonSize: {
type: Number,
default: 3
},
color: {
type: String,
default: ""
}
},
data() {
return {
totalSize: 0,
realButtonSize: 0
}
},
computed: {},
watch: {
total(newVal) {
this.totalSize = Math.ceil(this.total / this.size);
this.realButtonSize = this.buttonSize < this.totalSize ? this.buttonSize : this.totalSize;
}
},
created() {
this.totalSize = Math.ceil(this.total / this.size);
this.realButtonSize = this.buttonSize < this.totalSize ? this.buttonSize : this.totalSize;
},
mounted() {
},
methods: {
toPage(flag) {
if (flag === -1) {
this.$emit("toPage", this.current - 1);
} else if (flag === -2) {
this.$emit("toPage", this.current + 1);
} else {
this.$emit("toPage", flag);
}
}
}
}
</script>
<style scoped>
.page-content {
display: flex;
padding: 0;
margin: 30px 0;
}
.page-item {
margin: 0 10px;
list-style: none;
border: 1px solid var(--lightGray);
width: 40px;
height: 40px;
line-height: 38px;
text-align: center;
border-radius: 50%;
color: var(--black);
font-size: 14px;
cursor: pointer;
}
.page-item:hover {
border: 1px solid var(--themeBackground);
box-shadow: 0 0 5px var(--themeBackground);
}
</style>

@ -1,39 +0,0 @@
<template>
<div class="myTag" :style="bg">
<span class="name">🔖 {{info}}</span>
</div>
</template>
<script>
export default {
props: {
info: {
type: String,
default: "一只小毛驴"
},
color: {
type: String
}
},
data() {
return {
bg: {"background": this.color}
};
}
}
</script>
<style scoped>
.myTag {
cursor: pointer;
color: var(--white);
border-radius: 5px;
padding: 8px;
}
.myTag:hover {
background: var(--gradualRed) !important;
}
</style>

@ -1,112 +0,0 @@
<template>
<div v-if="!$common.isEmpty(treeHoleList)">
<div class="process-line">
<div class="process-item"
v-for="(treeHole, index) in treeHoleList"
:key="index">
<div class="timeline-item-time">
<span>
{{$common.getDateDiff(treeHole.createTime)}}
</span>
<span @click="deleteTreeHole(treeHole.id)"
class="process-delete"
v-if="!$common.isEmpty($store.state.currentUser) && $store.state.currentUser.id === treeHole.userId">
<svg viewBox="0 0 1024 1024" width="16" height="16" style="vertical-align: -3px">
<path
d="M921.1392 155.392h-270.592v-48.2816c0-22.7328-18.432-41.1648-41.1648-41.1648H426.3424a41.1648 41.1648 0 0 0-41.1648 41.1648v48.2816H110.6432c-14.1312 0-25.6 11.4688-25.6 25.6s11.4688 25.6 25.6 25.6h810.496c14.1312 0 25.6-11.4688 25.6-25.6s-11.4688-25.6-25.6-25.6zM170.8032 260.0448v592.8448c0 50.8928 41.2672 92.16 92.16 92.16h500.6848c50.8928 0 92.16-41.2672 92.16-92.16V260.0448H170.8032z m249.1392 462.7968c0 14.1312-11.4688 25.6-25.6 25.6s-25.6-11.4688-25.6-25.6V443.0848c0-14.1312 11.4688-25.6 25.6-25.6s25.6 11.4688 25.6 25.6v279.7568z m243.1488 0c0 14.1312-11.4688 25.6-25.6 25.6s-25.6-11.4688-25.6-25.6V443.0848c0-14.1312 11.4688-25.6 25.6-25.6s25.6 11.4688 25.6 25.6v279.7568z"
fill="#FF623E"></path>
</svg>
</span>
</div>
<div class="timeline-item-content" v-html="treeHole.content"></div>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
treeHoleList: {
type: Array
}
},
data() {
return {}
},
computed: {},
watch: {},
created() {
},
mounted() {
},
methods: {
deleteTreeHole(id) {
this.$emit("deleteTreeHole", id);
}
}
}
</script>
<style scoped>
.process-line {
border-left: 2px solid var(--lightGreen);
padding: 50px 20px 10px;
margin-left: 20px;
position: relative;
}
.process-line:before {
content: '';
width: 8px;
height: 8px;
border: 4px solid var(--maxLightRed);
border-radius: 50%;
position: absolute;
top: 15px;
left: -1px;
transform: translateX(-50%);
background-color: var(--white);
animation: weiYanShadowFlashing 1.5s linear infinite;
}
.process-item {
position: relative;
margin: 10px;
color: var(--fontColor);
}
.timeline-item-time::before {
position: absolute;
top: 5px;
left: -37px;
width: 6px;
height: 6px;
border: 3px solid var(--blue);
border-radius: 50%;
background: var(--white);
content: '';
}
.timeline-item-content {
padding: 12px 15px;
margin: 10px 0 15px;
border-radius: 10px;
background: rgba(66, 139, 202, 0.2);
}
.process-delete {
margin-left: 10px;
cursor: pointer;
}
</style>

@ -1,274 +0,0 @@
<template>
<div class="tree-hole-container">
<ol class="tree-hole-list" v-if="!$common.isEmpty(treeHoleList)">
<li class="tree-hole-li"
v-for="(treeHole, index) in treeHoleList"
:key="index">
<div class="tree-hole-content"
:class="{ leftTreeHole: index % 2 === 0 && !$common.mobile(), rightTreeHole: index % 2 !== 0 || $common.mobile() }">
<el-avatar shape="circle" class="avatar-img" :size="36" :src="currentUser.avatar"></el-avatar>
<div class="tree-hole-box"
:style="{background: $constant.tree_hole_color[index % $constant.tree_hole_color.length]}">
<div class="box-tag" v-if="index % 2 === 0 && !$common.mobile()"
:style="{'border-color': 'transparent transparent transparent '+$constant.tree_hole_color[index % $constant.tree_hole_color.length]}"></div>
<div class="box-tag" v-if="index % 2 !== 0 || $common.mobile()"
:style="{'border-color': 'transparent '+$constant.tree_hole_color[index % $constant.tree_hole_color.length]+' transparent transparent'}"></div>
<div class="my-content" v-html="treeHole.content"></div>
<div style="display: flex;justify-content: space-between">
<div>😃 {{treeHole.createTime}}</div>
<div @click="deleteTreeHole(treeHole.id)"
class="tree-hole-delete"
v-if="!$common.isEmpty($store.state.currentUser) && $store.state.currentUser.id === treeHole.userId">
<svg viewBox="0 0 1024 1024" width="18" height="18" style="vertical-align: -2px;">
<path
d="M921.1392 155.392h-270.592v-48.2816c0-22.7328-18.432-41.1648-41.1648-41.1648H426.3424a41.1648 41.1648 0 0 0-41.1648 41.1648v48.2816H110.6432c-14.1312 0-25.6 11.4688-25.6 25.6s11.4688 25.6 25.6 25.6h810.496c14.1312 0 25.6-11.4688 25.6-25.6s-11.4688-25.6-25.6-25.6zM170.8032 260.0448v592.8448c0 50.8928 41.2672 92.16 92.16 92.16h500.6848c50.8928 0 92.16-41.2672 92.16-92.16V260.0448H170.8032z m249.1392 462.7968c0 14.1312-11.4688 25.6-25.6 25.6s-25.6-11.4688-25.6-25.6V443.0848c0-14.1312 11.4688-25.6 25.6-25.6s25.6 11.4688 25.6 25.6v279.7568z m243.1488 0c0 14.1312-11.4688 25.6-25.6 25.6s-25.6-11.4688-25.6-25.6V443.0848c0-14.1312 11.4688-25.6 25.6-25.6s25.6 11.4688 25.6 25.6v279.7568z"
fill="#FF623E"></path>
</svg>
</div>
</div>
</div>
</div>
</li>
</ol>
<div class="tree-hole-go">
<i class="fa fa-paper-plane" @click="launch()"></i>
</div>
</div>
</template>
<script>
export default {
props: {
treeHoleList: {
type: Array
},
avatar: {
type: String
}
},
data() {
return {
currentUser: this.$store.state.currentUser,
}
},
computed: {},
watch: {},
created() {
},
mounted() {
},
methods: {
launch() {
this.$emit("launch");
},
deleteTreeHole(id) {
this.$emit("deleteTreeHole", id);
}
}
}
</script>
<style scoped>
.tree-hole-container {
padding: 20px;
margin: 0 auto;
}
.tree-hole-list {
padding: 100px 0 20px;
margin: 0;
position: relative;
list-style: none;
}
.tree-hole-list:before {
content: '';
width: 4px;
border-radius: 50%;
position: absolute;
top: 0;
bottom: 0;
left: 50%;
transform: translateX(-50%);
background-color: var(--themeBackground);
}
.tree-hole-list:after {
content: '';
width: 12px;
height: 12px;
border: 4px solid var(--maxLightRed);
border-radius: 50%;
position: absolute;
top: 10px;
left: 50%;
transform: translateX(-50%);
background-color: var(--white);
animation: weiYanShadowFlashing 1.5s linear infinite;
}
.tree-hole-li {
margin: 5px auto;
}
.tree-hole-content {
position: relative;
width: 50%;
}
.leftTreeHole {
text-align: right;
}
.rightTreeHole {
margin-left: 50%;
}
.tree-hole-content:before {
content: '';
width: 12px;
height: 12px;
border: 4px solid var(--blue);
border-radius: 50%;
position: absolute;
top: 10px;
background-color: var(--white);
}
.leftTreeHole:before {
right: 0;
transform: translateX(10px);
}
.rightTreeHole:before {
left: 0;
transform: translateX(-10px);
}
.avatar-img {
position: absolute;
top: 0;
transition: all 0.3s ease-in-out;
}
.leftTreeHole .avatar-img {
right: 25px;
}
.rightTreeHole .avatar-img {
left: 25px;
}
.tree-hole-box {
font-size: 16px;
padding: 10px;
width: 360px;
border-radius: 5px;
position: relative;
letter-spacing: 0.1em;
font-weight: 400;
transition: all 0.3s ease-in-out;
color: var(--black);
text-align: left;
display: inline-block;
}
.leftTreeHole .tree-hole-box {
margin-right: 90px;
}
.rightTreeHole .tree-hole-box {
margin-left: 90px;
}
.tree-hole-box:hover, .avatar-img:hover {
transform: translateY(-5px);
box-shadow: 0 0 16px 3px var(--miniMask);
}
.box-tag {
content: '';
position: absolute;
border-style: solid;
}
.leftTreeHole .box-tag {
right: -10px;
border-width: 15px 0 5px 10px;
}
.rightTreeHole .box-tag {
left: -10px;
border-width: 15px 10px 5px 0;
}
.my-content {
margin: 0 10px 10px;
line-height: 30px;
}
.tree-hole-box > div:last-child {
color: var(--greyFont);
padding: 10px 10px 0;
border-top: 1px dashed var(--white);
font-size: 14px;
}
.tree-hole-go {
color: var(--blue);
font-weight: 700;
font-size: 25px;
margin: 20px auto;
text-align: center;
}
.tree-hole-go i {
cursor: pointer;
}
.tree-hole-go i:hover {
animation: scale 1s linear infinite;
}
.tree-hole-delete {
font-size: 14px;
cursor: pointer;
}
@media screen and (max-width: 1000px) {
.tree-hole-box {
width: calc(100% - 90px);
}
}
@media screen and (max-width: 600px) {
.tree-hole-content {
margin-bottom: 50px;
}
.tree-hole-list:after {
left: 0;
}
.tree-hole-list:before {
left: 0;
}
.rightTreeHole {
margin-left: unset;
}
.tree-hole-content {
width: 100%;
}
}
</style>

@ -1,141 +0,0 @@
<template>
<div class="poem-container myCenter my-animation-hideToShow"
v-if="!$common.isEmpty(guShi.origin) || !$common.isEmpty(hitokoto.hitokoto)">
<!-- 背景图片 -->
<el-image class="my-el-image poem-image"
style="position: absolute;margin-top: -50px"
v-once
lazy
:src="$constant.two_poem_image[Math.floor(Math.random() * $constant.two_poem_image.length)]"
fit="cover">
<div slot="error" class="image-slot"></div>
</el-image>
<div class="poem-wrap">
<div v-if="isShehui"><span>鬼畜全明星</span></div>
<div v-else><span>{{isHitokoto?hitokoto.from:guShi.origin}}</span></div>
<p class="poem">{{isHitokoto?hitokoto.hitokoto:guShi.content}}</p>
<p class="info" v-if="!isShehui && (!isHitokoto || (isHitokoto && !$common.isEmpty(hitokoto.from_who)))">
{{isHitokoto?hitokoto.from_who:guShi.author}}
</p>
</div>
</div>
</template>
<script>
export default {
props: {
isHitokoto: {
type: Boolean,
default: true
},
isShehui: {
type: Boolean,
default: false
}
},
data() {
return {
guShi: {
"content": "...",
"origin": "...",
"author": "...",
"category": "..."
},
hitokoto: {
"hitokoto": "...",
"from": "...",
"from_who": "..."
}
};
},
created() {
if (!this.isShehui) {
if (this.isHitokoto) {
this.getHitokoto();
} else {
this.getGuShi();
}
} else {
this.hitokoto.from = "";
this.hitokoto.from_who = "";
this.sendShehui();
}
},
methods: {
sendShehui() {
let that = this;
let xhr = new XMLHttpRequest();
xhr.open('get', this.$constant.shehui);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
let shehui = xhr.responseText;
that.hitokoto.hitokoto = shehui.substring(1, shehui.length - 1);
}
};
xhr.send();
},
getGuShi() {
let that = this;
let xhr = new XMLHttpRequest();
xhr.open('get', this.$constant.jinrishici);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
that.guShi = JSON.parse(xhr.responseText);
}
};
xhr.send();
},
getHitokoto() {
let that = this;
let xhr = new XMLHttpRequest();
xhr.open('get', this.$constant.hitokoto);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
that.hitokoto = JSON.parse(xhr.responseText);
}
}
xhr.send();
}
}
};
</script>
<style scoped>
.poem-container {
padding: 90px 0 40px;
position: relative;
}
.poem-wrap {
border-radius: 10px;
z-index: 10;
text-align: center;
letter-spacing: 4px;
font-weight: 300;
width: 100%;
max-width: 800px;
}
.poem-wrap div span {
padding: 5px 10px;
color: var(--white);
font-size: 2em;
border-radius: 5px;
}
.poem-wrap p {
width: 100%;
max-width: 800px;
color: var(--white);
}
.poem-wrap p.poem {
margin: 40px auto;
font-size: 1.5em;
}
.poem-wrap p.info {
margin: 20px auto 40px;
font-size: 1.1em;
}
</style>

@ -1,198 +0,0 @@
<template>
<div>
<el-upload
class="upload-demo"
ref="upload"
multiple
drag
:action="$constant.qiniuUrl"
:on-change="handleChange"
:before-upload="beforeUpload"
:on-success="handleSuccess"
:on-error="handleError"
:on-remove="handleRemove"
:http-request="customUpload"
:list-type="listType"
:accept="accept"
:limit="maxNumber"
:auto-upload="false">
<div class="el-upload__text">
<svg viewBox="0 0 1024 1024" width="40" height="40">
<path
d="M666.2656 629.4528l-113.7664-112.4864c-20.7872-20.5824-54.3232-20.5312-75.1104 0.1024l-113.3056 112.4864c-20.8896 20.736-21.0432 54.528-0.256 75.4688 20.736 20.8896 54.528 21.0432 75.4688 0.256l22.6304-22.4256v189.5936c0 29.44 23.9104 53.3504 53.3504 53.3504s53.3504-23.9104 53.3504-53.3504v-189.5424l22.6816 22.4256a53.1456 53.1456 0 0 0 37.5296 15.4112c13.7728 0 27.4944-5.2736 37.9392-15.8208 20.6336-20.9408 20.4288-54.7328-0.512-75.4688z"
fill="#FFE37B"></path>
<path
d="M820.992 469.504h-5.376c-3.072-163.328-136.3456-294.8096-300.4416-294.8096S217.856 306.1248 214.784 469.504H209.408c-100.7104 0-182.3744 81.664-182.3744 182.3744s81.664 182.3744 182.3744 182.3744h209.7664V761.856c-30.208 5.5808-62.464-3.3792-85.6576-26.7264-37.3248-37.5808-37.0688-98.5088 0.512-135.7824l113.3056-112.4864c37.2224-36.9664 97.8432-37.0176 135.168-0.1536l113.7664 112.4864c18.2272 18.0224 28.3648 42.0864 28.5184 67.7376 0.1536 25.6512-9.728 49.8176-27.7504 68.0448a95.40096 95.40096 0 0 1-68.3008 28.5184c-5.9392 0-11.776-0.512-17.5104-1.5872v72.3456h209.7664c100.7104 0 182.3744-81.664 182.3744-182.3744S921.7024 469.504 820.992 469.504z"
fill="#8C7BFD"></path>
</svg>
<div>拖拽上传 / 点击上传</div>
</div>
<template v-if="listType === 'picture'">
<div slot="tip" class="el-upload__tip">
一次最多上传{{maxNumber}}张图片且每张图片不超过{{maxSize}}M
</div>
</template>
<template v-else>
<div slot="tip" class="el-upload__tip">
一次最多上传{{maxNumber}}个文件且每个文件不超过{{maxSize}}M
</div>
</template>
</el-upload>
<div style="text-align: center;margin-top: 20px">
<el-button type="success" style="font-size: 12px" @click="submitUpload">
上传
</el-button>
</div>
</div>
</template>
<script>
import upload from '../../utils/ajaxUpload';
export default {
props: {
isAdmin: {
type: Boolean,
default: false
},
prefix: {
type: String,
default: ""
},
listType: {
type: String,
default: "picture"
},
storeType: {
type: String,
default: localStorage.getItem("defaultStoreType")
},
accept: {
type: String,
default: "image/*"
},
maxSize: {
type: Number,
default: 5
},
maxNumber: {
type: Number,
default: 5
}
},
data() {
return {}
},
computed: {},
watch: {},
created() {
},
mounted() {
},
methods: {
submitUpload() {
this.$refs.upload.submit();
},
customUpload(options) {
let suffix = "";
if (options.file.name.lastIndexOf('.') !== -1) {
suffix = options.file.name.substring(options.file.name.lastIndexOf('.'));
}
let key = this.prefix + "/" + (!this.$common.isEmpty(this.$store.state.currentUser.username) ? (this.$store.state.currentUser.username.replace(/[^a-zA-Z]/g, '') + this.$store.state.currentUser.id) : (this.$store.state.currentAdmin.username.replace(/[^a-zA-Z]/g, '') + this.$store.state.currentAdmin.id)) + new Date().getTime() + Math.floor(Math.random() * 1000) + suffix;
if (this.storeType === "local") {
let fd = new FormData();
fd.append("file", options.file);
this.articleUp.articleCover = options.file
fd.append("key", key);
fd.append("relativePath", key);
fd.append("type", this.prefix);
fd.append("storeType", this.storeType);
//
return this.$http.upload(this.$constant.baseURL + "/resource/upload", fd, this.isAdmin);
} else if (this.storeType === "qiniu") {
const xhr = new XMLHttpRequest();
xhr.open('get', this.$constant.baseURL + "/qiniu/getUpToken?key=" + key, false);
if (this.isAdmin) {
xhr.setRequestHeader("Authorization", localStorage.getItem("adminToken"));
} else {
xhr.setRequestHeader("Authorization", localStorage.getItem("userToken"));
}
try {
xhr.send();
const res = JSON.parse(xhr.responseText);
if (res !== null && res.hasOwnProperty("code") && res.code === 200) {
options.data = {
token: res.data,
key: key
};
return upload(options);
} else if (res !== null && res.hasOwnProperty("code") && res.code !== 200) {
return Promise.reject(res.message);
} else {
return Promise.reject("服务异常!");
}
} catch (e) {
return Promise.reject(e.message);
}
}
},
//
handleSuccess(response, file, fileList) {
let url;
if (this.storeType === "local") {
url = response.data;
} else if (this.storeType === "qiniu") {
url = this.$constant.qiniuDownload + response.key;
this.$common.saveResource(this, this.prefix, url, file.size, file.raw.type, "qiniu", this.isAdmin);
}
this.$emit("addPicture", url);
},
handleError(err, file, fileList) {
this.$message({
message: err,
type: "error"
});
},
// false Promise reject
beforeUpload(file) {
},
//
handleRemove(file, fileList) {
},
//
handleChange(file, fileList) {
let flag = false;
if (file.size > this.maxSize * 1024 * 1024) {
this.$message({
message: "图片最大为" + this.maxSize + "M",
type: "warning"
});
flag = true;
}
if (flag) {
fileList.splice(fileList.size - 1, 1);
}
}
}
}
</script>
<style scoped>
</style>

@ -1,785 +0,0 @@
<template>
<div class="wrapper">
<!-- <div class="zombie">-->
<!-- <div class="zombie__head">-->
<!-- <div class="zombie__brain"></div>-->
<!-- <div class="zombie__cheeks"></div>-->
<!-- <div class="zombie__chin"></div>-->
<!-- <div class="zombie__eyes">-->
<!-- <div class="eye left">-->
<!-- <div class="eyebrow"></div>-->
<!-- </div>-->
<!-- <div class="eye right">-->
<!-- <div class="eyebrow"></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="zombie__nose"></div>-->
<!-- <div class="zombie__mouth">-->
<!-- <div class="tooth">-->
<!-- <div class="tooth__top"></div>-->
<!-- <div class="tooth__bottom"></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="zombie__body">-->
<!-- <div class="zombie__chest">-->
<!-- <div class="zombie__arms">-->
<!-- <div class="arm left">-->
<!-- <div class="arm__bone"></div>-->
<!-- <div class="arm__sleeve"></div>-->
<!-- </div>-->
<!-- <div class="arm right">-->
<!-- <div class="arm__details">-->
<!-- <div class="arm__biceps"></div>-->
<!-- <div class="arm__forearm"></div>-->
<!-- <div class="hands">-->
<!-- <div class="fingers">-->
<!-- <div class="finger thumb"></div>-->
<!-- <div class="finger middle"></div>-->
<!-- <div class="finger index"></div>-->
<!-- <div class="finger ring"></div>-->
<!-- <div class="finger pinky"></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="arm__sleeve"></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="ground">
<div class="ground__hole"></div>
<div class="ground__rocks">
<div class="rock"></div>
<div class="rock"></div>
<div class="rock"></div>
<div class="rock"></div>
<div class="rock"></div>
<div class="rock"></div>
<div class="rock"></div>
<div class="rock"></div>
<div class="rock"></div>
<div class="rock"></div>
<div class="rock"></div>
<div class="rock"></div>
<div class="rock"></div>
<div class="rock"></div>
<div class="rock"></div>
</div>
<div class="tomb">
<div class="tomb__info">
<h2 class="headers">{{$store.state.webInfo.webName}}</h2>
<h4 class="headers">大爷进来玩啊~~~</h4>
<h5 class="headers">网页有点慢等一下就好啦~</h5>
</div>
</div>
<div class="brains-comic-box">
<h1 class="brains__text">loading...</h1>
</div>
</div>
</div>
</template>
<style scoped>
@import url("https://fonts.googleapis.com/css?family=Creepster|Rye");
html,
body {
height: 100vh;
}
body {
background: #2c3e50;
}
.zombie__cheeks::before,
.zombie__cheeks::after {
content: "";
border-radius: 50% 0 0 50%;
box-shadow: 4px 7px 6px 1px rgba(0, 0, 0, 0.09);
background: #1abc9c;
width: 50px;
height: 50px;
}
.zombie__nose::before,
.zombie__nose::after {
content: "";
width: 15px;
height: 15px;
border-radius: 50% 50% 10px 10px;
background: #07362c;
box-shadow: inset 0 8px 0 2px #148f77;
align-self: flex-end;
}
.tooth .tooth__top::before,
.tooth .tooth__bottom::before {
content: "";
background: #fff;
width: 10px;
height: 10px;
display: block;
border-radius: 2px;
margin: 5px 20px 0 0;
display: inline-block;
}
.zombie__arms .left .arm__sleeve,
.zombie__arms .right .arm__sleeve {
width: 50px;
height: 60px;
background: linear-gradient(to bottom, #593f35, #795548);
border-radius: 20px 20px 0 0;
}
.wrapper {
display: flex;
height: 100vh;
justify-content: center;
flex-direction: column;
align-items: center;
background: #20332f;
}
.zombie {
position: relative;
z-index: 1;
}
.zombie__head {
width: 150px;
height: 150px;
background: #1abc9c;
border-radius: 70% 70% 35% 35%;
display: flex;
justify-content: center;
position: relative;
z-index: 1;
animation: moveHead 5s ease-in-out infinite;
}
.zombie__head::before {
content: "";
width: 49px;
height: 22px;
border-radius: 50%;
box-shadow: 0 -2px 0 1px #1a252f;
transform: translateX(24px) rotateZ(-53deg);
position: absolute;
right: 40px;
}
.zombie__head::after {
content: "";
width: 29px;
height: 12px;
border-radius: 50%;
box-shadow: 0 -2px 0 1px #1a252f;
transform: translateX(38px) rotateZ(-13deg);
position: absolute;
top: 5px;
right: 50px;
}
.zombie__brain {
width: 30px;
height: 60px;
background: #2c3e50;
border-radius: 50%;
transform: rotateZ(55deg);
position: absolute;
top: -2px;
left: 30px;
overflow: hidden;
}
.zombie__brain::before {
content: "";
width: 30px;
height: 80px;
background: #e05887;
position: absolute;
border-radius: 50%;
left: 15px;
}
.zombie__brain::after {
content: "";
background: #e05887;
width: 15px;
height: 15px;
border-radius: 40%;
position: absolute;
top: 35px;
left: 5px;
box-shadow: -14px -8px 0 0px #e05887, -28px -10px 0 0px #e05887;
transform: rotateZ(80deg);
}
.zombie__cheeks {
width: inherit;
height: 50px;
display: flex;
justify-content: space-between;
align-self: center;
position: absolute;
left: 0;
top: 75px;
}
.zombie__cheeks::before {
margin-left: -12px;
}
.zombie__cheeks::after {
transform: rotateY(180deg);
margin-right: -12px;
}
.zombie__eyes {
width: inherit;
height: 50px;
display: flex;
justify-content: space-between;
align-self: center;
position: absolute;
left: 0;
top: 50px;
}
.zombie__eyes .eye {
background: #fff;
border-radius: 50%;
box-shadow: 0 5px 0px 1px rgba(0, 0, 0, 0.22), 0 13px 0px 0px rgba(0, 0, 0, 0.22);
width: 50px;
height: 50px;
position: relative;
}
.zombie__eyes .eye::before {
content: "";
width: 16.66667px;
height: 16.66667px;
background: #fff;
border-radius: 50%;
display: table;
margin: 20px auto;
box-shadow: inset 0 -5px 0 5px #2c3e50, 0 0 0 3px #ff9800;
}
.zombie__eyes .eye .eyebrow {
width: inherit;
height: 20px;
background: #1abc9c;
position: absolute;
border-radius: 10px;
box-shadow: 0 2px 0 1px #117964;
top: -15px;
animation: moveEyebrow 5s ease-in-out infinite;
}
.zombie__chin {
width: 100px;
height: 80px;
background: #1abc9c;
border-radius: 0 0 30% 30%;
align-self: flex-end;
position: absolute;
left: 26px;
top: 100px;
}
.zombie__nose {
width: 25px;
height: 80px;
background: linear-gradient(to top, #148f77, #1abc9c);
border-radius: 0 0 10px 10px;
display: flex;
justify-content: space-between;
position: absolute;
left: 63px;
top: 35px;
}
.zombie__nose::before {
margin-left: -8px;
}
.zombie__nose::after {
margin-right: -8px;
}
.zombie__mouth {
width: 75px;
background: #1a252f;
border-radius: 20%/10% 10% 50% 50%;
box-shadow: inset 0 6px 0 0px #e883a6, 0 0 0 4px #148f77;
align-self: flex-end;
position: absolute;
left: 38px;
bottom: -18px;
overflow: hidden;
animation: moveMouth 5s ease-in-out infinite;
}
.tooth {
width: inherit;
display: flex;
flex-wrap: wrap;
flex-direction: column;
}
.tooth .tooth__top {
position: relative;
left: 10px;
}
.tooth .tooth__top::before {
box-shadow: 15px 0px 0 0 #fff, 30px 0px 0 0 #fff, 45px 0px 0 0 #fff;
}
.tooth .tooth__bottom {
position: relative;
right: -18px;
bottom: -6px;
}
.tooth .tooth__bottom::before {
box-shadow: 15px 0px 0 0 #fff, 30px 0px 0 0 #fff;
}
.zombie__chest {
width: 150px;
height: 100px;
background: linear-gradient(to bottom, #593f35 40%, #795548);
border-radius: 20px 20px 0 0;
display: flex;
justify-content: space-between;
flex-direction: column;
position: relative;
top: -10px;
}
.zombie__arms {
display: inline-flex;
width: 100%;
}
.zombie__arms .left {
position: relative;
animation: moveLeftArm 5s ease-in-out infinite;
}
.zombie__arms .left .arm__sleeve {
transform: translateX(-25px) rotateZ(80deg);
}
.zombie__arms .left .arm__bone {
width: 100px;
height: 20px;
background: #bfbfbf;
position: absolute;
left: -100px;
top: 25px;
transform: rotateZ(-10deg);
}
.zombie__arms .left .arm__bone::before {
content: "";
background: inherit;
width: 20px;
height: 20px;
position: absolute;
left: -15px;
top: -8px;
border-radius: 40%/50% 0 30% 40%;
transform: rotateZ(40deg);
}
.zombie__arms .left .arm__bone::after {
content: "";
background: inherit;
width: 20px;
height: 20px;
position: absolute;
left: -10px;
bottom: -6px;
border-radius: 40%/50% 0 30% 40%;
transform: rotateZ(40deg);
}
.zombie__arms .right {
position: relative;
}
.zombie__arms .right .arm__sleeve {
transform: translateX(79px) rotateZ(-63deg);
}
.zombie__arms .arm__biceps {
width: 100px;
height: 20px;
position: absolute;
background: #1abc9c;
left: 95px;
top: 40px;
transform: rotateZ(25deg);
}
.zombie__arms .arm__forearm {
width: 38px;
height: 45px;
position: absolute;
background: linear-gradient(to bottom, #148f77, #1abc9c);
left: 160px;
top: 55px;
border-radius: 40%/90% 90% 0 0;
transform: skewX(-10deg);
box-shadow: -1px 0px 5px 1px rgba(0, 0, 0, 0.18);
}
.hands {
background: #1abc9c;
width: 75px;
height: 30px;
border-radius: 30%/80% 40% 40% 40%;
position: absolute;
left: 135px;
top: 90px;
animation: moveHand 5s ease-in-out infinite;
}
.hands .finger {
width: 16px;
height: 32px;
display: inline-block;
background: #1abc9c;
border-radius: 50%/80% 40% 40% 40%;
position: absolute;
}
.hands .finger::before {
content: "";
background: #fff;
opacity: 0.6;
width: 8.88889px;
height: 8.88889px;
position: relative;
top: 18px;
left: 2px;
border-radius: 50% 50% 0 0;
box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.44);
display: block;
}
.hands .finger.thumb {
transform: rotateZ(90deg);
left: -15px;
top: -8px;
}
.hands .finger.index {
transform: rotateZ(20deg);
top: 20px;
left: -6px;
}
.hands .finger.middle {
top: 25px;
left: 22px;
}
.hands .finger.ring {
transform: rotateZ(-10deg) scale(0.9);
top: 20px;
left: 50px;
}
.hands .finger.pinky {
transform: rotateZ(-50deg) scale(0.8);
top: 8px;
left: 68px;
}
.ground {
position: relative;
}
.ground__hole {
width: 225px;
height: 40px;
border-radius: 50%;
background: rgba(0, 0, 0, 0.39);
box-shadow: 0 11px 34px 20px rgba(0, 0, 0, 0.25);
position: relative;
top: -42px;
}
.ground__rocks {
position: absolute;
top: 0;
z-index: 2;
}
.ground__rocks .rock {
background: #3e5871;
border-radius: 40%/80% 20% 70% 20%;
box-shadow: 3px 4px 0 5px #1a252f;
width: 40px;
height: 20px;
display: block;
position: absolute;
top: 0;
}
.ground__rocks:nth-child(2) {
left: -25px;
top: -25px;
transform: scale(1.2) rotateZ(-10deg);
z-index: -1;
}
.ground__rocks:nth-child(3) {
left: -3px;
top: -53px;
transform: scale(0.4);
}
.ground__rocks:nth-child(4) {
left: 30px;
top: -20px;
transform: scale(0.5);
}
.ground__rocks:nth-child(5) {
left: 55px;
top: -15px;
transform: scale(0.8);
}
.ground__rocks:nth-child(6) {
left: 55px;
top: -15px;
transform: scale(0.8);
}
.ground__rocks:nth-child(7) {
left: 95px;
top: -15px;
transform: scale(0.6) rotateY(180deg);
}
.ground__rocks:nth-child(8) {
left: 85px;
top: 20px;
transform: scale(0.4) rotateY(180deg);
}
.ground__rocks:nth-child(9) {
left: 165px;
top: 10px;
transform: scale(0.2);
}
.ground__rocks:nth-child(10) {
left: 125px;
top: -15px;
transform: scale(1.1) rotateY(180deg);
}
.ground__rocks:nth-child(11) {
left: 165px;
top: -12px;
transform: scale(0.8) rotateY(180deg) rotateZ(-20deg);
}
.ground__rocks:nth-child(12) {
left: 265px;
top: -90px;
transform: scale(0.7);
}
.ground__rocks:nth-child(13) {
left: 300px;
top: -90px;
transform: scale(1);
}
.ground__rocks:nth-child(14) {
left: 350px;
top: -90px;
transform: scale(0.5) rotateY(180deg);
}
.ground__rocks:nth-child(15) {
left: 390px;
top: -90px;
transform: scale(0.8) rotateY(180deg) rotateZ(-10deg);
}
.tomb {
width: 200px;
height: 200px;
background: #95a5a6;
border-radius: 50% 50% 0 0;
box-shadow: 18px 1px 0 0px #6d8082, 12px 26px 39px 7px rgba(0, 0, 0, 0.25);
position: absolute;
top: -280px;
left: 200px;
}
.tomb .tomb__info {
text-align: center;
margin: 20px;
color: #3e4a4a;
}
.tomb .tomb__info .headers {
font-weight: normal;
line-height: 1.3em;
margin: 15px 0;
}
.brains-comic-box {
font-size: 1.4em;
letter-spacing: 0.2em;
color: #e05887;
position: absolute;
top: -360px;
left: -200px;
transform: rotateZ(-10deg);
position: relative;
animation: moveBrainsBox 5s ease-in-out infinite;
}
.brains-comic-box .brains__text {
background: #fff;
border-radius: 40px;
padding: 15px 20px;
animation: moveBrainsText 5s ease-in-out infinite;
}
.brains-comic-box .brains__text::before {
width: 0;
height: 0;
content: "";
border-top: 1em solid #fff;
border-left: 0.5em solid transparent;
border-right: 0.5em solid transparent;
position: absolute;
bottom: -20px;
left: 160px;
transform: rotateZ(-30deg);
}
@keyframes moveLeftArm {
0%,
50%,
90%,
100% {
transform: rotateZ(22deg);
}
10%,
20%,
40% {
transform: rotateZ(0);
}
}
@keyframes moveHead {
0%,
50%,
90%,
100% {
transform: rotateZ(-10deg);
}
30% {
transform: translateX(6px) translateY(2px);
}
35% {
transform: translateX(-6px);
}
10%,
20%,
40% {
transform: rotateZ(0);
}
}
@keyframes moveMouth {
0%,
50%,
90%,
100% {
height: 20px;
transform: translateY(-10px);
}
10%,
20%,
40% {
height: 40px;
transform: translateY(0);
}
}
@keyframes moveEyebrow {
0%,
50%,
90%,
100% {
transform: translateY(8px);
}
10%,
20%,
40% {
transform: translateY(-10px);
}
}
@keyframes moveHand {
0%,
50%,
90%,
100% {
transform: translateY(0);
}
10%,
20%,
40% {
transform: translateY(-10px) rotateZ(15deg);
}
}
@keyframes moveBrainsText {
0%,
20%,
40%,
60%,
80%,
100% {
transform: translateX(20px);
}
10%,
30%,
50%,
70%,
90% {
transform: translateX(-20px);
}
}
@keyframes moveBrainsBox {
0%,
50%,
90%,
100% {
opacity: 0;
}
10%,
20%,
40% {
opacity: 1;
}
}
</style>

@ -1,307 +0,0 @@
<template>
<div>
<div class="favorite-container">
<!-- 封面 -->
<div class="favorite-header my-animation-slide-top">
<!-- 背景图片 -->
<video class="index-video" autoplay="autoplay" muted="muted" loop="loop"
:src="$constant.favoriteVideo">
</video>
<div style="position: absolute;left: 0;top: 0;padding: 20px">
<!-- 标题 -->
<div style="color: var(--white);margin: 10px">
<!-- <div>-->
<!-- 记录-->
<!-- </div>-->
<div style="font-size: 36px;font-weight: bold;line-height: 2">
医院推荐
</div>
</div>
<div class="card-container">
<!-- 收藏夹 -->
<!-- <div @click="changeFavorite(1)"-->
<!-- class="card-item">-->
<!-- <div class="favorite-image"></div>-->
<!-- <div style="position: absolute;left: 0;top: 0;padding: 20px 25px 15px">-->
<!-- <div class="card-name">-->
<!-- 收藏夹-->
<!-- </div>-->
<!-- <div class="card-desc">-->
<!-- poetize.cn 添加到您的收藏夹吧-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
</div>
<!-- 内容 -->
<div class="favorite-content my-animation-slide-bottom">
<!-- 收藏夹 -->
<div v-show="card === 1 && !$common.isEmpty(collects)">
<div v-for="(value, key) in collects" :key="key" style="margin-top: 20px">
<div class="collect-classify">
{{key}}
</div>
<div class="favorite-item-wrap">
<div v-for="(item, index) in value" :key="index" @click="toUrl(item.url)" class="favorite-item">
<div>
<el-avatar class="favorite-item-image" :size="60"
:src="item.cover">
</el-avatar>
</div>
<div style="width: calc(100% - 80px)">
<div class="favorite-item-title">
{{item.title}}
</div>
<div class="favorite-item-introduction">
{{item.introduction}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 页脚 -->
<div style="background: var(--favoriteBg)">
<myFooter></myFooter>
</div>
</div>
</template>
<script>
const myFooter = () => import( "./common/myFooter");
export default {
components: {
myFooter
},
data() {
return {
card: null,
collects: {}
}
},
computed: {},
watch: {},
created() {
this.card = 1;
this.getCollect();
},
mounted() {
},
methods: {
toUrl(url) {
window.open(url);
},
changeFavorite(card) {
this.card = card;
if (card === 1) {
if (this.$common.isEmpty(this.collects)) {
this.getCollect();
}
}
},
getCollect() {
this.$http.get(this.$constant.baseURL + "/webInfo/listCollect")
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.collects = res.data;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}
}
}
</script>
<style scoped>
.favorite-container {
padding: 25px;
background: var(--favoriteBg);
}
.favorite-header {
margin: 60px auto 30px;
height: 410px;
position: relative;
overflow: hidden;
border-radius: 20px;
max-width: 1200px;
}
.index-video {
width: 100%;
height: 100%;
object-fit: cover;
}
.favorite-image::before {
content: "";
position: absolute;
width: 100%;
height: 100%;
background-color: var(--translucent);
}
.card-container {
display: flex;
flex-wrap: wrap;
margin-top: 60px;
}
.card-item {
transition: all 0.3s;
position: relative;
width: 250px;
height: 120px;
border-radius: 20px;
animation: hideToShow 1s ease-in-out;
cursor: pointer;
overflow: hidden;
margin: 10px;
color: var(--white);
}
.card-item:hover {
transform: translateY(-6px);
}
.card-name {
font-weight: bold;
font-size: 25px;
}
.card-name:after {
top: 50px;
width: 22px;
left: 26px;
height: 2px;
background: var(--white);
content: "";
border-radius: 1px;
position: absolute;
}
.card-desc {
font-weight: bold;
margin-top: 15px;
}
.favorite-content {
margin: 0 auto;
max-width: 1200px;
}
.collect-classify {
font-size: 28px;
font-weight: bold;
margin-bottom: 10px;
}
.favorite-item-wrap {
display: flex;
flex-wrap: wrap;
margin-left: -10px;
}
.favorite-item {
transition: all 0.3s;
border-radius: 12px;
box-shadow: 0 8px 16px -4px #2c2d300c;
background: var(--background);
display: flex;
width: calc(100% / 4 - 20px);
max-width: 320px;
height: 90px;
overflow: hidden;
padding: 15px;
cursor: pointer;
margin: 10px;
}
.favorite-item:hover {
background: #425AEF;
color: var(--white);
}
.favorite-item:hover .favorite-item-image {
transition: all 0.6s;
width: 0 !important;
height: 0 !important;
opacity: 0;
margin-right: 0;
}
.favorite-item:hover div:nth-child(2) {
width: 100% !important;
}
.favorite-item-image {
margin-right: 20px;
transition: all 0.3s;
}
.favorite-item-title {
font-size: 19px;
font-weight: bold;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
margin-bottom: 5px;
}
.favorite-item-introduction {
opacity: 0.7;
font-weight: bold;
letter-spacing: 1px;
font-size: 14px;
line-height: 1.2;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
@media screen and (max-width: 620px) {
.card-container {
margin-top: 0;
}
}
@media screen and (max-width: 900px) {
.favorite-item {
width: calc(100% / 3 - 20px);
}
}
@media screen and (max-width: 700px) {
.favorite-item {
width: calc(100% / 2 - 20px);
}
}
@media screen and (max-width: 400px) {
.favorite-item {
width: calc(100% - 20px);
}
}
</style>

@ -1,396 +0,0 @@
<template>
<div>
<el-image style="animation: header-effect 2s"
class="background-image"
v-once
lazy
:src="$constant.friendBG"
fit="cover">
<div slot="error" class="image-slot background-image-error"></div>
</el-image>
<!-- 封面 -->
<div class="friend-head myCenter">
<h1 style="color: var(--white);z-index: 10;font-weight: 700;font-size: 45px">友人帐</h1>
</div>
<div class="friend-wrap">
<div class="friend-main">
<!-- 添加友链 -->
<div @click="clickLetter()" class="form-wrap">
<!-- 信封上面 -->
<img class="before-img" :src="$constant.friendLetterTop" style="width: 100%"/>
<!-- -->
<div class="envelope" style="animation: hideToShow 2s">
<div class="form-main">
<img :src="$constant.friendLetterMiddle" style="width: 100%"/>
<div>
<h3 style="text-align: center">有朋自远方来</h3>
<div>
<div class="myCenter form-friend">
<div class="user-title">
<div>名称</div>
<div>简介</div>
<div>封面</div>
<div>网址</div>
</div>
<div class="user-content">
<div>
<el-input maxlength="30" v-model="friend.title"></el-input>
</div>
<div>
<el-input maxlength="120" v-model="friend.introduction"></el-input>
</div>
<div>
<el-input maxlength="200" v-model="friend.cover"></el-input>
</div>
<div>
<el-input maxlength="200" v-model="friend.url"></el-input>
</div>
</div>
</div>
<div class="myCenter" style="margin-top: 20px">
<proButton :info="'提交'"
@click.native.stop="submitFriend()"
:before="$constant.before_color_2"
:after="$constant.after_color_2">
</proButton>
</div>
</div>
<div>
<img :src="$constant.friendLetterBiLi" style="width: 100%;margin: 5px auto"/>
</div>
<p style="font-size: 12px;text-align: center;color: #999">欢迎交换友链</p>
</div>
</div>
</div>
<img class="after-img" :src="$constant.friendLetterBottom" style="width: 100%"/>
</div>
<div style="font-size: 20px;font-weight: bold;margin-top: 40px">🌸本站信息</div>
<div>
<blockquote>
<div>网站名称: $$$$POETIZE</div>
<div>网址: $$$$https://poetize.cn</div>
<div>头像: $$$$https://s1.ax1x.com/2022/11/10/z9E7X4.jpg</div>
<div>描述: $$$$这是一个 Vue2 Vue3 SpringBoot 结合的产物</div>
<div>网站封面: $$$$https://s1.ax1x.com/2022/11/10/z9VlHs.png</div>
</blockquote>
</div>
<div style="font-size: 20px;font-weight: bold">🌸申请方式</div>
<div>
<blockquote>
<div>点击上方信封</div>
<div>不会添加带有广告营销和没有实质性内容的友链🚫🚫🚫</div>
<div>申请之前请将本网站添加为您的友链哦🎟🎟🎟</div>
</blockquote>
</div>
<hr>
<h2 style="margin-top: 60px">青出于蓝</h2>
<card :resourcePathList="friendList['♥️青出于蓝']" @clickResourcePath="clickFriend"></card>
<hr>
<h2 style="margin-top: 60px">🥇友情链接</h2>
<card :resourcePathList="friendList['🥇友情链接']" @clickResourcePath="clickFriend"></card>
</div>
</div>
<!-- 页脚 -->
<myFooter></myFooter>
</div>
</template>
<script>
const myFooter = () => import( "./common/myFooter");
const card = () => import( "./common/card");
const proButton = () => import( "./common/proButton");
export default {
components: {
myFooter,
card,
proButton
},
data() {
return {
friendList: {},
friend: {
title: "",
introduction: "",
cover: "",
url: ""
}
}
},
computed: {},
watch: {},
created() {
this.getFriends();
},
mounted() {
},
methods: {
clickLetter() {
if (document.body.clientWidth < 700) {
$(".form-wrap").css({"height": "1000px", "top": "-200px"});
} else {
$(".form-wrap").css({"height": "1150px", "top": "-200px"});
}
},
submitFriend() {
if (this.$common.isEmpty(this.$store.state.currentUser)) {
this.$message({
message: "请先登录!",
type: "error"
});
return;
}
if (this.friend.title.trim() === "") {
this.$message({
message: "你还没写名称呢~",
type: "warning"
});
return;
}
if (this.friend.introduction.trim() === "") {
this.$message({
message: "你还没写简介呢~",
type: "warning"
});
return;
}
if (this.friend.cover.trim() === "") {
this.$message({
message: "你还没设置封面呢~",
type: "warning"
});
return;
}
if (this.friend.url.trim() === "") {
this.$message({
message: "你还没写网址呢~",
type: "warning"
});
return;
}
this.$http.post(this.$constant.baseURL + "/webInfo/saveFriend", this.friend)
.then((res) => {
$(".form-wrap").css({"height": "447px", "top": "0"});
this.$message({
type: 'success',
message: '提交成功,待管理员审核!'
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
clickFriend(path) {
window.open(path);
},
getFriends() {
this.$http.get(this.$constant.baseURL + "/webInfo/listFriend")
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.friendList = res.data;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}
}
}
</script>
<style scoped>
.friend-head {
height: 300px;
position: relative;
}
.friend-head::before {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .3);
content: '';
}
.friend-main {
max-width: 1200px;
margin: 40px auto;
border-radius: 10px;
padding: 40px;
background: rgba(255, 255, 255, .85);
}
.friend-main h2 {
font-size: 20px;
}
hr {
position: relative;
margin: 40px auto;
border: 2px dashed var(--lightGreen);
overflow: visible;
}
hr:before {
position: absolute;
top: -14px;
left: 5%;
color: var(--lightGreen);
content: '❄';
font-size: 30px;
line-height: 1;
transition: all 1s ease-in-out;
}
hr:hover:before {
left: calc(95% - 20px);
}
.form-wrap {
margin: 0 auto;
overflow: hidden;
width: 530px;
height: 447px;
position: relative;
top: 0;
transition: all 1s ease-in-out .3s;
z-index: 0;
cursor: pointer;
}
.before-img {
position: absolute;
bottom: 126px;
left: 0;
background-repeat: no-repeat;
width: 530px;
height: 317px;
z-index: -100;
}
.after-img {
position: absolute;
bottom: -2px;
left: 0;
background-repeat: no-repeat;
width: 530px;
height: 259px;
z-index: 100;
}
.friend-wrap {
padding: 0 20px;
color: var(--black);
}
.envelope {
position: relative;
margin: 0 auto;
transition: all 1s ease-in-out .3s;
padding: 200px 20px 20px;
}
.form-main {
background: var(--white);
margin: 0 auto;
border-radius: 10px;
overflow: hidden;
}
.user-title {
text-align: right;
user-select: none;
}
.user-content {
text-align: left;
}
.user-title div {
height: 55px;
line-height: 55px;
text-align: center;
}
.user-content > div {
height: 55px;
display: flex;
align-items: center;
}
.user-content >>> .el-input__inner {
border: none;
height: 35px;
background: var(--whiteMask);
}
.form-friend {
margin-top: 12px;
background-color: #eee;
border: #ddd 1px solid;
padding: 20px 0;
}
blockquote {
line-height: 2;
border-left: 0.2rem solid #ed6ea0;
padding: 10px 1rem;
background-color: #ffe6fa;
border-radius: 4px;
margin: 20px auto;
color: var(--maxGreyFont);
}
@media screen and (max-width: 700px) {
.form-wrap {
width: auto;
}
.before-img {
width: auto;
}
.after-img {
width: auto;
}
}
@media screen and (max-width: 500px) {
.friend-main {
padding: 40px 15px;
}
.friend-wrap {
padding: 0 10px
}
}
</style>

@ -1,309 +0,0 @@
<template>
<div style="background: var(--background)">
<!-- 两句诗 -->
<div class="my-animation-slide-top">
<twoPoem :isShehui="true"></twoPoem>
</div>
<div style="background: var(--background);padding: 40px 0" class="my-animation-slide-bottom">
<div class="funny-wrap" v-if="!$common.isEmpty(funnys)">
<div v-for="(item, index) in funnys" :key="index">
<div style="display: flex">
<span class="iconRotate">
<svg viewBox="0 0 1024 1024" width="28" height="28">
<path
d="M502.272 948.224l-427.008-427.008c-1.536-1.536-1.536-3.584 0-4.608l427.008-427.008c1.536-1.536 3.584-1.536 4.608 0l427.008 427.008c1.536 1.536 1.536 3.584 0 4.608L506.88 948.224c-1.536 1.024-3.584 1.024-4.608 0z"
fill="#C9E6FF"></path>
<path
d="M504.32 956.416c-2.56 0-5.632-1.024-7.68-3.072l-427.008-427.008c-4.096-4.096-4.096-11.264 0-15.36L496.64 83.456c4.096-4.096 11.264-4.096 15.36 0l427.008 427.008c4.096 4.096 4.096 11.264 0 15.36L512 953.344c-2.048 2.048-4.608 3.072-7.68 3.072z m-420.864-437.76l420.864 420.864 420.864-420.864L504.32 97.28l-420.864 421.376z"
fill="#2E66FF"></path>
<path
d="M497.152 97.792l13.312 414.208 395.264-395.264c5.632-5.632 2.048-15.872-6.144-16.384L506.88 88.064c-5.632-0.512-9.728 4.096-9.728 9.728z"
fill="#FFFFFF"></path>
<path
d="M503.296 529.92l-13.824-432.128c0-4.608 1.536-9.216 5.12-12.8s7.68-5.12 12.8-5.12l392.704 12.8c7.168 0 12.8 4.608 15.36 10.752 2.56 6.656 1.024 13.312-3.584 18.432l-408.576 408.064z m1.536-432.64l12.8 396.8 382.464-382.464c0.512-0.512 0.512-1.024 0.512-2.048-0.512-0.512-1.024-1.024-1.536-1.024l-392.704-12.8c-0.512 0-1.024 0.512-1.536 0.512v1.024z"
fill="#2E66FF"></path>
<path
d="M522.24 946.688L508.416 532.48l-395.264 395.264c-5.632 5.632-2.048 15.872 6.144 16.384l392.704 12.8c5.632 0 10.24-4.608 10.24-10.24z"
fill="#FFFFFF"></path>
<path
d="M512.512 964.096h-0.512l-392.704-12.8c-7.168 0-12.8-4.608-15.36-10.752-2.56-6.656-1.024-13.312 3.584-18.432l407.552-407.552 13.824 432.128c0 4.608-1.536 9.216-5.12 12.8-2.048 3.072-6.656 4.608-11.264 4.608z m-11.264-413.696l-382.464 382.464c-0.512 0.512-0.512 1.024-0.512 2.048 0.512 0.512 1.024 1.024 1.536 1.024l392.704 12.8c0.512 0 1.024-0.512 1.536-0.512 0 0 0.512-0.512 0.512-1.536l-13.312-396.288z"
fill="#2E66FF"></path>
<path
d="M931.84 509.952l-414.208 13.312 395.264 395.264c5.632 5.632 15.872 2.048 16.384-6.144l12.8-392.704c0-5.632-4.608-10.24-10.24-9.728z"
fill="#FFB5EC"></path>
<path
d="M919.552 929.28c-4.608 0-8.704-1.536-11.776-5.12l-407.552-407.552 432.128-13.824c4.608 0 9.216 1.536 12.8 5.12s5.12 8.192 5.12 12.8l-12.8 392.704c0 7.168-4.608 12.8-10.752 15.36-3.072 0-5.12 0.512-7.168 0.512z m-384-398.848l382.464 382.464c0.512 0.512 1.024 0.512 2.048 0.512 0.512-0.512 1.024-1.024 1.024-1.536l12.8-392.704c0-0.512-0.512-1.024-0.512-1.536 0 0-1.024-0.512-1.536-0.512l-396.288 13.312z"
fill="#2E66FF"></path>
<path
d="M76.8 526.848l414.208-13.312-394.752-395.264c-5.632-5.632-15.872-2.048-16.384 6.144L67.072 517.12c0 5.632 4.096 10.24 9.728 9.728z"
fill="#FFF152"></path>
<path
d="M76.8 534.528c-4.608 0-8.704-2.048-12.288-5.12-3.584-3.584-5.12-8.192-5.12-12.8l12.8-392.704c0-7.168 4.608-12.8 10.752-15.36 6.656-2.56 13.312-1.024 18.432 3.584l407.552 407.552-432.128 13.824v1.024z m12.8-411.136h-0.512c-0.512 0.512-1.024 1.024-1.024 1.536l-12.8 392.704c0 0.512 0.512 1.024 0.512 1.536 0 0 0.512 0.512 1.536 0.512L474.112 506.88 90.624 123.904c-0.512-0.512-1.024-0.512-1.024-0.512z"
fill="#2E66FF"></path>
</svg>
</span>
<span class="funny-title">{{index + 1}}号选手{{item.classify}}</span>
</div>
<div class="process-wrap">
<el-collapse v-model="activeName" accordion @change="changeFunny(item.classify)">
<el-collapse-item title="笑梗不笑人" :name="index">
<div class="my-animation-slide-bottom"
style="display: flex;flex-flow: wrap;margin-left: 20px"
v-if="!$common.isEmpty(item.data)">
<div style="width: 150px" v-for="(funny, i) in item.data" :key="i">
<el-avatar class="funny-avatar myCenter" :size="110"
style="margin: 20px"
@click.native="playSound(funny.url, item.data, i)"
:src="funny.cover">
</el-avatar>
<div class="funny-item-title">{{funny.title}}</div>
</div>
</div>
</el-collapse-item>
</el-collapse>
<hr>
</div>
</div>
</div>
</div>
<!-- 页脚 -->
<myFooter></myFooter>
</div>
</template>
<script>
const twoPoem = () => import( "./common/twoPoem");
const myFooter = () => import( "./common/myFooter");
export default {
components: {
twoPoem,
myFooter
},
data() {
return {
pagination: {
current: 1,
size: 9999,
order: "title",
desc: false,
resourceType: "funny",
classify: ""
},
activeName: 0,
audio: null,
playList: null,
index: null,
funnys: [{
classify: "",
count: null,
data: [{
classify: "",
cover: "",
url: "",
title: ""
}]
}],
funny: {
classify: "",
title: "",
cover: "",
url: ""
}
}
},
computed: {},
watch: {},
created() {
this.getFunny();
},
mounted() {
},
beforeDestroy() {
if (this.audio != null && !this.audio.paused) {
this.audio.pause();
}
},
methods: {
getFunny() {
this.$http.get(this.$constant.baseURL + "/webInfo/listFunny")
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.funnys = res.data;
this.changeFunny(this.funnys[0].classify);
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
listFunny() {
this.$http.post(this.$constant.baseURL + "/webInfo/listResourcePath", this.pagination)
.then((res) => {
if (!this.$common.isEmpty(res.data) && !this.$common.isEmpty(res.data.records)) {
this.funnys.forEach(funny => {
if (funny.classify === this.pagination.classify) {
funny.data = res.data.records;
this.$forceUpdate();
}
});
}
this.pagination.classify = "";
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
changeFunny(classify) {
this.funnys.forEach(funny => {
if (funny.classify === classify && this.$common.isEmpty(funny.data)) {
this.pagination.classify = classify;
this.listFunny();
}
});
},
playSound(src, playList, index) {
this.playList = playList;
this.index = index;
if (this.audio != null) {
if (this.audio.src === src) {
if (this.audio.paused) {
this.audio.play();
} else {
this.audio.pause();
}
} else {
this.audio.pause();
this.audio.src = src;
this.audio.load();
this.audio.play();
}
} else {
this.audio = new Audio(src);
this.audio.play();
this.audio.onended = () => {
this.index = this.index + 1;
if (this.index < this.playList.length) {
this.audio.src = this.playList[this.index].url;
this.audio.load();
setTimeout(() => {
this.audio.play();
}, 3000);
}
};
}
}
}
}
</script>
<style scoped>
.funny-wrap {
background-color: var(--maxMaxLightGray);
width: 95%;
border-radius: 10px;
max-width: 1600px;
margin: 0 auto;
padding: 40px 20px 80px;
}
.funny-title {
color: var(--black);
font-size: 28px;
font-weight: 700;
margin-left: 12px;
}
.process-wrap {
margin: 20px 0 40px;
}
.process-wrap hr {
position: relative;
margin: 30px auto 100px;
border: 2px dashed var(--lightGreen);
overflow: visible;
}
.process-wrap hr:before {
position: absolute;
top: -14px;
left: 5%;
color: var(--lightGreen);
content: '❄';
font-size: 30px;
line-height: 1;
transition: all 1s ease-in-out;
}
.process-wrap hr:hover:before {
left: calc(95% - 20px);
}
.process-wrap >>> .el-collapse-item__header {
border-bottom: unset;
font-size: 20px;
font-weight: 700;
background-color: var(--maxMaxLightGray);
color: var(--lightGreen);
padding: 40px;
}
.process-wrap >>> .el-collapse-item__wrap {
background-color: var(--maxMaxLightGray);
}
.process-wrap .el-collapse {
border-top: unset;
border-bottom: unset;
border-radius: 10px;
overflow: hidden;
}
.process-wrap >>> .el-collapse-item__wrap {
border-bottom: unset;
}
.funny-item-title {
text-align: center;
margin: 0 10px;
font-size: 18px;
font-weight: 700;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.funny-item-title:hover {
text-overflow: unset;
overflow: unset;
}
.funny-avatar {
cursor: pointer;
transition: all 0.5s;
user-select: none;
}
.funny-avatar:hover {
transform: rotate(360deg);
}
</style>

@ -1,640 +0,0 @@
<template>
<div>
<!-- el过渡动画 -->
<transition name="el-fade-in-linear">
<!-- 导航栏 -->
<div v-show="toolbar.visible"
@mouseenter="hoverEnter = true"
@mouseleave="hoverEnter = false"
:class="[{ enter: toolbar.enter }, { hoverEnter: (hoverEnter || this.$route.path === '/favorite' || this.$route.path === '/travel') && !toolbar.enter }]"
class="toolbar-content myBetween">
<!-- 网站名称 -->
<div class="toolbar-title">
<h2 @click="$router.push({path: '/'})">{{$store.state.webInfo.webName}}</h2>
</div>
<!-- 手机导航按钮 -->
<div v-if="$common.mobile() || mobile"
class="toolbar-mobile-menu"
@click="toolbarDrawer = !toolbarDrawer"
:class="{ enter: toolbar.enter }">
<i class="el-icon-s-operation"></i>
</div>
<!-- 导航列表 -->
<div v-else>
<ul class="scroll-menu">
<li @click="$router.push({path: '/'})">
<div class="my-menu">
🏡 <span>首页</span>
</div>
</li>
<!-- <li v-for="(menu, index) in $store.getters.navigationBar"-->
<!-- @click="$router.push({path: '/sort', query: {sortId: menu.id, labelId: menu.labels[0].id}})"-->
<!-- :key="index">-->
<!-- <div class="my-menu">-->
<!-- 📒 <span>{{ menu.sortName }}</span>-->
<!-- </div>-->
<!-- </li>-->
<!-- 预测研发流程 -->
<li @click="$router.push({path: '/love'})">
<div class="my-menu">
🥼 <span>研发流程</span>
</div>
</li>
<!-- 博客 -->
<li @click="$router.push({ path: '/blog' })">
<div class="my-menu">
<span>博客</span>
</div>
</li>
<!-- 旅拍 -->
<li @click="$router.push({path: '/travel'})">
<div class="my-menu">
🌏 <span>照片</span>
</div>
</li>
<!-- 百宝箱 -->
<li @click="$router.push({path: '/favorite'})">
<div class="my-menu">
🧰 <span>医院推荐</span>
</div>
</li>
<!-- 聊天室 -->
<li @click="goIm()">
<div class="my-menu">
💬 <span>聊天室</span>
</div>
</li>
<!-- 音乐 -->
<!-- <li @click="$router.push({path: '/funny'})">-->
<!-- <div class="my-menu">-->
<!-- 🎺 <span>曲乐</span>-->
<!-- </div>-->
<!-- </li>-->
<!-- 留言 -->
<li @click="$router.push({path: '/message'})">
<div class="my-menu">
📪 <span>留言</span>
</div>
</li>
<!-- 友人帐 -->
<!-- <li @click="$router.push({path: '/friend'})">-->
<!-- <div class="my-menu">-->
<!-- 💃 <span>友人帐</span>-->
<!-- </div>-->
<!-- </li>-->
<!-- 关于 -->
<li @click="$router.push({path: '/about'})">
<div class="my-menu">
🐟 <span>关于</span>
</div>
</li>
<!-- 个人中心 -->
<li>
<el-dropdown placement="bottom">
<el-avatar class="user-avatar" :size="36"
style="margin-top: 12px"
:src="!$common.isEmpty($store.state.currentUser)?$store.state.currentUser.avatar:$store.state.webInfo.avatar">
</el-avatar>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="$router.push({path: '/user'})"
v-if="!$common.isEmpty($store.state.currentUser)">
<i class="fa fa-user-circle" aria-hidden="true"></i> <span>个人中心</span>
</el-dropdown-item>
<el-dropdown-item @click.native="logout()" v-if="!$common.isEmpty($store.state.currentUser)">
<i class="fa fa-sign-out" aria-hidden="true"></i> <span>退出</span>
</el-dropdown-item>
<el-dropdown-item @click.native="$router.push({path: '/user'})"
v-if="$common.isEmpty($store.state.currentUser)">
<i class="fa fa-sign-in" aria-hidden="true"></i> <span>登陆</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</li>
</ul>
</div>
</div>
</transition>
<div id="main-container">
<router-view></router-view>
</div>
<!-- 回到顶部按钮 -->
<div href="#" class="cd-top" v-if="!$common.mobile()" @click="toTop()"></div>
<div class="toolButton">
<div class="backTop" v-if="$common.mobile() && toolButton" @click="toTop()">
<!-- 回到顶部按钮 -->
<svg viewBox="0 0 1024 1024" width="50" height="50">
<path
d="M696.741825 447.714002c2.717387-214.485615-173.757803-312.227566-187.33574-320.371729-10.857551 5.430775-190.050127 103.168727-187.33274 320.371729-35.297037 24.435488-73.306463 65.1623-67.875688 135.752376 5.430775 70.589076 76.018851 119.460051 103.168726 116.745664 27.152875-2.716387 19.004713-21.7221 19.004713-21.7221l8.148162-38.011425s40.721814 59.732525 51.583363 59.732525h146.609927c13.574938 0 51.585363-59.732525 51.585363-59.732525l8.147162 38.011425s-8.147162 19.005713 19.004713 21.7221c27.148876 2.714388 97.738951-46.156588 103.168727-116.745664s-32.57965-111.316888-67.876688-135.752376z m-187.33574-2.713388c-5.426776 0-70.589076-2.717387-78.733239-78.737238 2.713388-73.306463 73.306463-78.733239 78.733239-81.450626 5.430775 0 76.02385 8.144163 78.736238 81.450626-8.143163 76.019851-73.305463 78.737238-78.736238 78.737238z m0 0"
fill="#000000"></path>
<path
d="M423.602441 746.060699c6.47054-6.297579 12.823107-7.017417 21.629121-2.784372 34.520213 16.582259 70.232157 19.645568 107.031855 9.116944 8.118169-2.323476 15.974396-5.475765 23.598677-9.22392 13.712907-6.73648 26.003134 0.8878 26.080116 16.13936 0.109975 22.574907-0.024994 45.142816 0.080982 67.709725 0.031993 7.464316-2.277486 13.322995-9.44387 16.608254-7.277358 3.333248-13.765895 1.961558-19.526595-3.264264-3.653176-3.313253-7.063407-6.897444-10.634601-10.304675-6.563519-6.259588-6.676494-6.25259-10.625603 1.603638-8.437097 16.80121-16.821205 33.623415-25.257302 50.423625-2.489438 4.953882-5.706713 9.196925-11.411426 10.775569-8.355115 2.315478-15.772442-1.070758-20.272427-9.867774-8.774021-17.15313-17.269104-34.453228-25.918153-51.669344-3.750154-7.469315-3.9891-7.479313-10.141712-1.514658-3.715162 3.602187-7.31435 7.326347-11.142486 10.800563-5.571743 5.060858-11.934308 6.269586-18.936728 3.207277-6.82746-2.984327-9.869774-8.483086-9.892769-15.685462-0.070984-23.506697-0.041991-47.018393-0.020995-70.532089 0.007998-4.679944 1.46467-8.785018 4.803916-11.538397z"
fill="#000000"></path>
</svg>
</div>
<el-popover placement="left"
:close-delay="500"
trigger="hover">
<div slot="reference">
<i class="fa fa-cog iconRotate" aria-hidden="true"></i>
</div>
<div class="my-setting">
<div>
<!-- 太阳按钮 -->
<i v-if="isDark" class="el-icon-sunny iconRotate" @click="changeColor()"></i>
<!-- 月亮按钮 -->
<i v-else class="fa fa-moon-o" aria-hidden="true" @click="changeColor()"></i>
</div>
<div>
<i class="fa fa-snowflake-o" aria-hidden="true" @click="changeMouseAnimation()"></i>
</div>
</div>
</el-popover>
</div>
<!-- 点击动画 -->
<canvas v-if="mouseAnimation" id="mousedown"
style="position:fixed;left:0;top:0;pointer-events:none;z-index: 1000">
</canvas>
<el-drawer :visible.sync="toolbarDrawer"
:show-close="false"
size="65%"
custom-class="toolbarDrawer"
title="欢迎光临"
direction="ltr">
<div>
<ul class="small-menu">
<li @click="smallMenu({path: '/'})">
<div>
🏡 <span>首页</span>
</div>
</li>
<!-- <li v-for="(menu, index) in $store.getters.navigationBar"-->
<!-- @click="smallMenu({path: '/sort', query: {sortId: menu.id, labelId: menu.labels[0].id}})"-->
<!-- :key="index">-->
<!-- <div>-->
<!-- 📒 <span>{{ menu.sortName }}</span>-->
<!-- </div>-->
<!-- </li>-->
<!-- 爱情买卖 -->
<li @click="smallMenu({path: '/love'})">
<div>
💋 <span>爱情买卖</span>
</div>
</li>
<!-- 旅拍 -->
<li @click="smallMenu({path: '/travel'})">
<div>
🌏 <span>旅拍</span>
</div>
</li>
<!-- 百宝箱 -->
<li @click="smallMenu({path: '/favorite'})">
<div>
🧰 <span>百宝箱</span>
</div>
</li>
<!-- 聊天室 -->
<li @click="goIm()">
<div>
💬 <span>非礼勿言</span>
</div>
</li>
<!-- 音乐 -->
<li @click="smallMenu({path: '/funny'})">
<div>
🎺 <span>曲乐</span>
</div>
</li>
<!-- 留言 -->
<li @click="smallMenu({path: '/message'})">
<div>
📪 <span>留言</span>
</div>
</li>
<!-- 友人帐 -->
<li @click="smallMenu({path: '/friend'})">
<div>
💃 <span>友人帐</span>
</div>
</li>
<!-- 关于 -->
<li @click="smallMenu({path: '/about'})">
<div>
🐟 <span>关于</span>
</div>
</li>
<template v-if="$common.isEmpty($store.state.currentUser)">
<li @click="smallMenu({path: '/user'})">
<div>
<i class="fa fa-sign-in" aria-hidden="true"></i>
<span>&nbsp;登录</span>
</div>
</li>
</template>
<template v-else>
<li @click="smallMenu({path: '/user'})">
<div>
<i class="fa fa-user-circle" aria-hidden="true"></i>
<span>&nbsp;个人中心</span>
</div>
</li>
<li @click="smallMenuLogout()">
<div>
<i class="fa fa-sign-out" aria-hidden="true"></i>
<span>&nbsp;退出</span>
</div>
</li>
</template>
</ul>
</div>
</el-drawer>
</div>
</template>
<script>
import mousedown from '../utils/mousedown';
export default {
data() {
return {
toolButton: false,
hoverEnter: false,
mouseAnimation: false,
isDark: false,
scrollTop: 0,
toolbarDrawer: false,
mobile: false
}
},
mounted() {
if (this.mouseAnimation) {
mousedown();
}
window.addEventListener("scroll", this.onScrollPage);
if (this.isDaylight()) {
this.isDark = true;
let root = document.querySelector(":root");
root.style.setProperty("--background", "#272727");
root.style.setProperty("--fontColor", "white");
root.style.setProperty("--borderColor", "#4F4F4F");
root.style.setProperty("--borderHoverColor", "black");
root.style.setProperty("--articleFontColor", "#E4E4E4");
root.style.setProperty("--articleGreyFontColor", "#D4D4D4");
root.style.setProperty("--commentContent", "#D4D4D4");
root.style.setProperty("--favoriteBg", "#1e1e1e");
}
},
destroyed() {
window.removeEventListener("scroll", this.onScrollPage);
},
watch: {
scrollTop(scrollTop, oldScrollTop) {
//
let enter = scrollTop > window.innerHeight / 2;
const top = scrollTop - oldScrollTop < 0;
let isShow = scrollTop - window.innerHeight > 30;
this.toolButton = isShow;
if (isShow && !this.$common.mobile()) {
if (window.innerHeight > 950) {
$(".cd-top").css("top", "0");
} else {
$(".cd-top").css("top", window.innerHeight - 950 + "px");
}
} else if (!isShow && !this.$common.mobile()) {
$(".cd-top").css("top", "-900px");
}
//
let toolbarStatus = {
enter: enter,
visible: top,
};
this.$store.commit("changeToolbarStatus", toolbarStatus);
},
},
created() {
let toolbarStatus = {
enter: false,
visible: true,
};
this.$store.commit("changeToolbarStatus", toolbarStatus);
this.getWebInfo();
this.getSortInfo();
this.mobile = document.body.clientWidth < 1100;
window.addEventListener('resize', () => {
let docWidth = document.body.clientWidth;
if (docWidth < 1100) {
this.mobile = true;
} else {
this.mobile = false;
}
});
},
computed: {
toolbar() {
return this.$store.state.toolbar;
}
},
methods: {
smallMenu(data) {
this.$router.push(data)
this.toolbarDrawer = false;
},
smallMenuLogout() {
this.logout();
this.toolbarDrawer = false;
},
goIm() {
if (this.$common.isEmpty(this.$store.state.currentUser)) {
this.$message({
message: "请先登录!",
type: "error"
});
} else {
let userToken = this.$common.encrypt(localStorage.getItem("userToken"));
window.open(this.$constant.imBaseURL + "?userToken=" + userToken + "&defaultStoreType=" + localStorage.getItem("defaultStoreType"));
}
},
logout() {
this.$http.get(this.$constant.baseURL + "/user/logout")
.then((res) => {
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
this.$store.commit("loadCurrentUser", {});
localStorage.removeItem("userToken");
this.$router.push({path: '/'});
},
getWebInfo() {
this.$http.get(this.$constant.baseURL + "/webInfo/getWebInfo")
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.$store.commit("loadWebInfo", res.data);
localStorage.setItem("defaultStoreType", res.data.defaultStoreType);
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
getSortInfo() {
this.$http.get(this.$constant.baseURL + "/webInfo/getSortInfo")
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.$store.commit("loadSortInfo", res.data);
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
changeColor() {
this.isDark = !this.isDark;
let root = document.querySelector(":root");
if (this.isDark) {
root.style.setProperty("--background", "#272727");
root.style.setProperty("--fontColor", "white");
root.style.setProperty("--borderColor", "#4F4F4F");
root.style.setProperty("--borderHoverColor", "black");
root.style.setProperty("--articleFontColor", "#E4E4E4");
root.style.setProperty("--articleGreyFontColor", "#D4D4D4");
root.style.setProperty("--commentContent", "#D4D4D4");
root.style.setProperty("--favoriteBg", "#1e1e1e");
} else {
root.style.setProperty("--background", "white");
root.style.setProperty("--fontColor", "black");
root.style.setProperty("--borderColor", "rgba(0, 0, 0, 0.5)");
root.style.setProperty("--borderHoverColor", "rgba(110, 110, 110, 0.4)");
root.style.setProperty("--articleFontColor", "#1F1F1F");
root.style.setProperty("--articleGreyFontColor", "#616161");
root.style.setProperty("--commentContent", "#F7F9FE");
root.style.setProperty("--favoriteBg", "#f7f9fe");
}
$("body").toggleClass("dark-mode");
var angle = $('.dark-mode-planet').data('angle') + 360 || 360;
$('.dark-mode-planet').css({'transform': 'rotate(' + angle + 'deg)'});
$('.dark-mode-planet').data('angle',angle);
},
toTop() {
window.scrollTo({
top: 0,
behavior: "smooth"
});
},
onScrollPage() {
this.scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
},
isDaylight() {
let currDate = new Date();
if (currDate.getHours() > 22 || currDate.getHours() < 7) {
return true;
} else {
return false;
}
},
changeMouseAnimation() {
this.mouseAnimation = !this.mouseAnimation;
if (this.mouseAnimation) {
this.$nextTick(() => {
mousedown();
});
}
}
}
}
</script>
<style scoped>
.toolbar-content {
width: 100%;
height: 60px;
color: var(--white);
/* 固定位置,不随滚动条滚动 */
position: fixed;
z-index: 100;
/* 禁止选中文字 */
user-select: none;
transition: all 0.3s ease-in-out;
}
.toolbar-content.enter {
background: var(--toolbarBackground);
color: var(--toolbarFont);
box-shadow: 0 1px 3px 0 rgba(0, 34, 77, 0.05);
}
.toolbar-content.hoverEnter {
background: var(--translucent);
box-shadow: 0 1px 3px 0 rgba(0, 34, 77, 0.05);
}
.toolbar-title {
margin-left: 30px;
cursor: pointer;
}
.toolbar-mobile-menu {
font-size: 30px;
margin-right: 15px;
cursor: pointer;
}
.scroll-menu {
margin: 0 25px 0 0;
display: flex;
justify-content: flex-end;
padding: 0;
}
.scroll-menu > li {
list-style: none;
margin: 0 12px;
font-size: 17px;
height: 60px;
line-height: 60px;
position: relative;
cursor: pointer;
}
.scroll-menu > li:hover .my-menu span {
color: var(--themeBackground);
}
.scroll-menu > li:hover .my-menu i {
color: var(--themeBackground);
animation: scale 1.5s ease-in-out infinite;
}
.scroll-menu > li .my-menu:after {
content: "";
display: block;
position: absolute;
bottom: 0;
height: 6px;
background-color: var(--themeBackground);
width: 100%;
max-width: 0;
transition: max-width 0.25s ease-in-out;
}
.scroll-menu > li:hover .my-menu:after {
max-width: 100%;
}
.el-dropdown {
font-size: unset;
color: unset;
}
.el-popper[x-placement^=bottom] {
margin-top: -8px;
}
.el-dropdown-menu {
padding: 5px 0;
}
.el-dropdown-menu__item {
font-size: unset;
}
.el-dropdown-menu__item:hover {
background-color: var(--white);
color: var(--themeBackground);
}
.toolButton {
position: fixed;
right: 3vh;
bottom: 3vh;
animation: slide-bottom 0.5s ease-in-out both;
z-index: 100;
cursor: pointer;
font-size: 25px;
}
.my-setting {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
cursor: pointer;
font-size: 20px;
}
.my-setting i {
padding: 5px;
}
.my-setting i:hover {
color: var(--themeBackground);
}
.cd-top {
background: var(--toTop) no-repeat center;
position: fixed;
right: 5vh;
top: -900px;
z-index: 99;
width: 70px;
height: 900px;
background-size: contain;
transition: all 0.5s ease-in-out;
cursor: pointer;
}
.backTop {
transition: all 0.3s ease-in;
position: relative;
top: 0;
left: -13px;
}
.backTop:hover {
top: -10px;
}
@media screen and (max-width: 400px) {
.toolButton {
right: 0.5vh;
}
}
</style>

@ -1,573 +0,0 @@
<template>
<div>
<loader :loading="loading">
<!-- 加载页面 -->
<template slot="loader">
<div>
<zombie></zombie>
</div>
</template>
<!-- 内容页面 -->
<template slot="body">
<!-- 首页图片 -->
<!--<el-image style="animation: header-effect 2s"
class="background-image"
v-once
lazy
:src="!$common.isEmpty($store.state.webInfo.backgroundImage)?$store.state.webInfo.backgroundImage:$constant.random_image+new Date()+Math.floor(Math.random()*10)"
fit="cover">
<div slot="error" class="image-slot background-image-error"></div>
</el-image>-->
<div class="dark-mode-sky">
<div class="dark-mode-planet"></div>
</div>
<!-- 首页文字 -->
<div class="signature-wall myCenter my-animation-hideToShow">
<h1 class="playful">
<span v-for="(a, index) in $store.state.webInfo.webTitle" :key="index">{{a}}</span>
</h1>
<!-- 搜索 -->
<div style="padding: 15px;border-radius: 10px;margin-top: 30px;animation: hideToShow 1s ease-in-out"
class="shadow-box background-opacity wow">
<div style="color: var(--lightGreen);font-size: 20px;font-weight: bold;margin-bottom: 10px">
查询DDI
</div>
<div style="display: flex">
<input class="ais-SearchBox-input" type="text"
v-model="queryParams.drug1"
placeholder="请输入药品A名称" maxlength="32">
<div style="width: 10px"></div>
<input class="ais-SearchBox-input" type="text"
v-model="queryParams.drug2"
placeholder="请输入药品B名称" maxlength="32">
<div style="width: 10px"></div>
<input class="ais-SearchBox-input" type="text"
v-model="queryParams.reaction"
placeholder="请输入相互作用效果" maxlength="32">
<div class="ais-SearchBox-submit" @click="handleQuery()">
<svg style="margin-top: 3.5px;margin-left: 18px" viewBox="0 0 1024 1024" width="20" height="20">
<path
d="M51.2 508.8c0 256.8 208 464.8 464.8 464.8s464.8-208 464.8-464.8-208-464.8-464.8-464.8-464.8 208-464.8 464.8z"
fill="#51C492"></path>
<path
d="M772.8 718.4c48-58.4 76.8-132.8 76.8-213.6 0-186.4-151.2-337.6-337.6-337.6-186.4 0-337.6 151.2-337.6 337.6 0 186.4 151.2 337.6 337.6 337.6 81.6 0 156-28.8 213.6-76.8L856 896l47.2-47.2-130.4-130.4zM512 776c-149.6 0-270.4-121.6-270.4-271.2S363.2 233.6 512 233.6c149.6 0 271.2 121.6 271.2 271.2C782.4 654.4 660.8 776 512 776z"
fill="#FFFFFF"></path>
</svg>
</div>
</div>
</div>
<div class="printer" @click="getGuShi()">
<printer :printerInfo="printerInfo">
<template slot="paper" slot-scope="scope">
<h3>
{{ scope.content }}<span class="cursor">|</span>
</h3>
</template>
</printer>
</div>
<div id="bannerWave1"></div>
<div id="bannerWave2"></div>
<i class="el-icon-arrow-down" @click="navigation('.page-container-wrap')"></i>
</div>
<!-- 首页内容 -->
<div class="page-container-wrap">
<div class="page-container">
<div class="aside-content" v-if="showAside">
<myAside ref="myAsideRef" @selectSort="selectSort" @selectArticle="selectArticle"></myAside>
</div>
<div class="recent-posts">
<div class="announcement background-opacity">
<i class="fa fa-volume-up" aria-hidden="true"></i>
<div>
<div v-for="(notice, index) in $store.state.webInfo.notices" :key="index">
{{ notice }}
</div>
</div>
</div>
<template>
<div class="shadow-box pagination-wrap background-opacity">
<el-table :data="table1List">
<el-table-column label="药品A">
<template slot-scope="{ row }">
<span @click="selectDrugDetails(row.drug1)">{{ row.drug1 }}</span>
</template>
</el-table-column>
<el-table-column label="药品B">
<template slot-scope="{ row }">
<span @click="selectDrugDetails(row.drug2)">{{ row.drug2 }}</span>
</template>
</el-table-column>
<el-table-column prop="reaction" label="相互作用效果"></el-table-column>
</el-table>
</div>
<!--分页组件-->
<div class="block background-opacity">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage1"
:page-sizes="[10, 15, 20, 25]"
:page-size="10"
layout="total, sizes, prev, pager, next, jumper"
:total=this.pagination.total>
</el-pagination>
</div>
<articleList :articleList="articles"></articleList>
<div class="pagination-wrap">
<div @click="pageArticles()" class="pagination" v-if="pagination.total !== articles.length">
下一页
</div>
<div v-else style="user-select: none">
~~到底啦~~
</div>
</div>
</template>
</div>
</div>
</div>
<!-- 页脚 -->
<div style="background: var(--background)">
<myFooter></myFooter>
</div>
</template>
</loader>
</div>
</template>
<script>
import {listTable1, listTotal, selectDetails} from "@/utils/table1";
const loader = () => import( "./common/loader");
const zombie = () => import( "./common/zombie");
const printer = () => import( "./common/printer");
const articleList = () => import( "./articleList");
const myFooter = () => import( "./common/myFooter");
const myAside = () => import( "./myAside");
export default {
components: {
loader,
zombie,
printer,
articleList,
myFooter,
myAside
},
data() {
return {
currentPage1: 1,
loading: false,
showAside: true,
printerInfo: "你看对面的青山多漂亮",
pagination: {
current: 1,
size: 10,
total: 0,
searchKey: "",
sortId: null,
articleSearch: ""
},
guShi: {
"content": "",
"origin": "",
"author": "",
"category": ""
},
articles: [],
table1List: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
drug1: null,
drug2: null,
reaction: null
},
};
},
watch: {},
created() {
this.getGuShi();
this.getArticles();
this.handleQuery();
},
mounted() {
},
methods: {
selectDrugDetails(drugName) {
this.$refs.myAsideRef.updateDrugName(drugName);
},
/** 查询药品作用列表条数 */
getTotal() {
listTotal(this.queryParams).then(response => {
this.pagination.total = parseInt(response);
console.log(this.pagination.total);
});
},
handleSizeChange(val) {
this.queryParams.pageSize = val; //
this.getList();
},
handleCurrentChange(val) {
this.queryParams.pageNum = val; //
this.getList();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.getTotal();
//
const targetElement = document.querySelector('.recent-posts');
if (targetElement) {
targetElement.scrollIntoView({ behavior: "smooth", block: "start" });
}
},
/** 查询药品作用管理列表 */
getList() {
// this.loading = true;
this.table1List = []; //
listTable1(this.queryParams).then(response => {
this.table1List = response;
});
},
async selectSort(sort) {
this.pagination = {
current: 1,
size: 10,
total: 0,
searchKey: "",
sortId: sort.id,
articleSearch: ""
};
this.articles = [];
await this.getArticles();
// this.$nextTick(() => {
// document.querySelector('.recent-posts').scrollIntoView({
// behavior: "smooth",
// block: "start",
// inline: "nearest"
// });
// });
},
async selectArticle(articleSearch) {
this.pagination = {
current: 1,
size: 10,
total: 0,
searchKey: "",
sortId: null,
articleSearch: articleSearch
};
this.articles = [];
await this.getArticles();
this.$nextTick(() => {
document.querySelector('.recent-posts').scrollIntoView({
behavior: "smooth",
block: "start",
inline: "nearest"
});
});
},
pageArticles() {
this.pagination.current = this.pagination.current + 1;
this.getArticles();
},
async getArticles() {
await this.$http.post(this.$constant.baseURL + "/article/listArticle", this.pagination)
// await this.$http.post("http://localhost:81" + "/system/table1/list", this.pagination)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.articles = this.articles.concat(res.data.records);
this.pagination.total = res.data.total;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
navigation(selector) {
let pageId = document.querySelector(selector);
window.scrollTo({
top: pageId.offsetTop,
behavior: "smooth"
});
},
getGuShi() {
let that = this;
let xhr = new XMLHttpRequest();
xhr.open('get', this.$constant.jinrishici);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
that.guShi = JSON.parse(xhr.responseText);
that.printerInfo = that.guShi.content;
}
};
xhr.send();
}
}
}
</script>
<style scoped>
.signature-wall {
/* 向下排列 */
display: flex;
flex-direction: column;
position: relative;
user-select: none;
height: 100vh;
overflow: hidden;
}
.playful {
color: var(--white);
font-size: 40px;
}
/*.playful span {*/
/* position: relative;*/
/* color: #5362f6;*/
/* text-shadow: 0.25px 0.25px #e485f8, 0.5px 0.5px #e485f8, 0.75px 0.75px #e485f8,*/
/* 1px 1px #e485f8, 1.25px 1.25px #e485f8, 1.5px 1.5px #e485f8, 1.75px 1.75px #e485f8,*/
/* 2px 2px #e485f8, 2.25px 2.25px #e485f8, 2.5px 2.5px #e485f8, 2.75px 2.75px #e485f8,*/
/* 3px 3px #e485f8, 3.25px 3.25px #e485f8, 3.5px 3.5px #e485f8, 3.75px 3.75px #e485f8,*/
/* 4px 4px #e485f8, 4.25px 4.25px #e485f8, 4.5px 4.5px #e485f8, 4.75px 4.75px #e485f8,*/
/* 5px 5px #e485f8, 5.25px 5.25px #e485f8, 5.5px 5.5px #e485f8, 5.75px 5.75px #e485f8,*/
/* 6px 6px #e485f8;*/
/* animation: scatter 1.75s infinite;*/
/* font-weight: normal;*/
/*}*/
/*.playful span:nth-child(2n) {*/
/* color: #ed625c;*/
/* text-shadow: 0.25px 0.25px #f2a063, 0.5px 0.5px #f2a063, 0.75px 0.75px #f2a063,*/
/* 1px 1px #f2a063, 1.25px 1.25px #f2a063, 1.5px 1.5px #f2a063, 1.75px 1.75px #f2a063,*/
/* 2px 2px #f2a063, 2.25px 2.25px #f2a063, 2.5px 2.5px #f2a063, 2.75px 2.75px #f2a063,*/
/* 3px 3px #f2a063, 3.25px 3.25px #f2a063, 3.5px 3.5px #f2a063, 3.75px 3.75px #f2a063,*/
/* 4px 4px #f2a063, 4.25px 4.25px #f2a063, 4.5px 4.5px #f2a063, 4.75px 4.75px #f2a063,*/
/* 5px 5px #f2a063, 5.25px 5.25px #f2a063, 5.5px 5.5px #f2a063, 5.75px 5.75px #f2a063,*/
/* 6px 6px #f2a063;*/
/* animation-delay: 0.3s;*/
/*}*/
/*.playful span:nth-child(3n) {*/
/* color: #ffd913;*/
/* text-shadow: 0.25px 0.25px #6ec0a9, 0.5px 0.5px #6ec0a9, 0.75px 0.75px #6ec0a9,*/
/* 1px 1px #6ec0a9, 1.25px 1.25px #6ec0a9, 1.5px 1.5px #6ec0a9, 1.75px 1.75px #6ec0a9,*/
/* 2px 2px #6ec0a9, 2.25px 2.25px #6ec0a9, 2.5px 2.5px #6ec0a9, 2.75px 2.75px #6ec0a9,*/
/* 3px 3px #6ec0a9, 3.25px 3.25px #6ec0a9, 3.5px 3.5px #6ec0a9, 3.75px 3.75px #6ec0a9,*/
/* 4px 4px #6ec0a9, 4.25px 4.25px #6ec0a9, 4.5px 4.5px #6ec0a9, 4.75px 4.75px #6ec0a9,*/
/* 5px 5px #6ec0a9, 5.25px 5.25px #6ec0a9, 5.5px 5.5px #6ec0a9, 5.75px 5.75px #6ec0a9,*/
/* 6px 6px #6ec0a9;*/
/* animation-delay: 0.15s;*/
/*}*/
/*.playful span:nth-child(5n) {*/
/* color: #555bff;*/
/* text-shadow: 0.25px 0.25px #e485f8, 0.5px 0.5px #e485f8, 0.75px 0.75px #e485f8,*/
/* 1px 1px #e485f8, 1.25px 1.25px #e485f8, 1.5px 1.5px #e485f8, 1.75px 1.75px #e485f8,*/
/* 2px 2px #e485f8, 2.25px 2.25px #e485f8, 2.5px 2.5px #e485f8, 2.75px 2.75px #e485f8,*/
/* 3px 3px #e485f8, 3.25px 3.25px #e485f8, 3.5px 3.5px #e485f8, 3.75px 3.75px #e485f8,*/
/* 4px 4px #e485f8, 4.25px 4.25px #e485f8, 4.5px 4.5px #e485f8, 4.75px 4.75px #e485f8,*/
/* 5px 5px #e485f8, 5.25px 5.25px #e485f8, 5.5px 5.5px #e485f8, 5.75px 5.75px #e485f8,*/
/* 6px 6px #e485f8;*/
/* animation-delay: 0.4s;*/
/*}*/
/*.playful span:nth-child(7n) {*/
/* color: #ff9c55;*/
/* text-shadow: 0.25px 0.25px #ff5555, 0.5px 0.5px #ff5555, 0.75px 0.75px #ff5555,*/
/* 1px 1px #ff5555, 1.25px 1.25px #ff5555, 1.5px 1.5px #ff5555, 1.75px 1.75px #ff5555,*/
/* 2px 2px #ff5555, 2.25px 2.25px #ff5555, 2.5px 2.5px #ff5555, 2.75px 2.75px #ff5555,*/
/* 3px 3px #ff5555, 3.25px 3.25px #ff5555, 3.5px 3.5px #ff5555, 3.75px 3.75px #ff5555,*/
/* 4px 4px #ff5555, 4.25px 4.25px #ff5555, 4.5px 4.5px #ff5555, 4.75px 4.75px #ff5555,*/
/* 5px 5px #ff5555, 5.25px 5.25px #ff5555, 5.5px 5.5px #ff5555, 5.75px 5.75px #ff5555,*/
/* 6px 6px #ff5555;*/
/* animation-delay: 0.25s;*/
/*}*/
.printer {
cursor: pointer;
color: var(--white);
background: var(--translucent);
border-radius: 10px;
padding-left: 10px;
padding-right: 10px;
}
#bannerWave1 {
height: 84px;
background: var(--bannerWave1);
position: absolute;
width: 200%;
bottom: 0;
z-index: 10;
animation: gradientBG 120s linear infinite;
}
#bannerWave2 {
height: 100px;
background: var(--bannerWave2);
position: absolute;
width: 400%;
bottom: 0;
z-index: 5;
animation: gradientBG 120s linear infinite;
}
/* 光标 */
.cursor {
margin-left: 1px;
animation: hideToShow 0.7s infinite;
font-weight: 200;
}
.el-icon-arrow-down {
font-size: 40px;
font-weight: bold;
color: var(--white);
position: absolute;
bottom: 60px;
animation: my-shake 1.5s ease-out infinite;
z-index: 15;
cursor: pointer;
}
.page-container-wrap {
background: var(--background);
position: relative;
}
.page-container {
display: flex;
justify-content: center;
width: 90%;
padding: 0 20px 40px 20px;
margin: 0 auto;
flex-direction: row;
}
.recent-posts {
width: 70%;
}
.announcement {
padding: 22px;
border: 1px dashed var(--lightGray);
color: var(--greyFont);
border-radius: 10px;
display: flex;
max-width: 780px;
margin: 40px auto 40px;
}
.announcement i {
color: var(--themeBackground);
font-size: 22px;
margin: auto 0;
animation: scale 0.8s ease-in-out infinite;
}
.announcement div div {
margin-left: 20px;
line-height: 30px;
}
.aside-content {
width: calc(30% - 40px);
user-select: none;
margin-top: 40px;
margin-right: 40px;
max-width: 300px;
float: right;
}
.pagination-wrap {
display: flex;
justify-content: center;
margin-top: 40px;
}
.pagination {
padding: 13px 15px;
border: 1px solid var(--lightGray);
border-radius: 3rem;
color: var(--greyFont);
width: 100px;
user-select: none;
cursor: pointer;
text-align: center;
}
.pagination:hover {
border: 1px solid var(--themeBackground);
color: var(--themeBackground);
box-shadow: 0 0 5px var(--themeBackground);
}
.ais-SearchBox-input {
padding: 0 14px;
height: 30px;
width: calc(100% - 50px);
outline: 0;
border: 2px solid var(--lightGreen);
border-right: 0;
border-radius: 40px;
color: var(--maxGreyFont);
background: var(--white);
opacity: 0.5;
}
@media screen and (max-width: 1100px) {
.recent-posts {
width: 100%;
}
.page-container {
width: 100%;
}
}
@media screen and (max-width: 1000px) {
.page-container {
/* 文章栏与侧标栏垂直排列 */
flex-direction: column;
}
.aside-content {
width: 100%;
max-width: unset;
float: unset;
margin: 40px auto 0;
}
}
@media screen and (max-width: 768px) {
h1 {
font-size: 35px;
}
}
</style>

@ -1,629 +0,0 @@
<template>
<div class="letter-wrap">
<div id="jsi-cherry-container" style="z-index: -99;">
<canvas width="646" height="754" position="absolute" top="0"></canvas>
</div>
<section class="container" id="contact">
<form class="flip">
<div class="front">
<h2>To&nbsp;&nbsp;Ming</h2>
<a id="flip2back" href="#">Flip</a>
</div>
<div id="content" class="back">
<div id="letter">
<div class="container">
<div class="flip">
<div class="front"></div>
<div class="back">
<p class="letter">Ming<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;夜にはいつも寒いよねでも手を繋いでいると暖かくなるよ<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;どんなに寒い夜も君と二人でいればちっとも寒くない<br><br>
<p style="float:right; display:block; width:80px;">Hao</p><span class="typed-cursor"
style="animation-iteration-count: infinite;">|</span>
<a id="close" href="#">Close</a>
</div>
</div>
</div>
</div>
<div id="top">
<a id="flip" href="#contact">Flip</a>
</div>
<div id="lid" class="container">
<div class="flip">
<div class="front">
<a id="open" href="#content"><span style="background-position: 0px -150px;"></span></a>
</div>
<div class="back"></div>
</div>
</div>
</div>
</form>
</section>
<div id="footer">
<audio id="music2" preload="auto" loop="" src=""></audio>
<a id="music_btn2" href="javascript:playPause();" style="opacity: 1;"></a>
</div>
</div>
</template>
<script>
export default {
data() {
return {};
},
created() {
},
methods: {}
}
</script>
<style scoped>
.letter-wrap {
font-family: Satisfy, serif;
}
#jsi-cherry-container {
position: absolute;
top: 0;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background-color: transparent;
overflow: hidden;
opacity: 0.618;
z-index: 99;
}
#footer {
/*width: 100%; */
position: fixed;
/*bottom: 100px;*/
top: 10px;
right: 10px;
}
#music_btn2 {
position: relative;
margin: 0 auto;
display: block;
width: 32px;
height: 32px;
background: url(https://haiyong.site/demo/eluvletter/images/play.png) no-repeat;
cursor: pointer;
opacity: 0.2;
}
body {
opacity: 0;
}
span {
display: block;
width: 150px;
height: 150px;
background: url(https://haiyong.site/demo/eluvletter/images/stitch.png) no-repeat;
background-position: 0 0;
}
.typed-cursor {
opacity: 0;
-webkit-animation: blink 0.7s infinite;
-moz-animation: blink 0.7s infinite;
animation: blink 0.7s infinite;
}
@keyframes blink {
0% {
opacity: 0;
}
50% {
opacity: 0;
}
100% {
opacity: 0;
}
}
@-webkit-keyframes blink {
0% {
opacity: 0;
}
50% {
opacity: 0;
}
100% {
opacity: 0;
}
}
@-moz-keyframes blink {
0% {
opacity: 0;
}
50% {
opacity: 0;
}
100% {
opacity: 0;
}
}
/* reset */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline;
}
html {
line-height: 1;
content-zooming: none;
}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
display: block;
}
/* body */
body {
font-family: Satisfy, serif;
color: #837362;
background: #fbf8f7;
}
h2 {
font-size: 1.5em;
line-height: 1.6;
float: left;
font-family: Satisfy, serif;
}
/* links */
a {
color: #9b4849;
text-decoration: none;
display: block;
}
a:hover {
color: #783839;
}
#open {
width: 150px;
text-align: center;
margin-top: 50px;
margin-left: 200px;
}
#flip {
margin: 160px 20px 0 0;
float: right;
}
#flip2back {
margin-top: 150px;
float: right;
}
#close {
position: absolute;
bottom: 10px;
right: 10px;
}
/*****************************/
section.container {
position: relative;
width: 600px;
height: 300px;
margin: 280px auto 0;
perspective: 1000px;
-webkit-perspective: 1000px;
-moz-perspective: 1000px;
}
section.container > form.flip {
width: 100%;
height: 100%;
position: absolute;
-webkit-transform: rotateY(180deg);
-moz-transform: rotateY(180deg);
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-webkit-transition: -webkit-transform 0.7s 0s;
-moz-transition: -moz-transform 0.7s 0s;
-webkit-transform-origin: center center;
-moz-transform-origin: center center;
}
section.container > form.flip > .front, section.container > form.flip > .back {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
}
section.container > form.flip > .back {
-webkit-transform: rotateY(180deg);
-moz-transform: rotateY(180deg);
transform: rotateY(180deg);
background: #837362;
box-shadow: inset 0 10px 30px -10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.2);
}
section.container:target > form.flip {
-webkit-transform: rotateY(0deg);
-moz-transform: rotateY(0deg);
transform: rotateY(0deg);
}
.no-csstransforms3d section.container:target > form.flip > .back {
display: none;
}
.container#lid {
position: relative;
width: 100%;
height: 50%;
-webkit-perspective: 800px;
-moz-perspective: 800px;
perspective: 800px;
z-index: 2;
transition: z-index 0s 1s;
-moz-transition: z-index 0s 1s;
-webkit-transition: z-index 0s 1s;
}
.no-csstransforms3d .container#lid {
-webkit-transition: none;
-moz-transition: none;
transition: none;
}
#content:target .container#lid {
z-index: -1;
transition: z-index 0s .5s;
-moz-transition: z-index 0s .5s;
-webkit-transition: z-index 0s .5s;
}
.no-csstransforms3d #content:target .container#lid {
-webkit-transition: none;
-moz-transition: none;
transition: none;
}
.no-csstransforms3d .container#lid .back {
display: none;
}
.no-csstransforms3d #content:target .container#lid .back {
display: block;
top: -150px;
}
#lid .flip {
width: 100%;
height: 100%;
}
#lid .flip {
position: absolute;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transition: -webkit-transform 0.5s 1s;
-moz-transition: -moz-transform 0.5s 1s;
transition: -moz-transform 0.5s 1s;
-webkit-transform-origin: left top;
-moz-transform-origin: left top;
transform-origin: left top;
}
#lid .flip > .front, #lid .flip > .back {
position: absolute;
width: 100%;
height: 100%;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
backface-visibility: hidden;
}
#lid .flip > .back {
-webkit-transform: rotateX(180deg);
-moz-transform: rotateX(180deg);
transform: rotateX(180deg);
}
#content:target #lid .flip {
-webkit-transform: rotateX(180deg);
-moz-transform: rotateX(180deg);
transform: rotateX(180deg);
-webkit-transition-duration: 0.5s;
-moz-transition-duration: 0.5s;
transition-duration: 0.5s;
-webkit-transition-delay: 0s;
-moz-transition-delay: 0s;
transition-delay: 0s;
}
#letter .flip > div, #lid .flip > div, section.container > form.flip > div {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#lid .flip .front, section.container > form.flip .front {
background: beige url("https://haiyong.site/demo/eluvletter/images/bg.png");
border: 1px #eae1d5 solid;
box-shadow: inset 0 0 10px 1px rgba(255, 255, 255, 0.6), 0 2px 3px -2px rgba(0, 0, 0, 0.6);
padding: 20px 30px;
color: #837362;
text-shadow: 0 1px 0 #fff, 0 1px 0 #fff;
}
section.container > form.flip > .front {
font-size: 1.25em;
background: beige url("https://haiyong.site/demo/eluvletter/images/bg.png");
background: url("https://haiyong.site/demo/eluvletter/images/bg.png") no-repeat 450px 20px, url("https://haiyong.site/demo/eluvletter/images/bg.png");
padding: 120px 20px 20px 40%;
border: 1px #eae1d5 solid;
}
#lid .flip .front {
font-size: 1.25em;
border-radius: 0 0 40px 40px;
}
#lid .flip .back {
background: #837362;
border-radius: 40px 40px 0 0;
border: 35px solid rgba(255, 255, 255, 0.1);
border-bottom: none;
box-shadow: inset 0 10px 30px 10px rgba(0, 0, 0, 0.1);
}
#top {
text-align: right;
background: beige url("https://haiyong.site/demo/eluvletter/images/bg.png");
background: -moz-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(163, 140, 130, 0.17) 100%), url("https://haiyong.site/demo/eluvletter/images/bg.png");
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(100%, rgba(163, 140, 130, 0.17))), url("https://haiyong.site/demo/eluvletter/images/bg.png");
background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(163, 140, 130, 0.17) 100%), url("https://haiyong.site/demo/eluvletter/images/bg.png");
background: -o-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(163, 140, 130, 0.17) 100%), url("https://haiyong.site/demo/eluvletter/images/bg.png");
background: -ms-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(163, 140, 130, 0.17) 100%), url("https://haiyong.site/demo/eluvletter/images/bg.png");
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
height: 65%;
position: absolute;
left: 0;
bottom: 0;
z-index: 1;
border: 1px #eae1d5 solid;
box-shadow: inset 0 0 10px 1px rgba(255, 255, 255, 0.6), 0 -2px 4px -3px rgba(0, 0, 0, 0.75), 0 2px 3px -2px rgba(0, 0, 0, 0.6);
}
#letter {
background: #fafafa;
width: 90%;
height: 95%;
position: absolute;
left: 5%;
top: 5%;
z-index: 0;
-webkit-transition: .5s .5s;
-moz-transition: .5s .5s;
-o-transition: 0s 0s;
transition: 0s 0s;
}
#content:target #letter {
top: -40%;
-o-transition: .5s .5s;
transition: .5s .5s;
}
#letter .container {
position: absolute;
width: 100%;
/*height: 50%;*/
-webkit-perspective: 800px;
-moz-perspective: 800px;
perspective: 800px;
top: 0;
left: 0;
-webkit-transition: 0s 0s;
-moz-transition: 0s 0s;
transition: 0s 0s;
z-index: 1;
}
#letter .flip {
width: 100%;
height: 100%;
}
#letter .flip {
position: absolute;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transition: -webkit-transform 0.5s 0s;
-moz-transition: -moz-transform 0.5s 0s;
transition: -moz-transform 0.5s 0s;
-webkit-transform-origin: left top;
-moz-transform-origin: left top;
transform-origin: left top;
}
#letter .flip > .front, #letter .flip > .back {
position: absolute;
width: 100%;
height: 100%;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
backface-visibility: hidden;
}
#letter .flip > .back {
-webkit-transform: rotateX(180deg);
-moz-transform: rotateX(180deg);
transform: rotateX(180deg);
}
#content:target #letter .flip {
-webkit-transform: rotateX(180deg);
-moz-transform: rotateX(180deg);
transform: rotateX(180deg);
-webkit-transition-duration: 0.5s;
-moz-transition-duration: 0.5s;
transition-duration: 0.5s;
-webkit-transition-delay: 1s;
-moz-transition-delay: 1s;
transition-delay: 1s;
}
#content:target #letter .container {
z-index: -1;
-webkit-transition: z-index 0s 1.5s;
-moz-transition: z-index 0s 1.5s;
transition: z-index 0s 1.5s;
}
#letter .flip .front {
background: #fafafa;
box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.2);
}
.no-csstransforms3d #content:target #letter .flip .front {
display: none;
}
#letter .flip .back {
background: #fafafa;
background: -webkit-linear-gradient(top, #fafafa 90%, #f7f7f7 100%);
background: -moz-linear-gradient(top, #fafafa 80%, #f7f7f7 100%);
padding: 40px 40px 0;
font-size: 18px;
line-height: 1.4;
border-bottom: 1px solid rgba(255, 255, 255, 0.5);
box-shadow: 0 -5px 8px -4px rgba(0, 0, 0, 0.15);
}
.no-csstransforms3d #content:target #letter .flip .back {
top: -140px;
}
input[type="text"] {
background: transparent;
border: none;
border-bottom: 1px dotted #837362;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
width: 50%;
-webkit-appearance: none;
}
input[type="text"]:focus {
outline: none;
border-bottom: 1px solid #837362;
-webkit-appearance: none;
}
textarea {
margin: 10px auto 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 90%;
height: 160px;
padding: 10px;
display: block;
background: transparent;
background: rgba(255, 255, 255, 0.07);
border: 1px dashed #c8bfb6;
}
textarea:focus {
outline: none;
background-color: rgba(255, 255, 255, 0.12);
border-color: rgba(255, 255, 255, 0.46);
box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
}
input[type="submit"] {
cursor: pointer;
display: block;
margin: 10px auto;
-webkit-appearance: none;
font-size: .9em;
background: #9b4849;
padding: 5px 20px;
border-radius: 3px;
border: 1px solid #9b4849;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
color: #fff;
-webkit-transition: background .5s;
}
input[type="submit"]:hover {
background: #783839;
}
/*-------ie8-----------*/
.container.target > form.flip > .back, #content.target #letter .flip .front {
display: none;
}
#content.target .container#lid {
z-index: -1;
}
#content.target .container#lid .back {
display: block;
top: -150px;
}
#content.target #letter {
top: -40%;
}
#content.target #letter .flip .back {
top: -140px;
}
</style>

File diff suppressed because it is too large Load Diff

@ -1,183 +0,0 @@
<template>
<div>
<div>
<el-image style="animation: header-effect 2s"
class="background-image"
v-once
lazy
:src="$constant.random_image+new Date()+Math.floor(Math.random()*10)"
fit="cover">
<div slot="error" class="image-slot background-image-error"></div>
</el-image>
<!-- 输入框 -->
<div class="message-in" style="text-align: center">
<h2 class="message-title">树洞</h2>
<div>
<input class="message-input"
type="text"
style="outline: none;width: 70%"
placeholder="留下点什么啦~"
v-model="messageContent"
@click="show = true"
maxlength="60"/>
<button v-show="show"
style="margin-left: 12px;cursor: pointer;width: 20%"
@click="submitMessage"
class="message-input">发射
</button>
</div>
</div>
<!-- 弹幕 -->
<div class="barrage-container">
<vue-baberrage :barrageList="barrageList" :loop="true"></vue-baberrage>
</div>
</div>
<div class="comment-wrap">
<div class="comment-content">
<comment :source="$constant.source" :type="'message'" :userId="$constant.userId"></comment>
</div>
<myFooter></myFooter>
</div>
</div>
</template>
<script>
const comment = () => import( "./comment/comment");
const myFooter = () => import( "./common/myFooter");
export default {
components: {
comment,
myFooter
},
data() {
return {
show: false,
messageContent: "",
// background: {"background": "url(" + this.$store.state.webInfo.backgroundImage + ") center center / cover no-repeat"},
barrageList: []
};
},
created() {
this.getTreeHole();
},
methods: {
getTreeHole() {
this.$http.get(this.$constant.baseURL + "/webInfo/listTreeHole")
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
res.data.forEach(m => {
this.barrageList.push({
id: m.id,
avatar: m.avatar,
msg: m.message,
time: Math.floor(Math.random() * 10 + 5)
});
});
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
submitMessage() {
if (this.messageContent.trim() === "") {
this.$message({
message: "你还没写呢~",
type: "warning"
});
return;
}
let treeHole = {
message: this.messageContent.trim()
};
if (!this.$common.isEmpty(this.$store.state.currentUser) && !this.$common.isEmpty(this.$store.state.currentUser.avatar)) {
treeHole.avatar = this.$store.state.currentUser.avatar;
}
this.$http.post(this.$constant.baseURL + "/webInfo/saveTreeHole", treeHole)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.barrageList.push({
id: res.data.id,
avatar: res.data.avatar,
msg: res.data.message,
time: Math.floor(Math.random() * 10 + 5)
});
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
this.messageContent = "";
this.show = false;
}
}
}
</script>
<style scoped>
.message-in {
position: absolute;
left: 50%;
top: 40%;
transform: translate(-50%, -50%);
color: var(--white);
animation: hideToShow 2.5s;
width: 360px;
z-index: 10;
}
.message-title {
user-select: none;
text-align: center;
}
.message-input {
border-radius: 1.2rem;
border: var(--white) 1px solid;
color: var(--white);
background: var(--transparent);
padding: 10px 10px;
}
.message-input::-webkit-input-placeholder {
color: var(--white);
}
.barrage-container {
position: absolute;
top: 50px;
left: 0;
right: 0;
bottom: 0;
height: calc(100% - 50px);
width: 100%;
user-select: none;
overflow: hidden;
}
.comment-wrap {
background: var(--background);
position: absolute;
top: 100vh;
width: 100%;
}
.comment-content {
max-width: 800px;
margin: 0 auto;
padding: 40px 20px;
}
</style>

@ -1,501 +0,0 @@
<template>
<div>
<!-- 网站信息 -->
<div class="card-content1 shadow-box background-opacity">
<!--<el-avatar style="margin-top: 20px" class="user-avatar" :size="120" src="http://s6qc8qkjn.hd-bkt.clouddn.com/userAvatar/Sara11704850554971625.jpg"></el-avatar>-->
<!--<el-avatar style="margin-top: 20px" class="user-avatar" :size="120" src="webInfo.avatar"></el-avatar>-->
<el-avatar style="margin-top: 20px"
class="user-avatar"
:size="120"
:src="!$common.isEmpty($store.state.currentUser)?$store.state.currentUser.avatar:$store.state.webInfo.avatar">
</el-avatar>
<div class="web-name">{{this.$store.state.currentUser.username}}</div>
<div class="web-info">
<div class="blog-info-box">
<span>文章</span>
<span class="blog-info-num">{{ $store.getters.articleTotal }}</span>
</div>
<div class="blog-info-box">
<span>分类</span>
<span class="blog-info-num">{{ sortInfo.length }}</span>
</div>
<div class="blog-info-box">
<span>访问量</span>
<span class="blog-info-num">{{ webInfo.historyAllCount }}</span>
</div>
</div>
<a class="collection-btn" @click="showTip()">
<i class="el-icon-star-off" style="margin-right: 2px"></i>朋友圈
</a>
</div>
<!-- 搜索 -->
<div style="padding: 15px;border-radius: 10px;margin-top: 30px;animation: hideToShow 1s ease-in-out"
class="shadow-box background-opacity wow">
<div style="color: var(--lightGreen);font-size: 20px;font-weight: bold;margin-bottom: 10px">
搜索
</div>
<div style="display: flex">
<input class="ais-SearchBox-input" type="text"
v-model="drugName"
placeholder="搜索药品" maxlength="32">
<div class="ais-SearchBox-submit" @click="selectDrugDetails()">
<svg style="margin-top: 3.5px;margin-left: 18px" viewBox="0 0 1024 1024" width="20" height="20">
<path
d="M51.2 508.8c0 256.8 208 464.8 464.8 464.8s464.8-208 464.8-464.8-208-464.8-464.8-464.8-464.8 208-464.8 464.8z"
fill="#51C492"></path>
<path
d="M772.8 718.4c48-58.4 76.8-132.8 76.8-213.6 0-186.4-151.2-337.6-337.6-337.6-186.4 0-337.6 151.2-337.6 337.6 0 186.4 151.2 337.6 337.6 337.6 81.6 0 156-28.8 213.6-76.8L856 896l47.2-47.2-130.4-130.4zM512 776c-149.6 0-270.4-121.6-270.4-271.2S363.2 233.6 512 233.6c149.6 0 271.2 121.6 271.2 271.2C782.4 654.4 660.8 776 512 776z"
fill="#FFFFFF"></path>
</svg>
</div>
</div>
</div>
<!-- 分类 -->
<div class="shadow-box background-opacity wow"
style="margin-top: 30px;padding: 25px 25px 5px;border-radius: 10px;animation: hideToShow 1s ease-in-out">
<div class="card-content2-title">
<i class="el-icon-folder-opened card-content2-icon"></i>
<span>药品简述</span>
</div>
<!-- <div v-for="(sort, index) in sortInfo"-->
<!-- :key="index"-->
<!-- class="post-sort"-->
<!-- @click="$router.push({path: '/sort', query: {sortId: sort.id}})">-->
<!-- <div>-->
<!-- <span v-for="(s, i) in sort.sortName.split('')" :key="i">{{ s }}</span>-->
<!-- </div>-->
<!-- </div>-->
{{drugDetails}}
</div>
<!-- 速览 -->
<div v-for="(sort, index) in sortInfo"
@click="selectSort(sort)"
:key="index"
:style="{background: $constant.sortColor[index % $constant.sortColor.length]}"
class="shadow-box-mini background-opacity wow"
style="position: relative;padding: 10px 25px 15px;border-radius: 10px;animation: hideToShow 1s ease-in-out;margin-top: 30px;cursor: pointer;color: var(--white)">
<div>速览</div>
<div class="sort-name">
{{sort.sortName}}
</div>
<div style="font-weight: bold;margin-top: 15px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden">
{{sort.sortDescription}}
</div>
</div>
<!-- 推荐文章 -->
<div v-if="!$common.isEmpty(recommendArticles)"
style="padding: 25px;border-radius: 10px;margin-top: 30px;animation: hideToShow 1s ease-in-out"
class="shadow-box background-opacity wow">
<div class="card-content2-title">
<i class="el-icon-reading card-content2-icon"></i>
<span>推荐文章</span>
</div>
<div v-for="(article, index) in recommendArticles"
:key="index"
@click="$router.push({path: '/article', query: {id: article.id}})">
<div class="aside-post-detail">
<div class="aside-post-image">
<el-image lazy class="my-el-image" :src="article.articleCover" fit="cover">
<div slot="error" class="image-slot">
<div class="error-aside-image">
{{article.username}}
</div>
</div>
</el-image>
</div>
<div class="aside-post-title">
{{ article.articleTitle }}
</div>
</div>
<div class="aside-post-date">
<i class="el-icon-date" style="color: var(--greyFont)"></i>{{ article.createTime }}
</div>
</div>
</div>
<!-- 速览 -->
<!-- <div v-for="(sort, index) in sortInfo"-->
<!-- @click="selectSort(sort)"-->
<!-- :key="index"-->
<!-- :style="{background: $constant.sortColor[index % $constant.sortColor.length]}"-->
<!-- class="shadow-box-mini background-opacity wow"-->
<!-- style="position: relative;padding: 10px 25px 15px;border-radius: 10px;animation: hideToShow 1s ease-in-out;margin-top: 30px;cursor: pointer;color: var(&#45;&#45;white)">-->
<!-- <div>速览</div>-->
<!-- <div class="sort-name">-->
<!-- {{sort.sortName}}-->
<!-- </div>-->
<!-- <div style="font-weight: bold;margin-top: 15px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden">-->
<!-- {{sort.sortDescription}}-->
<!-- </div>-->
<!-- </div>-->
<!-- 赞赏 -->
<div class="shadow-box-mini background-opacity wow admire-box"
v-if="!$common.isEmpty(admires)">
<div style="font-weight: bold;margin-bottom: 20px">🧨援助</div>
<div>
<vue-seamless-scroll :data="admires" style="height: 200px;overflow: hidden">
<div v-for="(item, i) in admires"
style="display: flex;justify-content: space-between"
:key="i">
<div style="display: flex">
<el-avatar
style="margin-bottom: 10px"
:size="36"
:src="item.avatar ">
</el-avatar>
<div style="margin-left: 10px;height: 36px;line-height: 36px;overflow: hidden;max-width: 80px">
{{ item.username }}
</div>
</div>
<div style="height: 36px;line-height: 36px">
{{ item.admire }}
</div>
</div>
</vue-seamless-scroll>
</div>
<div class="admire-btn" @click="showAdmire()">
援助
</div>
</div>
<!-- 微信 -->
<el-dialog title="援助"
:visible.sync="showAdmireDialog"
width="25%"
:append-to-body="true"
destroy-on-close
center>
<div>
<div class="admire-image"></div>
<div>
<div class="admire-content">1. 身处热闹人间没有谁可以保持真正的清醒不踩到生死边界活得都是一场梦</div>
<div class="admire-content">2. 如果您愿意帮助其他病友可以伸出您的援助之手我们将会将赞助全部援助到病友手中</div>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import vueSeamlessScroll from "vue-seamless-scroll";
import {listTable1, selectDetails} from "@/utils/table1";
export default {
components: {
// vueSeamlessScroll
},
data() {
return {
pagination: {
current: 1,
size: 5,
recommendStatus: true
},
recommendArticles: [],
admires: [],
showAdmireDialog: false,
articleSearch: "",
drugDetails: '',
drugName:''
}
},
computed: {
webInfo() {
return this.$store.state.webInfo;
},
sortInfo() {
return this.$store.state.sortInfo;
}
},
created() {
this.getRecommendArticles();
this.getAdmire();
},
methods: {
updateDrugName(drugName) {
this.drugName = drugName;
this.selectDrugDetails();
},
selectDrugDetails(){
selectDetails(this.drugName).then(response => {
this.drugDetails = response;
});
},
selectSort(sort) {
this.$emit("selectSort", sort);
},
selectArticle() {
this.$emit("selectArticle", this.articleSearch);
},
showAdmire() {
if (this.$common.isEmpty(this.$store.state.currentUser)) {
this.$message({
message: "请先登录!",
type: "error"
});
return;
}
this.showAdmireDialog = true;
},
getAdmire() {
this.$http.get(this.$constant.baseURL + "/webInfo/getAdmire")
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.admires = res.data;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
getRecommendArticles() {
this.$http.post(this.$constant.baseURL + "/article/listArticle", this.pagination)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.recommendArticles = res.data.records;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
showTip() {
this.$router.push({path: '/weiYan'});
}
}
}
</script>
<style scoped>
.card-content1 {
background: linear-gradient(-45deg, #e8d8b9, #eccec5, #a3e9eb, #bdbdf0, #eec1ea);
background-size: 400% 400%;
animation: gradientBG 10s ease infinite;
display: flex;
flex-direction: column;
align-items: center;
border-radius: 10px;
position: relative;
/*color: var(--white);*/
overflow: hidden;
}
.card-content1 :not(:first-child) {
z-index: 10;
}
.web-name {
font-size: 30px;
font-weight: bold;
margin: 20px 0;
}
.web-info {
width: 80%;
display: flex;
flex-direction: row;
justify-content: space-around;
}
.blog-info-box {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
}
.blog-info-num {
margin-top: 12px;
}
.collection-btn {
position: relative;
margin-top: 12px;
background: var(--lightGreen);
cursor: pointer;
width: 65%;
height: 35px;
border-radius: 1rem;
text-align: center;
line-height: 35px;
color: var(--white);
overflow: hidden;
z-index: 1;
margin-bottom: 25px;
}
.collection-btn::before {
background: var(--gradualRed);
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
content: "";
transform: scaleX(0);
transform-origin: 0;
transition: transform 0.5s ease-out;
transition-timing-function: cubic-bezier(0.45, 1.64, 0.47, 0.66);
border-radius: 1rem;
z-index: -1;
}
.collection-btn:hover::before {
transform: scaleX(1);
}
.card-content2-title {
font-size: 18px;
margin-bottom: 20px;
}
.card-content2-icon {
color: var(--red);
margin-right: 5px;
animation: scale 1s ease-in-out infinite;
}
.aside-post-detail {
display: flex;
cursor: pointer;
}
.aside-post-image {
width: 40%;
border-radius: 0.2rem;
margin-right: 8px;
overflow: hidden;
}
.error-aside-image {
background: var(--themeBackground);
color: var(--white);
padding: 10px;
text-align: center;
width: 100%;
height: 100%;
}
.aside-post-title {
width: 60%;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.aside-post-date {
margin-top: 8px;
margin-bottom: 20px;
color: var(--greyFont);
font-size: 12px;
}
.post-sort {
border-radius: 1rem;
margin-bottom: 15px;
line-height: 30px;
transition: all 0.3s;
}
.post-sort:hover {
background: var(--themeBackground);
padding: 2px 15px;
cursor: pointer;
color: var(--white);
}
.sort-name {
font-weight: bold;
font-size: 25px;
margin-top: 15px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.sort-name:after {
top: 74px;
width: 22px;
left: 26px;
height: 2px;
background: var(--white);
content: "";
border-radius: 1px;
position: absolute;
}
.admire-box {
background: var(--springBg) center center / cover no-repeat;
padding: 25px;
border-radius: 10px;
animation: hideToShow 1s ease-in-out;
margin-top: 30px;
}
.admire-btn {
padding: 13px 15px;
background: var(--maxLightRed);
border-radius: 3rem;
color: var(--white);
width: 100px;
user-select: none;
cursor: pointer;
text-align: center;
margin: 20px auto 0;
transition: all 1s;
}
.admire-btn:hover {
transform: scale(1.2);
}
.admire-image {
margin: 0 auto 10px;
border-radius: 10px;
height: 150px;
width: 150px;
background: var(--admireImage) center center / cover no-repeat;
}
.admire-content {
font-size: 12px;
color: var(--maxGreyFont);
line-height: 1.5;
margin: 5px;
}
.ais-SearchBox-input {
padding: 0 14px;
height: 30px;
width: calc(100% - 50px);
outline: 0;
border: 2px solid var(--lightGreen);
border-right: 0;
border-radius: 40px 0 0 40px;
color: var(--maxGreyFont);
background: var(--white);
}
.ais-SearchBox-submit {
height: 30px;
width: 50px;
border: 2px solid var(--lightGreen);
border-left: 0;
border-radius: 0 40px 40px 0;
background: var(--white);
cursor: pointer;
}
</style>

@ -1,204 +0,0 @@
<template>
<div>
<!-- 两句诗 -->
<div class="my-animation-slide-top">
<twoPoem></twoPoem>
</div>
<div style="background: var(--background);padding-top: 40px;" class="my-animation-slide-bottom">
<!-- 标签 -->
<div class="sort-warp shadow-box" v-if="!$common.isEmpty(sort) && !$common.isEmpty(sort.labels)">
<div v-for="(label, index) in sort.labels" :key="index"
:class="{isActive: !$common.isEmpty(labelId) && parseInt(labelId) === label.id}"
@click="listArticle(label)">
<proTag :info="label.labelName+' '+label.countOfLabel"
:color="$constant.before_color_list[Math.floor(Math.random() * 6)]"
style="margin: 12px">
</proTag>
</div>
</div>
<!-- 文章 -->
<div class="article-wrap">
<articleList :articleList="articles"></articleList>
<div class="pagination-wrap">
<div @click="pageArticles()" class="pagination" v-if="pagination.total !== articles.length">
下一页
</div>
<div v-else style="user-select: none">
~~到底啦~~
</div>
</div>
</div>
<!-- 页脚 -->
<myFooter></myFooter>
</div>
</div>
</template>
<script>
const twoPoem = () => import( "./common/twoPoem");
const proTag = () => import( "./common/proTag");
const articleList = () => import( "./articleList");
const myFooter = () => import( "./common/myFooter");
export default {
components: {
twoPoem,
proTag,
articleList,
myFooter
},
data() {
return {
sortId: this.$route.query.sortId,
labelId: this.$route.query.labelId,
sort: null,
pagination: {
current: 1,
size: 10,
total: 0,
searchKey: "",
sortId: this.$route.query.sortId,
labelId: this.$route.query.labelId
},
articles: []
}
},
computed: {},
watch: {
$route() {
this.pagination = {
current: 1,
size: 10,
total: 0,
searchKey: "",
sortId: this.$route.query.sortId,
labelId: this.$route.query.labelId
};
this.articles.splice(0, this.articles.length);
this.sortId = this.$route.query.sortId;
this.labelId = this.$route.query.labelId;
this.getSort();
this.getArticles();
}
},
created() {
this.getSort();
this.getArticles();
},
mounted() {
},
methods: {
pageArticles() {
this.pagination.current = this.pagination.current + 1;
this.getArticles();
},
getSort() {
let sortInfo = this.$store.state.sortInfo;
if (!this.$common.isEmpty(sortInfo)) {
let sortArray = sortInfo.filter(f => {
return f.id === parseInt(this.sortId);
});
if (!this.$common.isEmpty(sortArray)) {
this.sort = sortArray[0];
}
}
},
listArticle(label) {
this.labelId = label.id;
this.pagination = {
current: 1,
size: 10,
total: 0,
searchKey: "",
sortId: this.$route.query.sortId,
labelId: label.id
};
this.articles.splice(0, this.articles.length);
this.$nextTick(() => {
this.getArticles();
});
},
getArticles() {
this.$http.post(this.$constant.baseURL + "/article/listArticle", this.pagination)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.articles = this.articles.concat(res.data.records);
this.pagination.total = res.data.total;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}
}
}
</script>
<style scoped>
.sort-warp {
width: 70%;
max-width: 780px;
margin: 0 auto;
padding: 20px;
border-radius: 10px;
display: flex;
flex-wrap: wrap;
}
.article-wrap {
width: 70%;
margin: 40px auto;
min-height: 600px;
}
.isActive {
animation: scale 1.5s ease-in-out infinite;
}
.pagination-wrap {
display: flex;
justify-content: center;
margin-top: 40px;
}
.pagination {
padding: 13px 15px;
border: 1px solid var(--lightGray);
border-radius: 3rem;
color: var(--greyFont);
width: 100px;
user-select: none;
cursor: pointer;
text-align: center;
}
.pagination:hover {
border: 1px solid var(--themeBackground);
color: var(--themeBackground);
box-shadow: 0 0 5px var(--themeBackground);
}
@media screen and (max-width: 900px) {
.sort-warp {
width: 90%;
}
.article-wrap {
width: 90%;
}
}
</style>

@ -1,232 +0,0 @@
<template>
<div>
<div class="travel-container">
<!-- 封面 -->
<div class="travel-header my-animation-slide-top">
<!-- 背景图片 -->
<video class="index-video" autoplay="autoplay" muted="muted" loop="loop"
:src="$constant.favoriteVideo2">
</video>
<div style="position: absolute;left: 20px;top: 20px">
<!-- 标题 -->
<div style="margin: 10px">
<div style="font-size: 36px;font-weight: bold;line-height: 1.5;margin-top: 20px">
健康亲情和爱要比成功名利更重要
</div>
</div>
</div>
</div>
<div class="travel-content my-animation-slide-bottom">
<!-- 标签 -->
<div class="photo-title-warp" v-if="!$common.isEmpty(photoTitleList)">
<div v-for="(item, index) in photoTitleList" :key="index"
:class="{isActive: photoPagination.classify === item.classify}"
@click="changePhotoTitle(item.classify)">
<proTag :info="item.classify+' '+item.count"
:color="$constant.before_color_list[Math.floor(Math.random() * 6)]"
style="margin: 12px">
</proTag>
</div>
</div>
<div class="photo-title">
{{photoPagination.classify}}
</div>
<photo :resourcePathList="photoList"></photo>
<div class="pagination-wrap">
<div @click="pagePhotos()" class="pagination" v-if="photoPagination.total !== photoList.length">
下一页
</div>
<div v-else style="user-select: none">
~~到底啦~~
</div>
</div>
</div>
</div>
<!-- 页脚 -->
<div style="background: var(--favoriteBg)">
<myFooter></myFooter>
</div>
</div>
</template>
<script>
const myFooter = () => import( "./common/myFooter");
const photo = () => import( "./common/photo");
const proTag = () => import( "./common/proTag");
export default {
components: {
photo,
proTag,
myFooter
},
data() {
return {
photoPagination: {
current: 1,
size: 10,
total: 0,
resourceType: "lovePhoto",
classify: ""
},
photoTitleList: [
{ classify: "公益计划", count: 6 },
{ classify: "科研项目", count: 2 },
],
photoList: []
}
},
computed: {},
watch: {},
created() {
this.getPhotoTitles();
this.changePhotoTitle("公益计划");
},
mounted() {
},
methods: {
getPhotoTitles() {
this.$http.get(this.$constant.baseURL + "/webInfo/listAdminLovePhoto")
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.photoTitleList = res.data;
this.photoPagination = {
current: 1,
size: 10,
total: 0,
resourceType: "lovePhoto",
classify: this.photoTitleList[0].classify
};
this.changePhoto();
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
changePhotoTitle(classify) {
if (classify !== this.photoPagination.classify) {
this.photoPagination = {
current: 1,
size: 10,
total: 0,
resourceType: "lovePhoto",
classify: classify
};
this.photoList = [];
this.changePhoto();
}
},
pagePhotos() {
this.photoPagination.current = this.photoPagination.current + 1;
this.changePhoto();
},
changePhoto() {
this.$http.post(this.$constant.baseURL + "/webInfo/listResourcePath", this.photoPagination)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.photoList = this.photoList.concat(res.data.records);
this.photoPagination.total = res.data.total;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}
}
}
</script>
<style scoped>
.travel-container {
padding: 25px;
background: var(--favoriteBg);
}
.travel-header {
margin: 60px auto 30px;
height: 400px;
position: relative;
overflow: hidden;
border-radius: 20px;
max-width: 1200px;
color: var(--white);
user-select: none;
}
.index-video {
width: 100%;
height: 100%;
object-fit: cover;
background: var(--lightGreen);
}
.travel-content {
margin: 0 auto;
max-width: 1200px;
}
.photo-title-warp {
max-width: 1150px;
margin: 50px auto;
padding: 20px;
border-radius: 10px;
display: flex;
flex-wrap: wrap;
}
.isActive {
animation: scale 2.5s ease-in-out infinite;
}
.photo-title {
text-align: center;
font-size: 30px;
font-weight: 700;
line-height: 80px;
letter-spacing: 2px;
}
.pagination-wrap {
display: flex;
justify-content: center;
margin-top: 40px;
}
.pagination {
padding: 13px 15px;
border: 1px solid var(--lightGray);
border-radius: 3rem;
color: var(--greyFont);
width: 100px;
user-select: none;
cursor: pointer;
text-align: center;
}
@media screen and (max-width: 1150px) {
.photo-title-warp {
max-width: 780px;
}
}
</style>

@ -1,863 +0,0 @@
<template>
<div>
<!-- 登陆和注册 -->
<div v-if="$common.isEmpty(currentUser)"
class="myCenter in-up-container my-animation-hideToShow">
<!-- 背景图片 -->
<el-image class="my-el-image"
style="position: absolute"
v-once
lazy
:src="$constant.two_poem_image[Math.floor(Math.random() * $constant.two_poem_image.length)]"
fit="cover">
<div slot="error" class="image-slot"></div>
</el-image>
<div class="in-up" id="loginAndRegist">
<div class="form-container sign-up-container">
<div class="myCenter">
<h1>注册</h1>
<input v-model="username" type="text" maxlength="30" placeholder="用户名">
<input v-model="password" type="password" maxlength="30" placeholder="密码">
<input v-model="email" type="email" placeholder="邮箱">
<input v-model="code" type="text" placeholder="验证码" disabled>
<a style="margin: 0" href="#" @click="changeDialog('邮箱验证码')"></a>
<button @click="regist()"></button>
</div>
</div>
<div class="form-container sign-in-container">
<div class="myCenter">
<h1>登录</h1>
<input v-model="account" type="text" placeholder="用户名/邮箱/手机号">
<input v-model="password" type="password" placeholder="密码">
<a href="#" @click="changeDialog('找回密码')"></a>
<button @click="login()"></button>
</div>
</div>
<div class="overlay-container">
<div class="overlay">
<div class="overlay-panel myCenter overlay-left">
<h1>已有帐号</h1>
<p>请登录🚀</p>
<button class="ghost" @click="signIn()"></button>
</div>
<div class="overlay-panel myCenter overlay-right">
<h1>没有帐号</h1>
<p>立即注册吧😃</p>
<button class="ghost" @click="signUp()"></button>
</div>
</div>
</div>
</div>
</div>
<!-- 用户信息 -->
<div v-else class="user-container myCenter my-animation-hideToShow">
<!-- 背景图片 -->
<el-image class="my-el-image"
style="position: absolute"
v-once
lazy
:src="$constant.two_poem_image[Math.floor(Math.random() * $constant.two_poem_image.length)]"
fit="cover">
<div slot="error" class="image-slot"></div>
</el-image>
<div class="shadow-box-mini user-info" style="display: flex">
<div class="user-left">
<div>
<el-avatar class="user-avatar" @click.native="changeDialog('修改头像')" :size="60"
:src="currentUser.avatar"></el-avatar>
</div>
<div class="myCenter" style="margin-top: 12px">
<div class="user-title">
<div>用户名</div>
<div>手机号</div>
<div>邮箱</div>
<div>性别</div>
<div>简介</div>
</div>
<div class="user-content">
<div>
<el-input maxlength="30" v-model="currentUser.username"></el-input>
</div>
<div>
<div v-if="!$common.isEmpty(currentUser.phoneNumber)">
{{ currentUser.phoneNumber }} <span class="changeInfo" @click="changeDialog('修改手机号')"></span>
</div>
<div v-else><span class="changeInfo" @click="changeDialog('绑定手机号')"></span></div>
</div>
<div>
<div v-if="!$common.isEmpty(currentUser.email)">
{{ currentUser.email }} <span class="changeInfo" @click="changeDialog('修改邮箱')"></span>
</div>
<div v-else><span class="changeInfo" @click="changeDialog('绑定邮箱')"></span></div>
</div>
<div>
<el-radio-group v-model="currentUser.gender">
<el-radio :label="0" style="margin-right: 10px">薛定谔的猫</el-radio>
<el-radio :label="1" style="margin-right: 10px"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</div>
<div>
<el-input v-model="currentUser.introduction"
maxlength="60"
type="textarea"
show-word-limit></el-input>
</div>
</div>
</div>
<div style="margin-top: 20px">
<proButton :info="'提交'"
@click.native="submitUserInfo()"
:before="$constant.before_color_2"
:after="$constant.after_color_2">
</proButton>
</div>
</div>
<div class="user-right">
</div>
</div>
</div>
<el-dialog :title="dialogTitle"
:visible.sync="showDialog"
width="30%"
:before-close="clearDialog"
:append-to-body="true"
:close-on-click-modal="false"
center>
<div class="myCenter" style="flex-direction: column">
<div>
<div v-if="dialogTitle === '修改手机号' || dialogTitle === '绑定手机号'">
<div style="margin-bottom: 5px">手机号</div>
<el-input v-model="phoneNumber"></el-input>
<div style="margin-top: 10px;margin-bottom: 5px">验证码</div>
<el-input v-model="code"></el-input>
<div style="margin-top: 10px;margin-bottom: 5px">密码</div>
<el-input v-model="password"></el-input>
</div>
<div v-else-if="dialogTitle === '' || dialogTitle === ''">
<div style="margin-bottom: 5px">邮箱</div>
<el-input v-model="email"></el-input>
<div style="margin-top: 10px;margin-bottom: 5px">验证码</div>
<el-input v-model="code"></el-input>
<div style="margin-top: 10px;margin-bottom: 5px">密码</div>
<el-input v-model="password"></el-input>
</div>
<div v-else-if="dialogTitle === ''">
<uploadPicture :prefix="'userAvatar'" @addPicture="addPicture" :maxSize="1"
:maxNumber="1"></uploadPicture>
</div>
<div v-else-if="dialogTitle === ''">
<div class="myCenter" style="margin-bottom: 12px">
<el-radio-group v-model="passwordFlag">
<el-radio :label="1" style="margin-right: 10px">手机号</el-radio>
<el-radio :label="2">邮箱</el-radio>
</el-radio-group>
</div>
<div v-if="passwordFlag === 1">
<div style="margin-bottom: 5px">手机号</div>
<el-input v-model="phoneNumber"></el-input>
<div style="margin-top: 10px;margin-bottom: 5px">验证码</div>
<el-input v-model="code"></el-input>
<div style="margin-top: 10px;margin-bottom: 5px">新密码</div>
<el-input maxlength="30" v-model="password"></el-input>
</div>
<div v-else-if="passwordFlag === 2">
<div style="margin-bottom: 5px">邮箱</div>
<el-input v-model="email"></el-input>
<div style="margin-top: 10px;margin-bottom: 5px">验证码</div>
<el-input v-model="code"></el-input>
<div style="margin-top: 10px;margin-bottom: 5px">新密码</div>
<el-input maxlength="30" v-model="password"></el-input>
</div>
</div>
<div v-else-if="dialogTitle === ''">
<div>
<div style="margin-bottom: 5px">邮箱</div>
<el-input v-model="email"></el-input>
<div style="margin-top: 10px;margin-bottom: 5px">验证码</div>
<el-input v-model="code"></el-input>
</div>
</div>
</div>
<div style="display: flex;margin-top: 30px" v-show="dialogTitle !== '修改头像'">
<proButton :info="codeString"
v-show="dialogTitle === '修改手机号' || dialogTitle === '绑定手机号' || dialogTitle === '修改邮箱' || dialogTitle === '绑定邮箱' || dialogTitle === '找回密码' || dialogTitle === '邮箱验证码'"
@click.native="getCode()"
:before="$constant.before_color_1"
:after="$constant.after_color_1"
style="margin-right: 20px">
</proButton>
<proButton :info="'提交'"
@click.native="submitDialog()"
:before="$constant.before_color_2"
:after="$constant.after_color_2">
</proButton>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
const proButton = () => import( "./common/proButton");
const uploadPicture = () => import( "./common/uploadPicture");
export default {
components: {
proButton,
uploadPicture
},
data() {
return {
currentUser: this.$store.state.currentUser,
username: "",
account: "",
password: "",
phoneNumber: "",
email: "",
avatar: "",
showDialog: false,
code: "",
dialogTitle: "",
codeString: "验证码",
passwordFlag: null,
intervalCode: null
}
},
computed: {},
created() {
},
methods: {
addPicture(res) {
this.avatar = res;
this.submitDialog()
},
signUp() {
document.querySelector("#loginAndRegist").classList.add('right-panel-active');
},
signIn() {
document.querySelector("#loginAndRegist").classList.remove('right-panel-active');
},
login() {
if (this.$common.isEmpty(this.account) || this.$common.isEmpty(this.password)) {
this.$message({
message: "请输入账号或密码!",
type: "error"
});
return;
}
let user = {
account: this.account.trim(),
password: this.$common.encrypt(this.password.trim())
};
this.$http.post(this.$constant.baseURL + "/user/login", user, false, false)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.$store.commit("loadCurrentUser", res.data);
localStorage.setItem("userToken", res.data.accessToken);
this.account = "";
this.password = "";
this.$router.push({path: '/'});
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
regist() {
if (this.$common.isEmpty(this.username) || this.$common.isEmpty(this.password)) {
this.$message({
message: "请输入用户名或密码!",
type: "error"
});
return;
}
if (this.dialogTitle === "邮箱验证码" && this.$common.isEmpty(this.email)) {
this.$message({
message: "请输入邮箱!",
type: "error"
});
return false;
}
if (this.$common.isEmpty(this.code)) {
this.$message({
message: "请输入验证码!",
type: "error"
});
return;
}
if (this.username.indexOf(" ") !== -1 || this.password.indexOf(" ") !== -1) {
this.$message({
message: "用户名或密码不能包含空格!",
type: "error"
});
return;
}
let user = {
username: this.username.trim(),
code: this.code.trim(),
password: this.$common.encrypt(this.password.trim())
};
if (this.dialogTitle === "邮箱验证码") {
user.email = this.email;
}
this.$http.post(this.$constant.baseURL + "/user/regist", user)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.$store.commit("loadCurrentUser", res.data);
localStorage.setItem("userToken", res.data.accessToken);
this.username = "";
this.password = "";
this.$router.push({path: '/'});
let userToken = this.$common.encrypt(localStorage.getItem("userToken"));
window.open(this.$constant.imBaseURL + "?userToken=" + userToken);
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
submitUserInfo() {
if (!this.checkParameters()) {
return;
}
let user = {
username: this.currentUser.username,
gender: this.currentUser.gender
};
if (!this.$common.isEmpty(this.currentUser.introduction)) {
user.introduction = this.currentUser.introduction.trim();
}
this.$confirm('确认保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
center: true
}).then(() => {
this.$http.post(this.$constant.baseURL + "/user/updateUserInfo", user)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.$store.commit("loadCurrentUser", res.data);
this.currentUser = this.$store.state.currentUser;
this.$message({
message: "修改成功!",
type: "success"
});
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}).catch(() => {
this.$message({
type: 'success',
message: '已取消保存!'
});
});
},
checkParams(params) {
if (this.dialogTitle === "修改手机号" || this.dialogTitle === "绑定手机号" || (this.dialogTitle === "找回密码" && this.passwordFlag === 1)) {
params.flag = 1;
if (this.$common.isEmpty(this.phoneNumber)) {
this.$message({
message: "请输入手机号!",
type: "error"
});
return false;
}
if (!(/^1[345789]\d{9}$/.test(this.phoneNumber))) {
this.$message({
message: "手机号格式有误!",
type: "error"
});
return false;
}
params.place = this.phoneNumber;
return true;
} else if (this.dialogTitle === "修改邮箱" || this.dialogTitle === "绑定邮箱" || this.dialogTitle === "邮箱验证码" || (this.dialogTitle === "找回密码" && this.passwordFlag === 2)) {
params.flag = 2;
if (this.$common.isEmpty(this.email)) {
this.$message({
message: "请输入邮箱!",
type: "error"
});
return false;
}
if (!(/^\w+@[a-zA-Z0-9]{2,10}(?:\.[a-z]{2,4}){1,3}$/.test(this.email))) {
this.$message({
message: "邮箱格式有误!",
type: "error"
});
return false;
}
params.place = this.email;
return true;
}
return false;
},
checkParameters() {
if (this.$common.isEmpty(this.currentUser.username)) {
this.$message({
message: "请输入用户名!",
type: "error"
});
return false;
}
if (this.currentUser.username.indexOf(" ") !== -1) {
this.$message({
message: "用户名不能包含空格!",
type: "error"
});
return false;
}
return true;
},
changeDialog(value) {
if (value === "邮箱验证码") {
if (this.$common.isEmpty(this.email)) {
this.$message({
message: "请输入邮箱!",
type: "error"
});
return false;
}
if (!(/^\w+@[a-zA-Z0-9]{2,10}(?:\.[a-z]{2,4}){1,3}$/.test(this.email))) {
this.$message({
message: "邮箱格式有误!",
type: "error"
});
return false;
}
}
this.dialogTitle = value;
this.showDialog = true;
},
submitDialog() {
if (this.dialogTitle === "修改头像") {
if (this.$common.isEmpty(this.avatar)) {
this.$message({
message: "请上传头像!",
type: "error"
});
} else {
let user = {
avatar: this.avatar.trim()
};
this.$http.post(this.$constant.baseURL + "/user/updateUserInfo", user)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.$store.commit("loadCurrentUser", res.data);
this.currentUser = this.$store.state.currentUser;
this.clearDialog();
this.$message({
message: "修改成功!",
type: "success"
});
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}
} else if (this.dialogTitle === "修改手机号" || this.dialogTitle === "绑定手机号" || this.dialogTitle === "修改邮箱" || this.dialogTitle === "绑定邮箱") {
this.updateSecretInfo();
} else if (this.dialogTitle === "找回密码") {
if (this.passwordFlag !== 1 && this.passwordFlag !== 2) {
this.$message({
message: "请选择找回方式!",
type: "error"
});
} else {
this.updateSecretInfo();
}
} else if (this.dialogTitle === "邮箱验证码") {
this.showDialog = false;
}
},
updateSecretInfo() {
if (this.$common.isEmpty(this.code)) {
this.$message({
message: "请输入验证码!",
type: "error"
});
return;
}
if (this.$common.isEmpty(this.password)) {
this.$message({
message: "请输入密码!",
type: "error"
});
return;
}
let params = {
code: this.code.trim(),
password: this.$common.encrypt(this.password.trim())
};
if (!this.checkParams(params)) {
return;
}
if (this.dialogTitle === "找回密码") {
this.$http.post(this.$constant.baseURL + "/user/updateForForgetPassword", params, false, false)
.then((res) => {
this.clearDialog();
this.$message({
message: "修改成功,请重新登陆!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
} else {
this.$http.post(this.$constant.baseURL + "/user/updateSecretInfo", params, false, false)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.$store.commit("loadCurrentUser", res.data);
this.currentUser = this.$store.state.currentUser;
this.clearDialog();
this.$message({
message: "修改成功!",
type: "success"
});
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}
},
getCode() {
if (this.codeString === "验证码") {
//
let params = {};
if (!this.checkParams(params)) {
return;
}
let url;
if (this.dialogTitle === "找回密码" || this.dialogTitle === "邮箱验证码") {
url = "/user/getCodeForForgetPassword";
} else {
url = "/user/getCodeForBind";
}
this.$http.get(this.$constant.baseURL + url, params)
.then((res) => {
this.$message({
message: "验证码已发送,请注意查收!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
this.codeString = "30";
this.intervalCode = setInterval(() => {
if (this.codeString === "0") {
clearInterval(this.intervalCode)
this.codeString = "验证码";
} else {
this.codeString = (parseInt(this.codeString) - 1) + "";
}
}, 1000);
} else {
this.$message({
message: "请稍后再试!",
type: "warning"
});
}
},
clearDialog() {
this.password = "";
this.phoneNumber = "";
this.email = "";
this.avatar = "";
this.showDialog = false;
this.code = "";
this.dialogTitle = "";
this.passwordFlag = null;
}
}
}
</script>
<style scoped>
.in-up-container {
height: 100vh;
position: relative;
}
.in-up {
opacity: 0.9;
border-radius: 10px;
box-shadow: 0 15px 30px var(--miniMask), 0 10px 10px var(--miniMask);
position: relative;
overflow: hidden;
width: 750px;
max-width: 100%;
min-height: 450px;
margin: 10px;
}
.in-up p {
font-size: 14px;
letter-spacing: 1px;
margin: 20px 0 30px 0;
}
.in-up a {
color: var(--black);
font-size: 14px;
text-decoration: none;
margin: 15px 0;
}
.form-container {
position: absolute;
height: 100%;
transition: all 0.5s ease-in-out;
}
.sign-in-container {
left: 0;
width: 50%;
}
.sign-up-container {
left: 0;
width: 50%;
opacity: 0;
}
.form-container div {
background: var(--white);
flex-direction: column;
padding: 0 20px;
height: 100%;
}
.form-container input {
background: var(--maxLightGray);
border-radius: 2px;
border: none;
padding: 12px 15px;
margin: 10px 0;
width: 100%;
outline: none;
}
.in-up button {
border-radius: 2rem;
border: none;
background: var(--lightRed);
color: var(--white);
font-size: 16px;
font-weight: bold;
padding: 12px 45px;
letter-spacing: 2px;
cursor: pointer;
}
.in-up button:hover {
animation: scale 0.8s ease-in-out;
}
.in-up button.ghost {
background: transparent;
border: 1px solid var(--white);
}
.sign-up-container button {
margin-top: 20px;
}
.overlay-container {
position: absolute;
left: 50%;
width: 50%;
height: 100%;
overflow: hidden;
transition: all 0.5s ease-in-out;
}
.overlay {
background: var(--gradualRed);
color: var(--white);
position: relative;
left: -100%;
height: 100%;
width: 200%;
}
.overlay-panel {
position: absolute;
top: 0;
flex-direction: column;
height: 100%;
width: 50%;
transition: all 0.5s ease-in-out;
}
.overlay-right {
right: 0;
transform: translateY(0);
}
.overlay-left {
transform: translateY(-20%);
}
.in-up.right-panel-active .sign-in-container {
transform: translateY(100%);
}
.in-up.right-panel-active .overlay-container {
transform: translateX(-100%);
}
.in-up.right-panel-active .sign-up-container {
transform: translateX(100%);
opacity: 1;
}
.in-up.right-panel-active .overlay {
transform: translateX(50%);
}
.in-up.right-panel-active .overlay-left {
transform: translateY(0);
}
.in-up.right-panel-active .overlay-right {
transform: translateY(20%);
}
.user-container {
width: 100vw;
height: 100vh;
position: relative;
}
.user-info {
width: 80%;
z-index: 10;
margin-top: 70px;
height: calc(100vh - 90px);
margin-bottom: 20px;
border-radius: 10px;
overflow: hidden;
}
.user-left {
width: 50%;
background: var(--maxMaxWhiteMask);
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
padding: 20px;
}
.user-right {
width: 50%;
background: var(--maxWhiteMask);
padding: 20px;
}
.user-title {
text-align: right;
user-select: none;
}
.user-content {
text-align: left;
}
.user-title div {
height: 55px;
line-height: 55px;
text-align: center;
}
.user-content > div {
height: 55px;
display: flex;
align-items: center;
}
.user-content >>> .el-input__inner, .user-content >>> .el-textarea__inner {
border: none;
background: var(--whiteMask);
}
.user-content >>> .el-input__count {
background: var(--transparent);
user-select: none;
}
.changeInfo {
color: var(--white);
font-size: 0.75rem;
cursor: pointer;
background: var(--themeBackground);
padding: 3px;
border-radius: 0.2rem;
user-select: none;
}
@media screen and (max-width: 920px) {
.user-info {
width: 90%;
}
.user-left {
width: 100%;
}
.user-right {
display: none;
}
}
</style>

@ -1,201 +0,0 @@
<template>
<div>
<!-- 两句诗 -->
<div class="my-animation-slide-top">
<twoPoem :isHitokoto="false"></twoPoem>
</div>
<div style="background: var(--background);animation: hideToShow 2.5s">
<div>
<treeHole :treeHoleList="treeHoleList"
:avatar="!$common.isEmpty($store.state.currentUser)?$store.state.currentUser.avatar:$store.state.webInfo.avatar"
@launch="launch"
@deleteTreeHole="deleteTreeHole">
</treeHole>
<proPage :current="pagination.current"
:size="pagination.size"
:total="pagination.total"
:buttonSize="3"
:color="$constant.pageColor"
@toPage="toPage">
</proPage>
</div>
<!-- 页脚 -->
<myFooter :showFooter="showFooter"></myFooter>
</div>
<el-dialog title="微言"
:visible.sync="weiYanDialogVisible"
width="40%"
:before-close="handleClose"
:append-to-body="true"
destroy-on-close
center>
<div>
<div class="myCenter" style="padding-bottom: 20px">
<el-radio-group v-model="isPublic">
<el-radio-button :label="true">公开</el-radio-button>
<el-radio-button :label="false">私密</el-radio-button>
</el-radio-group>
</div>
<commentBox :disableGraffiti="true"
@submitComment="submitWeiYan">
</commentBox>
</div>
</el-dialog>
</div>
</template>
<script>
const twoPoem = () => import( "./common/twoPoem");
const myFooter = () => import( "./common/myFooter");
const treeHole = () => import( "./common/treeHole");
const proPage = () => import( "./common/proPage");
const commentBox = () => import( "./comment/commentBox");
export default {
components: {
twoPoem,
myFooter,
treeHole,
proPage,
commentBox
},
data() {
return {
treeHoleList: [],
pagination: {
current: 1,
size: 10,
total: 0
},
weiYanDialogVisible: false,
isPublic: true,
showFooter: false
}
},
computed: {},
watch: {},
created() {
this.getWeiYan();
},
mounted() {
},
methods: {
toPage(page) {
this.pagination.current = page;
window.scrollTo({
top: 240,
behavior: "smooth"
});
this.getWeiYan();
},
launch() {
if (this.$common.isEmpty(this.$store.state.currentUser)) {
this.$message({
message: "请先登录!",
type: "error"
});
return;
}
this.weiYanDialogVisible = true;
},
handleClose() {
this.weiYanDialogVisible = false;
},
submitWeiYan(content) {
let weiYan = {
content: content,
isPublic: this.isPublic
};
this.$http.post(this.$constant.baseURL + "/weiYan/saveWeiYan", weiYan)
.then((res) => {
this.getWeiYan();
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
this.handleClose();
},
deleteTreeHole(id) {
if (this.$common.isEmpty(this.$store.state.currentUser)) {
this.$message({
message: "请先登录!",
type: "error"
});
return;
}
this.$confirm('确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
center: true
}).then(() => {
this.$http.get(this.$constant.baseURL + "/weiYan/deleteWeiYan", {id: id})
.then((res) => {
this.$message({
type: 'success',
message: '删除成功!'
});
this.pagination.current = 1;
this.getWeiYan();
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}).catch(() => {
this.$message({
type: 'success',
message: '已取消删除!'
});
});
},
getWeiYan() {
this.$http.post(this.$constant.baseURL + "/weiYan/listWeiYan", this.pagination)
.then((res) => {
this.showFooter = false;
if (!this.$common.isEmpty(res.data)) {
res.data.records.forEach(c => {
c.content = c.content.replace(/\n{2,}/g, '<div style="height: 12px"></div>');
c.content = c.content.replace(/\n/g, '<br/>');
c.content = this.$common.faceReg(c.content);
c.content = this.$common.pictureReg(c.content);
});
this.treeHoleList = res.data.records;
this.pagination.total = res.data.total;
}
this.$nextTick(() => {
this.showFooter = true;
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}
}
}
</script>
<style scoped>
</style>

@ -1,39 +0,0 @@
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import http from './utils/request'
import common from './utils/common'
import constant from './utils/constant'
import mavonEditor from 'mavon-editor'
//引入js
//注释掉下面一行就取消了看板娘
// import './utils/live2d'
import './utils/title'
//引入css
import './assets/css/animation.css'
import './assets/css/index.css'
import './assets/css/tocbot.css'
import './assets/css/color.css'
import './assets/css/markdown-highlight.css'
import './assets/css/font-awesome.min.css'
import 'mavon-editor/dist/css/index.css'
import {vueBaberrage} from 'vue-baberrage'
Vue.use(ElementUI)
Vue.use(vueBaberrage)
Vue.use(mavonEditor)
Vue.prototype.$http = http
Vue.prototype.$common = common
Vue.prototype.$constant = constant
Vue.config.productionTip = false
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')

@ -1,164 +0,0 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err);
}
Vue.use(VueRouter)
const routes = [
{
path: '/',
component: () => import('../components/home'),
children: [{
path: "/",
name: "index",
component: () => import('../components/index')
}, {
path: "/sort",
name: "sort",
component: () => import('../components/sort')
}, {
path: "/article",
name: "article",
component: () => import('../components/article')
}, {
path: "/weiYan",
name: "weiYan",
component: () => import('../components/weiYan')
}, {
path: "/love",
name: "love",
component: () => import('../components/love')
}, {
path: "/blog",
name: "blog",
component: () => import('../components/blog')
}, {
path: "/favorite",
name: "favorite",
component: () => import('../components/favorite')
}, {
path: "/travel",
name: "travel",
component: () => import('../components/travel')
}, {
path: "/message",
name: "message",
component: () => import('../components/message')
}, {
path: "/friend",
name: "friend",
component: () => import('../components/friend')
}, {
path: "/funny",
name: "funny",
component: () => import('../components/funny')
}, {
path: "/about",
name: "about",
component: () => import('../components/about')
}, {
path: "/user",
name: "user",
component: () => import('../components/user')
}, {
path: "/letter",
name: "letter",
component: () => import('../components/letter')
}]
},
{
path: '/admin',
redirect: '/welcome',
meta: {requiresAuth: true},
component: () => import('../components/admin/admin'),
children: [{
path: '/welcome',
name: 'welcome',
component: () => import('../components/admin/welcome')
}, {
path: '/main',
name: 'main',
component: () => import('../components/admin/main')
}, {
path: '/webEdit',
name: 'webEdit',
component: () => import('../components/admin/webEdit')
}, {
path: '/userList',
name: 'userList',
component: () => import('../components/admin/userList')
}, {
path: '/postList',
name: 'postList',
component: () => import('../components/admin/postList')
}, {
path: '/postEdit',
name: 'postEdit',
component: () => import('../components/admin/postEdit')
}, {
path: '/sortList',
name: 'sortList',
component: () => import('../components/admin/sortList')
}, {
path: '/commentList',
name: 'commentList',
component: () => import('../components/admin/commentList')
}, {
path: '/treeHoleList',
name: 'treeHoleList',
component: () => import('../components/admin/treeHoleList')
}, {
path: '/resourceList',
name: 'resourceList',
component: () => import('../components/admin/resourceList')
}, {
path: '/loveList',
name: 'loveList',
component: () => import('../components/admin/loveList')
}, {
path: '/resourcePathList',
name: 'resourcePathList',
component: () => import('../components/admin/resourcePathList')
},
, {
path: '/drugReaction',
name: 'drugReaction',
component: () => import('../components/admin/drugReaction')
}
]
},
{
path: '/verify',
name: 'verify',
component: () => import('../components/admin/verify')
}
]
const router = new VueRouter({
mode: "history",
routes: routes,
scrollBehavior(to, from, savedPosition) {
return {x: 0, y: 0}
}
})
router.beforeEach((to, from, next) => {
if (to.matched.some(record => record.meta.requiresAuth)) {
if (!Boolean(localStorage.getItem("adminToken"))) {
next({
path: '/verify',
query: {redirect: to.fullPath}
});
} else {
next();
}
} else {
next();
}
})
export default router

@ -1,70 +0,0 @@
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
toolbar: JSON.parse(localStorage.getItem("toolbar") || '{"visible": false, "enter": true}'),
sortInfo: JSON.parse(localStorage.getItem("sortInfo") || '[]'),
currentUser: JSON.parse(localStorage.getItem("currentUser") || '{}'),
currentAdmin: JSON.parse(localStorage.getItem("currentAdmin") || '{}'),
webInfo: JSON.parse(localStorage.getItem("webInfo") || '{"webName": "", "webTitle": [], "notices": [], "footer": "", "backgroundImage": "", "avatar": ""}')
},
getters: {
articleTotal: state => {
if (state.sortInfo !== null && state.sortInfo.length !== 0) {
//sortInfo数组为空或者为null则表示没有文章.不为空则有文章
if (state.sortInfo.length === 1) {
return state.sortInfo[0].countOfSort;
} else {
return state.sortInfo.reduce((prev, curr) => {
if (typeof prev === "number") {
return prev + curr.countOfSort;
} else {
return prev.countOfSort + curr.countOfSort;
}
});
}
} else {
return 0;
}
},
navigationBar: state => {
if (state.sortInfo !== null && state.sortInfo.length !== 0) {
return state.sortInfo.filter(f => f.sortType === 0);
} else {
return [];
}
}
},
mutations: {
changeToolbarStatus(state, toolbarState) {
state.toolbar = toolbarState;
localStorage.setItem("toolbar", JSON.stringify(toolbarState));
},
loadSortInfo(state, sortInfo) {
if (sortInfo !== null && sortInfo.length !== 0) {
state.sortInfo = sortInfo.sort((s1, s2) => s1.priority - s2.priority);
localStorage.setItem("sortInfo", JSON.stringify(sortInfo.sort((s1, s2) => s1.priority - s2.priority)));
}
},
loadCurrentUser(state, user) {
state.currentUser = user;
localStorage.setItem("currentUser", JSON.stringify(user));
},
loadCurrentAdmin(state, user) {
state.currentAdmin = user;
localStorage.setItem("currentAdmin", JSON.stringify(user));
},
loadWebInfo(state, webInfo) {
webInfo.webTitle = webInfo.webTitle.split('');
webInfo.notices = JSON.parse(webInfo.notices);
state.webInfo = webInfo;
localStorage.setItem("webInfo", JSON.stringify(webInfo));
}
},
actions: {},
modules: {},
plugins: []
})

@ -1,77 +0,0 @@
function getError(action, option, xhr) {
let msg;
if (xhr.response) {
msg = `${xhr.response.error || xhr.response}`;
} else if (xhr.responseText) {
msg = `${xhr.responseText}`;
} else {
msg = `fail to ${action} ${xhr.status}`;
}
return new Error(msg);
}
function getBody(xhr) {
const text = xhr.responseText || xhr.response;
if (!text) {
return text;
}
try {
return JSON.parse(text);
} catch (e) {
return text;
}
}
export default function upload(option) {
const xhr = new XMLHttpRequest();
const action = option.action;
if (xhr.upload) {
xhr.upload.onprogress = function progress(e) {
if (e.total > 0) {
e.percent = e.loaded / e.total * 100;
}
option.onProgress(e);
};
}
const formData = new FormData();
if (option.data) {
Object.keys(option.data).forEach(key => {
formData.append(key, option.data[key]);
});
}
formData.append(option.filename, option.file, option.file.name);
xhr.onerror = function error(e) {
option.onError(e);
};
xhr.onload = function onload() {
if (xhr.status < 200 || xhr.status >= 300) {
return option.onError(getError(action, option, xhr));
}
option.onSuccess(getBody(xhr));
};
xhr.open('post', action, true);
if (option.withCredentials && 'withCredentials' in xhr) {
xhr.withCredentials = true;
}
const headers = option.headers || {};
for (let item in headers) {
if (headers.hasOwnProperty(item) && headers[item] !== null) {
xhr.setRequestHeader(item, headers[item]);
}
}
xhr.send(formData);
return xhr;
}

@ -1,98 +0,0 @@
if (document.querySelector(".author-content.author-content-item.single")) {
const canvas = document.createElement("canvas");
canvas.id = "header_canvas";
canvas.style.position = "absolute";
canvas.style.bottom = "0";
canvas.width = 844;
canvas.height = 346;
document.querySelector(".author-content.author-content-item.single").appendChild(canvas);
const parent = document.querySelector(".author-content.author-content-item.single").parentNode;
parent.className = "thumbnail_canvas";
(function () {
var canvas,
ctx,
width,
height,
bubbles,
animateHeader = true;
initHeader();
function initHeader() {
canvas = document.getElementById("header_canvas");
window_resize();
if (canvas) {
ctx = canvas.getContext("2d");
//建立泡泡
bubbles = [];
var num = width * 0.04; //气泡数量
for (var i = 0; i < num; i++) {
var c = new Bubble();
bubbles.push(c);
}
animate();
}
}
function animate() {
if (animateHeader) {
ctx.clearRect(0, 0, width, height);
for (var i in bubbles) {
bubbles[i].draw();
}
}
requestAnimationFrame(animate);
}
function window_resize() {
//canvas铺满窗口
//width = window.innerWidth;
//height = window.innerHeight;
//如果需要铺满内容可以换下面这个
const panel = document.querySelector(".thumbnail_canvas");
if (panel) {
width = panel.offsetWidth;
height = panel.offsetHeight;
canvas.width = width;
canvas.height = height;
}
}
window.onresize = function () {
window_resize();
};
function Bubble() {
var _this = this;
(function () {
_this.pos = {};
init();
})();
function init() {
_this.pos.x = Math.random() * width;
_this.pos.y = height + Math.random() * 100;
_this.alpha = 0.1 + Math.random() * 0.5; //气泡透明度
_this.alpha_change = 0.0002 + Math.random() * 0.0005; //气泡透明度变化速度
_this.scale = 0.2 + Math.random() * 0.8; //气泡大小
_this.scale_change = Math.random() * 0.002; //气泡大小变化速度
_this.speed = 0.1 + Math.random() * 0.4; //气泡上升速度
}
//气泡
this.draw = function () {
if (_this.alpha <= 0) {
init();
}
_this.pos.y -= _this.speed;
_this.alpha -= _this.alpha_change;
_this.scale += _this.scale_change;
ctx.beginPath();
ctx.arc(_this.pos.x, _this.pos.y, _this.scale * 10, 0, 2 * Math.PI, false);
ctx.fillStyle = "rgba(255,255,255," + _this.alpha + ")";
ctx.fill();
};
}
})();
}

@ -1,305 +0,0 @@
import constant from "./constant";
import CryptoJS from 'crypto-js';
export default {
mobile() {
let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
return flag && flag.length && flag.length > 0;
},
/**
* 判断是否为空
*/
isEmpty(value) {
if (typeof value === "undefined" || value === null || (typeof value === "string" && value.trim() === "") || (Array.prototype.isPrototypeOf(value) && value.length === 0) || (Object.prototype.isPrototypeOf(value) && Object.keys(value).length === 0)) {
return true;
} else {
return false;
}
},
/**
* 加密
*/
encrypt(plaintText) {
let options = {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
};
let key = CryptoJS.enc.Utf8.parse(constant.cryptojs_key);
let encryptedData = CryptoJS.AES.encrypt(plaintText, key, options);
return encryptedData.toString().replace(/\//g, "_").replace(/\+/g, "-");
},
/**
* 解密
*/
decrypt(encryptedBase64Str) {
let val = encryptedBase64Str.replace(/\-/g, '+').replace(/_/g, '/');
let options = {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
};
let key = CryptoJS.enc.Utf8.parse(constant.cryptojs_key);
let decryptedData = CryptoJS.AES.decrypt(val, key, options);
return CryptoJS.enc.Utf8.stringify(decryptedData);
},
/**
* 表情包转换
*/
faceReg(content) {
content = content.replace(/\[[^\[^\]]+\]/g, (word) => {
let index = constant.emojiList.indexOf(word.replace("[", "").replace("]", ""));
if (index > -1) {
let url = constant.qiniuDownload + "emoji/q" + (index + 1) + ".gif";
return '<img style="vertical-align: middle;width: 32px;height: 32px" src="' + url + '" title="' + word + '"/>';
} else {
return word;
}
});
return content;
},
/**
* 图片转换
*/
pictureReg(content) {
content = content.replace(/\<[^\<^\>]+\>/g, (word) => {
let index = word.indexOf(",");
if (index > -1) {
let arr = word.replace("<", "").replace(">", "").split(",");
return '<img style="border-radius: 5px;width: 100%;max-width: 250px;display: block" src="' + arr[1] + '" title="' + arr[0] + '"/>';
} else {
return word;
}
});
return content;
},
/**
* 字符串转换为时间戳
*/
getDateTimeStamp(dateStr) {
return Date.parse(dateStr.replace(/-/gi, "/"));
},
getDateDiff(dateStr) {
let publishTime = isNaN(Date.parse(dateStr.replace(/-/gi, "/")) / 1000) ? Date.parse(dateStr) / 1000 : Date.parse(dateStr.replace(/-/gi, "/")) / 1000;
let d_seconds,
d_minutes,
d_hours,
d_days,
timeNow = Math.floor(new Date().getTime() / 1000),
d,
date = new Date(publishTime * 1000),
Y = date.getFullYear(),
M = date.getMonth() + 1,
D = date.getDate(),
H = date.getHours(),
m = date.getMinutes(),
s = date.getSeconds();
//小于10的在前面补0
if (M < 10) {
M = '0' + M;
}
if (D < 10) {
D = '0' + D;
}
if (H < 10) {
H = '0' + H;
}
if (m < 10) {
m = '0' + m;
}
if (s < 10) {
s = '0' + s;
}
d = timeNow - publishTime;
d_days = Math.floor(d / 86400);
d_hours = Math.floor(d / 3600);
d_minutes = Math.floor(d / 60);
d_seconds = Math.floor(d);
if (d_days > 0 && d_days < 3) {
return d_days + '天前';
} else if (d_days <= 0 && d_hours > 0) {
return d_hours + '小时前';
} else if (d_hours <= 0 && d_minutes > 0) {
return d_minutes + '分钟前';
} else if (d_seconds < 60) {
if (d_seconds <= 0) {
return '刚刚发表';
} else {
return d_seconds + '秒前';
}
} else if (d_days >= 3) {
return Y + '-' + M + '-' + D + ' ' + H + ':' + m;
}
},
/**
* 保存资源
*/
saveResource(that, type, path, size, mimeType, storeType, isAdmin = false) {
let resource = {
type: type,
path: path,
size: size,
mimeType: mimeType,
storeType: storeType
};
that.$http.post(that.$constant.baseURL + "/resource/saveResource", resource, isAdmin)
.catch((error) => {
that.$message({
message: error.message,
type: "error"
});
});
},
/**
* 计算两个时间相差的年
*
* https://juejin.cn/post/7153816601156911118
*/
timeDiff(oldTime, newTime) {
oldTime = oldTime.replace(new RegExp("-", "gm"), "/");
if (newTime) {
newTime = newTime.replace(new RegExp("-", "gm"), "/");
} else {
newTime = new Date();
}
// 计算比较日期
const getMaxMinDate = (time, twoTime, type) => {
let minTime = new Date(time).getTime() - new Date(twoTime).getTime() > 0 ? twoTime : time;
let maxTime = new Date(time).getTime() - new Date(twoTime).getTime() > 0 ? time : twoTime;
let maxDateDay = new Date(new Date(maxTime).getFullYear(), new Date(maxTime).getMonth() + 1, 0).getDate();
let maxMinDate = new Date(minTime).getDate() > maxDateDay ? maxDateDay : new Date(minTime).getDate();
let maxMinTong;
if (type === 'month') {
maxMinTong = new Date(maxTime).getFullYear() + '/' + (new Date(minTime).getMonth() + 1) + '/' + maxMinDate + ' ' + new Date(minTime).toLocaleTimeString('chinese', {hour12: false});
} else {
maxMinTong = new Date(maxTime).getFullYear() + '/' + (new Date(maxTime).getMonth() + 1) + '/' + maxMinDate + ' ' + new Date(minTime).toLocaleTimeString('chinese', {hour12: false});
}
return {
minTime,
maxTime,
maxMinTong
}
}
// 相差年份
const getYear = (time, twoTime) => {
let oneYear = new Date(time).getFullYear();
let twoYear = new Date(twoTime).getFullYear();
const {minTime, maxTime, maxMinTong} = getMaxMinDate(time, twoTime, 'month');
let chaYear = Math.abs(oneYear - twoYear);
if (new Date(maxMinTong).getTime() > new Date(maxTime).getTime()) {
chaYear--;
}
return chaYear;
}
// 相差月份
const getMonth = (time, twoTime, value) => {
let oneMonth = new Date(time).getFullYear() * 12 + (new Date(time).getMonth() + 1);
let twoMonth = new Date(twoTime).getFullYear() * 12 + (new Date(twoTime).getMonth() + 1);
const {minTime, maxTime, maxMinTong} = getMaxMinDate(time, twoTime, 'day');
let chaMonth = Math.abs(oneMonth - twoMonth);
if (new Date(maxMinTong).getTime() > new Date(maxTime).getTime()) {
chaMonth--;
}
if (value) {
return chaMonth - value;
} else {
return chaMonth;
}
}
// 相差天数
const getDay = (time, twoTime, value) => {
let chaTime = Math.abs(new Date(time).getTime() - new Date(twoTime).getTime());
if (value) {
return parseInt(chaTime / 86400000) - value;
} else {
return parseInt(chaTime / 86400000);
}
}
// 相差小时
const getHour = (time, twoTime, value) => {
let chaTime = Math.abs(new Date(time).getTime() - new Date(twoTime).getTime());
if (value) {
return parseInt(chaTime / 3600000) - value;
} else {
return parseInt(chaTime / 3600000);
}
}
// 相差分钟
const getMinute = (time, twoTime, value) => {
let chaTime = Math.abs(new Date(time).getTime() - new Date(twoTime).getTime());
if (value) {
return parseInt(chaTime / 60000) - value;
} else {
return parseInt(chaTime / 60000);
}
}
// 相差秒
const getSecond = (time, twoTime, value) => {
let chaTime = Math.abs(new Date(time).getTime() - new Date(twoTime).getTime());
if (value) {
return parseInt(chaTime / 1000) - value;
} else {
return parseInt(chaTime / 1000);
}
}
// 相差年月日时分秒
const getDiffYMDHMS = (time, twoTime) => {
const {minTime, maxTime, maxMinTong} = getMaxMinDate(time, twoTime, 'day');
let diffDay1 = getDay(minTime, maxMinTong);
if (new Date(maxMinTong).getTime() > new Date(maxTime).getTime()) {
let prevMonth = new Date(maxMinTong).getMonth() - 1;
let lastTime = new Date(maxMinTong).setMonth(prevMonth);
diffDay1 = diffDay1 - getDay((new Date(lastTime).getFullYear() + '/' + (new Date(lastTime).getMonth() + 1) + '/' + new Date(lastTime).getDate()), maxMinTong);
}
let diffYear = getYear(time, twoTime);
let diffMonth = getMonth(time, twoTime, diffYear * 12);
let diffDay = getDay(time, twoTime, diffDay1);
let diffHour = getHour(time, twoTime, getDay(time, twoTime) * 24);
let diffMinute = getMinute(time, twoTime, (getDay(time, twoTime) * 24 * 60 + diffHour * 60));
let diffSecond = getSecond(time, twoTime, (getDay(time, twoTime) * 24 * 60 * 60 + diffHour * 60 * 60 + diffMinute * 60));
return {
diffYear,
diffMonth,
diffDay,
diffHour,
diffMinute,
diffSecond
}
}
return getDiffYMDHMS(oldTime, newTime);
},
countdown(time) {
time = new Date(time.replace(new RegExp("-", "gm"), "/"));
let nowTime = new Date();
//两个时间点的时间差(秒)
let seconds = parseInt((time.getTime() - nowTime.getTime()) / 1000);
let d = parseInt(seconds / 3600 / 24);
let h = parseInt(seconds / 3600 % 24);
let m = parseInt(seconds / 60 % 60);
let s = parseInt(seconds % 60);
return {
d,
h,
m,
s
}
}
}

@ -1,66 +0,0 @@
export default {
baseURL: "http://localhost:8081",
imBaseURL: "http://localhost:81",
webURL: "http://localhost",
// baseURL: "https://poetize.cn/api",
// imBaseURL: "https://poetize.cn/im",
// webURL: "https://poetize.cn",
live2d_path: "https://cdn.jsdelivr.net/gh/stevenjoezhang/live2d-widget@latest/",
cdnPath: "https://cdn.jsdelivr.net/gh/fghrsh/live2d_api/",
waifuPath: "/webInfo/getWaifuJson",
hitokoto: "https://v1.hitokoto.cn",
shehui: "https://api.oick.cn/yulu/api.php",
tocbot: "https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.11.1/tocbot.min.js",
jinrishici: "https://v1.jinrishici.com/all.json",
random_image: "https://s1.ax1x.com/2022/12/04/zsKgDs.jpg?",
//前后端定义的密钥AES使用16位
cryptojs_key: "aoligeimeimaobin",
qiniuUrl: "https://upload.qiniup.com",
qiniuDownload: "http://s6ondx7d9.hd-bkt.clouddn.com/",
favoriteVideo: "http://s6q4ppvdk.hd-bkt.clouddn.com/new.mp4",
favoriteVideo2: "http://s6q4ppvdk.hd-bkt.clouddn.com/images/340c8040d037c2f3217e8a1ade444fc8.mp4",
loveWeiYan: "https://s1.ax1x.com/2022/12/04/zsKgDs.jpg",
loveMessage: "https://s1.ax1x.com/2022/12/04/zsKgDs.jpg",
lovePhoto: "https://s1.ax1x.com/2022/12/04/zsKh5V.jpg",
// loveLike: "https://cdn.cbd.int//hexo-butterfly-envelope/lib/violet.jpg",
loveSortId: 1,
loveLabelId: 1,
friendBG: "https://s1.ax1x.com/2022/12/04/zsKgDs.jpg",
friendLetterTop: "https://cdn.cbd.int/hexo-butterfly-envelope/lib/before.png",
friendLetterBottom: "https://cdn.cbd.int/hexo-butterfly-envelope/lib/after.png",
friendLetterBiLi: "https://cdn.cbd.int/hexo-butterfly-envelope/lib/line.png",
friendLetterMiddle: "http://s6ondx7d9.hd-bkt.clouddn.com/images/R-C%281%29.jpg",
before_color_list: ["#ff4b2b", "#EF794F", "#67C23A", "orange", "rgb(131, 123, 199)", "#23d5ab"],
tree_hole_color: ["#ee7752", "#e73c7e", "#23a6d5", "#23d5ab", "rgb(131, 123, 199)", "#23d5ab"],
// two_poem_image: ["https://s1.ax1x.com/2022/12/04/zsKgDs.jpg",
// "https://s1.ax1x.com/2022/12/04/zsKh5V.jpg"],
two_poem_image: ["https://s11.ax1x.com/2024/01/11/pF9HX24.jpg"],
before_color_1: "black",
after_color_1: "linear-gradient(45deg, #f43f3b, #ec008c)",
before_color_2: "rgb(131, 123, 199)",
after_color_2: "linear-gradient(45deg, #f43f3b, #ec008c)",
sortColor: ["linear-gradient(to right, #358bff, #15c6ff)",
"linear-gradient(to right, #18e7ae, #1eebeb)",
"linear-gradient(to right, #ff6655, #ffbf37)",
"linear-gradient(120deg, rgba(255, 39, 232, 1) 0%, rgba(255, 128, 0, 1) 100%)",
"linear-gradient(120deg, rgba(91, 39, 255, 1) 0%, rgba(0, 212, 255, 1) 100%)"
],
pageColor: "#ee7752",
commentPageColor: "#23d5ab",
userId: 1,
source: 0,
emojiList: ['衰', '鄙视', '再见', '捂嘴', '摸鱼', '奋斗', '白眼', '可怜', '皱眉', '鼓掌', '烦恼', '吐舌', '挖鼻', '委屈', '滑稽', '啊这', '生气', '害羞', '晕', '好色', '流泪', '吐血', '微笑', '酷', '坏笑', '吓', '大兵', '哭笑', '困', '呲牙']
}

@ -1,69 +0,0 @@
var aparted = false;
$("#open").click(function () {
if (!aparted) {
var typed = new Typed('.letter', {
strings: ["^1000Dear&nbsp;&nbsp;Ming",
"M^200ing<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;夜には^300いつも^200寒いよね、^600でも、^600手を^200繋いでいると、^600暖か^200くなるよ<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;どんなに^300寒い夜も、^600君と^300二人でいれば、^600ちっとも^300寒くない<br><br><p style='float:right; display:block; width:80px;'>^1000H^200ao</p>"],
typeSpeed: 100,
backSpeed: 50
});
$('#open').find("span").eq(0).css('background-position', "0 -150px");
aparted = true;
var music = document.getElementById('music2');
if (music.paused) {
music.play();
$('#music_btn2').css("opacity", "1");
}
}
});
function playPause() {
var music = document.getElementById('music2');
var music_btn = $('#music_btn2');
if (music.paused) {
music.play();
music_btn.css("opacity", "1");
} else {
music.pause();
music_btn.css("opacity", "0.2");
}
}
window.onload = function () {
var currentUrl = window.location.href;
var firstIndex = currentUrl.indexOf("#");
if (firstIndex <= 0) window.location.href = currentUrl + "#contact";
$('#music2').attr('src', bgmsrc);
document.addEventListener('touchstart', function (event) {
if (event.touches.length > 1) event.preventDefault();
});
var lastTouchEnd = 0;
document.addEventListener('touchend', function (event) {
var now = (new Date()).getTime();
if (now - lastTouchEnd <= 300) event.preventDefault();
lastTouchEnd = now;
}, false);
document.addEventListener('gesturestart', function (event) {
event.preventDefault();
});
$('body').css('opacity', '1');
$('#jsi-cherry-container').css('z-index', '-99');
}

@ -1,323 +0,0 @@
/*
* Live2D Widget
* https://github.com/stevenjoezhang/live2d-widget
*/
import constant from "./constant";
// 注意live2d_path 参数应使用绝对路径
const live2d_path = constant.live2d_path;
// 加载 waifu.css live2d.min.js
if (screen.width > 768) {
Promise.all([
loadExternalResource(live2d_path + "waifu.css", "css"),
loadExternalResource(live2d_path + "live2d.min.js", "js")
]).then(() => {
initWidget({
waifuPath: constant.baseURL + constant.waifuPath,
cdnPath: constant.cdnPath
});
});
}
// 封装异步加载资源的方法
function loadExternalResource(url, type) {
return new Promise((resolve, reject) => {
let tag;
if (type === "css") {
tag = document.createElement("link");
tag.rel = "stylesheet";
tag.href = url;
} else if (type === "js") {
tag = document.createElement("script");
tag.src = url;
}
if (tag) {
tag.onload = () => resolve(url);
tag.onerror = () => reject(url);
document.head.appendChild(tag);
}
});
}
function initWidget(config) {
document.body.insertAdjacentHTML("beforeend", `<div id="waifu-toggle">
<span>看板娘</span>
</div>`);
const toggle = document.getElementById("waifu-toggle");
toggle.addEventListener("click", () => {
toggle.classList.remove("waifu-toggle-active");
if (toggle.getAttribute("first-time")) {
loadWidget(config);
toggle.removeAttribute("first-time");
} else {
localStorage.removeItem("waifu-display");
document.getElementById("waifu").style.display = "";
setTimeout(() => {
document.getElementById("waifu").style.bottom = 0;
}, 0);
}
});
if (localStorage.getItem("waifu-display") && Date.now() - localStorage.getItem("waifu-display") <= 86400000) {
toggle.setAttribute("first-time", true);
setTimeout(() => {
toggle.classList.add("waifu-toggle-active");
}, 0);
} else {
loadWidget(config);
}
}
function loadWidget(config) {
// 配置路径
let {waifuPath, cdnPath} = config;
if (!cdnPath.endsWith("/")) cdnPath += "/";
let modelList, idx = 0;
// 插入html
localStorage.removeItem("waifu-display");
localStorage.removeItem("waifu-text");
document.body.insertAdjacentHTML("beforeend", `<div id="waifu">
<div id="waifu-tips"></div>
<canvas id="live2d" width="800" height="800"></canvas>
<!-- 工具 -->
<div id="waifu-tool">
<span class="fa fa-lg fa-comment"></span>
<span class="fa fa-lg fa-street-view"></span>
<span class="fa fa-lg fa-mouse-pointer"></span>
<span class="fa fa-lg fa-times"></span>
</div>
</div>`);
setTimeout(() => {
document.getElementById("waifu").style.bottom = 0;
}, 0);
// 检测用户活动状态,并在空闲时显示消息
let userAction = false,
userActionTimer,
messageTimer,
messageArray = ["好久不见,日子过得好快呢……", "大坏蛋!你都多久没理人家了呀,嘤嘤嘤~", "嗨~快来逗我玩吧!", "拿小拳拳锤你胸口!", "记得把小家加入 Adblock 白名单哦!"];
window.addEventListener("mousemove", () => userAction = true);
window.addEventListener("keydown", () => userAction = true);
setInterval(() => {
if (userAction) {
userAction = false;
clearInterval(userActionTimer);
userActionTimer = null;
} else if (!userActionTimer) {
userActionTimer = setInterval(() => {
showMessage(randomSelection(messageArray), 6000, 9);
}, 20000);
}
}, 1000);
// 监听器
(function registerEventListener() {
document.querySelector("#waifu-tool .fa-comment").addEventListener("click", showHitokoto);
document.querySelector("#waifu-tool .fa-street-view").addEventListener("click", loadRandModel);
document.querySelector("#waifu-tool .fa-mouse-pointer").addEventListener("click", changeMouseAnimation);
document.querySelector("#waifu-tool .fa-times").addEventListener("click", () => {
localStorage.setItem("waifu-display", Date.now());
showMessage("愿你有一天能与重要的人重逢。", 2000, 11);
document.getElementById("waifu").style.bottom = "-500px";
setTimeout(() => {
document.getElementById("waifu").style.display = "none";
document.getElementById("waifu-toggle").classList.add("waifu-toggle-active");
}, 3000);
});
const devtools = () => {
};
console.log("%c", devtools);
devtools.toString = () => {
showMessage("哈哈,你打开了控制台,是想要看看我的小秘密吗?", 6000, 9);
};
window.addEventListener("copy", () => {
showMessage("你都复制了些什么呀,转载要记得加上出处哦!", 6000, 9);
});
window.addEventListener("visibilitychange", () => {
if (!document.hidden) showMessage("哇,你终于回来了~", 6000, 9);
});
localStorage.setItem("showMouseAnimation", "1");
document.querySelector("body").addEventListener("click", mouseAnimation);
})();
// 欢迎页
(function welcomeMessage() {
let text;
if (location.pathname === "/") { // 如果是主页
const now = new Date().getHours();
if (now > 5 && now <= 7) text = "早上好!一日之计在于晨,美好的一天就要开始了。";
else if (now > 7 && now <= 11) text = "上午好!工作顺利嘛,不要久坐,多起来走动走动哦!";
else if (now > 11 && now <= 13) text = "中午了,工作了一个上午,现在是午餐时间!";
else if (now > 13 && now <= 17) text = "午后很容易犯困呢,今天的运动目标完成了吗?";
else if (now > 17 && now <= 19) text = "傍晚了!窗外夕阳的景色很美丽呢,最美不过夕阳红~";
else if (now > 19 && now <= 21) text = "晚上好,今天过得怎么样?";
else if (now > 21 && now <= 23) text = ["已经这么晚了呀,早点休息吧,晚安~", "深夜时要爱护眼睛呀!"];
else text = "你是夜猫子呀?这么晚还不睡觉,明天起的来嘛?";
} else if (document.referrer !== "") {
const referrer = new URL(document.referrer),
domain = referrer.hostname.split(".")[1];
if (location.hostname === referrer.hostname) text = `欢迎阅读<span>「${document.title.split(" - ")[0]}」</span>`;
else if (domain === "baidu") text = `Hello来自 百度搜索 的朋友<br>你是搜索 <span>${referrer.search.split("&wd=")[1].split("&")[0]}</span> 找到的我吗?`;
else if (domain === "so") text = `Hello来自 360搜索 的朋友<br>你是搜索 <span>${referrer.search.split("&q=")[1].split("&")[0]}</span> 找到的我吗?`;
else if (domain === "google") text = `Hello来自 谷歌搜索 的朋友<br>欢迎阅读<span>「${document.title.split(" - ")[0]}」</span>`;
else text = `Hello来自 <span>${referrer.hostname}</span> 的朋友`;
} else {
text = `欢迎阅读<span>「${document.title.split(" - ")[0]}」</span>`;
}
showMessage(text, 7000, 8);
})();
// 初始化模型
(function initModel() {
let modelId = localStorage.getItem("modelId");
if (modelId === null) {
// 首次访问加载 指定模型 的 指定材质
modelId = 5; // 模型 ID
}
loadModel(modelId);
fetch(waifuPath)
.then(response => response.json())
.then(result => {
window.addEventListener("mouseover", event => {
for (let {selector, text} of result.mouseover) {
if (!event.target.matches(selector)) continue;
text = randomSelection(text);
text = text.replace("{text}", event.target.innerText);
showMessage(text, 4000, 8);
return;
}
});
window.addEventListener("click", event => {
for (let {selector, text} of result.click) {
if (!event.target.matches(selector)) continue;
text = randomSelection(text);
text = text.replace("{text}", event.target.innerText);
showMessage(text, 4000, 8);
return;
}
});
result.seasons.forEach(({date, text}) => {
const now = new Date(),
after = date.split("-")[0],
before = date.split("-")[1] || after;
if ((after.split("/")[0] <= now.getMonth() + 1 && now.getMonth() + 1 <= before.split("/")[0]) && (after.split("/")[1] <= now.getDate() && now.getDate() <= before.split("/")[1])) {
text = randomSelection(text);
text = text.replace("{year}", now.getFullYear());
messageArray.push(text);
}
});
});
})();
// 模型集合
async function loadModelList() {
const response = await fetch(`${cdnPath}model_list.json`);
modelList = await response.json();
}
// 载入模型
async function loadModel(modelId, message) {
localStorage.setItem("modelId", modelId);
showMessage(message, 4000, 10);
if (!modelList) await loadModelList();
// const target = randomSelection(modelList.models[modelId]);
const target = "HyperdimensionNeptunia/blanc_swimwear";
loadlive2d("live2d", `${cdnPath}model/${target}/index.json`);
}
// 换肤
async function loadRandModel() {
const modelId = localStorage.getItem("modelId");
if (!modelList) await loadModelList();
const target = randomSelection(modelList.models[modelId]);
loadlive2d("live2d", `${cdnPath}model/${target}/index.json`);
showMessage("我的新衣服好看嘛?", 4000, 10);
}
// 换人
async function loadOtherModel() {
let modelId = localStorage.getItem("modelId");
if (!modelList) await loadModelList();
const index = (++modelId >= modelList.models.length) ? 0 : modelId;
loadModel(index, modelList.messages[index]);
}
// 转换鼠标动画
function changeMouseAnimation() {
if (localStorage.getItem("showMouseAnimation") === "0") {
localStorage.setItem("showMouseAnimation", "1");
document.querySelector("body").addEventListener("click", mouseAnimation);
showMessage("哈哈,要牢记社会主义核心价值观哦!", 6000, 9);
} else {
localStorage.setItem("showMouseAnimation", "0");
document.querySelector("body").removeEventListener("click", mouseAnimation);
showMessage("今天你爱国了吗?", 6000, 9);
}
}
// 鼠标动画
function mouseAnimation(e) {
let list = new Array("富强", "民主", "文明", "和谐", "自由", "平等", "公正", "法治", "爱国", "敬业", "诚信", "友善");
let span = $("<span>").text(list[idx]);
idx = (idx + 1) % list.length;
let x = e.pageX, y = e.pageY;
span.css({
"z-index": 1000,
"top": y - 20,
"left": x,
"position": "absolute",
"pointer-events": "none",
"font-weight": "bold",
"color": "#ff6651"
});
$("body").append(span);
span.animate({"top": y - 180, "opacity": 0}, 1500, function () {
span.remove();
});
}
// 随机选择
function randomSelection(obj) {
return Array.isArray(obj) ? obj[Math.floor(Math.random() * obj.length)] : obj;
}
// 随机词
function showHitokoto() {
// 增加 hitokoto.cn 的 API
fetch(constant.hitokoto)
.then(response => response.json())
.then(result => {
const text = `这句一言来自 <span>「${result.from}」</span>,是 <span>${result.creator}</span> 在 hitokoto.cn 投稿的。`;
showMessage(result.hitokoto, 6000, 9);
setTimeout(() => {
showMessage(text, 4000, 9);
}, 6000);
});
}
// 显示消息
function showMessage(text, timeout, priority) {
if (!text || (localStorage.getItem("waifu-text") && localStorage.getItem("waifu-text") > priority)) return;
if (messageTimer) {
clearTimeout(messageTimer);
messageTimer = null;
}
text = randomSelection(text);
localStorage.setItem("waifu-text", priority);
const tips = document.getElementById("waifu-tips");
tips.innerHTML = text;
tips.classList.add("waifu-tips-active");
messageTimer = setTimeout(() => {
localStorage.removeItem("waifu-text");
tips.classList.remove("waifu-tips-active");
}, timeout);
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save