🚀 开发文章加密访问(后台)

master
linhaojun 3 years ago
parent db41e84369
commit cc5162378b

@ -15,9 +15,9 @@ public enum ArticleStatusEnum {
*/
PUBLIC(1, "公开"),
/**
*
*
*/
SECRET(2, "密"),
SECRET(2, ""),
/**
* 稿
*/

@ -4,6 +4,7 @@ package com.aurora.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import javax.validation.constraints.NotBlank;
import java.util.List;
@ -86,4 +87,10 @@ public class ArticleVO {
*/
@ApiModelProperty(name = "originalUrl", value = "原文链接", dataType = "String")
private String originalUrl;
/**
* 访
*/
@ApiModelProperty(name = "password", value = "文章访问密码", dataType = "String")
private String password;
}

@ -134,9 +134,12 @@
<el-form-item label="发布形式">
<el-radio-group v-model="article.status">
<el-radio :label="1">公开</el-radio>
<el-radio :label="2"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="访问密码" v-if="article.status == 2">
<el-input v-model="article.password" placeholder="请填写文章访问密码" />
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="addOrEdit = false"> </el-button>
@ -197,7 +200,6 @@ export default {
articleCover: '',
categoryName: null,
tagNames: [],
originalUrl: '',
isTop: 0,
type: 1,
status: 1
@ -481,4 +483,4 @@ export default {
height: 260px;
overflow-y: auto;
}
</style>
</style>

@ -39,7 +39,10 @@
</ul>
</span>
<h1 class="article-title" v-if="article.articleTitle" @click="toArticle" data-dia="article-link">
<a>{{ article.articleTitle }}</a>
<a>
<span> {{ article.articleTitle }}</span>
<svg-icon v-if="article.status == 2" icon-class="lock" class="lock-svg" />
</a>
</h1>
<ob-skeleton v-else tag="h1" height="3rem" />
<p v-if="article.articleContent">{{ article.articleContent }}</p>

@ -24,7 +24,6 @@
{{ article.categoryName }}
</b>
<ob-skeleton v-else tag="b" height="20px" width="35px" />
<ul>
<template v-if="article.tags && article.tags.length > 0">
<li v-for="tag in article.tags" :key="tag.id">
@ -41,7 +40,8 @@
</span>
<h1 class="article-title" v-if="article.articleTitle" @click="toArticle" data-dia="article-link">
<a>
{{ article.articleTitle }}
<span>{{ article.articleTitle }}</span>
<svg-icon v-if="article.status == 2" icon-class="lock" class="lock-svg" />
</a>
</h1>
<ob-skeleton v-else tag="h1" height="3rem" />

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1663655632737" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7549" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M650 432.6v-98.4c0-76.3-61.8-138.1-138.1-138.1S373.8 258 373.8 334.3v98.4H650z m-382.9 1.1l-0.1-3.1V322.5c0-59.9 23.8-117.4 66.2-159.8C375.6 120.3 433 96.5 493 96.5h37.9c124.8 0 225.9 101.2 225.9 225.9v111.3c58.2 8.1 101.5 57.9 101.5 116.7v258.3c0 65.1-52.7 117.8-117.8 117.8H283.3c-65.1 0-117.8-52.7-117.8-117.8V550.5c0-58.8 43.3-108.6 101.6-116.8z m217.6 266v77c0 15 12.2 27.2 27.2 27.2s27.2-12.2 27.2-27.2v-77c33.5-13.1 53-48.2 46.3-83.5-6.7-35.4-37.5-61-73.5-61s-66.9 25.6-73.5 61c-6.7 35.3 12.8 70.4 46.3 83.5z m0 0" p-id="7550"></path></svg>

After

Width:  |  Height:  |  Size: 880 B

Loading…
Cancel
Save