提交 cb06e7c8 编写于 作者: RYAN0UP's avatar RYAN0UP

release 1.0.3

上级 e67061cf
![](https://i.loli.net/2018/12/21/5c1cd34849751.png)
> Halo may be the best Java blog system.
<p align="center">
<a href="https://ryanc.cc"><img alt="Author" src="https://img.shields.io/badge/author-ruibaby-red.svg?style=flat-square"/></a>
<a href="#"><img alt="JDK" src="https://img.shields.io/badge/JDK-1.8-yellow.svg?style=flat-square"/></a>
<a href="https://github.com/ruibaby/halo/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/ruibaby/halo.svg?style=flat-square"/></a>
<a href="https://travis-ci.org/ruibaby/halo"><img alt="Travis CI" src="https://img.shields.io/travis/ruibaby/halo.svg?style=flat-square"/></a>
<a href="https://hub.docker.com/r/ruibaby/halo/"><img alt="Docker Build Status" src="https://img.shields.io/docker/build/ruibaby/halo.svg?style=flat-square"/></a>
</p>
------------------------------
🇨🇳[简体中文](README.md) | 🇺🇸English
## Introduction
**Halo** [ˈheɪloʊ], Become the best blogging system using Java.
Fast, concise, and powerful blogging system developed in Java.
> QQ Group: 162747721,Telegram Group: [https://t.me/HaloBlog](https://t.me/HaloBlog) | Telegram Channel: [https://t.me/halo_dev](https://t.me/halo_dev) | [WeHalo 小程序](https://github.com/aquanlerou/WeHalo)。
## Demo
> Frontend: [https://demo.halo.run](https://demo.halo.run)
> Backend: [https://demo.halo.run/admin](https://demo.halo.run/admin)
> username: admin,password: 123456
## Quick start
Deploy with Docker:
```bash
# pull docker images
$ docker pull ruibaby/halo
# create docker container and run it
$ docker run -d --name halo -p 8090:8090 -v ~/halo:/root/halo ruibaby/halo
# Tips:DB_USER and DB_PASSWORD must be repaired and recorded
```
Deploy with Docker compose:
```bash
# Download the nginx config file template
$ curl https://raw.githubusercontent.com/jwilder/nginx-proxy/master/nginx.tmpl > /etc/nginx/nginx.tmpl
# Get the docker-compose.yaml
$ yum install -y wget && wget -O docker-compose.yaml https://git.io/fpS8N
# Modify docker-compose.yaml
# 1. modify VIRTUAL_HOST, LETSENCRYPT_HOST for your own domain name.
# 2. modify LETSENCRYPT_EMAIL to your own mailbox.
# 3. modify DB_USER .
# 4. modify DB_PASSWORD .
# run
$ docker-compose up -d
```
Deploy with shell script:
```bash
# install Halo
$ yum install -y wget && wget -O halo-cli.sh https://git.io/fxHqp && bash halo-cli.sh -i
# upgrade Halo
$ bash halo-cli.sh -u
```
> Tips: If you use Idea, Eclipse and other IDEs to run, you need to install the Lombok plugin, In addition, JDK10 is not supported at the moment, and there are problems with themes scanning and uploading.
> See the [Halo documentation](https://halo-doc.ryanc.cc/installation/) or [ Wiki](https://github.com/halo-dev/halo/wiki) for more details.
## Blogs with Halo
[Ryan0up'S Blog](https://ryanc.cc)
[SNAIL BLOG](https://slogc.cc)
[宋浩志博客](http://songhaozhi.com)
[KingYiFan'S Blog](https://blog.cnbuilder.cn)
[AquanBlog](https://blog.eunji.cn/)
## Themes
In addition to the built-in [Anatole](https://github.com/hi-caicai/farbox-theme-Anatole) and [Material](https://github.com/viosey/hexo-theme-material), there are the following The theme is not integrated in the project. If you need it, please download it and upload it through the background.
- [Vno](https://github.com/halo-dev/vno-halo) - From Jekyll,Author [Wei Wang](https://onevcat.com/).
- [Hux](https://github.com/halo-dev/hux-halo) - From Jekyll,Author [Xuan Huang](https://huangxuan.me/).
- [Story](https://github.com/halo-dev/story-halo) - From Typecho,Author [Trii Hsia](https://yumoe.com/).
- [NexT](https://github.com/halo-dev/next-halo) - From Hexo,Author [iissnan](https://notes.iissnan.com/).
- [Casper](https://github.com/halo-dev/casper-halo) - From Ghost,Author [Ghost](https://github.com/TryGhost).
- [Pinghsu](https://github.com/halo-dev/pinghsu-halo) - From Typecho,Author [Chakhsu.Lau](https://github.com/chakhsu).
> Disclaimer: Do not accept any comments or suggestions on the functionality of the **Porting Theme**.
## License
[![license](https://img.shields.io/github/license/halo-dev/halo.svg?style=flat-square)](https://github.com/halo-dev/halo/blob/master/LICENSE)
> Halo uses the GPL-v3.0 protocol to open source.
## Thanks
The birth of Halo is inseparable from the following projects:
- [Spring Boot](https://github.com/spring-projects/spring-boot): Spring's rapid development framework
- [Freemarker](https://freemarker.apache.org/): Template engine to make pages static
- [H2 Database](https://github.com/h2database/h2database): Embedded database, no need to install
- [Spring-data-jpa](https://github.com/spring-projects/spring-data-jpa.git): a persistence layer framework that does not require writing sql statements
- [Ehcache](http://www.ehcache.org/): Cache Framework
- [Lombok](https://www.projectlombok.org/): Make the code simpler
- [oh-my-email](https://github.com/biezhi/oh-my-email): Probably the smallest Java mailing library, support for CC, attachments, templates, etc.
- [Hutool](https://github.com/looly/hutool): A Java Foundation Tools library
- [Thumbnailator](https://github.com/coobird/thumbnailator): thumbnail generation library
- [AdminLTE](https://github.com/almasaeed2010/AdminLTE): Bootstrap-based background template
- [Bootstrap](https://github.com/twbs/bootstrap.git): The most widely used front-end ui framework
- [Animate](https://github.com/daneden/animate.css.git): Very easy to use css effects library
- [SimpleMDE - Markdown Editor](https://github.com/sparksuite/simplemde-markdown-editor): Simple, functional, and lightweight Markdown editor
- [Bootstrap-FileInput](https://github.com/kartik-v/bootstrap-fileinput.git): Bootstrap-based file upload component
- [Font-awesome](https://github.com/FortAwesome/Font-Awesome.git): the most widely used font icon library
- [JQuery](https://github.com/jquery/jquery.git): The most widely used JavaScript framework
- [Layer](https://github.com/sentsin/layer.git): Personally think that the most practical and best-looking pop-up layer component, no one
- [JQuery-Toast](https://github.com/kamranahmedse/jquery-toast-plugin)
: message prompt component
- [Pjax](https://github.com/defunkt/jquery-pjax.git): pushState + ajax = pjax
## Donate
> If Halo is helpful to you, ask the author to have a ☕.
| AliPay/WeChat/QQ/PayPal |
| :------------: |
| <img src="https://i.loli.net/2018/12/23/5c1f68ce9b884.png" width="200"/> |
## Interface display
![](https://i.loli.net/2018/12/16/5c15b6edb9a49.png)
![](https://i.loli.net/2018/12/16/5c15b6ee08333.png)
![](https://i.loli.net/2018/12/16/5c15b6ec853af.png)
![](https://i.loli.net/2018/12/16/5c15b6ec50238.png)
![](https://i.loli.net/2018/12/16/5c15b6ed4057a.png)
![](https://i.loli.net/2018/12/16/5c15b6eb01f2d.png)
![](https://i.loli.net/2018/12/16/5c15b6eb98898.png)
![](https://i.loli.net/2018/12/16/5c15b6eb3b506.png)
![](https://i.loli.net/2018/12/16/5c15b6ebf29fd.png)
......@@ -26,13 +26,13 @@
### 下载最新的 Halo 安装包
```bash
curl -L https://github.com/halo-dev/halo/releases/download/v1.0.2/halo-1.0.2.jar --output halo-latest.jar
curl -L https://github.com/halo-dev/halo/releases/download/v1.0.3/halo-1.0.3.jar --output halo-latest.jar
```
或者
```bash
wget https://github.com/halo-dev/halo/releases/download/v1.0.2/halo-1.0.2.jar -O halo-latest.jar
wget https://github.com/halo-dev/halo/releases/download/v1.0.3/halo-1.0.3.jar -O halo-latest.jar
```
### 启动 Halo
......
......@@ -9,7 +9,7 @@ apply plugin: 'io.spring.dependency-management'
group = 'run.halo.app'
archivesBaseName = 'halo'
version = '1.0.2'
version = '1.0.3'
sourceCompatibility = '1.8'
description = 'Halo, personal blog system developed in Java.'
......
此差异已折叠。
此差异已折叠。
body{height:100%;background-color:#f5f5f5}.container{background:#f7f7f7;position:absolute;top:45%;left:50%;margin:-160px 0 0 -160px;width:320px;padding:16px 32px 32px 32px;-webkit-box-shadow:-4px 7px 46px 2px rgba(0,0,0,.1);box-shadow:-4px 7px 46px 2px rgba(0,0,0,.1)}.loginLogo{margin-bottom:20px;text-align:center}.loginLogo span{vertical-align:text-bottom;font-size:36px;display:inline-block;font-weight:600;color:#1790fe;background-image:-webkit-gradient(linear,37.219838% 34.532506%,36.425669% 93.178216%,from(#36c8f5),to(#1790fe),color-stop(.37,#1790fe));-webkit-text-fill-color:transparent;-webkit-background-clip:text}
\ No newline at end of file
body{height:100%;background-color:#f5f5f5}.container{background:#f7f7f7;position:absolute;top:45%;left:50%;margin:-160px 0 0 -160px;width:320px;padding:16px 32px 32px 32px;-webkit-box-shadow:-4px 7px 46px 2px rgba(0,0,0,.1);box-shadow:-4px 7px 46px 2px rgba(0,0,0,.1)}.container .tip{cursor:pointer;margin-top:.5rem;float:right}.loginLogo{margin-bottom:20px;text-align:center}.loginLogo span{vertical-align:text-bottom;font-size:36px;display:inline-block;font-weight:600;color:#1790fe;background-image:-webkit-gradient(linear,37.219838% 34.532506%,36.425669% 93.178216%,from(#36c8f5),to(#1790fe),color-stop(.37,#1790fe));-webkit-text-fill-color:transparent;-webkit-background-clip:text}
\ No newline at end of file
a[data-v-4b6b2ba0]{text-decoration:none}.sheet-title[data-v-4b6b2ba0]{max-width:300px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
\ No newline at end of file
.ant-upload-select-picture-card i{font-size:32px;color:#999}.ant-upload-select-picture-card .ant-upload-text{margin-top:8px;color:#666}.ant-upload-list-picture-card{float:none}.more-options-btn[data-v-7111bbfe]{margin-left:15px;text-decoration:none}.photo-card[data-v-7111bbfe]{width:104px;display:inline-block;margin-right:5px}
\ No newline at end of file
.analysis-card-container[data-v-698a5e37]{position:relative;overflow:hidden;width:100%}.analysis-card-container .meta[data-v-698a5e37]{position:relative;overflow:hidden;width:100%;color:rgba(0,0,0,.45);font-size:14px;line-height:22px}.analysis-card-container .meta .analysis-card-action[data-v-698a5e37]{cursor:pointer;position:absolute;top:0;right:0}.number[data-v-698a5e37]{overflow:hidden;text-overflow:ellipsis;word-break:break-all;white-space:nowrap;color:#000;margin-top:4px;margin-bottom:0;font-size:32px;line-height:38px;height:38px}
\ No newline at end of file
.analysis-card-container[data-v-698a5e37]{position:relative;overflow:hidden;width:100%}.analysis-card-container .meta[data-v-698a5e37]{position:relative;overflow:hidden;width:100%;color:rgba(0,0,0,.45);font-size:14px;line-height:22px}.analysis-card-container .meta .analysis-card-action[data-v-698a5e37]{cursor:pointer;position:absolute;top:0;right:0}.number[data-v-698a5e37]{overflow:hidden;text-overflow:ellipsis;word-break:break-all;white-space:nowrap;color:#000;margin-top:4px;margin-bottom:0;font-size:32px;line-height:38px;height:38px}.ant-upload-select-picture-card i{font-size:32px;color:#999}.ant-upload-select-picture-card .ant-upload-text{margin-top:8px;color:#666}.ant-upload-list-picture-card{float:none}.more-options-btn[data-v-77a18f66]{margin-left:15px;text-decoration:none}a[data-v-77a18f66]{text-decoration:none}
\ No newline at end of file
.ant-divider-horizontal[data-v-604cba98]{margin:24px 0 12px 0}.search-box[data-v-604cba98]{padding-bottom:12px}.attach-thumb[data-v-604cba98]{width:100%;margin:0 auto;position:relative;padding-bottom:56%;overflow:hidden}.attach-thumb img[data-v-604cba98],.attach-thumb span[data-v-604cba98]{width:100%;height:100%;position:absolute;top:0;left:0}.attach-thumb span[data-v-604cba98]{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:12px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:#9b9ea0}.ant-card-meta[data-v-604cba98]{padding:.8rem}.attach-detail-img img[data-v-604cba98]{width:100%}.table-operator[data-v-604cba98]{margin-bottom:0}
\ No newline at end of file
.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}a[data-v-a379d92e]{text-decoration:none}.post-title[data-v-a379d92e]{max-width:150px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
\ No newline at end of file
.v-note-wrapper[data-v-6a7e5dfd]{z-index:1000;min-height:580px}
\ No newline at end of file
.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}@font-face{font-family:fontello;src:url(../fonts/fontello.e73a0647.eot);src:url(../fonts/fontello.e73a0647.eot#iefix) format("embedded-opentype"),url(../fonts/fontello.8d4a4e6f.woff2) format("woff2"),url(../fonts/fontello.a782baa8.woff) format("woff"),url(../fonts/fontello.068ca2b3.ttf) format("truetype"),url(../assets/fontello.9354499c.svg#fontello) format("svg");font-weight:400;font-style:normal}[class*=" fa-mavon-"]:before,[class^=fa-mavon-]:before{font-family:fontello;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-mavon-bold:before{content:"\E800"}.fa-mavon-italic:before{content:"\E801"}.fa-mavon-thumb-tack:before{content:"\E802"}.fa-mavon-link:before{content:"\E803"}.fa-mavon-picture-o:before{content:"\E804"}.fa-mavon-repeat:before{content:"\E805"}.fa-mavon-undo:before{content:"\E806"}.fa-mavon-trash-o:before{content:"\E807"}.fa-mavon-floppy-o:before{content:"\E808"}.fa-mavon-compress:before{content:"\E809"}.fa-mavon-eye:before{content:"\E80A"}.fa-mavon-eye-slash:before{content:"\E80B"}.fa-mavon-question-circle:before{content:"\E80C"}.fa-mavon-times:before{content:"\E80D"}.fa-mavon-align-left:before{content:"\E80F"}.fa-mavon-align-center:before{content:"\E810"}.fa-mavon-align-right:before{content:"\E811"}.fa-mavon-arrows-alt:before{content:"\F0B2"}.fa-mavon-bars:before{content:"\F0C9"}.fa-mavon-list-ul:before{content:"\F0CA"}.fa-mavon-list-ol:before{content:"\F0CB"}.fa-mavon-strikethrough:before{content:"\F0CC"}.fa-mavon-underline:before{content:"\F0CD"}.fa-mavon-table:before{content:"\F0CE"}.fa-mavon-columns:before{content:"\F0DB"}.fa-mavon-quote-left:before{content:"\F10D"}.fa-mavon-code:before{content:"\F121"}.fa-mavon-superscript:before{content:"\F12B"}.fa-mavon-subscript:before{content:"\F12C"}.fa-mavon-header:before{content:"\F1DC"}.fa-mavon-window-maximize:before{content:"\F2D0"}.markdown-body strong{font-weight:bolder}.markdown-body .hljs-center{text-align:center}.markdown-body .hljs-right{text-align:right}.markdown-body .hljs-left{text-align:left}
\ No newline at end of file
.attach-detail-img img{width:100%}.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}@-webkit-keyframes scaleDraw-data-v-d8dae54c{0%{-webkit-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(1.3);transform:scale(1.3)}50%{-webkit-transform:scale(1);transform:scale(1)}75%{-webkit-transform:scale(1.3);transform:scale(1.3)}}@keyframes scaleDraw-data-v-d8dae54c{0%{-webkit-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(1.3);transform:scale(1.3)}50%{-webkit-transform:scale(1);transform:scale(1)}75%{-webkit-transform:scale(1.3);transform:scale(1.3)}}.upload-button[data-v-d8dae54c]{-webkit-animation:scaleDraw-data-v-d8dae54c 4s ease-in-out infinite;position:fixed;bottom:30px;right:30px}.theme-thumb[data-v-d8dae54c]{width:100%;margin:0 auto;position:relative;padding-bottom:56%;overflow:hidden}.theme-thumb img[data-v-d8dae54c]{width:100%;height:100%;position:absolute;top:0;left:0}
\ No newline at end of file
.attach-detail-img img{width:100%}.ant-divider-horizontal[data-v-18d41aa9]{margin:24px 0 12px 0}.search-box[data-v-18d41aa9]{padding-bottom:12px}.attach-thumb[data-v-18d41aa9]{width:100%;margin:0 auto;position:relative;padding-bottom:56%;overflow:hidden}.attach-thumb img[data-v-18d41aa9]{width:100%;height:100%;position:absolute;top:0;left:0}.ant-card-meta[data-v-18d41aa9]{padding:.8rem}.attach-detail-img img[data-v-18d41aa9]{width:100%}.table-operator[data-v-18d41aa9]{margin-bottom:0}
\ No newline at end of file
.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}@-webkit-keyframes scaleDraw-data-v-290ad9ab{0%{-webkit-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(1.3);transform:scale(1.3)}50%{-webkit-transform:scale(1);transform:scale(1)}75%{-webkit-transform:scale(1.3);transform:scale(1.3)}}@keyframes scaleDraw-data-v-290ad9ab{0%{-webkit-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(1.3);transform:scale(1.3)}50%{-webkit-transform:scale(1);transform:scale(1)}75%{-webkit-transform:scale(1.3);transform:scale(1.3)}}.upload-button[data-v-290ad9ab]{-webkit-animation:scaleDraw-data-v-290ad9ab 4s ease-in-out infinite;position:fixed;bottom:30px;right:30px}.theme-thumb[data-v-290ad9ab]{width:100%;margin:0 auto;position:relative;padding-bottom:56%;overflow:hidden}.theme-thumb img[data-v-290ad9ab]{width:100%;height:100%;position:absolute;top:0;left:0}
\ No newline at end of file
.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}.page-header-wrapper-grid-content-main[data-v-69ef61d6]{width:100%;height:100%;min-height:100%;-webkit-transition:.3s;transition:.3s}.page-header-wrapper-grid-content-main .profile-center-avatarHolder[data-v-69ef61d6]{text-align:center;margin-bottom:24px}.page-header-wrapper-grid-content-main .profile-center-avatarHolder>.avatar[data-v-69ef61d6]{margin:0 auto;width:104px;height:104px;margin-bottom:20px;border-radius:50%;overflow:hidden;cursor:pointer}.page-header-wrapper-grid-content-main .profile-center-avatarHolder>.avatar img[data-v-69ef61d6]{height:100%;width:100%}.page-header-wrapper-grid-content-main .profile-center-avatarHolder .username[data-v-69ef61d6]{color:rgba(0,0,0,.85);font-size:20px;line-height:28px;font-weight:500;margin-bottom:4px}.page-header-wrapper-grid-content-main .profile-center-detail p[data-v-69ef61d6]{margin-bottom:8px;padding-left:26px;position:relative}.page-header-wrapper-grid-content-main .profile-center-detail i[data-v-69ef61d6]{position:absolute;height:14px;width:14px;left:0;top:4px}
\ No newline at end of file
.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}.page-header-wrapper-grid-content-main[data-v-7e8f2146]{width:100%;height:100%;min-height:100%;-webkit-transition:.3s;transition:.3s}.page-header-wrapper-grid-content-main .profile-center-avatarHolder[data-v-7e8f2146]{text-align:center;margin-bottom:24px}.page-header-wrapper-grid-content-main .profile-center-avatarHolder>.avatar[data-v-7e8f2146]{margin:0 auto;width:104px;height:104px;margin-bottom:20px;border-radius:50%;overflow:hidden;cursor:pointer}.page-header-wrapper-grid-content-main .profile-center-avatarHolder>.avatar img[data-v-7e8f2146]{height:100%;width:100%}.page-header-wrapper-grid-content-main .profile-center-avatarHolder .username[data-v-7e8f2146]{color:rgba(0,0,0,.85);font-size:20px;line-height:28px;font-weight:500;margin-bottom:4px}.page-header-wrapper-grid-content-main .profile-center-detail p[data-v-7e8f2146]{margin-bottom:8px;padding-left:26px;position:relative}.page-header-wrapper-grid-content-main .profile-center-detail i[data-v-7e8f2146]{position:absolute;height:14px;width:14px;left:0;top:4px}
\ No newline at end of file
.v-note-wrapper[data-v-348cd59e]{z-index:1000;min-height:580px}.post-thum .img[data-v-348cd59e]{width:100%;cursor:pointer;border-radius:4px}.post-thum .post-thum-remove[data-v-348cd59e]{margin-top:16px}
\ No newline at end of file
.attach-detail-img img{width:100%}.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}@font-face{font-family:fontello;src:url(../fonts/fontello.e73a0647.eot);src:url(../fonts/fontello.e73a0647.eot#iefix) format("embedded-opentype"),url(../fonts/fontello.8d4a4e6f.woff2) format("woff2"),url(../fonts/fontello.a782baa8.woff) format("woff"),url(../fonts/fontello.068ca2b3.ttf) format("truetype"),url(../assets/fontello.9354499c.svg#fontello) format("svg");font-weight:400;font-style:normal}[class*=" fa-mavon-"]:before,[class^=fa-mavon-]:before{font-family:fontello;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-mavon-bold:before{content:"\E800"}.fa-mavon-italic:before{content:"\E801"}.fa-mavon-thumb-tack:before{content:"\E802"}.fa-mavon-link:before{content:"\E803"}.fa-mavon-picture-o:before{content:"\E804"}.fa-mavon-repeat:before{content:"\E805"}.fa-mavon-undo:before{content:"\E806"}.fa-mavon-trash-o:before{content:"\E807"}.fa-mavon-floppy-o:before{content:"\E808"}.fa-mavon-compress:before{content:"\E809"}.fa-mavon-eye:before{content:"\E80A"}.fa-mavon-eye-slash:before{content:"\E80B"}.fa-mavon-question-circle:before{content:"\E80C"}.fa-mavon-times:before{content:"\E80D"}.fa-mavon-align-left:before{content:"\E80F"}.fa-mavon-align-center:before{content:"\E810"}.fa-mavon-align-right:before{content:"\E811"}.fa-mavon-arrows-alt:before{content:"\F0B2"}.fa-mavon-bars:before{content:"\F0C9"}.fa-mavon-list-ul:before{content:"\F0CA"}.fa-mavon-list-ol:before{content:"\F0CB"}.fa-mavon-strikethrough:before{content:"\F0CC"}.fa-mavon-underline:before{content:"\F0CD"}.fa-mavon-table:before{content:"\F0CE"}.fa-mavon-columns:before{content:"\F0DB"}.fa-mavon-quote-left:before{content:"\F10D"}.fa-mavon-code:before{content:"\F121"}.fa-mavon-superscript:before{content:"\F12B"}.fa-mavon-subscript:before{content:"\F12C"}.fa-mavon-header:before{content:"\F1DC"}.fa-mavon-window-maximize:before{content:"\F2D0"}.markdown-body strong{font-weight:bolder}.markdown-body .hljs-center{text-align:center}.markdown-body .hljs-right{text-align:right}.markdown-body .hljs-left{text-align:left}
\ No newline at end of file
<!DOCTYPE html><html lang=zh-cmn-Hans><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><meta name=robots content=noindex,nofllow><meta name=generator content=Halo><link rel=icon href=/logo.png><title>Halo Dashboard</title><link href=/css/chunk-0337f7a6.4c6b622f.css rel=prefetch><link href=/css/chunk-14e0b302.32f796a8.css rel=prefetch><link href=/css/chunk-161dc990.5ac5144c.css rel=prefetch><link href=/css/chunk-1be69b35.43c1fc12.css rel=prefetch><link href=/css/chunk-31c8ea42.4a090118.css rel=prefetch><link href=/css/chunk-434a7762.ba0136c1.css rel=prefetch><link href=/css/chunk-5000e55c.7fb9bc61.css rel=prefetch><link href=/css/chunk-6d8b31f6.ad8d17b2.css rel=prefetch><link href=/css/chunk-81d936d8.05888d95.css rel=prefetch><link href=/css/chunk-b2d0b040.389eca76.css rel=prefetch><link href=/css/chunk-bb4f0d4a.c1990d7c.css rel=prefetch><link href=/css/chunk-bfd5bbcc.6a83ae7d.css rel=prefetch><link href=/css/chunk-c0a1d3c4.09186be6.css rel=prefetch><link href=/css/chunk-cec31564.6f053d75.css rel=prefetch><link href=/css/fail.809a6bc5.css rel=prefetch><link href=/js/chunk-0337f7a6.11326d77.js rel=prefetch><link href=/js/chunk-0ba750a2.b786c9db.js rel=prefetch><link href=/js/chunk-142c8832.0f8270b3.js rel=prefetch><link href=/js/chunk-14e0b302.a86d1254.js rel=prefetch><link href=/js/chunk-161dc990.5de9313f.js rel=prefetch><link href=/js/chunk-1be69b35.09ed87f0.js rel=prefetch><link href=/js/chunk-2d0b64bf.61d5d7c3.js rel=prefetch><link href=/js/chunk-2d0d65a2.2249765a.js rel=prefetch><link href=/js/chunk-2d21a35c.eda7a11a.js rel=prefetch><link href=/js/chunk-2d228d13.85b46532.js rel=prefetch><link href=/js/chunk-31c8ea42.0b2feab9.js rel=prefetch><link href=/js/chunk-434a7762.7b32a373.js rel=prefetch><link href=/js/chunk-5000e55c.47b4c73b.js rel=prefetch><link href=/js/chunk-5bf599cc.6555f060.js rel=prefetch><link href=/js/chunk-6d8b31f6.b64e5366.js rel=prefetch><link href=/js/chunk-81d936d8.8bec77ac.js rel=prefetch><link href=/js/chunk-87e2df70.0ada7d4e.js rel=prefetch><link href=/js/chunk-b2d0b040.b0d70d07.js rel=prefetch><link href=/js/chunk-bb4f0d4a.8511af49.js rel=prefetch><link href=/js/chunk-bfd5bbcc.d2ca1e80.js rel=prefetch><link href=/js/chunk-c0a1d3c4.60b68f50.js rel=prefetch><link href=/js/chunk-cec31564.cfe3fd85.js rel=prefetch><link href=/js/fail.61f30b0f.js rel=prefetch><link href=/css/app.852293da.css rel=preload as=style><link href=/css/chunk-vendors.ee4e8dbf.css rel=preload as=style><link href=/js/app.a9634e28.js rel=preload as=script><link href=/js/chunk-vendors.2f7bce79.js rel=preload as=script><link href=/css/chunk-vendors.ee4e8dbf.css rel=stylesheet><link href=/css/app.852293da.css rel=stylesheet></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.2f7bce79.js></script><script src=/js/app.a9634e28.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html lang=zh-cmn-Hans><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><meta name=robots content=noindex,nofllow><meta name=generator content=Halo><link rel=icon href=/logo.png><title>Halo Dashboard</title><link href=/css/chunk-0337f7a6.4c6b622f.css rel=prefetch><link href=/css/chunk-0a078271.3df10fb3.css rel=prefetch><link href=/css/chunk-0d3fb064.5797d58a.css rel=prefetch><link href=/css/chunk-1021dac6.d511bd53.css rel=prefetch><link href=/css/chunk-14ae239d.e9de712a.css rel=prefetch><link href=/css/chunk-14e0b302.32f796a8.css rel=prefetch><link href=/css/chunk-1be69b35.43c1fc12.css rel=prefetch><link href=/css/chunk-2430dc8c.3592751a.css rel=prefetch><link href=/css/chunk-31c8ea42.4a090118.css rel=prefetch><link href=/css/chunk-3939e374.206f7b3f.css rel=prefetch><link href=/css/chunk-3b51c5ec.8e8c628e.css rel=prefetch><link href=/css/chunk-423b6722.dc42f304.css rel=prefetch><link href=/css/chunk-6d8b31f6.ad8d17b2.css rel=prefetch><link href=/css/chunk-71df32ec.5ac5144c.css rel=prefetch><link href=/css/chunk-7af5ef16.684c5100.css rel=prefetch><link href=/css/chunk-aa61da20.bb28474a.css rel=prefetch><link href=/css/chunk-b2e922b4.35a0ae16.css rel=prefetch><link href=/css/chunk-bb4f0d4a.c1990d7c.css rel=prefetch><link href=/css/fail.809a6bc5.css rel=prefetch><link href=/js/chunk-0337f7a6.363f14d6.js rel=prefetch><link href=/js/chunk-0a078271.82e60fe7.js rel=prefetch><link href=/js/chunk-0ba750a2.43dc1b14.js rel=prefetch><link href=/js/chunk-0d3fb064.5a2b4eaa.js rel=prefetch><link href=/js/chunk-1021dac6.8b7c9616.js rel=prefetch><link href=/js/chunk-14ae239d.d15f85b1.js rel=prefetch><link href=/js/chunk-14e0b302.f32c7cb3.js rel=prefetch><link href=/js/chunk-1be69b35.399a467a.js rel=prefetch><link href=/js/chunk-2430dc8c.9c9f8538.js rel=prefetch><link href=/js/chunk-2d0b64bf.ed671024.js rel=prefetch><link href=/js/chunk-2d0d65a2.2f8a16de.js rel=prefetch><link href=/js/chunk-2d21a35c.69287534.js rel=prefetch><link href=/js/chunk-2d228d13.75eca9d7.js rel=prefetch><link href=/js/chunk-31c8ea42.7133cb21.js rel=prefetch><link href=/js/chunk-3939e374.cb5da37a.js rel=prefetch><link href=/js/chunk-3b51c5ec.80a40c78.js rel=prefetch><link href=/js/chunk-423b6722.af6d6aaa.js rel=prefetch><link href=/js/chunk-6d8b31f6.db21019b.js rel=prefetch><link href=/js/chunk-71df32ec.a5429fe8.js rel=prefetch><link href=/js/chunk-7af5ef16.6ad0d11c.js rel=prefetch><link href=/js/chunk-aa61da20.c3df7494.js rel=prefetch><link href=/js/chunk-b2e922b4.32665c80.js rel=prefetch><link href=/js/chunk-bb4f0d4a.4e789394.js rel=prefetch><link href=/js/fail.e23b7151.js rel=prefetch><link href=/css/app.05b5cd85.css rel=preload as=style><link href=/css/chunk-vendors.ee4e8dbf.css rel=preload as=style><link href=/js/app.f0c2e6d9.js rel=preload as=script><link href=/js/chunk-vendors.2f7bce79.js rel=preload as=script><link href=/css/chunk-vendors.ee4e8dbf.css rel=stylesheet><link href=/css/app.05b5cd85.css rel=stylesheet></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.2f7bce79.js></script><script src=/js/app.f0c2e6d9.js></script></body></html>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0a078271"],{1439:function(a,e,i){"use strict";var t=i("d20d"),n=i.n(t);n.a},ac2a:function(a,e,i){"use strict";i.r(e);var t=function(){var a=this,e=a.$createElement,i=a._self._c||e;return i("div",{staticClass:"container"},[a._m(0),i("div",{staticClass:"loginBody animated"},[i("a-form",{attrs:{layout:"vertical"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&a._k(e.keyCode,"enter",13,e.key,"Enter")?null:a.handleLogin(e)}}},[i("a-form-item",{staticClass:"animated fadeInUp",style:{"animation-delay":"0.1s"}},[i("a-input",{attrs:{placeholder:"用户名/邮箱"},model:{value:a.username,callback:function(e){a.username=e},expression:"username"}},[i("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),i("a-form-item",{staticClass:"animated fadeInUp",style:{"animation-delay":"0.2s"}},[i("a-input",{attrs:{type:"password",placeholder:"密码"},model:{value:a.password,callback:function(e){a.password=e},expression:"password"}},[i("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),i("a-row",[i("a-button",{staticClass:"animated fadeInUp",style:{"animation-delay":"0.3s"},attrs:{type:"primary",block:!0},on:{click:a.handleLogin}},[a._v("登录")])],1),i("a-row",[i("a",{staticClass:"tip animated fadeInUp",style:{"animation-delay":"0.4s"},on:{click:a.handleApiModifyModalOpen}},[a._v("\n API 设置\n ")])]),i("a-modal",{attrs:{title:"API 设置",visible:a.apiModifyVisiable},on:{ok:a.handleApiModifyOk,cancel:a.handleApiModifyCancel}},[i("a-form",[i("a-form-item",{attrs:{extra:"如果 halo admin 不是独立部署,请不要更改此 API"}},[i("a-input",{model:{value:a.apiUrl,callback:function(e){a.apiUrl=e},expression:"apiUrl"}})],1),i("a-form-item",[i("a-button",{on:{click:a.handleApiUrlRestore}},[a._v("\n 恢复默认\n ")])],1)],1)],1)],1)],1)])},n=[function(){var a=this,e=a.$createElement,i=a._self._c||e;return i("div",{staticClass:"loginLogo animated fadeInUp"},[i("span",[a._v("Halo")])])}],s=(i("34a3"),i("e20c")),o=i("591a"),l={data:function(){return{username:null,password:null,apiModifyVisiable:!1,defaultApiBefore:window.location.protocol+"//",apiUrl:window.location.host}},computed:Object(s["a"])({},Object(o["c"])({defaultApiUrl:"apiUrl"})),methods:Object(s["a"])({},Object(o["b"])(["login","loadUser"]),Object(o["d"])({setApiUrl:"SET_API_URL",restoreApiUrl:"RESTORE_API_URL"}),{handleLogin:function(){var a=this;this.username?this.password?this.login({username:this.username,password:this.password}).then(function(e){a.loginSuccess()}):this.$message.warn("密码不能为空!"):this.$message.warn("用户名不能为空!")},loginSuccess:function(){this.loadUser(),this.$route.query.redirect?this.$router.replace(this.$route.query.redirect):this.$router.replace({name:"Dashboard"})},handleApiModifyModalOpen:function(){this.apiUrl=this.defaultApiUrl,this.apiModifyVisiable=!0},handleApiModifyOk:function(){this.setApiUrl(this.apiUrl),this.apiModifyVisiable=!1},handleApiModifyCancel:function(){this.apiModifyVisiable=!1},handleApiUrlRestore:function(){this.restoreApiUrl(),this.apiUrl=this.defaultApiUrl}})},r=l,c=(i("1439"),i("17cc")),d=Object(c["a"])(r,t,n,!1,null,null,null);e["default"]=d.exports},d20d:function(a,e,i){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0d3fb064"],{"6d94":function(t,e,a){"use strict";var n=a("f76e"),s=a.n(n);s.a},a8ed:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page-header-index-wide"},[a("a-row",[a("a-col",{attrs:{span:24}},[a("div",{staticClass:"card-container"},[a("a-tabs",{attrs:{type:"card"}},[a("a-tab-pane",{key:"internal"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"pushpin"}}),t._v("内置页面\n ")],1),a("a-table",{attrs:{columns:t.internalColumns,dataSource:t.internalSheets,pagination:!1,rowKey:function(t){return t.id}},scopedSlots:t._u([{key:"status",fn:function(e){return[e?a("span",[t._v("可用")]):a("span",[t._v("不可用\n "),a("a-tooltip",{attrs:{slot:"action",title:"当前主题没有对应模板"},slot:"action"},[a("a-icon",{attrs:{type:"info-circle-o"}})],1)],1)]}},{key:"action",fn:function(e,n){return a("span",{},[1==n.id?a("router-link",{attrs:{to:{name:"LinkList"}}},[a("a",{attrs:{href:"javascript:void(0);"}},[t._v("管理")])]):t._e(),2==n.id?a("router-link",{attrs:{to:{name:"PhotoList"}}},[a("a",{attrs:{href:"javascript:void(0);"}},[t._v("管理")])]):t._e(),3==n.id?a("router-link",{attrs:{to:{name:"JournalList"}}},[a("a",{attrs:{href:"javascript:void(0);"}},[t._v("管理")])]):t._e(),a("a-divider",{attrs:{type:"vertical"}}),n.status?a("a",{attrs:{href:t.options.blog_url+n.url,target:"_blank"}},[t._v("访问")]):a("a",{attrs:{href:t.options.blog_url+n.url,target:"_blank",disabled:""}},[t._v("访问")])],1)}}])})],1),a("a-tab-pane",{key:"custom"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"fork"}}),t._v("自定义页面\n ")],1),a("a-table",{attrs:{rowKey:function(t){return t.id},columns:t.customColumns,dataSource:t.formattedSheets,pagination:!1},scopedSlots:t._u([{key:"sheetTitle",fn:function(e,n){return a("span",{staticClass:"sheet-title"},[a("a",{attrs:{href:t.options.blog_url+"/s/"+n.url,target:"_blank"}},[a("a-tooltip",{attrs:{placement:"topLeft",title:"点击预览 "+e}},[t._v(t._s(e))])],1)])}},{key:"status",fn:function(e){return a("span",{},[a("a-badge",{attrs:{status:e.status}}),t._v("\n "+t._s(e.text)+"\n ")],1)}},{key:"updateTime",fn:function(e){return a("span",{},[t._v(t._s(t._f("timeAgo")(e)))])}},{key:"action",fn:function(e,n){return a("span",{},["PUBLISHED"===n.status||"DRAFT"===n.status?a("a",{attrs:{href:"javascript:;"},on:{click:function(e){return t.handleEditClick(n)}}},[t._v("编辑")]):"RECYCLE"===n.status?a("a-popconfirm",{attrs:{title:"你确定要发布【"+n.title+"】?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleEditStatusClick(n.id,"PUBLISHED")}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("还原")])]):t._e(),a("a-divider",{attrs:{type:"vertical"}}),"PUBLISHED"===n.status||"DRAFT"===n.status?a("a-popconfirm",{attrs:{title:"你确定要将【"+n.title+"】页面移到回收站?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleEditStatusClick(n.id,"RECYCLE")}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("回收站")])]):"RECYCLE"===n.status?a("a-popconfirm",{attrs:{title:"你确定要永久删除【"+n.title+"】页面?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleDeleteClick(n.id)}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("删除")])]):t._e()],1)}}])})],1)],1)],1)])],1)],1)},s=[],o=(a("f763"),a("ac0d")),r=a("ed66"),i=a("482b"),c=[{title:"页面名称",dataIndex:"title"},{title:"访问路径",dataIndex:"url"},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"操作",dataIndex:"action",width:"150px",scopedSlots:{customRender:"action"}}],u=[{title:"标题",dataIndex:"title",scopedSlots:{customRender:"sheetTitle"}},{title:"状态",className:"status",dataIndex:"statusProperty",scopedSlots:{customRender:"status"}},{title:"评论量",dataIndex:"commentCount"},{title:"访问量",dataIndex:"visits"},{title:"更新时间",dataIndex:"updateTime",scopedSlots:{customRender:"updateTime"}},{title:"操作",width:"150px",scopedSlots:{customRender:"action"}}],l={mixins:[o["a"],o["b"]],data:function(){return{sheetStatus:r["a"].sheetStatus,internalColumns:c,customColumns:u,internalSheets:[],sheets:[],options:[],keys:["blog_url"]}},computed:{formattedSheets:function(){var t=this;return this.sheets.map(function(e){return e.statusProperty=t.sheetStatus[e.status],e})}},created:function(){this.loadSheets(),this.loadInternalSheets(),this.loadOptions()},methods:{loadSheets:function(){var t=this;r["a"].list().then(function(e){t.sheets=e.data.data.content})},loadInternalSheets:function(){var t=this;r["a"].listInternal().then(function(e){t.internalSheets=e.data.data})},loadOptions:function(){var t=this;i["a"].listAll(this.keys).then(function(e){t.options=e.data.data})},handleEditClick:function(t){this.$router.push({name:"SheetEdit",query:{sheetId:t.id}})},handleEditStatusClick:function(t,e){var a=this;r["a"].updateStatus(t,e).then(function(t){a.$message.success("操作成功!"),a.loadSheets()})},handleDeleteClick:function(t){var e=this;r["a"].delete(t).then(function(t){e.$message.success("删除成功!"),e.loadSheets()})}}},d=l,p=(a("6d94"),a("17cc")),h=Object(p["a"])(d,n,s,!1,null,"4b6b2ba0",null);e["default"]=h.exports},ed66:function(t,e,a){"use strict";var n=a("9efd"),s="/api/admin/sheets",o={list:function(){return Object(n["a"])({url:s,method:"get"})},listInternal:function(){return Object(n["a"])({url:"".concat(s,"/internal"),method:"get"})},get:function(t){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"get"})},create:function(t,e){return Object(n["a"])({url:s,method:"post",data:t,params:{autoSave:e}})},update:function(t,e,a){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"put",data:e,params:{autoSave:a}})},updateStatus:function(t,e){return Object(n["a"])({url:"".concat(s,"/").concat(t,"/").concat(e),method:"put"})},delete:function(t){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"delete"})},sheetStatus:{PUBLISHED:{color:"green",status:"success",text:"已发布"},DRAFT:{color:"yellow",status:"warning",text:"草稿"},RECYCLE:{color:"red",status:"error",text:"回收站"}}};e["a"]=o},f76e:function(t,e,a){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1021dac6"],{"2c7e":function(t,e,a){},"4e8a":function(t,e,a){"use strict";var n=a("2c7e"),o=a.n(n);o.a},"81a6":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=this,a=e.$createElement,n=e._self._c||a;return n("div",{staticClass:"page-header-index-wide"},[n("a-row",[n("a-col",{attrs:{span:24}},[n("a-card",{attrs:{bordered:!1}},[n("div",{staticClass:"table-page-search-wrapper"},[n("a-form",{attrs:{layout:"inline"}},[n("a-row",{attrs:{gutter:48}},[n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"关键词"}},[n("a-input",{model:{value:e.queryParam.keyword,callback:function(t){e.$set(e.queryParam,"keyword",t)},expression:"queryParam.keyword"}})],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"状态"}},[n("a-select",{attrs:{placeholder:"请选择状态"}},[n("a-select-option",{attrs:{value:"1"}},[e._v("公开")]),n("a-select-option",{attrs:{value:"0"}},[e._v("私密")])],1)],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("span",{staticClass:"table-page-search-submitButtons"},[n("a-button",{attrs:{type:"primary"},on:{click:function(t){return e.loadJournals(!0)}}},[e._v("查询")]),n("a-button",{staticStyle:{"margin-left":"8px"},on:{click:e.resetParam}},[e._v("重置")])],1)])],1)],1)],1),n("div",{staticClass:"table-operator"},[n("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.handleNew}},[e._v("写日志")])],1),n("a-divider"),n("div",{staticStyle:{"margin-top":"15px"}},[n("a-list",{attrs:{itemLayout:"vertical",pagination:!1,dataSource:e.journals,loading:e.listLoading},scopedSlots:e._u([{key:"renderItem",fn:function(t,a){return n("a-list-item",{key:a},[n("a-modal",{attrs:{visible:e.previewVisible,footer:null},on:{cancel:e.handleCancelPreview}},[n("img",{staticStyle:{width:"100%"},attrs:{alt:e.previewPhoto.name+e.previewPhoto.description,src:e.previewPhoto.url}})]),n("template",{slot:"actions"},[n("span",[n("a",{attrs:{href:"javascript:void(0);"}},[n("a-icon",{staticStyle:{"margin-right":"8px"},attrs:{type:"like-o"}}),e._v("\n "+e._s(t.likes)+"\n ")],1)]),n("span",[n("a",{attrs:{href:"javascript:void(0);"},on:{click:function(a){return e.handleCommentShow(t)}}},[n("a-icon",{staticStyle:{"margin-right":"8px"},attrs:{type:"message"}}),e._v("\n "+e._s(t.commentCount)+"\n ")],1)])]),n("template",{slot:"extra"},[n("a",{attrs:{href:"javascript:void(0);"},on:{click:function(a){return e.handleEdit(t)}}},[e._v("编辑")]),n("a-divider",{attrs:{type:"vertical"}}),n("a-popconfirm",{attrs:{title:"你确定要删除这条日志?",okText:"确定",cancelText:"取消"},on:{confirm:function(a){return e.handleDelete(t.id)}}},[n("a",{attrs:{href:"javascript:void(0);"}},[e._v("删除")])])],1),n("a-list-item-meta",{attrs:{description:t.content}},[n("span",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(e._f("moment")(t.createTime)))]),n("a-avatar",{attrs:{slot:"avatar",size:"large",src:e.user.avatar},slot:"avatar"})],1)],2)}}])},[n("div",{staticClass:"page-wrapper"},[n("a-pagination",{staticClass:"pagination",attrs:{total:e.pagination.total,defaultPageSize:e.pagination.size,pageSizeOptions:["1","2","5","10","20","50","100"],showSizeChanger:""},on:{showSizeChange:e.onPaginationChange,change:e.onPaginationChange}})],1)])],1)],1)],1)],1),n("a-modal",{model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[n("template",{slot:"title"},[e._v("\n "+e._s(e.title)+"\n "),n("a-tooltip",{attrs:{slot:"action",title:"只能输入250字"},slot:"action"},[n("a-icon",{attrs:{type:"info-circle-o"}})],1)],1),n("template",{slot:"footer"},[n("a-button",{key:"submit",attrs:{type:"primary"},on:{click:e.createOrUpdateJournal}},[e._v("发布")])],1),n("a-form",{attrs:{layout:"vertical"}},[n("a-form-item",[n("a-input",{attrs:{type:"textarea",autosize:{minRows:8}},model:{value:e.journal.content,callback:function(t){e.$set(e.journal,"content",t)},expression:"journal.content"}})],1)],1)],2),e.selectComment?n("a-modal",{attrs:{title:"回复给:"+e.selectComment.author},model:{value:e.selectCommentVisible,callback:function(t){e.selectCommentVisible=t},expression:"selectCommentVisible"}},[n("template",{slot:"footer"},[n("a-button",{key:"submit",attrs:{type:"primary"},on:{click:e.handleReplyComment}},[e._v("回复")])],1),n("a-form",{attrs:{layout:"vertical"}},[n("a-form-item",[n("a-input",{attrs:{type:"textarea",autosize:{minRows:8}},model:{value:e.replyComment.content,callback:function(t){e.$set(e.replyComment,"content",t)},expression:"replyComment.content"}})],1)],1)],2):e._e(),n("a-drawer",{attrs:{title:"评论列表",width:e.isMobile()?"100%":"460",closable:"",visible:e.commentVisiable,destroyOnClose:""},on:{close:function(){return t.commentVisiable=!1}}},[n("a-row",{attrs:{type:"flex",align:"middle"}},[n("a-col",{attrs:{span:24}},[n("a-comment",[n("a-avatar",{attrs:{slot:"avatar",src:e.user.avatar,alt:e.user.nickname},slot:"avatar"}),n("p",{attrs:{slot:"content"},slot:"content"},[e._v(e._s(e.journal.content))]),n("span",{attrs:{slot:"datetime"},slot:"datetime"},[e._v(e._s(e._f("moment")(e.journal.createTime)))])],1)],1),n("a-divider"),n("a-col",{attrs:{span:24}},e._l(e.comments,function(t,a){return n("journal-comment-tree",{key:a,attrs:{comment:t},on:{reply:e.handleCommentReplyClick,delete:e.handleCommentDelete}})}),1)],1)],1)],1)},o=[],i=(a("b745"),a("7364"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-comment",[a("span",{attrs:{slot:"actions"},on:{click:t.handleReplyClick},slot:"actions"},[t._v("回复")]),a("a-popconfirm",{attrs:{slot:"actions",title:"你确定要永久删除该评论?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleDeleteClick},slot:"actions"},[a("span",[t._v("删除")])]),a("a",{attrs:{slot:"author"},slot:"author"},[t._v(" "+t._s(t.comment.author)+" ")]),a("a-avatar",{attrs:{slot:"avatar",src:t.avatar,alt:t.comment.author},slot:"avatar"}),a("p",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.comment.content))]),t.comment.children?t._l(t.comment.children,function(e,n){return a("journal-comment-tree",{key:n,attrs:{comment:e},on:{reply:t.handleSubReply,delete:t.handleSubDelete}})}):t._e()],2)],1)}),s=[],l={name:"JournalCommentTree",props:{comment:{type:Object,required:!1,default:null}},computed:{avatar:function(){return"//cn.gravatar.com/avatar/".concat(this.comment.gravatarMd5,"/?s=256&d=mp")}},methods:{handleReplyClick:function(){this.$emit("reply",this.comment)},handleSubReply:function(t){this.$emit("reply",t)},handleDeleteClick:function(){this.$emit("delete",this.comment)},handleSubDelete:function(t){this.$emit("delete",t)}}},r=l,c=a("17cc"),u=Object(c["a"])(r,i,s,!1,null,null,null),m=u.exports,d=a("ac0d"),h=a("d8fc"),p=a("9efd"),f="/api/admin/journals/comments",v={create:function(t){return Object(p["a"])({url:f,data:t,method:"post"})},delete:function(t){return Object(p["a"])({url:"".concat(f,"/").concat(t),method:"delete"})}},b=v,g=a("c24f"),y=a("a9f3"),C={mixins:[d["a"],d["b"]],components:{JournalCommentTree:m,UploadPhoto:y["a"]},data:function(){return{plusPhotoVisible:!0,photoList:[],previewVisible:!1,showMoreOptions:!1,previewPhoto:{name:"",description:"",url:""},title:"发表",listLoading:!1,visible:!1,commentVisiable:!1,selectCommentVisible:!1,pagination:{page:1,size:10,sort:null},queryParam:{page:0,size:10,sort:null,keyword:null},journals:[],comments:[],journal:{id:void 0,content:"",photos:[]},journalPhotos:[],selectComment:null,replyComment:{},user:{}}},created:function(){this.loadJournals(),this.loadUser()},methods:{handleCancelPreview:function(){this.previewVisible=!1},handlerPhotoPreview:function(t){this.previewVisible=!0,this.previewPhoto=t},handlerPhotoUploadSuccess:function(t,e){var a=t.data.data,n={name:a.name,url:a.path,thumbnail:a.thumbPath,suffix:a.suffix,width:a.width,height:a.height};this.journalPhotos.push(n)},handleUploadPhotoWallClick:function(){this.showMoreOptions=!this.showMoreOptions},loadJournals:function(t){var e=this;this.queryParam.page=this.pagination.page-1,this.queryParam.size=this.pagination.size,this.queryParam.sort=this.pagination.sort,t&&(this.queryParam.page=0),this.listLoading=!0,h["a"].query(this.queryParam).then(function(t){e.journals=t.data.data.content,e.pagination.total=t.data.data.total,e.listLoading=!1})},loadUser:function(){var t=this;g["a"].getProfile().then(function(e){t.user=e.data.data})},handleNew:function(){this.title="新建",this.visible=!0,this.journal={},this.plusPhotoVisible=!0,this.photoList=[]},handleEdit:function(t){this.title="编辑",this.journal=t,this.visible=!0,this.plusPhotoVisible=!1,this.photoList=t.photos},handleDelete:function(t){var e=this;h["a"].delete(t).then(function(t){e.$message.success("删除成功!"),e.loadJournals()})},handleCommentShow:function(t){var e=this;this.journal=t,h["a"].commentTree(this.journal.id).then(function(t){e.comments=t.data.data.content,e.commentVisiable=!0})},handleCommentReplyClick:function(t){this.selectComment=t,this.selectCommentVisible=!0,this.replyComment.parentId=t.id,this.replyComment.postId=this.journal.id},handleReplyComment:function(){var t=this;b.create(this.replyComment).then(function(e){t.$message.success("回复成功!"),t.replyComment={},t.selectComment={},t.selectCommentVisible=!1,t.handleCommentShow(t.journal)})},handleCommentDelete:function(t){var e=this;b.delete(t.id).then(function(t){e.$message.success("删除成功!"),e.handleCommentShow(e.journal)})},createOrUpdateJournal:function(){var t=this;this.journal.photos=this.journalPhotos,this.journal.id?h["a"].update(this.journal.id,this.journal).then(function(e){t.$message.success("更新成功!"),t.loadJournals()}):h["a"].create(this.journal).then(function(e){t.$message.success("发表成功!"),t.loadJournals(),t.photoList=[]}),this.visible=!1},onPaginationChange:function(t,e){this.$log.debug("Current: ".concat(t,", PageSize: ").concat(e)),this.pagination.page=t,this.pagination.size=e,this.loadJournals()},resetParam:function(){this.queryParam.keyword=null,this.loadJournals()}}},w=C,P=(a("a04d"),Object(c["a"])(w,n,o,!1,null,"7111bbfe",null));e["default"]=P.exports},a04d:function(t,e,a){"use strict";var n=a("eca3"),o=a.n(n);o.a},a796:function(t,e,a){"use strict";var n=a("f753"),o=a.n(n),i=a("9efd"),s="/api/admin/attachments",l={query:function(t){return Object(i["a"])({url:s,params:t,method:"get"})},get:function(t){return Object(i["a"])({url:"".concat(s,"/").concat(t),method:"get"})},delete:function(t){return Object(i["a"])({url:"".concat(s,"/").concat(t),method:"delete"})},update:function(t,e){return Object(i["a"])({url:"".concat(s,"/").concat(t),method:"put",data:e})},getMediaTypes:function(){return Object(i["a"])({url:"".concat(s,"/media_types"),method:"get"})}};l.CancelToken=o.a.CancelToken,l.isCancel=o.a.isCancel,l.upload=function(t,e,a){return Object(i["a"])({url:"".concat(s,"/upload"),timeout:864e4,data:t,onUploadProgress:e,cancelToken:a,method:"post"})},l.uploads=function(t,e,a){return Object(i["a"])({url:"".concat(s,"/uploads"),timeout:864e4,data:t,onUploadProgress:e,cancelToken:a,method:"post"})},l.type={LOCAL:{type:"local",text:"本地"},SMMS:{type:"smms",text:"SM.MS"},UPYUN:{type:"upyun",text:"又拍云"},QNYUN:{type:"qnyun",text:"七牛云"},ALIYUN:{type:"aliyun",text:"阿里云"}},e["a"]=l},a9f3:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"clearfix"},[a("a-upload",{attrs:{name:t.name,customRequest:t.handleUpload,listType:"picture-card",fileList:t.fileList},on:{preview:t.handlePreview,change:t.handleChange}},[t.fileList.length<9&&t.plusPhotoVisible?a("div",{attrs:{id:"plus-photo-uploadbox"}},[a("a-icon",{attrs:{type:"plus"}}),a("div",{staticClass:"ant-upload-text"},[t._v("Upload")])],1):t._e()]),a("a-modal",{attrs:{visible:t.previewVisible,footer:null},on:{cancel:t.handleCancel}},[a("img",{staticStyle:{width:"100%"},attrs:{alt:"example",src:t.previewImage}})])],1)},o=[],i=(a("7364"),a("f753")),s=a.n(i),l=a("a796"),r={props:{photoList:{type:Array,required:!1,default:function(){return[]}},plusPhotoVisible:{type:Boolean,required:!1,default:!0}},data:function(){return{name:"file",previewVisible:!1,previewImage:"",fileList:[],uploadHandler:l["a"].upload}},created:function(){this.handlerEditPreviewPhoto(this.photoList)},watch:{photoList:function(t,e){this.handlerEditPreviewPhoto(t)}},methods:{handlerEditPreviewPhoto:function(t){if(this.fileList=[],null!==t&&void 0!==t)for(var e=0;e<t.length;e++)this.fileList.push({uid:t[e].id,name:t[e].name,status:"done",url:t[e].thumbnail})},handleCancel:function(){this.previewVisible=!1},handlePreview:function(t){this.previewImage=t.url||t.thumbUrl,this.previewVisible=!0},handleChange:function(t){var e=t.fileList;this.fileList=e},handleUpload:function(t){var e=this;this.$log.debug("Uploading option",t);var a=s.a.CancelToken,n=a.source(),o=new FormData;return o.append(this.name,t.file),this.uploadHandler(o,function(a){a.total>0&&(a.percent=a.loaded/a.total*100),e.$log.debug("Uploading percent: ",a.percent),t.onProgress(a)},n.token,t.file).then(function(a){e.$log.debug("Uploaded successfully",a),t.onSuccess(a,t.file),e.$emit("success",a,t.file)}).catch(function(a){e.$log.debug("Failed to upload file",a),t.onError(a,a.response),e.$emit("failure",a,t.file)}),{abort:function(){e.$log.debug("Upload operation aborted by the user"),n.cancel("Upload operation canceled by the user.")}}}}},c=r,u=(a("4e8a"),a("17cc")),m=Object(u["a"])(c,n,o,!1,null,null,null);e["a"]=m.exports},d8fc:function(t,e,a){"use strict";var n=a("9efd"),o="/api/admin/journals",i={query:function(t){return Object(n["a"])({url:o,params:t,method:"get"})},create:function(t){return Object(n["a"])({url:o,data:t,method:"post"})},update:function(t,e){return Object(n["a"])({url:"".concat(o,"/").concat(t),data:e,method:"put"})},delete:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},commentTree:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t,"/comments/tree_view"),method:"get"})}};e["a"]=i},eca3:function(t,e,a){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-142c8832"],{a8ed:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page-header-index-wide"},[a("a-row",[a("a-col",{attrs:{span:24}},[a("div",{staticClass:"card-container"},[a("a-tabs",{attrs:{type:"card"}},[a("a-tab-pane",{key:"internal"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"pushpin"}}),t._v("内置页面\n ")],1),a("a-table",{attrs:{columns:t.internalColumns,dataSource:t.internalSheets,pagination:!1,rowKey:function(t){return t.id}},scopedSlots:t._u([{key:"status",fn:function(e){return[e?a("span",[t._v("可用")]):a("span",[t._v("不可用\n "),a("a-tooltip",{attrs:{slot:"action",title:"当前主题没有对应模板"},slot:"action"},[a("a-icon",{attrs:{type:"info-circle-o"}})],1)],1)]}},{key:"action",fn:function(e,n){return a("span",{},[1==n.id?a("router-link",{attrs:{to:{name:"LinkList"}}},[a("a",{attrs:{href:"javascript:void(0);"}},[t._v("管理")])]):t._e(),2==n.id?a("router-link",{attrs:{to:{name:"PhotoList"}}},[a("a",{attrs:{href:"javascript:void(0);"}},[t._v("管理")])]):t._e(),3==n.id?a("router-link",{attrs:{to:{name:"JournalList"}}},[a("a",{attrs:{href:"javascript:void(0);"}},[t._v("管理")])]):t._e(),a("a-divider",{attrs:{type:"vertical"}}),n.status?a("a",{attrs:{href:t.options.blog_url+n.url,target:"_blank"}},[t._v("访问")]):a("a",{attrs:{href:t.options.blog_url+n.url,target:"_blank",disabled:""}},[t._v("访问")])],1)}}])})],1),a("a-tab-pane",{key:"custom"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"fork"}}),t._v("自定义页面\n ")],1),a("a-table",{attrs:{rowKey:function(t){return t.id},columns:t.customColumns,dataSource:t.formattedSheets,pagination:!1},scopedSlots:t._u([{key:"status",fn:function(e){return a("span",{},[a("a-badge",{attrs:{status:e.status}}),t._v("\n "+t._s(e.text)+"\n ")],1)}},{key:"updateTime",fn:function(e){return a("span",{},[t._v(t._s(t._f("timeAgo")(e)))])}},{key:"action",fn:function(e,n){return a("span",{},["PUBLISHED"===n.status||"DRAFT"===n.status?a("a",{attrs:{href:"javascript:;"},on:{click:function(e){return t.handleEditClick(n)}}},[t._v("编辑")]):"RECYCLE"===n.status?a("a-popconfirm",{attrs:{title:"你确定要发布【"+n.title+"】?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleEditStatusClick(n.id,"PUBLISHED")}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("还原")])]):t._e(),a("a-divider",{attrs:{type:"vertical"}}),"PUBLISHED"===n.status||"DRAFT"===n.status?a("a-popconfirm",{attrs:{title:"你确定要将【"+n.title+"】页面移到回收站?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleEditStatusClick(n.id,"RECYCLE")}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("回收站")])]):"RECYCLE"===n.status?a("a-popconfirm",{attrs:{title:"你确定要永久删除【"+n.title+"】页面?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleDeleteClick(n.id)}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("删除")])]):t._e()],1)}}])})],1)],1)],1)])],1)],1)},s=[],o=(a("f763"),a("ac0d")),r=a("ed66"),i=a("482b"),c=[{title:"页面名称",dataIndex:"title"},{title:"访问路径",dataIndex:"url"},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"操作",dataIndex:"action",width:"150px",scopedSlots:{customRender:"action"}}],u=[{title:"标题",dataIndex:"title"},{title:"状态",className:"status",dataIndex:"statusProperty",scopedSlots:{customRender:"status"}},{title:"评论量",dataIndex:"commentCount"},{title:"访问量",dataIndex:"visits"},{title:"更新时间",dataIndex:"updateTime",scopedSlots:{customRender:"updateTime"}},{title:"操作",width:"150px",scopedSlots:{customRender:"action"}}],l={mixins:[o["a"],o["b"]],data:function(){return{sheetStatus:r["a"].sheetStatus,internalColumns:c,customColumns:u,internalSheets:[],sheets:[],options:[],keys:["blog_url"]}},computed:{formattedSheets:function(){var t=this;return this.sheets.map(function(e){return e.statusProperty=t.sheetStatus[e.status],e})}},created:function(){this.loadSheets(),this.loadInternalSheets(),this.loadOptions()},methods:{loadSheets:function(){var t=this;r["a"].list().then(function(e){t.sheets=e.data.data.content})},loadInternalSheets:function(){var t=this;r["a"].listInternal().then(function(e){t.internalSheets=e.data.data})},loadOptions:function(){var t=this;i["a"].listAll(this.keys).then(function(e){t.options=e.data.data})},handleEditClick:function(t){this.$router.push({name:"SheetEdit",query:{sheetId:t.id}})},handleEditStatusClick:function(t,e){var a=this;r["a"].updateStatus(t,e).then(function(t){a.$message.success("操作成功!"),a.loadSheets()})},handleDeleteClick:function(t){var e=this;r["a"].delete(t).then(function(t){e.$message.success("删除成功!"),e.loadSheets()})}}},d=l,p=a("17cc"),h=Object(p["a"])(d,n,s,!1,null,null,null);e["default"]=h.exports},ed66:function(t,e,a){"use strict";var n=a("9efd"),s="/api/admin/sheets",o={list:function(){return Object(n["a"])({url:s,method:"get"})},listInternal:function(){return Object(n["a"])({url:"".concat(s,"/internal"),method:"get"})},get:function(t){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"get"})},create:function(t,e){return Object(n["a"])({url:s,method:"post",data:t,params:{autoSave:e}})},update:function(t,e,a){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"put",data:e,params:{autoSave:a}})},updateStatus:function(t,e){return Object(n["a"])({url:"".concat(s,"/").concat(t,"/").concat(e),method:"put"})},delete:function(t){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"delete"})},sheetStatus:{PUBLISHED:{color:"green",status:"success",text:"已发布"},DRAFT:{color:"yellow",status:"warning",text:"草稿"},RECYCLE:{color:"red",status:"error",text:"回收站"}}};e["a"]=o}}]);
\ No newline at end of file
此差异已折叠。
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1be69b35"],{"031c":function(t,a,n){},2967:function(t,a,n){"use strict";n.r(a);var e=function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("div",{staticClass:"page-header-index-wide"},[n("a-row",[n("a-col",{attrs:{span:24}},[n("a-card",{attrs:{bordered:!1}},[n("a-card",{staticClass:"environment-info",attrs:{bordered:!1}},[n("template",{slot:"title"},[t._v("\n 环境信息\n "),n("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handleCopyEnvironments}},[n("a-icon",{attrs:{type:"copy"}})],1)]),n("a-popconfirm",{attrs:{slot:"extra",placement:"left",okText:"确定",cancelText:"取消"},on:{confirm:t.confirmUpdate},slot:"extra"},[n("template",{slot:"title"},[n("p",[t._v("确定更新 "),n("b",[t._v("Halo admin")]),t._v(" 吗?")])]),n("a-icon",{attrs:{slot:"icon",type:"cloud-download"},slot:"icon"}),n("a-button",{attrs:{loading:t.updating,type:"dashed",shape:"circle",icon:"cloud-download"}})],2),n("ul",[n("li",[t._v("Server 版本:"+t._s(t.environments.version))]),n("li",[t._v("Admin 版本:"+t._s(t.adminVersion))]),n("li",[t._v("数据库:"+t._s(t.environments.database))]),n("li",[t._v("运行模式:"+t._s(t.environments.mode))]),n("li",[t._v("启动时间:"+t._s(t._f("moment")(t.environments.startTime)))])]),n("a",{attrs:{href:"https://github.com/halo-dev",target:"_blank"}},[t._v("开源地址\n "),n("a-icon",{attrs:{type:"link"}})],1),n("a",{attrs:{href:"https://halo.run/guide",target:"_blank"}},[t._v("用户文档\n "),n("a-icon",{attrs:{type:"link"}})],1),n("a",{attrs:{href:"https://bbs.halo.run",target:"_blank"}},[t._v("在线社区\n "),n("a-icon",{attrs:{type:"link"}})],1)],2),n("a-card",{attrs:{title:"开发者",bordered:!1}},t._l(t.developers,function(t,a){return n("a",{key:a,attrs:{href:t.github,target:"_blank"}},[n("a-tooltip",{attrs:{placement:"top",title:t.name}},[n("a-avatar",{style:{marginRight:"10px"},attrs:{size:"large",src:t.avatar}})],1)],1)}),0),n("a-card",{attrs:{title:"时间轴",bordered:!1}},[n("a-timeline",[n("a-timeline-item",[t._v("...")]),t._l(t.steps,function(a,e){return n("a-timeline-item",{key:e},[t._v(t._s(a.date)+" "+t._s(a.content))])})],2)],1)],1)],1)],1)],1)},i=[],o=n("50fc"),s={data:function(){return{adminVersion:this.VERSION,environments:{},developers:[{name:"Ryan Wang",avatar:"//cn.gravatar.com/avatar/7cc7f29278071bd4dce995612d428834?s=256&d=mm",website:"https://ryanc.cc",github:"https://github.com/ruibaby"},{name:"John Niang",avatar:"//cn.gravatar.com/avatar/1dcf60ef27363dae539385d5bae9b2bd?s=256&d=mm",website:"https://johnniang.me",github:"https://github.com/johnniang"},{name:"Aquan",avatar:"//cn.gravatar.com/avatar/3958035fa354403fa9ca3fca36b08068?s=256&d=mm",website:"https://blog.eunji.cn",github:"https://github.com/aquanlerou"},{name:"appdev",avatar:"//cn.gravatar.com/avatar/08cf681fb7c6ad1b4fe70a8269c2103c?s=256&d=mm",website:"https://www.apkdv.com",github:"https://github.com/appdev"}],steps:[{date:"2019-06-01",content:"1.0 正式版发布"},{date:"2019-05-03",content:"Star 数达到 3300"},{date:"2019-01-30",content:"John Niang 加入开发"},{date:"2018-10-18",content:"构建镜像到 Docker hub"},{date:"2018-09-22",content:"Star 数达到 800"},{date:"2018-05-02",content:"第一条 Issue"},{date:"2018-05-01",content:"Star 数达到 100"},{date:"2018-04-29",content:"第一个 Pull request"},{date:"2018-04-28",content:"正式开源"},{date:"2018-03-21",content:"确定命名为 Halo,并上传到 Github"}],updating:!1}},created:function(){this.getEnvironments()},computed:{updateText:function(){return this.updating?"更新中...":"更新"}},methods:{getEnvironments:function(){var t=this;o["a"].environments().then(function(a){t.environments=a.data.data})},confirmUpdate:function(){var t=this;this.updating=!0,o["a"].updateAdminAssets().then(function(a){t.$notification.success({message:"更新成功",description:"请刷新后体验最新版本!"})}).finally(function(){t.updating=!1})},handleCopyEnvironments:function(){var t=this,a="Server 版本:".concat(this.environments.version,"\nAdmin 版本:").concat(this.adminVersion,"\n数据库:").concat(this.environments.database,"\n运行模式:").concat(this.environments.mode);this.$copyText(a).then(function(a){console.log("copy",a),t.$message.success("复制成功!")}).catch(function(a){console.log("copy.err",a),t.$message.error("复制失败!")})}}},r=s,c=(n("5ea2"),n("17cc")),d=Object(c["a"])(r,e,i,!1,null,null,null);a["default"]=d.exports},"5ea2":function(t,a,n){"use strict";var e=n("031c"),i=n.n(e);i.a}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1be69b35"],{"031c":function(t,a,n){},2967:function(t,a,n){"use strict";n.r(a);var e=function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("div",{staticClass:"page-header-index-wide"},[n("a-row",[n("a-col",{attrs:{span:24}},[n("a-card",{attrs:{bordered:!1}},[n("a-card",{staticClass:"environment-info",attrs:{bordered:!1}},[n("template",{slot:"title"},[t._v("\n 环境信息\n "),n("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handleCopyEnvironments}},[n("a-icon",{attrs:{type:"copy"}})],1)]),n("a-popconfirm",{attrs:{slot:"extra",placement:"left",okText:"确定",cancelText:"取消"},on:{confirm:t.confirmUpdate},slot:"extra"},[n("template",{slot:"title"},[n("p",[t._v("确定更新 "),n("b",[t._v("Halo admin")]),t._v(" 吗?")])]),n("a-icon",{attrs:{slot:"icon",type:"cloud-download"},slot:"icon"}),n("a-button",{attrs:{loading:t.updating,type:"dashed",shape:"circle",icon:"cloud-download"}})],2),n("ul",[n("li",[t._v("Server 版本:"+t._s(t.environments.version))]),n("li",[t._v("Admin 版本:"+t._s(t.adminVersion))]),n("li",[t._v("数据库:"+t._s(t.environments.database))]),n("li",[t._v("运行模式:"+t._s(t.environments.mode))]),n("li",[t._v("启动时间:"+t._s(t._f("moment")(t.environments.startTime)))])]),n("a",{attrs:{href:"https://github.com/halo-dev",target:"_blank"}},[t._v("开源地址\n "),n("a-icon",{attrs:{type:"link"}})],1),n("a",{attrs:{href:"https://halo.run/guide",target:"_blank"}},[t._v("用户文档\n "),n("a-icon",{attrs:{type:"link"}})],1),n("a",{attrs:{href:"https://bbs.halo.run",target:"_blank"}},[t._v("在线社区\n "),n("a-icon",{attrs:{type:"link"}})],1)],2),n("a-card",{attrs:{title:"开发者",bordered:!1}},t._l(t.developers,function(t,a){return n("a",{key:a,attrs:{href:t.github,target:"_blank"}},[n("a-tooltip",{attrs:{placement:"top",title:t.name}},[n("a-avatar",{style:{marginRight:"10px"},attrs:{size:"large",src:t.avatar}})],1)],1)}),0),n("a-card",{attrs:{title:"时间轴",bordered:!1}},[n("a-timeline",[n("a-timeline-item",[t._v("...")]),t._l(t.steps,function(a,e){return n("a-timeline-item",{key:e},[t._v(t._s(a.date)+" "+t._s(a.content))])})],2)],1)],1)],1)],1)],1)},i=[],o=n("50fc"),r={data:function(){return{adminVersion:this.VERSION,environments:{},developers:[{name:"Ryan Wang",avatar:"//cn.gravatar.com/avatar/7cc7f29278071bd4dce995612d428834?s=256&d=mm",website:"https://ryanc.cc",github:"https://github.com/ruibaby"},{name:"John Niang",avatar:"//cn.gravatar.com/avatar/1dcf60ef27363dae539385d5bae9b2bd?s=256&d=mm",website:"https://johnniang.me",github:"https://github.com/johnniang"},{name:"Aquan",avatar:"//cn.gravatar.com/avatar/3958035fa354403fa9ca3fca36b08068?s=256&d=mm",website:"https://blog.eunji.cn",github:"https://github.com/aquanlerou"},{name:"appdev",avatar:"//cn.gravatar.com/avatar/08cf681fb7c6ad1b4fe70a8269c2103c?s=256&d=mm",website:"https://www.apkdv.com",github:"https://github.com/appdev"},{name:"guqing",avatar:"//cn.gravatar.com/avatar/ad062ba572c8b006bfd2cbfc43fdee5e?s=256&d=mm",website:"http://www.guqing.xyz",github:"https://github.com/guqing"}],steps:[{date:"2019-07-09",content:"Halo v1.0.3 发布"},{date:"2019-07-08",content:"Star 数达到 6500"},{date:"2019-06-01",content:"1.0 正式版发布"},{date:"2019-05-03",content:"Star 数达到 3300"},{date:"2019-01-30",content:"John Niang 加入开发"},{date:"2018-10-18",content:"构建镜像到 Docker hub"},{date:"2018-09-22",content:"Star 数达到 800"},{date:"2018-05-02",content:"第一条 Issue"},{date:"2018-05-01",content:"Star 数达到 100"},{date:"2018-04-29",content:"第一个 Pull request"},{date:"2018-04-28",content:"正式开源"},{date:"2018-03-21",content:"确定命名为 Halo,并上传到 Github"}],updating:!1}},created:function(){this.getEnvironments()},computed:{updateText:function(){return this.updating?"更新中...":"更新"}},methods:{getEnvironments:function(){var t=this;o["a"].environments().then(function(a){t.environments=a.data.data})},confirmUpdate:function(){var t=this;this.updating=!0,o["a"].updateAdminAssets().then(function(a){t.$notification.success({message:"更新成功",description:"请刷新后体验最新版本!"})}).finally(function(){t.updating=!1})},handleCopyEnvironments:function(){var t=this,a="Server 版本:".concat(this.environments.version,"\nAdmin 版本:").concat(this.adminVersion,"\n数据库:").concat(this.environments.database,"\n运行模式:").concat(this.environments.mode);this.$copyText(a).then(function(a){console.log("copy",a),t.$message.success("复制成功!")}).catch(function(a){console.log("copy.err",a),t.$message.error("复制失败!")})}}},s=r,c=(n("5ea2"),n("17cc")),d=Object(c["a"])(s,e,i,!1,null,null,null);a["default"]=d.exports},"5ea2":function(t,a,n){"use strict";var e=n("031c"),i=n.n(e);i.a}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2430dc8c"],{"4cf8":function(a,t,e){"use strict";var n=e("7de1"),i=e.n(n);i.a},"61d0":function(a,t,e){"use strict";e.r(t);var n=function(){var a=this,t=this,e=t.$createElement,n=t._self._c||e;return n("page-view",[n("a-row",{attrs:{gutter:12,type:"flex",align:"middle"}},[n("a-col",{staticClass:"search-box",attrs:{span:24}},[n("a-card",{attrs:{bordered:!1}},[n("div",{staticClass:"table-page-search-wrapper"},[n("a-form",{attrs:{layout:"inline"}},[n("a-row",{attrs:{gutter:48}},[n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"关键词"}},[n("a-input",{model:{value:t.queryParam.keyword,callback:function(a){t.$set(t.queryParam,"keyword",a)},expression:"queryParam.keyword"}})],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"存储位置"}},[n("a-select",{on:{change:t.handleQuery},model:{value:t.queryParam.attachmentType,callback:function(a){t.$set(t.queryParam,"attachmentType",a)},expression:"queryParam.attachmentType"}},t._l(Object.keys(t.attachmentType),function(a){return n("a-select-option",{key:a,attrs:{value:a}},[t._v(t._s(t.attachmentType[a].text))])}),1)],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"文件类型"}},[n("a-select",{on:{change:t.handleQuery},model:{value:t.queryParam.mediaType,callback:function(a){t.$set(t.queryParam,"mediaType",a)},expression:"queryParam.mediaType"}},t._l(t.mediaTypes,function(a,e){return n("a-select-option",{key:e,attrs:{value:a}},[t._v(t._s(a))])}),1)],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("span",{staticClass:"table-page-search-submitButtons"},[n("a-button",{attrs:{type:"primary"},on:{click:t.handleQuery}},[t._v("查询")]),n("a-button",{staticStyle:{"margin-left":"8px"},on:{click:t.handleResetParam}},[t._v("重置")])],1)])],1)],1)],1),n("div",{staticClass:"table-operator"},[n("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:function(){return a.uploadVisible=!0}}},[t._v("上传")])],1)])],1),n("a-col",{attrs:{span:24}},[n("a-list",{attrs:{grid:{gutter:12,xs:1,sm:2,md:4,lg:6,xl:6,xxl:6},dataSource:t.formattedDatas,loading:t.listLoading},scopedSlots:t._u([{key:"renderItem",fn:function(a,e){return n("a-list-item",{key:e},[n("a-card",{attrs:{bodyStyle:{padding:0},hoverable:""},on:{click:function(e){return t.handleShowDetailDrawer(a)}}},[n("div",{staticClass:"attach-thumb"},[n("span",{directives:[{name:"show",rawName:"v-show",value:!t.handleJudgeMediaType(a),expression:"!handleJudgeMediaType(item)"}]},[t._v("当前格式不支持预览")]),n("img",{directives:[{name:"show",rawName:"v-show",value:t.handleJudgeMediaType(a),expression:"handleJudgeMediaType(item)"}],attrs:{src:a.thumbPath}})]),n("a-card-meta",[n("ellipsis",{attrs:{slot:"description",length:t.isMobile()?36:16,tooltip:""},slot:"description"},[t._v(t._s(a.name))])],1)],1)],1)}}])})],1)],1),n("div",{staticClass:"page-wrapper"},[n("a-pagination",{staticClass:"pagination",attrs:{total:t.pagination.total,defaultPageSize:t.pagination.size,pageSizeOptions:["18","36","54","72","90","108"],showSizeChanger:""},on:{change:t.handlePaginationChange,showSizeChange:t.handlePaginationChange}})],1),n("a-modal",{attrs:{title:"上传附件",footer:null,afterClose:t.onUploadClose},model:{value:t.uploadVisible,callback:function(a){t.uploadVisible=a},expression:"uploadVisible"}},[n("upload",{attrs:{name:"file",multiple:"",uploadHandler:t.uploadHandler}},[n("p",{staticClass:"ant-upload-drag-icon"},[n("a-icon",{attrs:{type:"inbox"}})],1),n("p",{staticClass:"ant-upload-text"},[t._v("点击选择文件或将文件拖拽到此处")]),n("p",{staticClass:"ant-upload-hint"},[t._v("支持单个或批量上传")])])],1),t.selectAttachment?n("AttachmentDetailDrawer",{attrs:{attachment:t.selectAttachment,addToPhoto:!0},on:{delete:function(){return a.loadAttachments()}},model:{value:t.drawerVisiable,callback:function(a){t.drawerVisiable=a},expression:"drawerVisiable"}}):t._e()],1)},i=[],s=(e("7bc1"),e("b745"),e("680ad")),r=e("ac0d"),l=e("5bcf"),o=e("a796"),c={components:{PageView:s["b"],AttachmentDetailDrawer:l["a"]},mixins:[r["a"],r["b"]],data:function(){return{attachmentType:o["a"].type,listLoading:!0,uploadVisible:!1,selectAttachment:{},attachments:[],mediaTypes:[],editable:!1,pagination:{page:1,size:18,sort:null},queryParam:{page:0,size:18,sort:null,keyword:null,mediaType:null,attachmentType:null},uploadHandler:o["a"].upload,drawerVisiable:!1}},computed:{formattedDatas:function(){var a=this;return this.attachments.map(function(t){return t.typeProperty=a.attachmentType[t.type],t})}},created:function(){this.loadAttachments(),this.loadMediaTypes()},methods:{loadAttachments:function(){var a=this;this.queryParam.page=this.pagination.page-1,this.queryParam.size=this.pagination.size,this.queryParam.sort=this.pagination.sort,this.listLoading=!0,o["a"].query(this.queryParam).then(function(t){a.attachments=t.data.data.content,a.pagination.total=t.data.data.total,a.listLoading=!1})},loadMediaTypes:function(){var a=this;o["a"].getMediaTypes().then(function(t){a.mediaTypes=t.data.data})},handleShowDetailDrawer:function(a){this.selectAttachment=a,this.drawerVisiable=!0},handlePaginationChange:function(a,t){this.$log.debug("Current: ".concat(a,", PageSize: ").concat(t)),this.pagination.page=a,this.pagination.size=t,this.loadAttachments()},handleResetParam:function(){this.queryParam.keyword=null,this.queryParam.mediaType=null,this.queryParam.attachmentType=null,this.loadAttachments()},handleQuery:function(){this.queryParam.page=0,this.loadAttachments()},onUploadClose:function(){this.loadAttachments(),this.loadMediaTypes()},handleJudgeMediaType:function(a){var t=a.mediaType;if(t){var e=t.split("/")[0];return"image"===e}return!1}}},d=c,u=(e("4cf8"),e("17cc")),p=Object(u["a"])(d,n,i,!1,null,"604cba98",null);t["default"]=p.exports},"7de1":function(a,t,e){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b64bf"],{"1d0f":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("page-view",[a("div",{staticClass:"card-container"},[a("a-tabs",{attrs:{type:"card"}},[a("a-tab-pane",{key:"1",attrs:{tab:"文章"}},[a("comment-tab",{attrs:{type:"posts"}})],1),a("a-tab-pane",{key:"2",attrs:{tab:"页面"}},[a("comment-tab",{attrs:{type:"sheets"}})],1)],1)],1)])},n=[],o=a("680ad"),i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"comment-tab-wrapper"},[a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"table-page-search-wrapper"},[a("a-form",{attrs:{layout:"inline"}},[a("a-row",{attrs:{gutter:48}},[a("a-col",{attrs:{md:6,sm:24}},[a("a-form-item",{attrs:{label:"关键词"}},[a("a-input",{model:{value:t.queryParam.keyword,callback:function(e){t.$set(t.queryParam,"keyword",e)},expression:"queryParam.keyword"}})],1)],1),a("a-col",{attrs:{md:6,sm:24}},[a("a-form-item",{attrs:{label:"评论状态"}},[a("a-select",{attrs:{placeholder:"请选择评论状态"},on:{change:t.handleQuery},model:{value:t.queryParam.status,callback:function(e){t.$set(t.queryParam,"status",e)},expression:"queryParam.status"}},t._l(Object.keys(t.commentStatus),function(e){return a("a-select-option",{key:e,attrs:{value:e}},[t._v(t._s(t.commentStatus[e].text))])}),1)],1)],1),a("a-col",{attrs:{md:12,sm:24}},[a("span",{staticClass:"table-page-search-submitButtons"},[a("a-button",{attrs:{type:"primary"},on:{click:t.handleQuery}},[t._v("查询")]),a("a-button",{staticStyle:{"margin-left":"8px"},on:{click:t.handleResetParam}},[t._v("重置")])],1)])],1)],1)],1),a("div",{staticClass:"table-operator"},[a("a-dropdown",{directives:[{name:"show",rawName:"v-show",value:null!=t.queryParam.status&&""!=t.queryParam.status,expression:"queryParam.status!=null && queryParam.status!=''"}]},[a("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},["AUDITING"===t.queryParam.status?a("a-menu-item",{key:"1"},[a("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handlePublishMore}},[t._v("\n 通过\n ")])]):t._e(),"PUBLISHED"===t.queryParam.status||"AUDITING"===t.queryParam.status?a("a-menu-item",{key:"2"},[a("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handleRecycleMore}},[t._v("\n 移到回收站\n ")])]):t._e(),"RECYCLE"===t.queryParam.status?a("a-menu-item",{key:"3"},[a("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handleDeleteMore}},[t._v("\n 永久删除\n ")])]):t._e()],1),a("a-button",[t._v("\n 批量操作\n "),a("a-icon",{attrs:{type:"down"}})],1)],1)],1),a("div",{staticStyle:{"margin-top":"15px"}},[a("a-table",{attrs:{rowKey:function(t){return t.id},rowSelection:{onChange:t.onSelectionChange,getCheckboxProps:t.getCheckboxProps},columns:t.columns,dataSource:t.formattedComments,loading:t.loading,pagination:!1},scopedSlots:t._u([{key:"content",fn:function(e){return a("p",{staticClass:"comment-content-wrapper",domProps:{innerHTML:t._s(e)}})}},{key:"status",fn:function(e){return a("span",{},[a("a-badge",{attrs:{status:e.status}}),t._v("\n "+t._s(e.text)+"\n ")],1)}},{key:"post",fn:function(e){return"posts"===t.type?a("a",{attrs:{href:t.options.blog_url+"/archives/"+e.url,target:"_blank"}},[t._v(t._s(e.title))]):a("a",{attrs:{href:t.options.blog_url+"/s/"+t.sheet.url,target:"_blank"}},[t._v(t._s(t.sheet.title))])}},{key:"createTime",fn:function(e){return a("span",{},[t._v(t._s(t._f("timeAgo")(e)))])}},{key:"action",fn:function(e,s){return a("span",{},["AUDITING"===s.status?a("a-dropdown",{attrs:{trigger:["click"]}},[a("a",{staticClass:"ant-dropdown-link",attrs:{href:"javascript:void(0);"}},[t._v("通过")]),a("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[a("a-menu-item",{key:"1"},[a("a",{attrs:{href:"javascript:void(0);"},on:{click:function(e){return t.handleEditStatusClick(s.id,"PUBLISHED")}}},[t._v("通过")])]),a("a-menu-item",{key:"2"},[a("a",{attrs:{href:"javascript:void(0);"},on:{click:function(e){return t.handleReplyAndPassClick(s)}}},[t._v("通过并回复")])])],1)],1):"PUBLISHED"===s.status?a("a",{attrs:{href:"javascript:void(0);"},on:{click:function(e){return t.handleReplyClick(s)}}},[t._v("回复")]):"RECYCLE"===s.status?a("a-popconfirm",{attrs:{title:"你确定要还原该评论?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleEditStatusClick(s.id,"PUBLISHED")}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("还原")])]):t._e(),a("a-divider",{attrs:{type:"vertical"}}),"PUBLISHED"===s.status||"AUDITING"===s.status?a("a-popconfirm",{attrs:{title:"你确定要将该评论移到回收站?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleEditStatusClick(s.id,"RECYCLE")}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("回收站")])]):"RECYCLE"===s.status?a("a-popconfirm",{attrs:{title:"你确定要永久删除该评论?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleDeleteClick(s.id)}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("删除")])]):t._e()],1)}}],null,!0)}),a("div",{staticClass:"page-wrapper"},[a("a-pagination",{staticClass:"pagination",attrs:{total:t.pagination.total,pageSizeOptions:["1","2","5","10","20","50","100"],showSizeChanger:""},on:{showSizeChange:t.handlePaginationChange,change:t.handlePaginationChange}})],1)],1)]),t.selectComment?a("a-modal",{attrs:{title:"回复给:"+t.selectComment.author},on:{close:t.onReplyClose},model:{value:t.replyCommentVisible,callback:function(e){t.replyCommentVisible=e},expression:"replyCommentVisible"}},[a("template",{slot:"footer"},[a("a-button",{key:"submit",attrs:{type:"primary"},on:{click:t.handleCreateClick}},[t._v("\n 回复\n ")])],1),a("a-form",{attrs:{layout:"vertical"}},[a("a-form-item",[a("a-input",{attrs:{type:"textarea",autosize:{minRows:8}},model:{value:t.replyComment.content,callback:function(e){t.$set(t.replyComment,"content",e)},expression:"replyComment.content"}})],1)],1)],2):t._e()],1)},r=[],l=(a("f763"),a("b745"),a("063c")),c=a("482b"),u=a("ae4d"),m=a.n(u),d=[{title:"昵称",dataIndex:"author"},{title:"内容",dataIndex:"content",scopedSlots:{customRender:"content"}},{title:"状态",className:"status",dataIndex:"statusProperty",scopedSlots:{customRender:"status"}},{title:"评论文章",dataIndex:"post",scopedSlots:{customRender:"post"}},{title:"日期",dataIndex:"createTime",scopedSlots:{customRender:"createTime"}},{title:"操作",dataIndex:"action",width:"150px",scopedSlots:{customRender:"action"}}],p=[{title:"昵称",dataIndex:"author"},{title:"内容",dataIndex:"content",scopedSlots:{customRender:"content"}},{title:"状态",className:"status",dataIndex:"statusProperty",scopedSlots:{customRender:"status"}},{title:"评论页面",dataIndex:"sheet",scopedSlots:{customRender:"sheet"}},{title:"日期",dataIndex:"createTime",scopedSlots:{customRender:"createTime"}},{title:"操作",dataIndex:"action",width:"150px",scopedSlots:{customRender:"action"}}],h={name:"CommentTab",props:{type:{type:String,required:!1,default:"posts",validator:function(t){return-1!==["posts","sheets","journals"].indexOf(t)}}},data:function(){return{columns:"posts"===this.type?d:p,replyCommentVisible:!1,pagination:{current:1,pageSize:10,sort:null},queryParam:{page:0,size:10,sort:null,keyword:null,status:null},selectedRowKeys:[],selectedRows:[],comments:[],selectComment:{},replyComment:{},loading:!1,commentStatus:l["a"].commentStatus,options:[],keys:["blog_url"]}},created:function(){this.loadComments(),this.loadOptions()},computed:{formattedComments:function(){var t=this;return this.comments.map(function(e){return e.statusProperty=t.commentStatus[e.status],e.content=m()(e.content,{sanitize:!0}),e})}},methods:{loadComments:function(){var t=this;this.loading=!0,this.queryParam.page=this.pagination.current-1,this.queryParam.size=this.pagination.pageSize,this.queryParam.sort=this.pagination.sort,l["a"].queryComment(this.type,this.queryParam).then(function(e){t.comments=e.data.data.content,t.pagination.total=e.data.data.total,t.loading=!1})},handleQuery:function(){this.queryParam.page=0,this.loadComments()},loadOptions:function(){var t=this;c["a"].listAll(this.keys).then(function(e){t.options=e.data.data})},handleEditStatusClick:function(t,e){var a=this;l["a"].updateStatus(this.type,t,e).then(function(t){a.$message.success("操作成功!"),a.loadComments()})},handleDeleteClick:function(t){var e=this;l["a"].delete(this.type,t).then(function(t){e.$message.success("删除成功!"),e.loadComments()})},handleReplyAndPassClick:function(t){this.handleReplyClick(t),this.handleEditStatusClick(t.id,"PUBLISHED")},handleReplyClick:function(t){this.selectComment=t,this.replyCommentVisible=!0,this.replyComment.parentId=t.id,this.replyComment.postId=t.post.id},handleCreateClick:function(){var t=this;l["a"].create(this.type,this.replyComment).then(function(e){t.$message.success("回复成功!"),t.replyComment={},t.selectComment={},t.replyCommentVisible=!1,t.loadComments()})},handlePaginationChange:function(t,e){this.$log.debug("Current: ".concat(t,", PageSize: ").concat(e)),this.pagination.current=t,this.pagination.pageSize=e,this.loadComments()},handleResetParam:function(){this.queryParam.keyword=null,this.queryParam.status=null,this.loadComments()},handlePublishMore:function(){var t=this;if(this.selectedRowKeys.length<=0)this.$message.success("请至少选择一项!");else for(var e=function(e){var a=t.selectedRowKeys[e];l["a"].updateStatus(t.type,a,"PUBLISHED").then(function(e){t.$log.debug("commentId: ".concat(a,", status: PUBLISHED")),t.selectedRowKeys=[],t.loadComments()})},a=0;a<this.selectedRowKeys.length;a++)e(a)},handleRecycleMore:function(){var t=this;if(this.selectedRowKeys.length<=0)this.$message.success("请至少选择一项!");else for(var e=function(e){var a=t.selectedRowKeys[e];l["a"].updateStatus(t.type,a,"RECYCLE").then(function(e){t.$log.debug("commentId: ".concat(a,", status: RECYCLE")),t.selectedRowKeys=[],t.loadComments()})},a=0;a<this.selectedRowKeys.length;a++)e(a)},handleDeleteMore:function(){var t=this;if(this.selectedRowKeys.length<=0)this.$message.success("请至少选择一项!");else for(var e=function(e){var a=t.selectedRowKeys[e];l["a"].delete(t.type,a).then(function(e){t.$log.debug("delete: ".concat(a)),t.selectedRowKeys=[],t.loadComments()})},a=0;a<this.selectedRowKeys.length;a++)e(a)},onReplyClose:function(){this.replyComment={},this.selectComment={},this.replyCommentVisible=!1},onSelectionChange:function(t){this.selectedRowKeys=t,this.$log.debug("SelectedRowKeys: ".concat(t))},getCheckboxProps:function(t){return{props:{disabled:"RECYCLE"===t.status,name:t.author}}}}},y=h,f=a("17cc"),C=Object(f["a"])(y,i,r,!1,null,null,null),g=C.exports,v={components:{PageView:o["b"],CommentTab:g},data:function(){return{}},methods:{}},k=v,b=Object(f["a"])(k,s,n,!1,null,null,null);e["default"]=b.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b64bf"],{"1d0f":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("page-view",[a("div",{staticClass:"card-container"},[a("a-tabs",{attrs:{type:"card"}},[a("a-tab-pane",{key:"1",attrs:{tab:"文章"}},[a("comment-tab",{attrs:{type:"posts"}})],1),a("a-tab-pane",{key:"2",attrs:{tab:"页面"}},[a("comment-tab",{attrs:{type:"sheets"}})],1)],1)],1)])},n=[],o=a("680ad"),i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"comment-tab-wrapper"},[a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"table-page-search-wrapper"},[a("a-form",{attrs:{layout:"inline"}},[a("a-row",{attrs:{gutter:48}},[a("a-col",{attrs:{md:6,sm:24}},[a("a-form-item",{attrs:{label:"关键词"}},[a("a-input",{model:{value:t.queryParam.keyword,callback:function(e){t.$set(t.queryParam,"keyword",e)},expression:"queryParam.keyword"}})],1)],1),a("a-col",{attrs:{md:6,sm:24}},[a("a-form-item",{attrs:{label:"评论状态"}},[a("a-select",{attrs:{placeholder:"请选择评论状态"},on:{change:t.handleQuery},model:{value:t.queryParam.status,callback:function(e){t.$set(t.queryParam,"status",e)},expression:"queryParam.status"}},t._l(Object.keys(t.commentStatus),function(e){return a("a-select-option",{key:e,attrs:{value:e}},[t._v(t._s(t.commentStatus[e].text))])}),1)],1)],1),a("a-col",{attrs:{md:12,sm:24}},[a("span",{staticClass:"table-page-search-submitButtons"},[a("a-button",{attrs:{type:"primary"},on:{click:t.handleQuery}},[t._v("查询")]),a("a-button",{staticStyle:{"margin-left":"8px"},on:{click:t.handleResetParam}},[t._v("重置")])],1)])],1)],1)],1),a("div",{staticClass:"table-operator"},[a("a-dropdown",{directives:[{name:"show",rawName:"v-show",value:null!=t.queryParam.status&&""!=t.queryParam.status,expression:"queryParam.status!=null && queryParam.status!=''"}]},[a("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},["AUDITING"===t.queryParam.status?a("a-menu-item",{key:"1"},[a("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handlePublishMore}},[t._v("\n 通过\n ")])]):t._e(),"PUBLISHED"===t.queryParam.status||"AUDITING"===t.queryParam.status?a("a-menu-item",{key:"2"},[a("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handleRecycleMore}},[t._v("\n 移到回收站\n ")])]):t._e(),"RECYCLE"===t.queryParam.status?a("a-menu-item",{key:"3"},[a("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handleDeleteMore}},[t._v("\n 永久删除\n ")])]):t._e()],1),a("a-button",[t._v("\n 批量操作\n "),a("a-icon",{attrs:{type:"down"}})],1)],1)],1),a("div",{staticStyle:{"margin-top":"15px"}},[a("a-table",{attrs:{rowKey:function(t){return t.id},rowSelection:{onChange:t.onSelectionChange,getCheckboxProps:t.getCheckboxProps},columns:t.columns,dataSource:t.formattedComments,loading:t.loading,pagination:!1},scopedSlots:t._u([{key:"content",fn:function(e){return a("p",{staticClass:"comment-content-wrapper",domProps:{innerHTML:t._s(e)}})}},{key:"status",fn:function(e){return a("span",{},[a("a-badge",{attrs:{status:e.status}}),t._v("\n "+t._s(e.text)+"\n ")],1)}},{key:"post",fn:function(e){return"posts"===t.type?a("a",{attrs:{href:t.options.blog_url+"/archives/"+e.url,target:"_blank"}},[t._v(t._s(e.title))]):t._e()}},{key:"sheet",fn:function(e){return"sheets"===t.type?a("a",{attrs:{href:t.options.blog_url+"/s/"+e.url,target:"_blank"}},[t._v(t._s(e.title))]):t._e()}},{key:"createTime",fn:function(e){return a("span",{},[t._v(t._s(t._f("timeAgo")(e)))])}},{key:"action",fn:function(e,s){return a("span",{},["AUDITING"===s.status?a("a-dropdown",{attrs:{trigger:["click"]}},[a("a",{staticClass:"ant-dropdown-link",attrs:{href:"javascript:void(0);"}},[t._v("通过")]),a("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[a("a-menu-item",{key:"1"},[a("a",{attrs:{href:"javascript:void(0);"},on:{click:function(e){return t.handleEditStatusClick(s.id,"PUBLISHED")}}},[t._v("通过")])]),a("a-menu-item",{key:"2"},[a("a",{attrs:{href:"javascript:void(0);"},on:{click:function(e){return t.handleReplyAndPassClick(s)}}},[t._v("通过并回复")])])],1)],1):"PUBLISHED"===s.status?a("a",{attrs:{href:"javascript:void(0);"},on:{click:function(e){return t.handleReplyClick(s)}}},[t._v("回复")]):"RECYCLE"===s.status?a("a-popconfirm",{attrs:{title:"你确定要还原该评论?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleEditStatusClick(s.id,"PUBLISHED")}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("还原")])]):t._e(),a("a-divider",{attrs:{type:"vertical"}}),"PUBLISHED"===s.status||"AUDITING"===s.status?a("a-popconfirm",{attrs:{title:"你确定要将该评论移到回收站?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleEditStatusClick(s.id,"RECYCLE")}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("回收站")])]):"RECYCLE"===s.status?a("a-popconfirm",{attrs:{title:"你确定要永久删除该评论?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleDeleteClick(s.id)}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("删除")])]):t._e()],1)}}],null,!0)}),a("div",{staticClass:"page-wrapper"},[a("a-pagination",{staticClass:"pagination",attrs:{total:t.pagination.total,pageSizeOptions:["1","2","5","10","20","50","100"],showSizeChanger:""},on:{showSizeChange:t.handlePaginationChange,change:t.handlePaginationChange}})],1)],1)]),t.selectComment?a("a-modal",{attrs:{title:"回复给:"+t.selectComment.author},on:{close:t.onReplyClose},model:{value:t.replyCommentVisible,callback:function(e){t.replyCommentVisible=e},expression:"replyCommentVisible"}},[a("template",{slot:"footer"},[a("a-button",{key:"submit",attrs:{type:"primary"},on:{click:t.handleCreateClick}},[t._v("\n 回复\n ")])],1),a("a-form",{attrs:{layout:"vertical"}},[a("a-form-item",[a("a-input",{attrs:{type:"textarea",autosize:{minRows:8}},model:{value:t.replyComment.content,callback:function(e){t.$set(t.replyComment,"content",e)},expression:"replyComment.content"}})],1)],1)],2):t._e()],1)},r=[],l=(a("f763"),a("b745"),a("063c")),c=a("482b"),u=a("ae4d"),m=a.n(u),d=[{title:"昵称",dataIndex:"author"},{title:"内容",dataIndex:"content",scopedSlots:{customRender:"content"}},{title:"状态",className:"status",dataIndex:"statusProperty",scopedSlots:{customRender:"status"}},{title:"评论文章",dataIndex:"post",scopedSlots:{customRender:"post"}},{title:"日期",dataIndex:"createTime",scopedSlots:{customRender:"createTime"}},{title:"操作",dataIndex:"action",width:"150px",scopedSlots:{customRender:"action"}}],p=[{title:"昵称",dataIndex:"author"},{title:"内容",dataIndex:"content",scopedSlots:{customRender:"content"}},{title:"状态",className:"status",dataIndex:"statusProperty",scopedSlots:{customRender:"status"}},{title:"评论页面",dataIndex:"sheet",scopedSlots:{customRender:"sheet"}},{title:"日期",dataIndex:"createTime",scopedSlots:{customRender:"createTime"}},{title:"操作",dataIndex:"action",width:"150px",scopedSlots:{customRender:"action"}}],h={name:"CommentTab",props:{type:{type:String,required:!1,default:"posts",validator:function(t){return-1!==["posts","sheets","journals"].indexOf(t)}}},data:function(){return{columns:"posts"===this.type?d:p,replyCommentVisible:!1,pagination:{current:1,pageSize:10,sort:null},queryParam:{page:0,size:10,sort:null,keyword:null,status:null},selectedRowKeys:[],selectedRows:[],comments:[],selectComment:{},replyComment:{},loading:!1,commentStatus:l["a"].commentStatus,options:[],keys:["blog_url"]}},created:function(){this.loadComments(),this.loadOptions()},computed:{formattedComments:function(){var t=this;return this.comments.map(function(e){return e.statusProperty=t.commentStatus[e.status],e.content=m()(e.content,{sanitize:!0}),e})}},methods:{loadComments:function(){var t=this;this.loading=!0,this.queryParam.page=this.pagination.current-1,this.queryParam.size=this.pagination.pageSize,this.queryParam.sort=this.pagination.sort,l["a"].queryComment(this.type,this.queryParam).then(function(e){t.comments=e.data.data.content,t.pagination.total=e.data.data.total,t.loading=!1})},handleQuery:function(){this.queryParam.page=0,this.loadComments()},loadOptions:function(){var t=this;c["a"].listAll(this.keys).then(function(e){t.options=e.data.data})},handleEditStatusClick:function(t,e){var a=this;l["a"].updateStatus(this.type,t,e).then(function(t){a.$message.success("操作成功!"),a.loadComments()})},handleDeleteClick:function(t){var e=this;l["a"].delete(this.type,t).then(function(t){e.$message.success("删除成功!"),e.loadComments()})},handleReplyAndPassClick:function(t){this.handleReplyClick(t),this.handleEditStatusClick(t.id,"PUBLISHED")},handleReplyClick:function(t){this.selectComment=t,this.replyCommentVisible=!0,this.replyComment.parentId=t.id,"posts"===this.type?this.replyComment.postId=t.post.id:this.replyComment.postId=t.sheet.id},handleCreateClick:function(){var t=this;l["a"].create(this.type,this.replyComment).then(function(e){t.$message.success("回复成功!"),t.replyComment={},t.selectComment={},t.replyCommentVisible=!1,t.loadComments()})},handlePaginationChange:function(t,e){this.$log.debug("Current: ".concat(t,", PageSize: ").concat(e)),this.pagination.current=t,this.pagination.pageSize=e,this.loadComments()},handleResetParam:function(){this.queryParam.keyword=null,this.queryParam.status=null,this.loadComments()},handlePublishMore:function(){var t=this;if(this.selectedRowKeys.length<=0)this.$message.success("请至少选择一项!");else for(var e=function(e){var a=t.selectedRowKeys[e];l["a"].updateStatus(t.type,a,"PUBLISHED").then(function(e){t.$log.debug("commentId: ".concat(a,", status: PUBLISHED")),t.selectedRowKeys=[],t.loadComments()})},a=0;a<this.selectedRowKeys.length;a++)e(a)},handleRecycleMore:function(){var t=this;if(this.selectedRowKeys.length<=0)this.$message.success("请至少选择一项!");else for(var e=function(e){var a=t.selectedRowKeys[e];l["a"].updateStatus(t.type,a,"RECYCLE").then(function(e){t.$log.debug("commentId: ".concat(a,", status: RECYCLE")),t.selectedRowKeys=[],t.loadComments()})},a=0;a<this.selectedRowKeys.length;a++)e(a)},handleDeleteMore:function(){var t=this;if(this.selectedRowKeys.length<=0)this.$message.success("请至少选择一项!");else for(var e=function(e){var a=t.selectedRowKeys[e];l["a"].delete(t.type,a).then(function(e){t.$log.debug("delete: ".concat(a)),t.selectedRowKeys=[],t.loadComments()})},a=0;a<this.selectedRowKeys.length;a++)e(a)},onReplyClose:function(){this.replyComment={},this.selectComment={},this.replyCommentVisible=!1},onSelectionChange:function(t){this.selectedRowKeys=t,this.$log.debug("SelectedRowKeys: ".concat(t))},getCheckboxProps:function(t){return{props:{disabled:"RECYCLE"===t.status,name:t.author}}}}},y=h,f=a("17cc"),C=Object(f["a"])(y,i,r,!1,null,null,null),g=C.exports,v={components:{PageView:o["b"],CommentTab:g},data:function(){return{}},methods:{}},k=v,b=Object(f["a"])(k,s,n,!1,null,null,null);e["default"]=b.exports}}]);
\ No newline at end of file
此差异已折叠。
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3b51c5ec"],{c02e:function(t,e,a){"use strict";var r=a("d93e"),o=a.n(r);o.a},c405:function(t,e,a){"use strict";a("7364"),a("f763");var r=a("9efd"),o="/api/admin/categories",s={};function n(t,e){e.forEach(function(e){t.key===e.parentId&&(t.children||(t.children=[]),t.children.push({key:e.id,title:e.name,isLeaf:!1}))}),t.children?t.children.forEach(function(t){return n(t,e)}):t.isLeaf=!0}s.listAll=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Object(r["a"])({url:"".concat(o),params:{more:t},method:"get"})},s.listTree=function(){return Object(r["a"])({url:"".concat(o,"/tree_view"),method:"get"})},s.create=function(t){return Object(r["a"])({url:o,data:t,method:"post"})},s.delete=function(t){return Object(r["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},s.get=function(t){return Object(r["a"])({url:"".concat(o,"/").concat(t),method:"get"})},s.update=function(t,e){return Object(r["a"])({url:"".concat(o,"/").concat(t),data:e,method:"put"})},s.concreteTree=function(t){var e={key:0,title:"top",children:[]};return n(e,t),e.children},e["a"]=s},caf6:function(t,e,a){"use strict";var r=a("9efd"),o="/api/admin/posts",s={listLatest:function(t){return Object(r["a"])({url:"".concat(o,"/latest"),params:{top:t},method:"get"})},query:function(t){return Object(r["a"])({url:o,params:t,method:"get"})},get:function(t){return Object(r["a"])({url:"".concat(o,"/").concat(t),method:"get"})},create:function(t,e){return Object(r["a"])({url:o,method:"post",data:t,mute:e,params:{autoSave:e}})},update:function(t,e,a){return Object(r["a"])({url:"".concat(o,"/").concat(t),method:"put",data:e,params:{autoSave:a}})},updateStatus:function(t,e){return Object(r["a"])({url:"".concat(o,"/").concat(t,"/status/").concat(e),method:"put"})},delete:function(t){return Object(r["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},postStatus:{PUBLISHED:{color:"green",status:"success",text:"已发布"},DRAFT:{color:"yellow",status:"warning",text:"草稿"},RECYCLE:{color:"red",status:"error",text:"回收站"}}};e["a"]=s},d28d:function(t,e,a){"use strict";var r=a("9efd"),o="/api/admin/tags",s={listAll:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Object(r["a"])({url:o,params:{more:t},method:"get"})},createWithName:function(t){return Object(r["a"])({url:o,data:{name:t},method:"post"})},create:function(t){return Object(r["a"])({url:o,data:t,method:"post"})},update:function(t,e){return Object(r["a"])({url:"".concat(o,"/").concat(t),data:e,method:"put"})},delete:function(t){return Object(r["a"])({url:"".concat(o,"/").concat(t),method:"delete"})}};e["a"]=s},d93e:function(t,e,a){},db44:function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=this,a=e.$createElement,r=e._self._c||a;return r("div",{staticClass:"page-header-index-wide"},[r("a-row",{attrs:{gutter:12}},[r("a-col",{attrs:{span:24}},[r("div",{staticStyle:{"margin-bottom":"16px"}},[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["title",{rules:[{required:!0,message:"请输入文章标题"}]}],expression:"['title', { rules: [{ required: true, message: '请输入文章标题' }] }]"}],attrs:{size:"large",placeholder:"请输入文章标题"},model:{value:e.postToStage.title,callback:function(t){e.$set(e.postToStage,"title",t)},expression:"postToStage.title"}})],1),r("div",{attrs:{id:"editor"}},[r("mavon-editor",{attrs:{boxShadow:!1,toolbars:e.toolbars,ishljs:!0,autofocus:!1},model:{value:e.postToStage.originalContent,callback:function(t){e.$set(e.postToStage,"originalContent",t)},expression:"postToStage.originalContent"}})],1)])],1),r("a-drawer",{attrs:{title:"文章设置",width:e.isMobile()?"100%":"460",placement:"right",closable:"",visible:e.postSettingVisible},on:{close:function(){return t.postSettingVisible=!1}}},[r("div",{staticClass:"post-setting-drawer-content"},[r("div",{style:{marginBottom:"16px"}},[r("h3",{staticClass:"post-setting-drawer-title"},[e._v("基本设置")]),r("div",{staticClass:"post-setting-drawer-item"},[r("a-form",{attrs:{layout:"vertical"}},[r("a-form-item",{attrs:{label:"文章路径:",help:e.options.blog_url+"/archives/"+(e.postToStage.url?e.postToStage.url:"{auto_generate}")}},[r("a-input",{model:{value:e.postToStage.url,callback:function(t){e.$set(e.postToStage,"url",t)},expression:"postToStage.url"}})],1),r("a-form-item",{attrs:{label:"开启评论:"}},[r("a-radio-group",{attrs:{defaultValue:!1},model:{value:e.postToStage.disallowComment,callback:function(t){e.$set(e.postToStage,"disallowComment",t)},expression:"postToStage.disallowComment"}},[r("a-radio",{attrs:{value:!1}},[e._v("开启")]),r("a-radio",{attrs:{value:!0}},[e._v("关闭")])],1)],1)],1)],1)]),r("a-divider"),r("div",{style:{marginBottom:"16px"}},[r("h3",{staticClass:"post-setting-drawer-title"},[e._v("分类目录")]),r("div",{staticClass:"post-setting-drawer-item"},[r("category-tree",{attrs:{categories:e.categories},model:{value:e.selectedCategoryIds,callback:function(t){e.selectedCategoryIds=t},expression:"selectedCategoryIds"}}),r("div",[r("a-form",{attrs:{layout:"vertical"}},[e.categoryForm?r("a-form-item",[r("category-select-tree",{attrs:{categories:e.categories},model:{value:e.categoryToCreate.parentId,callback:function(t){e.$set(e.categoryToCreate,"parentId",t)},expression:"categoryToCreate.parentId"}})],1):e._e(),e.categoryForm?r("a-form-item",[r("a-input",{attrs:{placeholder:"分类名称"},model:{value:e.categoryToCreate.name,callback:function(t){e.$set(e.categoryToCreate,"name",t)},expression:"categoryToCreate.name"}})],1):e._e(),e.categoryForm?r("a-form-item",[r("a-input",{attrs:{placeholder:"分类路径"},model:{value:e.categoryToCreate.slugNames,callback:function(t){e.$set(e.categoryToCreate,"slugNames",t)},expression:"categoryToCreate.slugNames"}})],1):e._e(),r("a-form-item",[e.categoryForm?r("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"primary"},on:{click:e.handlerCreateCategory}},[e._v("保存")]):e._e(),e.categoryForm?e._e():r("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"dashed"},on:{click:e.toggleCategoryForm}},[e._v("新增")]),e.categoryForm?r("a-button",{on:{click:e.toggleCategoryForm}},[e._v("取消")]):e._e()],1)],1)],1)],1)]),r("a-divider"),r("div",{style:{marginBottom:"16px"}},[r("h3",{staticClass:"post-setting-drawer-title"},[e._v("标签")]),r("div",{staticClass:"post-setting-drawer-item"},[r("a-form",{attrs:{layout:"vertical"}},[r("a-form-item",[r("TagSelect",{model:{value:e.selectedTagIds,callback:function(t){e.selectedTagIds=t},expression:"selectedTagIds"}})],1)],1)],1)]),r("a-divider"),r("div",{style:{marginBottom:"16px"}},[r("h3",{staticClass:"post-setting-drawer-title"},[e._v("摘要")]),r("div",{staticClass:"post-setting-drawer-item"},[r("a-form",{attrs:{layout:"vertical"}},[r("a-form-item",[r("a-input",{attrs:{type:"textarea",autosize:{minRows:5},placeholder:"不填写则会自动生成"},model:{value:e.postToStage.summary,callback:function(t){e.$set(e.postToStage,"summary",t)},expression:"postToStage.summary"}})],1)],1)],1)]),r("a-divider"),r("div",{style:{marginBottom:"16px"}},[r("h3",{staticClass:"post-setting-drawer-title"},[e._v("缩略图")]),r("div",{staticClass:"post-setting-drawer-item"},[r("div",{staticClass:"post-thum"},[r("img",{staticClass:"img",attrs:{src:e.postToStage.thumbnail||"//i.loli.net/2019/05/05/5ccf007c0a01d.png"},on:{click:function(){return t.thumDrawerVisible=!0}}}),r("a-button",{staticClass:"post-thum-remove",attrs:{type:"dashed"},on:{click:e.handlerRemoveThumb}},[e._v("移除")])],1)])]),r("a-divider",{staticClass:"divider-transparent"})],1),r("AttachmentSelectDrawer",{attrs:{drawerWidth:460},on:{listenToSelect:e.handleSelectPostThumb},model:{value:e.thumDrawerVisible,callback:function(t){e.thumDrawerVisible=t},expression:"thumDrawerVisible"}}),r("div",{staticClass:"bottom-control"},[r("a-button",{staticStyle:{marginRight:"8px"},on:{click:e.handleDraftClick}},[e._v("保存草稿")]),r("a-button",{attrs:{type:"primary"},on:{click:e.handlePublishClick}},[e._v("发布")])],1)],1),r("AttachmentDrawer",{model:{value:e.attachmentDrawerVisible,callback:function(t){e.attachmentDrawerVisible=t},expression:"attachmentDrawerVisible"}}),r("footer-tool-bar",{style:{width:e.isSideMenu()&&e.isDesktop()?"calc(100% - "+(e.sidebarOpened?256:80)+"px)":"100%"}},[r("a-button",{attrs:{type:"primary"},on:{click:function(){return t.postSettingVisible=!0}}},[e._v("发布")]),r("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"dashed"},on:{click:function(){return t.attachmentDrawerVisible=!0}}},[e._v("附件库")])],1)],1)},o=[],s=(a("f763"),a("eda3")),n=a("edf6"),i=a("ac9d"),c=a("ed4e"),l=a("3993"),u=a("fa25"),d=a("5a70"),g=a("ac0d"),m=a("2749"),p=(a("fa4e"),a("c405")),h=a("caf6"),f=a("482b"),v={components:{TagSelect:n["a"],mavonEditor:i["mavonEditor"],CategoryTree:s["a"],FooterToolBar:d["a"],AttachmentDrawer:c["a"],AttachmentSelectDrawer:l["a"],CategorySelectTree:u["a"]},mixins:[g["a"],g["b"]],data:function(){return{toolbars:m["a"],wrapperCol:{xl:{span:24},sm:{span:24},xs:{span:24}},attachmentDrawerVisible:!1,postSettingVisible:!1,thumDrawerVisible:!1,categoryForm:!1,categories:[],selectedCategoryIds:[],selectedTagIds:[],postToStage:{},categoryToCreate:{},timer:null,options:[],keys:["blog_url"]}},created:function(){this.loadCategories(),this.loadOptions(),clearInterval(this.timer),this.timer=null,this.autoSaveTimer()},destroyed:function(){clearInterval(this.timer),this.timer=null},beforeRouteLeave:function(t,e,a){null!==this.timer&&clearInterval(this.timer),this.autoSavePost(),a()},beforeRouteEnter:function(t,e,a){var r=t.query.postId;a(function(t){r&&h["a"].get(r).then(function(e){var a=e.data.data;t.postToStage=a,t.selectedTagIds=a.tagIds,t.selectedCategoryIds=a.categoryIds})})},methods:{loadCategories:function(){var t=this;p["a"].listAll().then(function(e){t.categories=e.data.data})},loadOptions:function(){var t=this;f["a"].listAll(this.keys).then(function(e){t.options=e.data.data})},createOrUpdatePost:function(t,e,a){var r=this;this.postToStage.categoryIds=this.selectedCategoryIds,this.postToStage.tagIds=this.selectedTagIds,this.postToStage.id?h["a"].update(this.postToStage.id,this.postToStage,a).then(function(t){r.$log.debug("Updated post",t.data.data),e&&e()}):h["a"].create(this.postToStage,a).then(function(e){r.$log.debug("Created post",e.data.data),t&&t(),r.postToStage=e.data.data})},savePost:function(){var t=this;this.createOrUpdatePost(function(){return t.$message.success("文章创建成功")},function(){return t.$message.success("文章更新成功")},!1)},autoSavePost:function(){null!=this.postToStage.title&&null!=this.postToStage.originalContent&&this.createOrUpdatePost(null,null,!0)},toggleCategoryForm:function(){this.categoryForm=!this.categoryForm},handlePublishClick:function(){this.postToStage.status="PUBLISHED",this.savePost()},handleDraftClick:function(){this.postToStage.status="DRAFT",this.savePost()},handlerRemoveThumb:function(){this.postToStage.thumbnail=null},handlerCreateCategory:function(){var t=this;p["a"].create(this.categoryToCreate).then(function(e){t.loadCategories(),t.categoryToCreate={}})},handleSelectPostThumb:function(t){this.postToStage.thumbnail=t.path,this.thumDrawerVisible=!1},autoSaveTimer:function(){var t=this;null==this.timer&&(this.timer=setInterval(function(){t.autoSavePost()},15e3))}}},y=v,b=(a("c02e"),a("17cc")),T=Object(b["a"])(y,r,o,!1,null,"6a7e5dfd",null);e["default"]=T.exports},eda3:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-tree",{attrs:{checkable:"",treeData:t.categoryTree,defaultExpandAll:!0,checkedKeys:t.categoryIds},on:{check:t.onCheck}},[a("span",{staticStyle:{color:"#1890ff"},attrs:{slot:"title0010"},slot:"title0010"},[t._v("sss")])])},o=[],s=a("c405"),n={name:"CategoryTree",model:{prop:"categoryIds",event:"check"},props:{categoryIds:{type:Array,required:!1,default:function(){return[]}},categories:{type:Array,required:!1,default:function(){return[]}}},computed:{categoryTree:function(){return s["a"].concreteTree(this.categories)}},methods:{onCheck:function(t,e){this.$log.debug("Chekced keys",t),this.$log.debug("e",e);var a=e.checkedNodes.filter(function(t){return t.data.props.isLeaf}).map(function(t){return t.key});this.$log.debug("Effectively selected category ids",a),this.$emit("check",a)}}},i=n,c=a("17cc"),l=Object(c["a"])(i,r,o,!1,null,null,null);e["a"]=l.exports},edf6:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-select",{staticStyle:{width:"100%"},attrs:{allowClear:"",mode:"tags",placeholder:"选择或输入标签"},on:{blur:t.handleBlur},model:{value:t.selectedTagNames,callback:function(e){t.selectedTagNames=e},expression:"selectedTagNames"}},t._l(t.tags,function(e){return a("a-select-option",{key:e.id,attrs:{value:e.name}},[t._v(t._s(e.name))])}),1)],1)},o=[],s=(a("f763"),a("7364"),a("d28d")),n=a("f753"),i=a.n(n),c={name:"TagSelect",model:{prop:"tagIds",event:"change"},props:{tagIds:{type:Array,required:!1,default:function(){return[]}}},data:function(){return{tags:[],selectedTagNames:[]}},created:function(){this.loadTags()},watch:{tags:function(t,e){var a=this;t&&(this.selectedTagNames=this.tagIds.map(function(t){return a.tagIdMap[t].name}))}},computed:{tagIdMap:function(){var t={};return this.tags.forEach(function(e){t[e.id]=e}),t},tagNameMap:function(){var t={};return this.tags.forEach(function(e){t[e.name]=e}),t}},methods:{loadTags:function(t){var e=this;s["a"].listAll(!0).then(function(a){e.tags=a.data.data,t&&t()})},handleBlur:function(){var t=this;this.$log.debug("Blured");var e=this.selectedTagNames.filter(function(e){return!t.tagNameMap[e]});if(this.$log.debug("Tag names to create",e),e!==[]){var a=e.map(function(t){return s["a"].createWithName(t)});i.a.all(a).then(i.a.spread(function(){t.loadTags(function(){t.$log.debug("Tag name map",t.tagNameMap);var e=t.selectedTagNames.map(function(e){return t.tagNameMap[e].id});t.$emit("change",e)})}))}else{var r=this.selectedTagNames.map(function(e){return t.tagNameMap[e].id});this.$emit("change",r)}}}},l=c,u=a("17cc"),d=Object(u["a"])(l,r,o,!1,null,null,null);e["a"]=d.exports},fa25:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-tree-select",{attrs:{treeData:t.categoryTreeData,placeholder:"请选择上级目录,默认为顶级目录",treeDefaultExpandAll:"",treeDataSimpleMode:!0,allowClear:!0,value:t.categoryIdString},on:{change:t.handleSelectionChange}})},o=[],s=(a("0857"),a("7364"),a("d4d5"),{name:"CategorySelectTree",model:{prop:"categoryId",event:"change"},props:{categoryId:{type:Number,required:!0,default:0},categories:{type:Array,required:!1,default:function(){return[]}}},computed:{categoryTreeData:function(){return this.categories.map(function(t){return{id:t.id,title:t.name,value:t.id.toString(),pId:t.parentId}})},categoryIdString:function(){return this.categoryId.toString()}},methods:{handleSelectionChange:function(t,e,a){this.$log.debug("value: ",t),this.$log.debug("label: ",e),this.$log.debug("extra: ",a),this.$emit("change",t?parseInt(t):0)}}}),n=s,i=a("17cc"),c=Object(i["a"])(n,r,o,!1,null,null,null);e["a"]=c.exports}}]);
\ No newline at end of file
此差异已折叠。
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5000e55c"],{"3e5b":function(t,a,e){},"5bcf":function(t,a,e){"use strict";var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("a-drawer",{attrs:{title:"附件详情",width:t.isMobile()?"100%":"460",closable:"",visible:t.visiable,destroyOnClose:""},on:{close:t.onClose}},[e("a-row",{attrs:{type:"flex",align:"middle"}},[e("a-col",{attrs:{span:24}},[e("a-skeleton",{attrs:{active:"",loading:t.detailLoading,paragraph:{rows:8}}},[e("div",{staticClass:"attach-detail-img"},[e("img",{attrs:{src:t.attachment.path}})])])],1),e("a-divider"),e("a-col",{attrs:{span:24}},[e("a-skeleton",{attrs:{active:"",loading:t.detailLoading,paragraph:{rows:8}}},[e("a-list",{attrs:{itemLayout:"horizontal"}},[e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-input",{on:{blur:t.doUpdateAttachment},model:{value:t.attachment.name,callback:function(a){t.$set(t.attachment,"name",a)},expression:"attachment.name"}})],1):e("template",{slot:"description"},[t._v(t._s(t.attachment.name))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 附件名:\n "),e("a",{attrs:{href:"javascript:void(0);"}},[e("a-icon",{attrs:{type:"edit"},on:{click:t.handleEditName}})],1)])],2)],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.mediaType}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("附件类型:")])])],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.typeProperty}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("存储位置:")])])],1),e("a-list-item",[e("a-list-item-meta",[e("template",{slot:"description"},[t._v("\n "+t._s(t._f("fileSizeFormat")(t.attachment.size))+"\n ")]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("附件大小:")])],2)],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.height+"x"+t.attachment.width}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("图片尺寸:")])])],1),e("a-list-item",[e("a-list-item-meta",[e("template",{slot:"description"},[t._v("\n "+t._s(t._f("moment")(t.attachment.createTime))+"\n ")]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("上传日期:")])],2)],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.path}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 普通链接:\n "),e("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handleCopyNormalLink}},[e("a-icon",{attrs:{type:"copy"}})],1)])])],1),e("a-list-item",[e("a-list-item-meta",[e("span",{attrs:{slot:"description"},slot:"description"},[t._v("!["+t._s(t.attachment.name)+"]("+t._s(t.attachment.path)+")")]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n Markdown 格式:\n "),e("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handleCopyMarkdownLink}},[e("a-icon",{attrs:{type:"copy"}})],1)])])],1)],1)],1)],1)],1),e("a-divider",{staticClass:"divider-transparent"}),e("div",{staticClass:"bottom-control"},[t.addToPhoto?e("a-popconfirm",{attrs:{title:"你确定要添加到图库?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleAddToPhoto}},[e("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"dashed"}},[t._v("添加到图库")])],1):t._e(),e("a-popconfirm",{attrs:{title:"你确定要删除该附件?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleDeleteAttachment}},[e("a-button",{attrs:{type:"danger"}},[t._v("删除")])],1)],1)],1)},i=[],s=(e("7364"),e("ac0d")),o=e("a796"),l=e("975e"),r={name:"AttachmentDetailDrawer",mixins:[s["a"],s["b"]],data:function(){return{detailLoading:!0,editable:!1,photo:{}}},model:{prop:"visiable",event:"close"},props:{attachment:{type:Object,required:!0},addToPhoto:{type:Boolean,required:!1,default:!1},visiable:{type:Boolean,required:!1,default:!0}},created:function(){this.loadSkeleton()},watch:{visiable:function(t,a){this.$log.debug("old value",a),this.$log.debug("new value",t),t&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var t=this;this.detailLoading=!0,setTimeout(function(){t.detailLoading=!1},500)},handleDeleteAttachment:function(){var t=this;o["a"].delete(this.attachment.id).then(function(a){t.$message.success("删除成功!"),t.$emit("delete",t.attachment),t.onClose()})},handleEditName:function(){this.editable=!this.editable},doUpdateAttachment:function(){var t=this;o["a"].update(this.attachment.id,this.attachment).then(function(a){t.$log.debug("Updated attachment",a.data.data),t.$message.success("附件修改成功!")}),this.editable=!1},handleCopyNormalLink:function(){var t=this,a="".concat(this.attachment.path);this.$copyText(a).then(function(a){console.log("copy",a),t.$message.success("复制成功!")}).catch(function(a){console.log("copy.err",a),t.$message.error("复制失败!")})},handleCopyMarkdownLink:function(){var t=this,a="![".concat(this.attachment.name,"](").concat(this.attachment.path,")");this.$copyText(a).then(function(a){console.log("copy",a),t.$message.success("复制成功!")}).catch(function(a){console.log("copy.err",a),t.$message.error("复制失败!")})},handleAddToPhoto:function(){var t=this;this.photo["name"]=this.attachment.name,this.photo["thumbnail"]=this.attachment.thumbPath,this.photo["url"]=this.attachment.path,this.photo["takeTime"]=(new Date).getTime(),l["a"].create(this.photo).then(function(a){t.$message.success("添加成功!")})},onClose:function(){this.$emit("close",!1)}}},c=r,d=(e("b3a7"),e("17cc")),u=Object(d["a"])(c,n,i,!1,null,null,null);a["a"]=u.exports},"61d0":function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=this,e=a.$createElement,n=a._self._c||e;return n("page-view",[n("a-row",{attrs:{gutter:12,type:"flex",align:"middle"}},[n("a-col",{staticClass:"search-box",attrs:{span:24}},[n("a-card",{attrs:{bordered:!1}},[n("div",{staticClass:"table-page-search-wrapper"},[n("a-form",{attrs:{layout:"inline"}},[n("a-row",{attrs:{gutter:48}},[n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"关键词"}},[n("a-input",{model:{value:a.queryParam.keyword,callback:function(t){a.$set(a.queryParam,"keyword",t)},expression:"queryParam.keyword"}})],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"存储位置"}},[n("a-select",{on:{change:a.handleQuery},model:{value:a.queryParam.attachmentType,callback:function(t){a.$set(a.queryParam,"attachmentType",t)},expression:"queryParam.attachmentType"}},a._l(Object.keys(a.attachmentType),function(t){return n("a-select-option",{key:t,attrs:{value:t}},[a._v(a._s(a.attachmentType[t].text))])}),1)],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"文件类型"}},[n("a-select",{on:{change:a.handleQuery},model:{value:a.queryParam.mediaType,callback:function(t){a.$set(a.queryParam,"mediaType",t)},expression:"queryParam.mediaType"}},a._l(a.mediaTypes,function(t,e){return n("a-select-option",{key:e,attrs:{value:t}},[a._v(a._s(t))])}),1)],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("span",{staticClass:"table-page-search-submitButtons"},[n("a-button",{attrs:{type:"primary"},on:{click:a.handleQuery}},[a._v("查询")]),n("a-button",{staticStyle:{"margin-left":"8px"},on:{click:a.handleResetParam}},[a._v("重置")])],1)])],1)],1)],1),n("div",{staticClass:"table-operator"},[n("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:function(){return t.uploadVisible=!0}}},[a._v("上传")])],1)])],1),n("a-col",{attrs:{span:24}},[n("a-list",{attrs:{grid:{gutter:12,xs:1,sm:2,md:4,lg:6,xl:6,xxl:6},dataSource:a.formattedDatas,loading:a.listLoading},scopedSlots:a._u([{key:"renderItem",fn:function(t,e){return n("a-list-item",{key:e},[n("a-card",{attrs:{bodyStyle:{padding:0},hoverable:""},on:{click:function(e){return a.handleShowDetailDrawer(t)}}},[n("div",{staticClass:"attach-thumb"},[n("img",{attrs:{src:t.thumbPath}})]),n("a-card-meta",[n("ellipsis",{attrs:{slot:"description",length:a.isMobile()?36:16,tooltip:""},slot:"description"},[a._v(a._s(t.name))])],1)],1)],1)}}])})],1)],1),n("div",{staticClass:"page-wrapper"},[n("a-pagination",{staticClass:"pagination",attrs:{total:a.pagination.total,defaultPageSize:a.pagination.size,pageSizeOptions:["18","36","54","72","90","108"],showSizeChanger:""},on:{change:a.handlePaginationChange,showSizeChange:a.handlePaginationChange}})],1),n("a-modal",{attrs:{title:"上传附件",footer:null,afterClose:a.onUploadClose},model:{value:a.uploadVisible,callback:function(t){a.uploadVisible=t},expression:"uploadVisible"}},[n("upload",{attrs:{name:"file",multiple:"",uploadHandler:a.uploadHandler}},[n("p",{staticClass:"ant-upload-drag-icon"},[n("a-icon",{attrs:{type:"inbox"}})],1),n("p",{staticClass:"ant-upload-text"},[a._v("点击选择文件或将文件拖拽到此处")]),n("p",{staticClass:"ant-upload-hint"},[a._v("支持单个或批量上传")])])],1),a.selectAttachment?n("AttachmentDetailDrawer",{attrs:{attachment:a.selectAttachment,addToPhoto:!0},on:{delete:function(){return t.loadAttachments()}},model:{value:a.drawerVisiable,callback:function(t){a.drawerVisiable=t},expression:"drawerVisiable"}}):a._e()],1)},i=[],s=(e("b745"),e("680ad")),o=e("ac0d"),l=e("5bcf"),r=e("a796"),c={components:{PageView:s["b"],AttachmentDetailDrawer:l["a"]},mixins:[o["a"],o["b"]],data:function(){return{attachmentType:r["a"].type,listLoading:!0,uploadVisible:!1,selectAttachment:{},attachments:[],mediaTypes:[],editable:!1,pagination:{page:1,size:18,sort:null},queryParam:{page:0,size:18,sort:null,keyword:null,mediaType:null,attachmentType:null},uploadHandler:r["a"].upload,drawerVisiable:!1}},computed:{formattedDatas:function(){var t=this;return this.attachments.map(function(a){return a.typeProperty=t.attachmentType[a.type],a})}},created:function(){this.loadAttachments(),this.loadMediaTypes()},methods:{loadAttachments:function(){var t=this;this.queryParam.page=this.pagination.page-1,this.queryParam.size=this.pagination.size,this.queryParam.sort=this.pagination.sort,this.listLoading=!0,r["a"].query(this.queryParam).then(function(a){t.attachments=a.data.data.content,t.pagination.total=a.data.data.total,t.listLoading=!1})},loadMediaTypes:function(){var t=this;r["a"].getMediaTypes().then(function(a){t.mediaTypes=a.data.data})},handleShowDetailDrawer:function(t){this.selectAttachment=t,this.drawerVisiable=!0},handlePaginationChange:function(t,a){this.$log.debug("Current: ".concat(t,", PageSize: ").concat(a)),this.pagination.page=t,this.pagination.size=a,this.loadAttachments()},handleResetParam:function(){this.queryParam.keyword=null,this.queryParam.mediaType=null,this.queryParam.attachmentType=null,this.loadAttachments()},handleQuery:function(){this.queryParam.page=0,this.loadAttachments()},onUploadClose:function(){this.loadAttachments(),this.loadMediaTypes()}}},d=c,u=(e("e402"),e("17cc")),m=Object(u["a"])(d,n,i,!1,null,"18d41aa9",null);a["default"]=m.exports},9298:function(t,a,e){},"975e":function(t,a,e){"use strict";var n=e("9efd"),i="/api/admin/photos",s={query:function(t){return Object(n["a"])({url:i,params:t,method:"get"})},create:function(t){return Object(n["a"])({url:i,data:t,method:"post"})},update:function(t,a){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"put",data:a})},delete:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"delete"})}};a["a"]=s},a796:function(t,a,e){"use strict";var n=e("f753"),i=e.n(n),s=e("9efd"),o="/api/admin/attachments",l={query:function(t){return Object(s["a"])({url:o,params:t,method:"get"})},get:function(t){return Object(s["a"])({url:"".concat(o,"/").concat(t),method:"get"})},delete:function(t){return Object(s["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},update:function(t,a){return Object(s["a"])({url:"".concat(o,"/").concat(t),method:"put",data:a})},getMediaTypes:function(){return Object(s["a"])({url:"".concat(o,"/media_types"),method:"get"})}};l.CancelToken=i.a.CancelToken,l.isCancel=i.a.isCancel,l.upload=function(t,a,e){return Object(s["a"])({url:"".concat(o,"/upload"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},l.uploads=function(t,a,e){return Object(s["a"])({url:"".concat(o,"/uploads"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},l.type={LOCAL:{type:"local",text:"本地"},SMMS:{type:"smms",text:"SM.MS"},UPYUN:{type:"upyun",text:"又拍云"},QNYUN:{type:"qnyun",text:"七牛云"},ALIYUN:{type:"aliyun",text:"阿里云"}},a["a"]=l},b3a7:function(t,a,e){"use strict";var n=e("9298"),i=e.n(n);i.a},e402:function(t,a,e){"use strict";var n=e("3e5b"),i=e.n(n);i.a}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5bf599cc"],{"81a6":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=this,a=e.$createElement,n=e._self._c||a;return n("div",{staticClass:"page-header-index-wide"},[n("a-row",[n("a-col",{attrs:{span:24}},[n("a-card",{attrs:{bordered:!1}},[n("div",{staticClass:"table-page-search-wrapper"},[n("a-form",{attrs:{layout:"inline"}},[n("a-row",{attrs:{gutter:48}},[n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"关键词"}},[n("a-input",{model:{value:e.queryParam.keyword,callback:function(t){e.$set(e.queryParam,"keyword",t)},expression:"queryParam.keyword"}})],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"状态"}},[n("a-select",{attrs:{placeholder:"请选择状态"}},[n("a-select-option",{attrs:{value:"1"}},[e._v("公开")]),n("a-select-option",{attrs:{value:"0"}},[e._v("私密")])],1)],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("span",{staticClass:"table-page-search-submitButtons"},[n("a-button",{attrs:{type:"primary"},on:{click:function(t){return e.loadJournals(!0)}}},[e._v("查询")]),n("a-button",{staticStyle:{"margin-left":"8px"},on:{click:e.resetParam}},[e._v("重置")])],1)])],1)],1)],1),n("div",{staticClass:"table-operator"},[n("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.handleNew}},[e._v("写日志")])],1),n("a-divider"),n("div",{staticStyle:{"margin-top":"15px"}},[n("a-list",{attrs:{itemLayout:"vertical",pagination:!1,dataSource:e.journals,loading:e.listLoading},scopedSlots:e._u([{key:"renderItem",fn:function(t,a){return n("a-list-item",{key:a},[n("template",{slot:"actions"},[n("span",[n("a",{attrs:{href:"javascript:void(0);"}},[n("a-icon",{staticStyle:{"margin-right":"8px"},attrs:{type:"like-o"}}),e._v(e._s(t.likes)+"\n ")],1)]),n("span",[n("a",{attrs:{href:"javascript:void(0);"},on:{click:function(a){return e.handleCommentShow(t)}}},[n("a-icon",{staticStyle:{"margin-right":"8px"},attrs:{type:"message"}}),e._v(e._s(t.commentCount)+"\n ")],1)])]),n("template",{slot:"extra"},[n("a",{attrs:{href:"javascript:void(0);"},on:{click:function(a){return e.handleEdit(t)}}},[e._v("编辑")]),n("a-divider",{attrs:{type:"vertical"}}),n("a-popconfirm",{attrs:{title:"你确定要删除这条日志?",okText:"确定",cancelText:"取消"},on:{confirm:function(a){return e.handleDelete(t.id)}}},[n("a",{attrs:{href:"javascript:void(0);"}},[e._v("删除")])])],1),n("a-list-item-meta",{attrs:{description:t.content}},[n("span",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(e._f("moment")(t.createTime)))]),n("a-avatar",{attrs:{slot:"avatar",size:"large",src:e.user.avatar},slot:"avatar"})],1)],2)}}])},[n("div",{staticClass:"page-wrapper"},[n("a-pagination",{staticClass:"pagination",attrs:{total:e.pagination.total,defaultPageSize:e.pagination.size,pageSizeOptions:["1","2","5","10","20","50","100"],showSizeChanger:""},on:{showSizeChange:e.onPaginationChange,change:e.onPaginationChange}})],1)])],1)],1)],1)],1),n("a-modal",{model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[n("template",{slot:"title"},[e._v("\n "+e._s(e.title)+" "),n("a-tooltip",{attrs:{slot:"action",title:"只能输入250字"},slot:"action"},[n("a-icon",{attrs:{type:"info-circle-o"}})],1)],1),n("template",{slot:"footer"},[n("a-button",{key:"submit",attrs:{type:"primary"},on:{click:e.createOrUpdateJournal}},[e._v("\n 发布\n ")])],1),n("a-form",{attrs:{layout:"vertical"}},[n("a-form-item",[n("a-input",{attrs:{type:"textarea",autosize:{minRows:8}},model:{value:e.journal.content,callback:function(t){e.$set(e.journal,"content",t)},expression:"journal.content"}})],1)],1)],2),e.selectComment?n("a-modal",{attrs:{title:"回复给:"+e.selectComment.author},model:{value:e.selectCommentVisible,callback:function(t){e.selectCommentVisible=t},expression:"selectCommentVisible"}},[n("template",{slot:"footer"},[n("a-button",{key:"submit",attrs:{type:"primary"},on:{click:e.handleReplyComment}},[e._v("\n 回复\n ")])],1),n("a-form",{attrs:{layout:"vertical"}},[n("a-form-item",[n("a-input",{attrs:{type:"textarea",autosize:{minRows:8}},model:{value:e.replyComment.content,callback:function(t){e.$set(e.replyComment,"content",t)},expression:"replyComment.content"}})],1)],1)],2):e._e(),n("a-drawer",{attrs:{title:"评论列表",width:e.isMobile()?"100%":"460",closable:"",visible:e.commentVisiable,destroyOnClose:""},on:{close:function(){return t.commentVisiable=!1}}},[n("a-row",{attrs:{type:"flex",align:"middle"}},[n("a-col",{attrs:{span:24}},[n("a-comment",[n("a-avatar",{attrs:{slot:"avatar",src:e.user.avatar,alt:e.user.nickname},slot:"avatar"}),n("p",{attrs:{slot:"content"},slot:"content"},[e._v(e._s(e.journal.content))]),n("span",{attrs:{slot:"datetime"},slot:"datetime"},[e._v(e._s(e._f("moment")(e.journal.createTime)))])],1)],1),n("a-divider"),n("a-col",{attrs:{span:24}},e._l(e.comments,function(t,a){return n("journal-comment-tree",{key:a,attrs:{comment:t},on:{reply:e.handleCommentReplyClick,delete:e.handleCommentDelete}})}),1)],1)],1)],1)},o=[],i=(a("b745"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-comment",[a("span",{attrs:{slot:"actions"},on:{click:t.handleReplyClick},slot:"actions"},[t._v("回复")]),a("a-popconfirm",{attrs:{slot:"actions",title:"你确定要永久删除该评论?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleDeleteClick},slot:"actions"},[a("span",[t._v("删除")])]),a("a",{attrs:{slot:"author"},slot:"author"},[t._v(" "+t._s(t.comment.author)+" ")]),a("a-avatar",{attrs:{slot:"avatar",src:t.avatar,alt:t.comment.author},slot:"avatar"}),a("p",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.comment.content))]),t.comment.children?t._l(t.comment.children,function(e,n){return a("journal-comment-tree",{key:n,attrs:{comment:e},on:{reply:t.handleSubReply,delete:t.handleSubDelete}})}):t._e()],2)],1)}),s=[],r={name:"JournalCommentTree",props:{comment:{type:Object,required:!1,default:null}},computed:{avatar:function(){return"//cn.gravatar.com/avatar/".concat(this.comment.gravatarMd5,"/?s=256&d=mp")}},methods:{handleReplyClick:function(){this.$emit("reply",this.comment)},handleSubReply:function(t){this.$emit("reply",t)},handleDeleteClick:function(){this.$emit("delete",this.comment)},handleSubDelete:function(t){this.$emit("delete",t)}}},l=r,c=a("17cc"),m=Object(c["a"])(l,i,s,!1,null,null,null),u=m.exports,d=a("ac0d"),p=a("d8fc"),h=a("9efd"),f="/api/admin/journals/comments",v={create:function(t){return Object(h["a"])({url:f,data:t,method:"post"})},delete:function(t){return Object(h["a"])({url:"".concat(f,"/").concat(t),method:"delete"})}},y=v,g=a("c24f"),b={mixins:[d["a"],d["b"]],components:{JournalCommentTree:u},data:function(){return{title:"发表",listLoading:!1,visible:!1,commentVisiable:!1,selectCommentVisible:!1,pagination:{page:1,size:10,sort:null},queryParam:{page:0,size:10,sort:null,keyword:null},journals:[],comments:[],journal:{},selectComment:null,replyComment:{},user:{}}},created:function(){this.loadJournals(),this.loadUser()},methods:{loadJournals:function(t){var e=this;this.queryParam.page=this.pagination.page-1,this.queryParam.size=this.pagination.size,this.queryParam.sort=this.pagination.sort,t&&(this.queryParam.page=0),this.listLoading=!0,p["a"].query(this.queryParam).then(function(t){e.journals=t.data.data.content,e.pagination.total=t.data.data.total,e.listLoading=!1})},loadUser:function(){var t=this;g["a"].getProfile().then(function(e){t.user=e.data.data})},handleNew:function(){this.title="新建",this.visible=!0,this.journal={}},handleEdit:function(t){this.title="编辑",this.journal=t,this.visible=!0},handleDelete:function(t){var e=this;p["a"].delete(t).then(function(t){e.$message.success("删除成功!"),e.loadJournals()})},handleCommentShow:function(t){var e=this;this.journal=t,p["a"].commentTree(this.journal.id).then(function(t){e.comments=t.data.data.content,e.commentVisiable=!0})},handleCommentReplyClick:function(t){this.selectComment=t,this.selectCommentVisible=!0,this.replyComment.parentId=t.id,this.replyComment.postId=this.journal.id},handleReplyComment:function(){var t=this;y.create(this.replyComment).then(function(e){t.$message.success("回复成功!"),t.replyComment={},t.selectComment={},t.selectCommentVisible=!1,t.handleCommentShow(t.journal)})},handleCommentDelete:function(t){var e=this;y.delete(t.id).then(function(t){e.$message.success("删除成功!"),e.handleCommentShow(e.journal)})},createOrUpdateJournal:function(){var t=this;this.journal.id?p["a"].update(this.journal.id,this.journal).then(function(e){t.$message.success("更新成功!"),t.loadJournals()}):p["a"].create(this.journal).then(function(e){t.$message.success("发表成功!"),t.loadJournals()}),this.visible=!1},onPaginationChange:function(t,e){this.$log.debug("Current: ".concat(t,", PageSize: ").concat(e)),this.pagination.page=t,this.pagination.size=e,this.loadJournals()},resetParam:function(){this.queryParam.keyword=null,this.loadJournals()}}},C=b,_=Object(c["a"])(C,n,o,!1,null,null,null);e["default"]=_.exports},d8fc:function(t,e,a){"use strict";var n=a("9efd"),o="/api/admin/journals",i={query:function(t){return Object(n["a"])({url:o,params:t,method:"get"})},create:function(t){return Object(n["a"])({url:o,data:t,method:"post"})},update:function(t,e){return Object(n["a"])({url:"".concat(o,"/").concat(t),data:e,method:"put"})},delete:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},commentTree:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t,"/comments/tree_view"),method:"get"})}};e["a"]=i}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6d8b31f6"],{"307b":function(t,a,e){"use strict";var o=e("6fda"),i=e.n(o);i.a},3993:function(t,a,e){"use strict";var o=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("a-drawer",{attrs:{title:t.title,width:t.isMobile()?"100%":t.drawerWidth,closable:"",visible:t.visiable,destroyOnClose:""},on:{close:t.onClose}},[e("a-row",{attrs:{type:"flex",align:"middle"}},[e("a-input-search",{attrs:{placeholder:"搜索附件",enterButton:""}})],1),e("a-divider"),e("a-row",{attrs:{type:"flex",align:"middle"}},[e("a-skeleton",{attrs:{active:"",loading:t.skeletonLoading,paragraph:{rows:18}}},[e("a-col",{attrs:{span:24}},t._l(t.attachments,function(a,o){return e("div",{key:o,staticClass:"attach-item",on:{click:function(e){return t.handleSelectAttachment(a)}}},[e("img",{attrs:{src:a.thumbPath}})])}),0)],1)],1),e("a-divider"),e("div",{staticClass:"page-wrapper"},[e("a-pagination",{attrs:{defaultPageSize:t.pagination.size,total:t.pagination.total},on:{change:t.handlePaginationChange}})],1),e("a-divider",{staticClass:"divider-transparent"}),e("div",{staticClass:"bottom-control"},[e("a-button",{attrs:{type:"primary"},on:{click:t.handleShowUploadModal}},[t._v("上传附件")])],1)],1),e("a-modal",{attrs:{title:"上传附件",footer:null,afterClose:t.onUploadClose},model:{value:t.uploadVisible,callback:function(a){t.uploadVisible=a},expression:"uploadVisible"}},[e("upload",{attrs:{name:"file",multiple:"",uploadHandler:t.attachmentUploadHandler}},[e("p",{staticClass:"ant-upload-drag-icon"},[e("a-icon",{attrs:{type:"inbox"}})],1),e("p",{staticClass:"ant-upload-text"},[t._v("点击选择文件或将文件拖拽到此处")]),e("p",{staticClass:"ant-upload-hint"},[t._v("支持单个或批量上传")])])],1)],1)},i=[],n=(e("d4d5"),e("ac0d")),s=e("a796"),l={name:"AttachmentSelectDrawer",mixins:[n["a"],n["b"]],model:{prop:"visiable",event:"close"},props:{visiable:{type:Boolean,required:!1,default:!1},drawerWidth:{type:Number,required:!1,default:460},title:{type:String,required:!1,default:"选择附件"}},data:function(){return{uploadVisible:!1,skeletonLoading:!0,pagination:{page:1,size:12,sort:""},attachments:[],attachmentUploadHandler:s["a"].upload}},created:function(){this.loadSkeleton(),this.loadAttachments()},watch:{visiable:function(t,a){t&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var t=this;this.skeletonLoading=!0,setTimeout(function(){t.skeletonLoading=!1},500)},handleShowUploadModal:function(){this.uploadVisible=!0},loadAttachments:function(){var t=this,a=Object.assign({},this.pagination);a.page--,s["a"].query(a).then(function(a){t.attachments=a.data.data.content,t.pagination.total=a.data.data.total})},handleSelectAttachment:function(t){this.$emit("listenToSelect",t)},handlePaginationChange:function(t,a){this.pagination.page=t,this.pagination.size=a,this.loadAttachments()},handleAttachmentUploadSuccess:function(){this.$message.success("上传成功!"),this.loadAttachments()},onUploadClose:function(){this.loadSkeleton(),this.loadAttachments()},onClose:function(){this.$emit("close",!1)}}},r=l,c=(e("307b"),e("17cc")),d=Object(c["a"])(r,o,i,!1,null,null,null);a["a"]=d.exports},"6d0d":function(t,a,e){"use strict";e.r(a);var o=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"page-header-index-wide"},[e("a-row",{attrs:{gutter:12,type:"flex",align:"middle"}},[e("a-col",{staticClass:"search-box",attrs:{span:24}},[e("a-card",{attrs:{bordered:!1}},[e("div",{staticClass:"table-page-search-wrapper"},[e("a-form",{attrs:{layout:"inline"}},[e("a-row",{attrs:{gutter:48}},[e("a-col",{attrs:{md:6,sm:24}},[e("a-form-item",{attrs:{label:"关键词"}},[e("a-input",{model:{value:t.queryParam.keyword,callback:function(a){t.$set(t.queryParam,"keyword",a)},expression:"queryParam.keyword"}})],1)],1),e("a-col",{attrs:{md:6,sm:24}},[e("a-form-item",{attrs:{label:"分组"}},[e("a-select",[e("a-select-option",{attrs:{value:"11"}},[t._v("11")]),e("a-select-option",{attrs:{value:"22"}},[t._v("22")])],1)],1)],1),e("a-col",{attrs:{md:6,sm:24}},[e("span",{staticClass:"table-page-search-submitButtons"},[e("a-button",{attrs:{type:"primary"},on:{click:function(a){return t.loadPhotos(!0)}}},[t._v("查询")]),e("a-button",{staticStyle:{"margin-left":"8px"},on:{click:t.resetParam}},[t._v("重置")])],1)])],1)],1)],1),e("div",{staticClass:"table-operator"},[e("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:t.handleAddClick}},[t._v("添加")])],1)])],1),e("a-col",{attrs:{span:24}},[e("a-list",{attrs:{grid:{gutter:12,xs:1,sm:2,md:4,lg:6,xl:6,xxl:6},dataSource:t.photos,loading:t.listLoading},scopedSlots:t._u([{key:"renderItem",fn:function(a,o){return e("a-list-item",{key:o},[e("a-card",{attrs:{bodyStyle:{padding:0},hoverable:""},on:{click:function(e){return t.showDrawer(a)}}},[e("div",{staticClass:"photo-thumb"},[e("img",{attrs:{src:a.thumbnail}})]),e("a-card-meta",[e("ellipsis",{attrs:{slot:"description",length:t.isMobile()?36:18,tooltip:""},slot:"description"},[t._v(t._s(a.name))])],1)],1)],1)}}])})],1)],1),e("div",{staticClass:"page-wrapper"},[e("a-pagination",{attrs:{total:t.pagination.total,defaultPageSize:t.pagination.size,pageSizeOptions:["18","36","54","72","90","108"],showSizeChanger:""},on:{change:t.handlePaginationChange,showSizeChange:t.handlePaginationChange}})],1),e("a-drawer",{attrs:{title:"图片详情",width:t.isMobile()?"100%":"460",closable:"",visible:t.drawerVisiable,destroyOnClose:""},on:{close:t.onDrawerClose}},[e("a-row",{attrs:{type:"flex",align:"middle"}},[e("a-col",{attrs:{span:24}},[e("a-skeleton",{attrs:{active:"",loading:t.drawerLoading,paragraph:{rows:8}}},[e("div",{staticClass:"photo-detail-img"},[e("img",{attrs:{src:t.photo.url||"//i.loli.net/2019/05/05/5ccf007c0a01d.png"},on:{click:t.showThumbDrawer}})])])],1),e("a-divider"),e("a-col",{attrs:{span:24}},[e("a-skeleton",{attrs:{active:"",loading:t.drawerLoading,paragraph:{rows:8}}},[e("a-list",{attrs:{itemLayout:"horizontal"}},[e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-input",{model:{value:t.photo.thumbnail,callback:function(a){t.$set(t.photo,"thumbnail",a)},expression:"photo.thumbnail"}})],1):e("template",{slot:"description"},[t._v(t._s(t.photo.thumbnail))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 缩略图地址:\n ")])],2)],1),e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-input",{model:{value:t.photo.name,callback:function(a){t.$set(t.photo,"name",a)},expression:"photo.name"}})],1):e("template",{slot:"description"},[t._v(t._s(t.photo.name))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 图片名称:\n ")])],2)],1),e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-date-picker",{staticStyle:{width:"100%"},model:{value:t.photo.takeTime,callback:function(a){t.$set(t.photo,"takeTime",a)},expression:"photo.takeTime"}})],1):e("span",{attrs:{slot:"description"},slot:"description"},[t._v(t._s(t._f("moment")(t.photo.takeTime)))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("拍摄日期:")])],2)],1),e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-input",{model:{value:t.photo.location,callback:function(a){t.$set(t.photo,"location",a)},expression:"photo.location"}})],1):e("span",{attrs:{slot:"description"},slot:"description"},[t._v(t._s(t.photo.location||""))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("拍摄地点:")])],2)],1),e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-input",{model:{value:t.photo.team,callback:function(a){t.$set(t.photo,"team",a)},expression:"photo.team"}})],1):e("span",{attrs:{slot:"description"},slot:"description"},[t._v(t._s(t.photo.team||""))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("分组:")])],2)],1),e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-input",{attrs:{type:"textarea",autosize:{minRows:5}},model:{value:t.photo.description,callback:function(a){t.$set(t.photo,"description",a)},expression:"photo.description"}})],1):e("span",{attrs:{slot:"description"},slot:"description"},[t._v(t._s(t.photo.description||""))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("描述:")])],2)],1)],1)],1)],1)],1),e("AttachmentSelectDrawer",{attrs:{drawerWidth:460},on:{listenToSelect:t.selectPhotoThumb},model:{value:t.thumDrawerVisible,callback:function(a){t.thumDrawerVisible=a},expression:"thumDrawerVisible"}}),e("a-divider",{staticClass:"divider-transparent"}),e("div",{staticClass:"bottom-control"},[t.editable?e("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"primary"},on:{click:t.handleCreateOrUpdate}},[t._v("保存")]):e("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"dashed"},on:{click:t.handleEditClick}},[t._v("编辑")]),e("a-popconfirm",{attrs:{title:"你确定要删除该图片?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleDeletePhoto}},[e("a-button",{attrs:{type:"danger"}},[t._v("删除")])],1)],1)],1)],1)},i=[],n=(e("b745"),e("3993")),s=e("ac0d"),l=e("975e"),r={components:{AttachmentSelectDrawer:n["a"]},mixins:[s["a"],s["b"]],data:function(){return{drawerVisiable:!1,drawerLoading:!1,listLoading:!0,thumDrawerVisible:!1,photo:{},photos:[],editable:!1,pagination:{page:1,size:18,sort:null},queryParam:{page:0,size:18,sort:null,keyword:null}}},created:function(){this.loadPhotos()},methods:{loadPhotos:function(t){var a=this;this.queryParam.page=this.pagination.page-1,this.queryParam.size=this.pagination.size,this.queryParam.sort=this.pagination.sort,t&&(this.queryParam.page=0),this.listLoading=!0,l["a"].query(this.queryParam).then(function(t){a.photos=t.data.data.content,a.pagination.total=t.data.data.total,a.listLoading=!1})},handleCreateOrUpdate:function(){var t=this;this.photo.id?l["a"].update(this.photo.id,this.photo).then(function(a){t.$message.success("照片更新成功!"),t.loadPhotos()}):l["a"].create(this.photo).then(function(a){t.$message.success("照片添加成功!"),t.loadPhotos(),t.photo=a.data.data}),this.editable=!1},showDrawer:function(t){this.photo=t,this.drawerVisiable=!0},handlePaginationChange:function(t,a){this.$log.debug("Current: ".concat(t,", PageSize: ").concat(a)),this.pagination.page=t,this.pagination.size=a,this.loadPhotos()},handleAddClick:function(){this.editable=!0,this.drawerVisiable=!0},handleEditClick:function(){this.editable=!0},handleDeletePhoto:function(){var t=this;l["a"].delete(this.photo.id).then(function(a){t.$message.success("删除成功!"),t.onDrawerClose(),t.loadPhotos()})},showThumbDrawer:function(){this.thumDrawerVisible=!0},selectPhotoThumb:function(t){this.photo.url=t.path,this.thumDrawerVisible=!1},resetParam:function(){this.queryParam.keyword=null,this.loadPhotos()},onDrawerClose:function(){this.drawerVisiable=!1,this.photo={},this.editable=!1}}},c=r,d=(e("77a8"),e("17cc")),p=Object(d["a"])(c,o,i,!1,null,"4bf43659",null);a["default"]=p.exports},"6fda":function(t,a,e){},"77a8":function(t,a,e){"use strict";var o=e("8ba4"),i=e.n(o);i.a},"8ba4":function(t,a,e){},"975e":function(t,a,e){"use strict";var o=e("9efd"),i="/api/admin/photos",n={query:function(t){return Object(o["a"])({url:i,params:t,method:"get"})},create:function(t){return Object(o["a"])({url:i,data:t,method:"post"})},update:function(t,a){return Object(o["a"])({url:"".concat(i,"/").concat(t),method:"put",data:a})},delete:function(t){return Object(o["a"])({url:"".concat(i,"/").concat(t),method:"delete"})}};a["a"]=n},a796:function(t,a,e){"use strict";var o=e("f753"),i=e.n(o),n=e("9efd"),s="/api/admin/attachments",l={query:function(t){return Object(n["a"])({url:s,params:t,method:"get"})},get:function(t){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"get"})},delete:function(t){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"delete"})},update:function(t,a){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"put",data:a})},getMediaTypes:function(){return Object(n["a"])({url:"".concat(s,"/media_types"),method:"get"})}};l.CancelToken=i.a.CancelToken,l.isCancel=i.a.isCancel,l.upload=function(t,a,e){return Object(n["a"])({url:"".concat(s,"/upload"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},l.uploads=function(t,a,e){return Object(n["a"])({url:"".concat(s,"/uploads"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},l.type={LOCAL:{type:"local",text:"本地"},SMMS:{type:"smms",text:"SM.MS"},UPYUN:{type:"upyun",text:"又拍云"},QNYUN:{type:"qnyun",text:"七牛云"},ALIYUN:{type:"aliyun",text:"阿里云"}},a["a"]=l}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6d8b31f6"],{"307b":function(t,a,e){"use strict";var o=e("6fda"),i=e.n(o);i.a},3993:function(t,a,e){"use strict";var o=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("a-drawer",{attrs:{title:t.title,width:t.isMobile()?"100%":t.drawerWidth,closable:"",visible:t.visiable,destroyOnClose:""},on:{close:t.onClose}},[e("a-row",{attrs:{type:"flex",align:"middle"}},[e("a-input-search",{attrs:{placeholder:"搜索附件",enterButton:""}})],1),e("a-divider"),e("a-row",{attrs:{type:"flex",align:"middle"}},[e("a-skeleton",{attrs:{active:"",loading:t.skeletonLoading,paragraph:{rows:18}}},[e("a-col",{attrs:{span:24}},t._l(t.attachments,function(a,o){return e("div",{key:o,staticClass:"attach-item",on:{click:function(e){return t.handleSelectAttachment(a)}}},[e("img",{attrs:{src:a.thumbPath}})])}),0)],1)],1),e("a-divider"),e("div",{staticClass:"page-wrapper"},[e("a-pagination",{attrs:{defaultPageSize:t.pagination.size,total:t.pagination.total},on:{change:t.handlePaginationChange}})],1),e("a-divider",{staticClass:"divider-transparent"}),e("div",{staticClass:"bottom-control"},[t.isChooseAvatar?e("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"dashed"},on:{click:t.handleSelectGravatar}},[t._v("使用 Gravatar")]):t._e(),e("a-button",{attrs:{type:"primary"},on:{click:t.handleShowUploadModal}},[t._v("上传附件")])],1)],1),e("a-modal",{attrs:{title:"上传附件",footer:null,afterClose:t.onUploadClose},model:{value:t.uploadVisible,callback:function(a){t.uploadVisible=a},expression:"uploadVisible"}},[e("upload",{attrs:{name:"file",multiple:"",uploadHandler:t.attachmentUploadHandler}},[e("p",{staticClass:"ant-upload-drag-icon"},[e("a-icon",{attrs:{type:"inbox"}})],1),e("p",{staticClass:"ant-upload-text"},[t._v("点击选择文件或将文件拖拽到此处")]),e("p",{staticClass:"ant-upload-hint"},[t._v("支持单个或批量上传")])])],1)],1)},i=[],n=(e("d4d5"),e("ac0d")),s=e("a796"),l={name:"AttachmentSelectDrawer",mixins:[n["a"],n["b"]],model:{prop:"visiable",event:"close"},props:{visiable:{type:Boolean,required:!1,default:!1},drawerWidth:{type:Number,required:!1,default:460},title:{type:String,required:!1,default:"选择附件"},isChooseAvatar:{type:Boolean,required:!1,default:!1}},data:function(){return{uploadVisible:!1,skeletonLoading:!0,pagination:{page:1,size:12,sort:""},attachments:[],attachmentUploadHandler:s["a"].upload}},created:function(){this.loadSkeleton(),this.loadAttachments()},watch:{visiable:function(t,a){t&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var t=this;this.skeletonLoading=!0,setTimeout(function(){t.skeletonLoading=!1},500)},handleShowUploadModal:function(){this.uploadVisible=!0},loadAttachments:function(){var t=this,a=Object.assign({},this.pagination);a.page--,s["a"].query(a).then(function(a){t.attachments=a.data.data.content,t.pagination.total=a.data.data.total})},handleSelectAttachment:function(t){this.$emit("listenToSelect",t)},handleSelectGravatar:function(){this.$emit("listenToSelectGravatar")},handlePaginationChange:function(t,a){this.pagination.page=t,this.pagination.size=a,this.loadAttachments()},handleAttachmentUploadSuccess:function(){this.$message.success("上传成功!"),this.loadAttachments()},onUploadClose:function(){this.loadSkeleton(),this.loadAttachments()},onClose:function(){this.$emit("close",!1)}}},r=l,c=(e("307b"),e("17cc")),d=Object(c["a"])(r,o,i,!1,null,null,null);a["a"]=d.exports},"6d0d":function(t,a,e){"use strict";e.r(a);var o=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"page-header-index-wide"},[e("a-row",{attrs:{gutter:12,type:"flex",align:"middle"}},[e("a-col",{staticClass:"search-box",attrs:{span:24}},[e("a-card",{attrs:{bordered:!1}},[e("div",{staticClass:"table-page-search-wrapper"},[e("a-form",{attrs:{layout:"inline"}},[e("a-row",{attrs:{gutter:48}},[e("a-col",{attrs:{md:6,sm:24}},[e("a-form-item",{attrs:{label:"关键词"}},[e("a-input",{model:{value:t.queryParam.keyword,callback:function(a){t.$set(t.queryParam,"keyword",a)},expression:"queryParam.keyword"}})],1)],1),e("a-col",{attrs:{md:6,sm:24}},[e("a-form-item",{attrs:{label:"分组"}},[e("a-select",[e("a-select-option",{attrs:{value:"11"}},[t._v("11")]),e("a-select-option",{attrs:{value:"22"}},[t._v("22")])],1)],1)],1),e("a-col",{attrs:{md:6,sm:24}},[e("span",{staticClass:"table-page-search-submitButtons"},[e("a-button",{attrs:{type:"primary"},on:{click:function(a){return t.loadPhotos(!0)}}},[t._v("查询")]),e("a-button",{staticStyle:{"margin-left":"8px"},on:{click:t.resetParam}},[t._v("重置")])],1)])],1)],1)],1),e("div",{staticClass:"table-operator"},[e("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:t.handleAddClick}},[t._v("添加")])],1)])],1),e("a-col",{attrs:{span:24}},[e("a-list",{attrs:{grid:{gutter:12,xs:1,sm:2,md:4,lg:6,xl:6,xxl:6},dataSource:t.photos,loading:t.listLoading},scopedSlots:t._u([{key:"renderItem",fn:function(a,o){return e("a-list-item",{key:o},[e("a-card",{attrs:{bodyStyle:{padding:0},hoverable:""},on:{click:function(e){return t.showDrawer(a)}}},[e("div",{staticClass:"photo-thumb"},[e("img",{attrs:{src:a.thumbnail}})]),e("a-card-meta",[e("ellipsis",{attrs:{slot:"description",length:t.isMobile()?36:18,tooltip:""},slot:"description"},[t._v(t._s(a.name))])],1)],1)],1)}}])})],1)],1),e("div",{staticClass:"page-wrapper"},[e("a-pagination",{attrs:{total:t.pagination.total,defaultPageSize:t.pagination.size,pageSizeOptions:["18","36","54","72","90","108"],showSizeChanger:""},on:{change:t.handlePaginationChange,showSizeChange:t.handlePaginationChange}})],1),e("a-drawer",{attrs:{title:"图片详情",width:t.isMobile()?"100%":"460",closable:"",visible:t.drawerVisiable,destroyOnClose:""},on:{close:t.onDrawerClose}},[e("a-row",{attrs:{type:"flex",align:"middle"}},[e("a-col",{attrs:{span:24}},[e("a-skeleton",{attrs:{active:"",loading:t.drawerLoading,paragraph:{rows:8}}},[e("div",{staticClass:"photo-detail-img"},[e("img",{attrs:{src:t.photo.url||"//i.loli.net/2019/05/05/5ccf007c0a01d.png"},on:{click:t.showThumbDrawer}})])])],1),e("a-divider"),e("a-col",{attrs:{span:24}},[e("a-skeleton",{attrs:{active:"",loading:t.drawerLoading,paragraph:{rows:8}}},[e("a-list",{attrs:{itemLayout:"horizontal"}},[e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-input",{model:{value:t.photo.thumbnail,callback:function(a){t.$set(t.photo,"thumbnail",a)},expression:"photo.thumbnail"}})],1):e("template",{slot:"description"},[t._v(t._s(t.photo.thumbnail))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 缩略图地址:\n ")])],2)],1),e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-input",{model:{value:t.photo.name,callback:function(a){t.$set(t.photo,"name",a)},expression:"photo.name"}})],1):e("template",{slot:"description"},[t._v(t._s(t.photo.name))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 图片名称:\n ")])],2)],1),e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-date-picker",{staticStyle:{width:"100%"},model:{value:t.photo.takeTime,callback:function(a){t.$set(t.photo,"takeTime",a)},expression:"photo.takeTime"}})],1):e("span",{attrs:{slot:"description"},slot:"description"},[t._v(t._s(t._f("moment")(t.photo.takeTime)))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("拍摄日期:")])],2)],1),e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-input",{model:{value:t.photo.location,callback:function(a){t.$set(t.photo,"location",a)},expression:"photo.location"}})],1):e("span",{attrs:{slot:"description"},slot:"description"},[t._v(t._s(t.photo.location||""))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("拍摄地点:")])],2)],1),e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-input",{model:{value:t.photo.team,callback:function(a){t.$set(t.photo,"team",a)},expression:"photo.team"}})],1):e("span",{attrs:{slot:"description"},slot:"description"},[t._v(t._s(t.photo.team||""))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("分组:")])],2)],1),e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-input",{attrs:{type:"textarea",autosize:{minRows:5}},model:{value:t.photo.description,callback:function(a){t.$set(t.photo,"description",a)},expression:"photo.description"}})],1):e("span",{attrs:{slot:"description"},slot:"description"},[t._v(t._s(t.photo.description||""))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("描述:")])],2)],1)],1)],1)],1)],1),e("AttachmentSelectDrawer",{attrs:{drawerWidth:460},on:{listenToSelect:t.selectPhotoThumb},model:{value:t.thumDrawerVisible,callback:function(a){t.thumDrawerVisible=a},expression:"thumDrawerVisible"}}),e("a-divider",{staticClass:"divider-transparent"}),e("div",{staticClass:"bottom-control"},[t.editable?e("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"primary"},on:{click:t.handleCreateOrUpdate}},[t._v("保存")]):e("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"dashed"},on:{click:t.handleEditClick}},[t._v("编辑")]),e("a-popconfirm",{attrs:{title:"你确定要删除该图片?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleDeletePhoto}},[e("a-button",{attrs:{type:"danger"}},[t._v("删除")])],1)],1)],1)],1)},i=[],n=(e("b745"),e("3993")),s=e("ac0d"),l=e("975e"),r={components:{AttachmentSelectDrawer:n["a"]},mixins:[s["a"],s["b"]],data:function(){return{drawerVisiable:!1,drawerLoading:!1,listLoading:!0,thumDrawerVisible:!1,photo:{},photos:[],editable:!1,pagination:{page:1,size:18,sort:null},queryParam:{page:0,size:18,sort:null,keyword:null}}},created:function(){this.loadPhotos()},methods:{loadPhotos:function(t){var a=this;this.queryParam.page=this.pagination.page-1,this.queryParam.size=this.pagination.size,this.queryParam.sort=this.pagination.sort,t&&(this.queryParam.page=0),this.listLoading=!0,l["a"].query(this.queryParam).then(function(t){a.photos=t.data.data.content,a.pagination.total=t.data.data.total,a.listLoading=!1})},handleCreateOrUpdate:function(){var t=this;this.photo.id?l["a"].update(this.photo.id,this.photo).then(function(a){t.$message.success("照片更新成功!"),t.loadPhotos()}):l["a"].create(this.photo).then(function(a){t.$message.success("照片添加成功!"),t.loadPhotos(),t.photo=a.data.data}),this.editable=!1},showDrawer:function(t){this.photo=t,this.drawerVisiable=!0},handlePaginationChange:function(t,a){this.$log.debug("Current: ".concat(t,", PageSize: ").concat(a)),this.pagination.page=t,this.pagination.size=a,this.loadPhotos()},handleAddClick:function(){this.editable=!0,this.drawerVisiable=!0},handleEditClick:function(){this.editable=!0},handleDeletePhoto:function(){var t=this;l["a"].delete(this.photo.id).then(function(a){t.$message.success("删除成功!"),t.onDrawerClose(),t.loadPhotos()})},showThumbDrawer:function(){this.thumDrawerVisible=!0},selectPhotoThumb:function(t){this.photo.url=t.path,this.thumDrawerVisible=!1},resetParam:function(){this.queryParam.keyword=null,this.loadPhotos()},onDrawerClose:function(){this.drawerVisiable=!1,this.photo={},this.editable=!1}}},c=r,d=(e("77a8"),e("17cc")),p=Object(d["a"])(c,o,i,!1,null,"4bf43659",null);a["default"]=p.exports},"6fda":function(t,a,e){},"77a8":function(t,a,e){"use strict";var o=e("8ba4"),i=e.n(o);i.a},"8ba4":function(t,a,e){},"975e":function(t,a,e){"use strict";var o=e("9efd"),i="/api/admin/photos",n={query:function(t){return Object(o["a"])({url:i,params:t,method:"get"})},create:function(t){return Object(o["a"])({url:i,data:t,method:"post"})},update:function(t,a){return Object(o["a"])({url:"".concat(i,"/").concat(t),method:"put",data:a})},delete:function(t){return Object(o["a"])({url:"".concat(i,"/").concat(t),method:"delete"})}};a["a"]=n},a796:function(t,a,e){"use strict";var o=e("f753"),i=e.n(o),n=e("9efd"),s="/api/admin/attachments",l={query:function(t){return Object(n["a"])({url:s,params:t,method:"get"})},get:function(t){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"get"})},delete:function(t){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"delete"})},update:function(t,a){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"put",data:a})},getMediaTypes:function(){return Object(n["a"])({url:"".concat(s,"/media_types"),method:"get"})}};l.CancelToken=i.a.CancelToken,l.isCancel=i.a.isCancel,l.upload=function(t,a,e){return Object(n["a"])({url:"".concat(s,"/upload"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},l.uploads=function(t,a,e){return Object(n["a"])({url:"".concat(s,"/uploads"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},l.type={LOCAL:{type:"local",text:"本地"},SMMS:{type:"smms",text:"SM.MS"},UPYUN:{type:"upyun",text:"又拍云"},QNYUN:{type:"qnyun",text:"七牛云"},ALIYUN:{type:"aliyun",text:"阿里云"}},a["a"]=l}}]);
\ No newline at end of file
此差异已折叠。
此差异已折叠。
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-87e2df70"],{c405:function(t,e,a){"use strict";a("7364"),a("f763");var s=a("9efd"),n="/api/admin/categories",o={};function r(t,e){e.forEach(function(e){t.key===e.parentId&&(t.children||(t.children=[]),t.children.push({key:e.id,title:e.name,isLeaf:!1}))}),t.children?t.children.forEach(function(t){return r(t,e)}):t.isLeaf=!0}o.listAll=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Object(s["a"])({url:"".concat(n),params:{more:t},method:"get"})},o.listTree=function(){return Object(s["a"])({url:"".concat(n,"/tree_view"),method:"get"})},o.create=function(t){return Object(s["a"])({url:n,data:t,method:"post"})},o.delete=function(t){return Object(s["a"])({url:"".concat(n,"/").concat(t),method:"delete"})},o.get=function(t){return Object(s["a"])({url:"".concat(n,"/").concat(t),method:"get"})},o.update=function(t,e){return Object(s["a"])({url:"".concat(n,"/").concat(t),data:e,method:"put"})},o.concreteTree=function(t){var e={key:0,title:"top",children:[]};return r(e,t),e.children},e["a"]=o},caf6:function(t,e,a){"use strict";var s=a("9efd"),n="/api/admin/posts",o={listLatest:function(t){return Object(s["a"])({url:"".concat(n,"/latest"),params:{top:t},method:"get"})},query:function(t){return Object(s["a"])({url:n,params:t,method:"get"})},get:function(t){return Object(s["a"])({url:"".concat(n,"/").concat(t),method:"get"})},create:function(t,e){return Object(s["a"])({url:n,method:"post",data:t,mute:e,params:{autoSave:e}})},update:function(t,e,a){return Object(s["a"])({url:"".concat(n,"/").concat(t),method:"put",data:e,params:{autoSave:a}})},updateStatus:function(t,e){return Object(s["a"])({url:"".concat(n,"/").concat(t,"/status/").concat(e),method:"put"})},delete:function(t){return Object(s["a"])({url:"".concat(n,"/").concat(t),method:"delete"})},postStatus:{PUBLISHED:{color:"green",status:"success",text:"已发布"},DRAFT:{color:"yellow",status:"warning",text:"草稿"},RECYCLE:{color:"red",status:"error",text:"回收站"}}};e["a"]=o},dae2:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page-header-index-wide"},[a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"table-page-search-wrapper"},[a("a-form",{attrs:{layout:"inline"}},[a("a-row",{attrs:{gutter:48}},[a("a-col",{attrs:{md:6,sm:24}},[a("a-form-item",{attrs:{label:"关键词"}},[a("a-input",{model:{value:t.queryParam.keyword,callback:function(e){t.$set(t.queryParam,"keyword",e)},expression:"queryParam.keyword"}})],1)],1),a("a-col",{attrs:{md:6,sm:24}},[a("a-form-item",{attrs:{label:"文章状态"}},[a("a-select",{attrs:{placeholder:"请选择文章状态"},on:{change:t.handleQuery},model:{value:t.queryParam.status,callback:function(e){t.$set(t.queryParam,"status",e)},expression:"queryParam.status"}},t._l(Object.keys(t.postStatus),function(e){return a("a-select-option",{key:e,attrs:{value:e}},[t._v(t._s(t.postStatus[e].text))])}),1)],1)],1),a("a-col",{attrs:{md:6,sm:24}},[a("a-form-item",{attrs:{label:"分类目录"}},[a("a-select",{attrs:{placeholder:"请选择分类"},on:{change:t.handleQuery},model:{value:t.queryParam.categoryId,callback:function(e){t.$set(t.queryParam,"categoryId",e)},expression:"queryParam.categoryId"}},t._l(t.categories,function(e){return a("a-select-option",{key:e.id},[t._v(t._s(e.name))])}),1)],1)],1),a("a-col",{attrs:{md:6,sm:24}},[a("span",{staticClass:"table-page-search-submitButtons"},[a("a-button",{attrs:{type:"primary"},on:{click:t.handleQuery}},[t._v("查询")]),a("a-button",{staticStyle:{"margin-left":"8px"},on:{click:t.handleResetParam}},[t._v("重置")])],1)])],1)],1)],1),a("div",{staticClass:"table-operator"},[a("router-link",{attrs:{to:{name:"PostEdit"}}},[a("a-button",{attrs:{type:"primary",icon:"plus"}},[t._v("写文章")])],1),a("a-dropdown",{directives:[{name:"show",rawName:"v-show",value:null!=t.queryParam.status&&""!=t.queryParam.status,expression:"queryParam.status!=null && queryParam.status!=''"}]},[a("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},["DRAFT"===t.queryParam.status?a("a-menu-item",{key:"1"},[a("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handlePublishMore}},[a("span",[t._v("发布")])])]):t._e(),"PUBLISHED"===t.queryParam.status||"DRAFT"===t.queryParam.status?a("a-menu-item",{key:"2"},[a("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handleRecycleMore}},[a("span",[t._v("移到回收站")])])]):t._e(),"RECYCLE"===t.queryParam.status?a("a-menu-item",{key:"3"},[a("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handleDeleteMore}},[a("span",[t._v("永久删除")])])]):t._e()],1),a("a-button",{staticStyle:{"margin-left":"8px"}},[t._v("\n 批量操作\n "),a("a-icon",{attrs:{type:"down"}})],1)],1)],1),a("div",{staticStyle:{"margin-top":"15px"}},[a("a-table",{attrs:{rowKey:function(t){return t.id},rowSelection:{onChange:t.onSelectionChange,getCheckboxProps:t.getCheckboxProps},columns:t.columns,dataSource:t.formattedPosts,loading:t.postsLoading,pagination:!1},scopedSlots:t._u([{key:"postTitle",fn:function(e){return a("ellipsis",{attrs:{length:25,tooltip:""}},[t._v(t._s(e))])}},{key:"status",fn:function(e){return a("span",{},[a("a-badge",{attrs:{status:e.status}}),t._v("\n "+t._s(e.text)+"\n ")],1)}},{key:"categories",fn:function(e){return a("span",{},t._l(e,function(e,s){return a("a-tag",{key:s,attrs:{color:"blue"}},[t._v(t._s(e.name))])}),1)}},{key:"tags",fn:function(e){return a("span",{},t._l(e,function(e,s){return a("a-tag",{key:s,attrs:{color:"green"}},[t._v(t._s(e.name))])}),1)}},{key:"updateTime",fn:function(e){return a("span",{},[t._v(t._s(t._f("timeAgo")(e)))])}},{key:"action",fn:function(e,s){return a("span",{},["PUBLISHED"===s.status||"DRAFT"===s.status?a("a",{attrs:{href:"javascript:;"},on:{click:function(e){return t.handleEditClick(s)}}},[t._v("编辑")]):"RECYCLE"===s.status?a("a-popconfirm",{attrs:{title:"你确定要发布【"+s.title+"】文章?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleEditStatusClick(s.id,"PUBLISHED")}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("还原")])]):t._e(),a("a-divider",{attrs:{type:"vertical"}}),"PUBLISHED"===s.status||"DRAFT"===s.status?a("a-popconfirm",{attrs:{title:"你确定要将【"+s.title+"】文章移到回收站?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleEditStatusClick(s.id,"RECYCLE")}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("回收站")])]):"RECYCLE"===s.status?a("a-popconfirm",{attrs:{title:"你确定要永久删除【"+s.title+"】文章?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleDeleteClick(s.id)}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("删除")])]):t._e()],1)}}])}),a("div",{staticClass:"page-wrapper"},[a("a-pagination",{staticClass:"pagination",attrs:{total:t.pagination.total,pageSizeOptions:["1","2","5","10","20","50","100"],showSizeChanger:""},on:{showSizeChange:t.handlePaginationChange,change:t.handlePaginationChange}})],1)],1)])],1)},n=[],o=(a("b745"),a("c405")),r=a("caf6"),i=[{title:"标题",dataIndex:"title",scopedSlots:{customRender:"postTitle"}},{title:"状态",className:"status",dataIndex:"statusProperty",scopedSlots:{customRender:"status"}},{title:"分类目录",dataIndex:"categories",scopedSlots:{customRender:"categories"}},{title:"标签",dataIndex:"tags",scopedSlots:{customRender:"tags"}},{title:"评论量",dataIndex:"commentCount"},{title:"访问量",dataIndex:"visits"},{title:"更新时间",dataIndex:"updateTime",scopedSlots:{customRender:"updateTime"}},{title:"操作",width:"150px",scopedSlots:{customRender:"action"}}],c={name:"PostList",components:{},data:function(){return{postStatus:r["a"].postStatus,pagination:{current:1,pageSize:10,sort:null},queryParam:{page:0,size:10,sort:null,keyword:null,categoryId:null,status:null},columns:i,selectedRowKeys:[],selectedRows:[],categories:[],posts:[],postsLoading:!1}},computed:{formattedPosts:function(){var t=this;return this.posts.map(function(e){return e.statusProperty=t.postStatus[e.status],e})}},created:function(){this.loadCategories(),this.loadPosts()},methods:{loadPosts:function(){var t=this;this.postsLoading=!0,this.queryParam.page=this.pagination.current-1,this.queryParam.size=this.pagination.pageSize,this.queryParam.sort=this.pagination.sort,r["a"].query(this.queryParam).then(function(e){t.posts=e.data.data.content,t.pagination.total=e.data.data.total,t.postsLoading=!1})},loadCategories:function(){var t=this;o["a"].listAll().then(function(e){t.categories=e.data.data})},handleEditClick:function(t){this.$router.push({name:"PostEdit",query:{postId:t.id}})},onSelectionChange:function(t){this.selectedRowKeys=t,this.$log.debug("SelectedRowKeys: ".concat(t))},getCheckboxProps:function(t){return{props:{disabled:"RECYCLE"===t.status,name:t.title}}},handlePaginationChange:function(t,e){this.$log.debug("Current: ".concat(t,", PageSize: ").concat(e)),this.pagination.current=t,this.pagination.pageSize=e,this.loadPosts()},handleResetParam:function(){this.queryParam.keyword=null,this.queryParam.categoryId=null,this.queryParam.status=null,this.loadPosts()},handleQuery:function(){this.queryParam.page=0,this.loadPosts()},handleEditStatusClick:function(t,e){var a=this;r["a"].updateStatus(t,e).then(function(t){a.$message.success("操作成功!"),a.loadPosts()})},handleDeleteClick:function(t){var e=this;r["a"].delete(t).then(function(t){e.$message.success("删除成功!"),e.loadPosts()})},handlePublishMore:function(){var t=this;if(this.selectedRowKeys.length<=0)this.$message.success("请至少选择一项!");else for(var e=function(e){var a=t.selectedRowKeys[e];r["a"].updateStatus(a,"PUBLISHED").then(function(e){t.$log.debug("postId: ".concat(a,", status: PUBLISHED")),t.selectedRowKeys=[],t.loadPosts()})},a=0;a<this.selectedRowKeys.length;a++)e(a)},handleRecycleMore:function(){var t=this;if(this.selectedRowKeys.length<=0)this.$message.success("请至少选择一项!");else for(var e=function(e){var a=t.selectedRowKeys[e];r["a"].updateStatus(a,"RECYCLE").then(function(e){t.$log.debug("postId: ".concat(a,", status: RECYCLE")),t.selectedRowKeys=[],t.loadPosts()})},a=0;a<this.selectedRowKeys.length;a++)e(a)},handleDeleteMore:function(){var t=this;if(this.selectedRowKeys.length<=0)this.$message.success("请至少选择一项!");else for(var e=function(e){var a=t.selectedRowKeys[e];r["a"].delete(a).then(function(e){t.$log.debug("delete: ".concat(a)),t.selectedRowKeys=[],t.loadPosts()})},a=0;a<this.selectedRowKeys.length;a++)e(a)}}},u=c,l=a("17cc"),d=Object(l["a"])(u,s,n,!1,null,null,null);e["default"]=d.exports}}]);
\ No newline at end of file
此差异已折叠。
此差异已折叠。
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-cec31564"],{9231:function(e,a,t){"use strict";var s=t("ea0a"),n=t.n(s);n.a},ac2a:function(e,a,t){"use strict";t.r(a);var s=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",{staticClass:"container"},[e._m(0),t("div",{staticClass:"loginBody animated"},[t("a-form",{attrs:{layout:"vertical"},nativeOn:{keyup:function(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter")?null:e.handleLogin(a)}}},[t("a-form-item",{staticClass:"animated fadeInUp",style:{"animation-delay":"0.1s"}},[t("a-input",{attrs:{placeholder:"用户名/邮箱"},model:{value:e.username,callback:function(a){e.username=a},expression:"username"}},[t("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),t("a-form-item",{staticClass:"animated fadeInUp",style:{"animation-delay":"0.2s"}},[t("a-input",{attrs:{type:"password",placeholder:"密码"},model:{value:e.password,callback:function(a){e.password=a},expression:"password"}},[t("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),t("a-row",[t("a-button",{staticClass:"animated fadeInUp",style:{"animation-delay":"0.3s"},attrs:{type:"primary",block:!0},on:{click:e.handleLogin}},[e._v("登录")])],1)],1)],1)])},n=[function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",{staticClass:"loginLogo animated fadeInUp"},[t("span",[e._v("Halo")])])}],i=(t("34a3"),t("e20c")),r=t("591a"),o={data:function(){return{username:null,password:null}},methods:Object(i["a"])({},Object(r["b"])(["login","loadUser"]),{handleLogin:function(){var e=this;this.username?this.password?this.login({username:this.username,password:this.password}).then(function(a){e.loginSuccess()}):this.$message.warn("密码不能为空!"):this.$message.warn("用户名不能为空!")},loginSuccess:function(){this.loadUser(),this.$route.query.redirect?this.$router.replace(this.$route.query.redirect):this.$router.replace({name:"Dashboard"})}})},l=o,c=(t("9231"),t("17cc")),u=Object(c["a"])(l,s,n,!1,null,null,null);a["default"]=u.exports},ea0a:function(e,a,t){}}]);
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册