新增百宝箱,优化首页

master
haitao 2 years ago
parent 27f51cfe06
commit afbcec3f5a

@ -26,6 +26,12 @@
- 优化:前端美化 - 优化:前端美化
- 优化:留言分类与资源整合 - 优化:留言分类与资源整合
### 2023年4月1日更新
- 新增:百宝箱(收藏夹)
- 优化:首页
- 优化:前端美化
- 优化:资源整合
### 首页 ### 首页
![首页](首页.jpg) ![首页](首页.jpg)

27
package-lock.json generated

@ -19,6 +19,7 @@
"vue-baberrage": "^3.2.4", "vue-baberrage": "^3.2.4",
"vue-ripple-directive": "^2.0.1", "vue-ripple-directive": "^2.0.1",
"vue-router": "^3.2.0", "vue-router": "^3.2.0",
"vue-seamless-scroll": "^1.1.23",
"vuex": "^3.4.0", "vuex": "^3.4.0",
"vuex-persistedstate": "^4.0.0" "vuex-persistedstate": "^4.0.0"
}, },
@ -4531,6 +4532,11 @@
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
"dev": true "dev": true
}, },
"node_modules/comutils": {
"version": "1.1.19",
"resolved": "https://registry.npmmirror.com/comutils/-/comutils-1.1.19.tgz",
"integrity": "sha512-JxXB67juILiwhdLwOsYyjUqwWEhHdObI0EClOPk+JDtEuTbac59s0pxGpfCBnNNQ5JommifmcMGneW/4Cg7YWw=="
},
"node_modules/concat-map": { "node_modules/concat-map": {
"version": "0.0.1", "version": "0.0.1",
"resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz",
@ -14630,6 +14636,14 @@
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.5.3.tgz", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.5.3.tgz",
"integrity": "sha512-FUlILrW3DGitS2h+Xaw8aRNvGTwtuaxrRkNSHWTizOfLUie7wuYwezeZ50iflRn8YPV5kxmU2LQuu3nM/b3Zsg==" "integrity": "sha512-FUlILrW3DGitS2h+Xaw8aRNvGTwtuaxrRkNSHWTizOfLUie7wuYwezeZ50iflRn8YPV5kxmU2LQuu3nM/b3Zsg=="
}, },
"node_modules/vue-seamless-scroll": {
"version": "1.1.23",
"resolved": "https://registry.npmmirror.com/vue-seamless-scroll/-/vue-seamless-scroll-1.1.23.tgz",
"integrity": "sha512-HBjUub8WwsKJzbFCrwKPDrZn4e+SSbkKgwWtjKtfLwesiFGwSsVxP44/Z6d3kpXy94qIFOiflJH6l0/9pj7SGA==",
"dependencies": {
"comutils": "^1.1.9"
}
},
"node_modules/vue-style-loader": { "node_modules/vue-style-loader": {
"version": "4.1.3", "version": "4.1.3",
"resolved": "https://registry.npmmirror.com/vue-style-loader/-/vue-style-loader-4.1.3.tgz", "resolved": "https://registry.npmmirror.com/vue-style-loader/-/vue-style-loader-4.1.3.tgz",
@ -19472,6 +19486,11 @@
} }
} }
}, },
"comutils": {
"version": "1.1.19",
"resolved": "https://registry.npmmirror.com/comutils/-/comutils-1.1.19.tgz",
"integrity": "sha512-JxXB67juILiwhdLwOsYyjUqwWEhHdObI0EClOPk+JDtEuTbac59s0pxGpfCBnNNQ5JommifmcMGneW/4Cg7YWw=="
},
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz",
@ -27876,6 +27895,14 @@
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.5.3.tgz", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.5.3.tgz",
"integrity": "sha512-FUlILrW3DGitS2h+Xaw8aRNvGTwtuaxrRkNSHWTizOfLUie7wuYwezeZ50iflRn8YPV5kxmU2LQuu3nM/b3Zsg==" "integrity": "sha512-FUlILrW3DGitS2h+Xaw8aRNvGTwtuaxrRkNSHWTizOfLUie7wuYwezeZ50iflRn8YPV5kxmU2LQuu3nM/b3Zsg=="
}, },
"vue-seamless-scroll": {
"version": "1.1.23",
"resolved": "https://registry.npmmirror.com/vue-seamless-scroll/-/vue-seamless-scroll-1.1.23.tgz",
"integrity": "sha512-HBjUub8WwsKJzbFCrwKPDrZn4e+SSbkKgwWtjKtfLwesiFGwSsVxP44/Z6d3kpXy94qIFOiflJH6l0/9pj7SGA==",
"requires": {
"comutils": "^1.1.9"
}
},
"vue-style-loader": { "vue-style-loader": {
"version": "4.1.3", "version": "4.1.3",
"resolved": "https://registry.npmmirror.com/vue-style-loader/-/vue-style-loader-4.1.3.tgz", "resolved": "https://registry.npmmirror.com/vue-style-loader/-/vue-style-loader-4.1.3.tgz",

@ -19,6 +19,7 @@
"vue-baberrage": "^3.2.4", "vue-baberrage": "^3.2.4",
"vue-ripple-directive": "^2.0.1", "vue-ripple-directive": "^2.0.1",
"vue-router": "^3.2.0", "vue-router": "^3.2.0",
"vue-seamless-scroll": "^1.1.23",
"vuex": "^3.4.0", "vuex": "^3.4.0",
"vuex-persistedstate": "^4.0.0" "vuex-persistedstate": "^4.0.0"
}, },

@ -2,6 +2,7 @@
/* 背景 */ /* 背景 */
--background: white; --background: white;
--gradualBackground: linear-gradient(to right bottom, #ee7752, #e73c7e, #23a6d5, #23d5ab); --gradualBackground: linear-gradient(to right bottom, #ee7752, #e73c7e, #23a6d5, #23d5ab);
--favoriteBg: #f7f9fe;
/* 字体 */ /* 字体 */
--fontColor: black; --fontColor: black;
@ -75,6 +76,8 @@
--globalFont: SmileySans; --globalFont: SmileySans;
--commentURL: url(../file/comment.jpg); --commentURL: url(../file/comment.jpg);
--springBg: url(../file/bg1.jpg);
--admireImage: url(../file/bg1.jpg);
--toTop: url(../file/top.jpg); --toTop: url(../file/top.jpg);
--bannerWave1: url(../file/bannerwave1.png) repeat-x; --bannerWave1: url(../file/bannerwave1.png) repeat-x;
--bannerWave2: url(../file/bannerwave2.png) repeat-x; --bannerWave2: url(../file/bannerwave2.png) repeat-x;

@ -16,11 +16,12 @@
<el-option key="11" label="聊天群头像" value="im/groupAvatar"></el-option> <el-option key="11" label="聊天群头像" value="im/groupAvatar"></el-option>
<el-option key="12" label="群聊天图片" value="im/groupMessage"></el-option> <el-option key="12" label="群聊天图片" value="im/groupMessage"></el-option>
<el-option key="13" label="朋友聊天图片" value="im/friendMessage"></el-option> <el-option key="13" label="朋友聊天图片" value="im/friendMessage"></el-option>
<el-option key="14" label="Funny声音" value="funnyUrl"></el-option> <el-option key="14" label="音乐声音" value="funnyUrl"></el-option>
<el-option key="15" label="Funny封面" value="funnyCover"></el-option> <el-option key="15" label="音乐封面" value="funnyCover"></el-option>
<el-option key="16" label="Love.Cover" value="love/bgCover"></el-option> <el-option key="16" label="Love.Cover" value="love/bgCover"></el-option>
<el-option key="17" label="Love.Man" value="love/manCover"></el-option> <el-option key="17" label="Love.Man" value="love/manCover"></el-option>
<el-option key="18" label="Love.Woman" value="love/womanCover"></el-option> <el-option key="18" label="Love.Woman" value="love/womanCover"></el-option>
<el-option key="19" label="收藏夹封面" value="favoritesCover"></el-option>
</el-select> </el-select>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button type="primary" @click="addResources()"></el-button> <el-button type="primary" @click="addResources()"></el-button>

@ -20,6 +20,7 @@
<el-table :data="resourcePaths" border class="table" header-cell-class-name="table-header"> <el-table :data="resourcePaths" border class="table" header-cell-class-name="table-header">
<el-table-column prop="id" label="ID" width="55" align="center"></el-table-column> <el-table-column prop="id" label="ID" width="55" align="center"></el-table-column>
<el-table-column prop="title" label="标题" align="center"></el-table-column> <el-table-column prop="title" label="标题" align="center"></el-table-column>
<el-table-column prop="classify" label="分类" align="center"></el-table-column>
<el-table-column prop="introduction" label="简介" align="center"></el-table-column> <el-table-column prop="introduction" label="简介" align="center"></el-table-column>
<el-table-column label="封面" align="center"> <el-table-column label="封面" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -97,8 +98,12 @@
<div> <div>
<div style="margin-bottom: 5px">标题</div> <div style="margin-bottom: 5px">标题</div>
<el-input maxlength="60" v-model="resourcePath.title"></el-input> <el-input maxlength="60" v-model="resourcePath.title"></el-input>
<div style="margin-top: 10px;margin-bottom: 5px">分类</div>
<el-input :disabled="!['lovePhoto', 'funny', 'favorites'].includes(resourcePath.type)"
maxlength="30" v-model="resourcePath.classify"></el-input>
<div style="margin-top: 10px;margin-bottom: 5px">简介</div> <div style="margin-top: 10px;margin-bottom: 5px">简介</div>
<el-input maxlength="1000" v-model="resourcePath.introduction"></el-input> <el-input :disabled="!['friendUrl', 'favorites'].includes(resourcePath.type)"
maxlength="1000" v-model="resourcePath.introduction"></el-input>
<div style="margin-top: 10px;margin-bottom: 5px">封面</div> <div style="margin-top: 10px;margin-bottom: 5px">封面</div>
<div style="display: flex"> <div style="display: flex">
<el-input v-model="resourcePath.cover"></el-input> <el-input v-model="resourcePath.cover"></el-input>
@ -112,7 +117,8 @@
</div> </div>
<div style="margin-top: 10px;margin-bottom: 5px">链接</div> <div style="margin-top: 10px;margin-bottom: 5px">链接</div>
<div style="display: flex"> <div style="display: flex">
<el-input v-model="resourcePath.url"></el-input> <el-input :disabled="!['friendUrl', 'funny', 'favorites'].includes(resourcePath.type)"
v-model="resourcePath.url"></el-input>
<div style="width: 66px;margin: 3.5px 0 0 10px"> <div style="width: 66px;margin: 3.5px 0 0 10px">
<proButton :info="'上传文件'" <proButton :info="'上传文件'"
@click.native="addResourcePathUrl()" @click.native="addResourcePathUrl()"
@ -131,7 +137,8 @@
</el-option> </el-option>
</el-select> </el-select>
<div style="margin-top: 10px;margin-bottom: 5px">备注</div> <div style="margin-top: 10px;margin-bottom: 5px">备注</div>
<el-input maxlength="1000" v-model="resourcePath.remark" type="textarea"></el-input> <el-input :disabled="![].includes(resourcePath.type)"
maxlength="1000" v-model="resourcePath.remark" type="textarea"></el-input>
</div> </div>
<div style="display: flex;margin-top: 30px" class="myCenter"> <div style="display: flex;margin-top: 30px" class="myCenter">
<proButton :info="'提交'" <proButton :info="'提交'"
@ -160,7 +167,8 @@
resourceTypes: [ resourceTypes: [
{label: "友链", value: "friendUrl"}, {label: "友链", value: "friendUrl"},
{label: "恋爱图片", value: "lovePhoto"}, {label: "恋爱图片", value: "lovePhoto"},
{label: "鬼畜", value: "funny"} {label: "音乐", value: "funny"},
{label: "收藏夹", value: "favorites"}
], ],
pagination: { pagination: {
current: 1, current: 1,
@ -176,6 +184,7 @@
isUpdate: false, isUpdate: false,
resourcePath: { resourcePath: {
title: "", title: "",
classify: "",
introduction: "", introduction: "",
cover: "", cover: "",
url: "", url: "",
@ -209,9 +218,9 @@
if (this.addResourcePathDialog === false) { if (this.addResourcePathDialog === false) {
return; return;
} }
if (this.$common.isEmpty(this.resourcePath.type)) { if (!['funny'].includes(this.resourcePath.type)) {
this.$message({ this.$message({
message: "请选择资源类型!", message: "请选择有效资源类型!",
type: "error" type: "error"
}); });
return; return;
@ -333,6 +342,7 @@
this.addResourcePathDialog = false; this.addResourcePathDialog = false;
this.resourcePath = { this.resourcePath = {
title: "", title: "",
classify: "",
introduction: "", introduction: "",
cover: "", cover: "",
url: "", url: "",

@ -13,7 +13,7 @@
<span v-else-if="scope.row.sortType === 1">普通分类</span> <span v-else-if="scope.row.sortType === 1">普通分类</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="priority" label="导航栏分类优先级" align="center"></el-table-column> <el-table-column prop="priority" label="分类优先级" align="center"></el-table-column>
<el-table-column prop="countOfSort" label="文章总数" align="center"></el-table-column> <el-table-column prop="countOfSort" label="文章总数" align="center"></el-table-column>
<el-table-column label="操作" width="380" align="center"> <el-table-column label="操作" width="380" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -77,9 +77,9 @@
<el-input placeholder="请输入分类描述" v-model="sortForHttp.sortDescription"> <el-input placeholder="请输入分类描述" v-model="sortForHttp.sortDescription">
<template slot="prepend">分类描述</template> <template slot="prepend">分类描述</template>
</el-input> </el-input>
<el-input type="number" v-if="sortForHttp.sortType === 0" placeholder="请输入整数,数字小的在前面" <el-input type="number" placeholder="请输入整数,数字小的在前面"
v-model="sortForHttp.priority"> v-model="sortForHttp.priority">
<template slot="prepend">导航栏分类优先级</template> <template slot="prepend">分类优先级</template>
</el-input> </el-input>
</div> </div>
@ -189,6 +189,7 @@
}, },
saveSortEdit() { saveSortEdit() {
if (this.$common.isEmpty(this.sortForHttp.sortType) || if (this.$common.isEmpty(this.sortForHttp.sortType) ||
this.$common.isEmpty(this.sortForHttp.priority) ||
this.$common.isEmpty(this.sortForHttp.sortName) || this.$common.isEmpty(this.sortForHttp.sortName) ||
this.$common.isEmpty(this.sortForHttp.sortDescription)) { this.$common.isEmpty(this.sortForHttp.sortDescription)) {
this.$message({ this.$message({
@ -198,14 +199,6 @@
return; return;
} }
if (this.sortForHttp.sortType === 0 && this.$common.isEmpty(this.sortForHttp.priority)) {
this.$message({
message: "导航栏分类必须输入优先级!",
type: "error"
});
return;
}
let url; let url;
if (this.$common.isEmpty(this.sortForHttp.id)) { if (this.$common.isEmpty(this.sortForHttp.id)) {
url = "/webInfo/saveSort"; url = "/webInfo/saveSort";

@ -20,6 +20,12 @@
<el-table-column prop="username" label="用户名" align="center"></el-table-column> <el-table-column prop="username" label="用户名" align="center"></el-table-column>
<el-table-column prop="phoneNumber" label="手机号" align="center"></el-table-column> <el-table-column prop="phoneNumber" label="手机号" align="center"></el-table-column>
<el-table-column prop="email" label="邮箱" align="center"></el-table-column> <el-table-column prop="email" label="邮箱" align="center"></el-table-column>
<el-table-column label="赞赏" width="100" align="center">
<template slot-scope="scope">
<el-input size="medium" maxlength="30" v-model="scope.row.admire"
@blur="changeUserAdmire(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column label="用户状态" align="center"> <el-table-column label="用户状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="scope.row.userStatus === false ? 'danger' : 'success'" <el-tag :type="scope.row.userStatus === false ? 'danger' : 'success'"
@ -193,6 +199,38 @@
}); });
}); });
}, },
changeUserAdmire(user) {
if (!this.$common.isEmpty(user.admire)) {
this.$confirm('确认保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
center: true
}).then(() => {
this.$http.get(this.$constant.baseURL + "/admin/user/changeUserAdmire", {
userId: user.id,
admire: user.admire
}, true)
.then((res) => {
this.$message({
message: "修改成功!",
type: "success"
});
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
}).catch(() => {
this.$message({
type: 'success',
message: '已取消保存!'
});
});
}
},
editUser(user) { editUser(user) {
this.changeUser.id = user.id; this.changeUser.id = user.id;
this.changeUser.userType = user.userType; this.changeUser.userType = user.userType;

@ -14,7 +14,7 @@
</svg> </svg>
发现 发现
</div> </div>
<div class="recent-post-item shadow-box background-opacity wow" <div class="recent-post-item shadow-box background-opacity"
v-for="(article, index) in articleList" v-for="(article, index) in articleList"
:key="index" :key="index"
:class="{'my-animation-slide-top': index % 2 !== 0,'my-animation-slide-bottom': index % 2 === 0}" :class="{'my-animation-slide-top': index % 2 !== 0,'my-animation-slide-bottom': index % 2 === 0}"
@ -49,7 +49,12 @@
发布于 {{ article.createTime }} 发布于 {{ article.createTime }}
</div> </div>
<!-- 标题 --> <!-- 标题 -->
<el-tooltip placement="top" effect="light">
<div slot="content">{{ article.articleTitle }}</div>
<h3>{{ article.articleTitle }}</h3> <h3>{{ article.articleTitle }}</h3>
</el-tooltip>
<!-- 信息 --> <!-- 信息 -->
<div class="post-meta" style="margin-bottom: 15px"> <div class="post-meta" style="margin-bottom: 15px">
<span> <span>

@ -88,14 +88,6 @@
return; return;
} }
if (this.$common.isEmpty(this.$store.state.currentUser.email)) {
this.$message({
message: "请先绑定邮箱!",
type: "error"
});
return;
}
this.showPicture = true; this.showPicture = true;
}, },
@ -121,14 +113,6 @@
return; return;
} }
if (this.$common.isEmpty(this.$store.state.currentUser.email)) {
this.$message({
message: "请先绑定邮箱!",
type: "error"
});
return;
}
this.commentContent = ""; this.commentContent = "";
this.$emit("showGraffiti"); this.$emit("showGraffiti");
}, },
@ -141,18 +125,10 @@
return; return;
} }
if (this.$common.isEmpty(this.$store.state.currentUser.email)) {
this.$message({
message: "请先绑定邮箱!",
type: "error"
});
return;
}
if (this.commentContent.trim() === "") { if (this.commentContent.trim() === "") {
this.$message({ this.$message({
message: "你还没写呢~", message: "你还没写呢~",
type: "warning", type: "warning"
}); });
return; return;
} }

@ -144,7 +144,7 @@
this.setCanvasStyle(); this.setCanvasStyle();
}, },
created() { created() {
if (!this.$common.isEmpty(this.$store.state.currentUser) && !this.$common.isEmpty(this.$store.state.currentUser.email)) { if (!this.$common.isEmpty(this.$store.state.currentUser)) {
this.getUpToken(); this.getUpToken();
} }
}, },
@ -275,7 +275,7 @@
if (this.preDrawAry.length < 1) { if (this.preDrawAry.length < 1) {
this.$message({ this.$message({
message: "你还没画呢~", message: "你还没画呢~",
type: "warning", type: "warning"
}); });
return; return;
} }

@ -15,9 +15,9 @@
</div> </div>
<div class="card-body"> <div class="card-body">
<el-tooltip placement="bottom-start" effect="light"> <el-tooltip placement="bottom-start" effect="light">
<div slot="content">{{resourcePath.introduction}}</div> <div slot="content">{{resourcePath.title}}</div>
<div class="card-desc"> <div class="card-desc">
{{resourcePath.introduction}} {{resourcePath.title}}
</div> </div>
</el-tooltip> </el-tooltip>
<div class="card-time"> <div class="card-time">

@ -19,7 +19,7 @@
<div>😃 {{treeHole.createTime}}</div> <div>😃 {{treeHole.createTime}}</div>
<div @click="deleteTreeHole(treeHole.id)" <div @click="deleteTreeHole(treeHole.id)"
class="tree-hole-delete" class="tree-hole-delete"
v-if="!$common.isEmpty($store.state.currentUser)"> v-if="!$common.isEmpty($store.state.currentUser) && $store.state.currentUser.id === treeHole.userId">
<svg viewBox="0 0 1024 1024" width="18" height="18" style="vertical-align: -2px;"> <svg viewBox="0 0 1024 1024" width="18" height="18" style="vertical-align: -2px;">
<path <path
d="M921.1392 155.392h-270.592v-48.2816c0-22.7328-18.432-41.1648-41.1648-41.1648H426.3424a41.1648 41.1648 0 0 0-41.1648 41.1648v48.2816H110.6432c-14.1312 0-25.6 11.4688-25.6 25.6s11.4688 25.6 25.6 25.6h810.496c14.1312 0 25.6-11.4688 25.6-25.6s-11.4688-25.6-25.6-25.6zM170.8032 260.0448v592.8448c0 50.8928 41.2672 92.16 92.16 92.16h500.6848c50.8928 0 92.16-41.2672 92.16-92.16V260.0448H170.8032z m249.1392 462.7968c0 14.1312-11.4688 25.6-25.6 25.6s-25.6-11.4688-25.6-25.6V443.0848c0-14.1312 11.4688-25.6 25.6-25.6s25.6 11.4688 25.6 25.6v279.7568z m243.1488 0c0 14.1312-11.4688 25.6-25.6 25.6s-25.6-11.4688-25.6-25.6V443.0848c0-14.1312 11.4688-25.6 25.6-25.6s25.6 11.4688 25.6 25.6v279.7568z" d="M921.1392 155.392h-270.592v-48.2816c0-22.7328-18.432-41.1648-41.1648-41.1648H426.3424a41.1648 41.1648 0 0 0-41.1648 41.1648v48.2816H110.6432c-14.1312 0-25.6 11.4688-25.6 25.6s11.4688 25.6 25.6 25.6h810.496c14.1312 0 25.6-11.4688 25.6-25.6s-11.4688-25.6-25.6-25.6zM170.8032 260.0448v592.8448c0 50.8928 41.2672 92.16 92.16 92.16h500.6848c50.8928 0 92.16-41.2672 92.16-92.16V260.0448H170.8032z m249.1392 462.7968c0 14.1312-11.4688 25.6-25.6 25.6s-25.6-11.4688-25.6-25.6V443.0848c0-14.1312 11.4688-25.6 25.6-25.6s25.6 11.4688 25.6 25.6v279.7568z m243.1488 0c0 14.1312-11.4688 25.6-25.6 25.6s-25.6-11.4688-25.6-25.6V443.0848c0-14.1312 11.4688-25.6 25.6-25.6s25.6 11.4688 25.6 25.6v279.7568z"
@ -242,7 +242,7 @@
@media screen and (max-width: 1000px) { @media screen and (max-width: 1000px) {
.tree-hole-box { .tree-hole-box {
width: auto; width: calc(100% - 90px);
} }
} }

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

@ -138,18 +138,10 @@
return; return;
} }
if (this.$common.isEmpty(this.$store.state.currentUser.email)) {
this.$message({
message: "请先绑定邮箱!",
type: "error"
});
return;
}
if (this.friend.title.trim() === "") { if (this.friend.title.trim() === "") {
this.$message({ this.$message({
message: "你还没写名称呢~", message: "你还没写名称呢~",
type: "warning", type: "warning"
}); });
return; return;
} }
@ -157,7 +149,7 @@
if (this.friend.introduction.trim() === "") { if (this.friend.introduction.trim() === "") {
this.$message({ this.$message({
message: "你还没写简介呢~", message: "你还没写简介呢~",
type: "warning", type: "warning"
}); });
return; return;
} }
@ -165,7 +157,7 @@
if (this.friend.cover.trim() === "") { if (this.friend.cover.trim() === "") {
this.$message({ this.$message({
message: "你还没设置封面呢~", message: "你还没设置封面呢~",
type: "warning", type: "warning"
}); });
return; return;
} }
@ -173,7 +165,7 @@
if (this.friend.url.trim() === "") { if (this.friend.url.trim() === "") {
this.$message({ this.$message({
message: "你还没写网址呢~", message: "你还没写网址呢~",
type: "warning", type: "warning"
}); });
return; return;
} }

@ -43,10 +43,10 @@
fill="#2E66FF"></path> fill="#2E66FF"></path>
</svg> </svg>
</span> </span>
<span class="funny-title">{{index + 1}}号选手{{item.title}}</span> <span class="funny-title">{{index + 1}}号选手{{item.classify}}</span>
</div> </div>
<div class="process-wrap"> <div class="process-wrap">
<el-collapse v-model="activeName" accordion @change="changeFunny(item.title)"> <el-collapse v-model="activeName" accordion @change="changeFunny(item.classify)">
<el-collapse-item title="笑梗不笑人" :name="index"> <el-collapse-item title="笑梗不笑人" :name="index">
<div class="my-animation-slide-bottom" <div class="my-animation-slide-bottom"
style="display: flex;flex-flow: wrap;margin-left: 20px" style="display: flex;flex-flow: wrap;margin-left: 20px"
@ -57,7 +57,7 @@
@click.native="playSound(funny.url)" @click.native="playSound(funny.url)"
:src="funny.cover"> :src="funny.cover">
</el-avatar> </el-avatar>
<div class="funny-item-title">{{funny.introduction}}</div> <div class="funny-item-title">{{funny.title}}</div>
</div> </div>
</div> </div>
</el-collapse-item> </el-collapse-item>
@ -88,26 +88,26 @@
pagination: { pagination: {
current: 1, current: 1,
size: 9999, size: 9999,
order: "introduction", order: "title",
desc: false, desc: false,
resourceType: "funny", resourceType: "funny",
searchKey: "" classify: ""
}, },
activeName: 0, activeName: 0,
audio: null, audio: null,
funnys: [{ funnys: [{
title: "", classify: "",
count: null, count: null,
data: [{ data: [{
title: "", classify: "",
cover: "", cover: "",
url: "", url: "",
introduction: "" title: ""
}] }]
}], }],
funny: { funny: {
classify: "",
title: "", title: "",
introduction: "",
cover: "", cover: "",
url: "" url: ""
} }
@ -132,7 +132,7 @@
.then((res) => { .then((res) => {
if (!this.$common.isEmpty(res.data)) { if (!this.$common.isEmpty(res.data)) {
this.funnys = res.data; this.funnys = res.data;
this.changeFunny(this.funnys[0].title); this.changeFunny(this.funnys[0].classify);
} }
}) })
.catch((error) => { .catch((error) => {
@ -147,13 +147,13 @@
.then((res) => { .then((res) => {
if (!this.$common.isEmpty(res.data) && !this.$common.isEmpty(res.data.records)) { if (!this.$common.isEmpty(res.data) && !this.$common.isEmpty(res.data.records)) {
this.funnys.forEach(funny => { this.funnys.forEach(funny => {
if (funny.title === this.pagination.searchKey) { if (funny.classify === this.pagination.classify) {
funny.data = res.data.records; funny.data = res.data.records;
this.$forceUpdate(); this.$forceUpdate();
} }
}); });
} }
this.pagination.searchKey = ""; this.pagination.classify = "";
}) })
.catch((error) => { .catch((error) => {
this.$message({ this.$message({
@ -162,10 +162,10 @@
}); });
}); });
}, },
changeFunny(title) { changeFunny(classify) {
this.funnys.forEach(funny => { this.funnys.forEach(funny => {
if (funny.title === title && this.$common.isEmpty(funny.data)) { if (funny.classify === classify && this.$common.isEmpty(funny.data)) {
this.pagination.searchKey = title; this.pagination.classify = classify;
this.listFunny(); this.listFunny();
} }
}); });

@ -6,7 +6,7 @@
<div v-show="toolbar.visible" <div v-show="toolbar.visible"
@mouseenter="hoverEnter = true" @mouseenter="hoverEnter = true"
@mouseleave="hoverEnter = false" @mouseleave="hoverEnter = false"
:class="[{ enter: toolbar.enter }, { hoverEnter: hoverEnter && !toolbar.enter }]" :class="[{ enter: toolbar.enter }, { hoverEnter: (hoverEnter || this.$route.path === '/favorite') && !toolbar.enter }]"
class="toolbar-content myBetween"> class="toolbar-content myBetween">
<!-- 网站名称 --> <!-- 网站名称 -->
<div class="toolbar-title"> <div class="toolbar-title">
@ -29,13 +29,14 @@
🏡 <span>首页</span> 🏡 <span>首页</span>
</div> </div>
</li> </li>
<li v-for="(menu, index) in $store.getters.navigationBar"
@click="$router.push({path: '/sort', query: {sortId: menu.id, labelId: menu.labels[0].id}})" <!-- <li v-for="(menu, index) in $store.getters.navigationBar"-->
:key="index"> <!-- @click="$router.push({path: '/sort', query: {sortId: menu.id, labelId: menu.labels[0].id}})"-->
<div class="my-menu"> <!-- :key="index">-->
📒 <span>{{ menu.sortName }}</span> <!-- <div class="my-menu">-->
</div> <!-- 📒 <span>{{ menu.sortName }}</span>-->
</li> <!-- </div>-->
<!-- </li>-->
<!-- 爱情买卖 --> <!-- 爱情买卖 -->
<li @click="$router.push({path: '/love'})"> <li @click="$router.push({path: '/love'})">
@ -44,16 +45,23 @@
</div> </div>
</li> </li>
<!-- 百宝箱 -->
<li @click="$router.push({path: '/favorite'})">
<div class="my-menu">
🧰 <span>百宝箱</span>
</div>
</li>
<!-- 聊天室 --> <!-- 聊天室 -->
<li @click="goIm()"> <li @click="goIm()">
<div class="my-menu"> <div class="my-menu">
💬 <span>非礼勿言</span> 💬 <span>非礼勿言</span>
</div> </div>
</li> </li>
<!-- 鬼畜全明星 --> <!-- 音乐 -->
<li @click="$router.push({path: '/funny'})"> <li @click="$router.push({path: '/funny'})">
<div class="my-menu"> <div class="my-menu">
🐔 <span>只因</span> 🎺 <span>曲乐</span>
</div> </div>
</li> </li>
<!-- 留言 --> <!-- 留言 -->
@ -161,13 +169,14 @@
🏡 <span>首页</span> 🏡 <span>首页</span>
</div> </div>
</li> </li>
<li v-for="(menu, index) in $store.getters.navigationBar"
@click="smallMenu({path: '/sort', query: {sortId: menu.id, labelId: menu.labels[0].id}})" <!-- <li v-for="(menu, index) in $store.getters.navigationBar"-->
:key="index"> <!-- @click="smallMenu({path: '/sort', query: {sortId: menu.id, labelId: menu.labels[0].id}})"-->
<div> <!-- :key="index">-->
📒 <span>{{ menu.sortName }}</span> <!-- <div>-->
</div> <!-- 📒 <span>{{ menu.sortName }}</span>-->
</li> <!-- </div>-->
<!-- </li>-->
<!-- 爱情买卖 --> <!-- 爱情买卖 -->
<li @click="smallMenu({path: '/love'})"> <li @click="smallMenu({path: '/love'})">
@ -176,16 +185,23 @@
</div> </div>
</li> </li>
<!-- 百宝箱 -->
<li @click="smallMenu({path: '/favorite'})">
<div>
🧰 <span>百宝箱</span>
</div>
</li>
<!-- 聊天室 --> <!-- 聊天室 -->
<li @click="goIm()"> <li @click="goIm()">
<div> <div>
💬 <span>非礼勿言</span> 💬 <span>非礼勿言</span>
</div> </div>
</li> </li>
<!-- 鬼畜全明星 --> <!-- 音乐 -->
<li @click="smallMenu({path: '/funny'})"> <li @click="smallMenu({path: '/funny'})">
<div> <div>
🐔 <span>只因</span> 🎺 <span>曲乐</span>
</div> </div>
</li> </li>
<!-- 留言 --> <!-- 留言 -->
@ -266,6 +282,7 @@
root.style.setProperty("--articleFontColor", "#E4E4E4"); root.style.setProperty("--articleFontColor", "#E4E4E4");
root.style.setProperty("--articleGreyFontColor", "#D4D4D4"); root.style.setProperty("--articleGreyFontColor", "#D4D4D4");
root.style.setProperty("--commentContent", "#D4D4D4"); root.style.setProperty("--commentContent", "#D4D4D4");
root.style.setProperty("--favoriteBg", "#1e1e1e");
} }
}, },
destroyed() { destroyed() {
@ -397,6 +414,7 @@
root.style.setProperty("--articleFontColor", "#E4E4E4"); root.style.setProperty("--articleFontColor", "#E4E4E4");
root.style.setProperty("--articleGreyFontColor", "#D4D4D4"); root.style.setProperty("--articleGreyFontColor", "#D4D4D4");
root.style.setProperty("--commentContent", "#D4D4D4"); root.style.setProperty("--commentContent", "#D4D4D4");
root.style.setProperty("--favoriteBg", "#1e1e1e");
} else { } else {
root.style.setProperty("--background", "white"); root.style.setProperty("--background", "white");
root.style.setProperty("--fontColor", "black"); root.style.setProperty("--fontColor", "black");
@ -405,6 +423,7 @@
root.style.setProperty("--articleFontColor", "#1F1F1F"); root.style.setProperty("--articleFontColor", "#1F1F1F");
root.style.setProperty("--articleGreyFontColor", "#616161"); root.style.setProperty("--articleGreyFontColor", "#616161");
root.style.setProperty("--commentContent", "#F7F9FE"); root.style.setProperty("--commentContent", "#F7F9FE");
root.style.setProperty("--favoriteBg", "#f7f9fe");
} }
}, },
toTop() { toTop() {

@ -40,7 +40,7 @@
<div class="page-container-wrap"> <div class="page-container-wrap">
<div class="page-container"> <div class="page-container">
<div class="aside-content" v-if="showAside"> <div class="aside-content" v-if="showAside">
<myAside></myAside> <myAside @selectSort="selectSort"></myAside>
</div> </div>
<div class="recent-posts"> <div class="recent-posts">
<div class="announcement background-opacity"> <div class="announcement background-opacity">
@ -98,7 +98,8 @@
current: 1, current: 1,
size: 10, size: 10,
total: 0, total: 0,
searchKey: "" searchKey: "",
sortId: null
}, },
guShi: { guShi: {
"content": "", "content": "",
@ -121,13 +122,31 @@
}, },
methods: { methods: {
async selectSort(sort) {
this.pagination = {
current: 1,
size: 10,
total: 0,
searchKey: "",
sortId: sort.id
};
this.articles = [];
await this.getArticles();
this.$nextTick(() => {
document.querySelector('.recent-posts').scrollIntoView({
behavior: "smooth",
block: "start",
inline: "nearest"
});
});
},
pageArticles() { pageArticles() {
this.pagination.current = this.pagination.current + 1; this.pagination.current = this.pagination.current + 1;
this.getArticles(); this.getArticles();
}, },
getArticles() { async getArticles() {
this.$http.post(this.$constant.baseURL + "/article/listArticle", this.pagination) await this.$http.post(this.$constant.baseURL + "/article/listArticle", this.pagination)
.then((res) => { .then((res) => {
if (!this.$common.isEmpty(res.data)) { if (!this.$common.isEmpty(res.data)) {
this.articles = this.articles.concat(res.data.records); this.articles = this.articles.concat(res.data.records);

@ -113,7 +113,7 @@
<div class="card-content shadow-box-mini" @click="changeCard(1)"> <div class="card-content shadow-box-mini" @click="changeCard(1)">
<div> <div>
<el-avatar :size="100" <el-avatar :size="100"
:src="$constant.loveArticle"> :src="$constant.loveWeiYan">
</el-avatar> </el-avatar>
</div> </div>
<div class="card-right"> <div class="card-right">
@ -160,24 +160,16 @@
</div> </div>
<div class="card-container"> <div class="card-container">
<div v-show="card === 1 && !$common.isEmpty(articles)"> <div v-show="card === 1 && !$common.isEmpty(treeHoleList)">
<articleList :articleList="articles"></articleList> <treeHole :treeHoleList="treeHoleList" @launch="launch" @deleteTreeHole="deleteTreeHole"></treeHole>
<div class="pagination-wrap">
<div @click="pageArticles()" class="pagination" v-if="articlePagination.total !== articles.length">
下一页
</div>
<div v-else style="user-select: none">
~~到底啦~~
</div>
</div>
</div> </div>
<div v-show="card === 2 && !$common.isEmpty(photoTitleList)"> <div v-show="card === 2 && !$common.isEmpty(photoTitleList)">
<!-- 标签 --> <!-- 标签 -->
<div class="photo-title-warp" v-if="!$common.isEmpty(photoTitleList)"> <div class="photo-title-warp" v-if="!$common.isEmpty(photoTitleList)">
<div v-for="(item, index) in photoTitleList" :key="index" <div v-for="(item, index) in photoTitleList" :key="index"
:class="{isActive: photoPagination.searchKey === item.title}" :class="{isActive: photoPagination.classify === item.classify}"
@click="changePhotoTitle(item.title)"> @click="changePhotoTitle(item.classify)">
<proTag :info="item.title+' '+item.count" <proTag :info="item.classify+' '+item.count"
:color="$constant.before_color_list[Math.floor(Math.random() * 6)]" :color="$constant.before_color_list[Math.floor(Math.random() * 6)]"
style="margin: 12px"> style="margin: 12px">
</proTag> </proTag>
@ -185,7 +177,7 @@
</div> </div>
<div class="photo-title"> <div class="photo-title">
{{photoPagination.searchKey}} {{photoPagination.classify}}
</div> </div>
<photo :resourcePathList="photoList"></photo> <photo :resourcePathList="photoList"></photo>
@ -423,7 +415,7 @@
<script> <script>
const articleList = () => import( "./articleList"); const treeHole = () => import( "./common/treeHole");
const comment = () => import( "./comment/comment"); const comment = () => import( "./comment/comment");
const myFooter = () => import( "./common/myFooter"); const myFooter = () => import( "./common/myFooter");
const photo = () => import( "./common/photo"); const photo = () => import( "./common/photo");
@ -435,7 +427,7 @@
components: { components: {
comment, comment,
photo, photo,
articleList, treeHole,
myFooter, myFooter,
proTag, proTag,
proButton, proButton,
@ -469,21 +461,20 @@
countdownTime: "", countdownTime: "",
timing: "" timing: ""
}, },
articlePagination: { weiYanPagination: {
current: 1, current: 1,
size: 10, size: 10,
total: 0, total: 0,
sortId: this.$constant.loveSortId, userId: this.$constant.userId
labelId: this.$constant.loveLabelId
}, },
photoPagination: { photoPagination: {
current: 1, current: 1,
size: 10, size: 10,
total: 0, total: 0,
resourceType: "lovePhoto", resourceType: "lovePhoto",
searchKey: "" classify: ""
}, },
articles: [], treeHoleList: [],
photoTitleList: [], photoTitleList: [],
photoList: [], photoList: [],
randomFamily: [], randomFamily: [],
@ -506,6 +497,8 @@
created() { created() {
this.getAdminFamily(); this.getAdminFamily();
this.card = 1;
this.getWeiYan();
}, },
mounted() { mounted() {
@ -533,7 +526,7 @@
if (this.userLove.bgCover.trim() === "") { if (this.userLove.bgCover.trim() === "") {
this.$message({ this.$message({
message: "你还没设置背景封面呢~", message: "你还没设置背景封面呢~",
type: "warning", type: "warning"
}); });
return; return;
} }
@ -541,7 +534,7 @@
if (this.userLove.manCover.trim() === "") { if (this.userLove.manCover.trim() === "") {
this.$message({ this.$message({
message: "你还没设置男生头像呢~", message: "你还没设置男生头像呢~",
type: "warning", type: "warning"
}); });
return; return;
} }
@ -549,7 +542,7 @@
if (this.userLove.womanCover.trim() === "") { if (this.userLove.womanCover.trim() === "") {
this.$message({ this.$message({
message: "你还没设置女生头像呢~", message: "你还没设置女生头像呢~",
type: "warning", type: "warning"
}); });
return; return;
} }
@ -557,7 +550,7 @@
if (this.userLove.manName.trim() === "") { if (this.userLove.manName.trim() === "") {
this.$message({ this.$message({
message: "你还没写男生昵称呢~", message: "你还没写男生昵称呢~",
type: "warning", type: "warning"
}); });
return; return;
} }
@ -565,7 +558,7 @@
if (this.userLove.womanName.trim() === "") { if (this.userLove.womanName.trim() === "") {
this.$message({ this.$message({
message: "你还没写女生昵称呢~", message: "你还没写女生昵称呢~",
type: "warning", type: "warning"
}); });
return; return;
} }
@ -573,7 +566,7 @@
if (this.userLove.timing.trim() === "") { if (this.userLove.timing.trim() === "") {
this.$message({ this.$message({
message: "你还没设置计时时间呢~", message: "你还没设置计时时间呢~",
type: "warning", type: "warning"
}); });
return; return;
} }
@ -603,14 +596,6 @@
return; return;
} }
if (this.$common.isEmpty(this.$store.state.currentUser.email)) {
this.$message({
message: "请先绑定邮箱!",
type: "error"
});
return;
}
this.$http.get(this.$constant.baseURL + "/family/getFamily") this.$http.get(this.$constant.baseURL + "/family/getFamily")
.then((res) => { .then((res) => {
if (!this.$common.isEmpty(res.data)) { if (!this.$common.isEmpty(res.data)) {
@ -639,7 +624,7 @@
size: 10, size: 10,
total: 0, total: 0,
resourceType: "lovePhoto", resourceType: "lovePhoto",
searchKey: this.photoTitleList[0].title classify: this.photoTitleList[0].classify
}; };
this.changePhoto(); this.changePhoto();
} }
@ -686,14 +671,14 @@
}); });
}); });
}, },
changePhotoTitle(title) { changePhotoTitle(classify) {
if (title !== this.photoPagination.searchKey) { if (classify !== this.photoPagination.classify) {
this.photoPagination = { this.photoPagination = {
current: 1, current: 1,
size: 10, size: 10,
total: 0, total: 0,
resourceType: "lovePhoto", resourceType: "lovePhoto",
searchKey: title classify: classify
}; };
this.photoList = []; this.photoList = [];
this.changePhoto(); this.changePhoto();
@ -728,8 +713,8 @@
} }
if (card === 1) { if (card === 1) {
if (this.$common.isEmpty(this.articles)) { if (this.$common.isEmpty(this.treeHoleList)) {
this.getArticles(); this.getWeiYan();
} }
} else if (card === 2) { } else if (card === 2) {
if (this.$common.isEmpty(this.photoTitleList)) { if (this.$common.isEmpty(this.photoTitleList)) {
@ -760,17 +745,61 @@
let countdown = this.$common.countdown(this.love.countdownTime); let countdown = this.$common.countdown(this.love.countdownTime);
this.countdownChange = countdown.d + "天" + countdown.h + "时" + countdown.m + "分" + countdown.s + "秒"; this.countdownChange = countdown.d + "天" + countdown.h + "时" + countdown.m + "分" + countdown.s + "秒";
}, },
pageArticles() { launch() {
this.articlePagination.current = this.articlePagination.current + 1; if (this.weiYanPagination.total !== this.treeHoleList.length) {
this.getArticles(); this.weiYanPagination.current = this.weiYanPagination.current + 1;
this.getWeiYan();
} else {
this.$message({
message: "~~到底啦~~",
type: "warning"
});
}
}, },
getArticles() { getWeiYan() {
this.$http.post(this.$constant.baseURL + "/article/listArticle", this.articlePagination) this.$http.post(this.$constant.baseURL + "/weiYan/listWeiYan", this.weiYanPagination)
.then((res) => { .then((res) => {
if (!this.$common.isEmpty(res.data)) { if (!this.$common.isEmpty(res.data)) {
this.articles = this.articles.concat(res.data.records); res.data.records.forEach(c => {
this.articlePagination.total = res.data.total; c.content = c.content.replace(/\n{2,}/g, '<div style="height: 12px"></div>');
c.content = c.content.replace(/\n/g, '<br/>');
c.content = this.$common.faceReg(c.content);
c.content = this.$common.pictureReg(c.content);
});
this.treeHoleList = this.treeHoleList.concat(res.data.records);
this.weiYanPagination.total = res.data.total;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
deleteTreeHole(id) {
if (this.$common.isEmpty(this.$store.state.currentUser)) {
this.$message({
message: "请先登录!",
type: "error"
});
return;
} }
this.$confirm('确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
center: true
}).then(() => {
this.$http.get(this.$constant.baseURL + "/weiYan/deleteWeiYan", {id: id})
.then((res) => {
this.$message({
type: 'success',
message: '删除成功!'
});
this.weiYanPagination.current = 1;
this.getWeiYan();
}) })
.catch((error) => { .catch((error) => {
this.$message({ this.$message({
@ -778,6 +807,12 @@
type: "error" type: "error"
}); });
}); });
}).catch(() => {
this.$message({
type: 'success',
message: '已取消删除!'
});
});
} }
} }
} }
@ -1192,6 +1227,10 @@
.user-content >>> .el-input__inner { .user-content >>> .el-input__inner {
width: 190px; width: 190px;
} }
.card-container .tree-hole-container {
padding: 0;
}
} }
@media screen and (max-width: 1150px) { @media screen and (max-width: 1150px) {

@ -87,7 +87,7 @@
if (this.messageContent.trim() === "") { if (this.messageContent.trim() === "") {
this.$message({ this.$message({
message: "你还没写呢~", message: "你还没写呢~",
type: "warning", type: "warning"
}); });
return; return;
} }

@ -18,9 +18,52 @@
<i class="el-icon-star-off" style="margin-right: 2px"></i>朋友圈 <i class="el-icon-star-off" style="margin-right: 2px"></i>朋友圈
</a> </a>
</div> </div>
<!-- 赞赏 -->
<div class="shadow-box-mini background-opacity wow admire-box"
v-if="!$common.isEmpty(admires)">
<div style="font-weight: bold;margin-bottom: 20px">🧨赞赏名单</div>
<div>
<vue-seamless-scroll :data="admires" style="height: 200px;overflow: hidden">
<div v-for="(item, i) in admires"
style="display: flex;justify-content: space-between"
:key="i">
<div style="display: flex">
<el-avatar style="margin-bottom: 10px" :size="36" :src="item.avatar"></el-avatar>
<div style="margin-left: 10px;height: 36px;line-height: 36px;overflow: hidden;max-width: 80px">
{{ item.username }}
</div>
</div>
<div style="height: 36px;line-height: 36px">
{{ item.admire }}
</div>
</div>
</vue-seamless-scroll>
</div>
<div class="admire-btn" @click="showAdmire()">
赞赏
</div>
</div>
<!-- 速览 -->
<div v-for="(sort, index) in sortInfo"
@click="selectSort(sort)"
:key="index"
:style="{background: $constant.sortColor[index % $constant.sortColor.length]}"
class="shadow-box-mini background-opacity wow"
style="position: relative;padding: 20px 25px 40px;border-radius: 10px;animation: hideToShow 1s ease-in-out;margin-top: 40px;cursor: pointer;color: var(--white)">
<div>速览</div>
<div class="sort-name">
{{sort.sortName}}
</div>
<div style="font-weight: bold;margin-top: 15px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden">
{{sort.sortDescription}}
</div>
</div>
<!-- 分类 --> <!-- 分类 -->
<div class="shadow-box background-opacity wow" <div class="shadow-box background-opacity wow"
style="padding: 25px 25px 5px;border-radius: 10px;animation: hideToShow 1s ease-in-out"> style="margin-top: 40px;padding: 25px 25px 5px;border-radius: 10px;animation: hideToShow 1s ease-in-out">
<div class="card-content2-title"> <div class="card-content2-title">
<i class="el-icon-folder-opened card-content2-icon"></i> <i class="el-icon-folder-opened card-content2-icon"></i>
<span>分类</span> <span>分类</span>
@ -34,6 +77,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 推荐文章 --> <!-- 推荐文章 -->
<div v-if="!$common.isEmpty(recommendArticles)" <div v-if="!$common.isEmpty(recommendArticles)"
style="padding: 25px;border-radius: 10px;margin-top: 40px;animation: hideToShow 1s ease-in-out" style="padding: 25px;border-radius: 10px;margin-top: 40px;animation: hideToShow 1s ease-in-out"
@ -64,11 +108,32 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 微信 -->
<el-dialog title="赞赏"
:visible.sync="showAdmireDialog"
width="25%"
:append-to-body="true"
destroy-on-close
center>
<div>
<div class="admire-image"></div>
<div>
<div class="admire-content">1. 感谢老铁送来的666</div>
<div class="admire-content">2. 申请通过后会加博客交流群不需要加群或者退群后会定期清理好友强迫症福利</div>
</div>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import vueSeamlessScroll from "vue-seamless-scroll";
export default { export default {
components: {
vueSeamlessScroll
},
data() { data() {
return { return {
pagination: { pagination: {
@ -76,7 +141,9 @@
size: 5, size: 5,
recommendStatus: true recommendStatus: true
}, },
recommendArticles: [] recommendArticles: [],
admires: [],
showAdmireDialog: false
} }
}, },
computed: { computed: {
@ -89,8 +156,37 @@
}, },
created() { created() {
this.getRecommendArticles(); this.getRecommendArticles();
this.getAdmire();
}, },
methods: { methods: {
selectSort(sort) {
this.$emit("selectSort", sort);
},
showAdmire() {
if (this.$common.isEmpty(this.$store.state.currentUser)) {
this.$message({
message: "请先登录!",
type: "error"
});
return;
}
this.showAdmireDialog = true;
},
getAdmire() {
this.$http.get(this.$constant.baseURL + "/webInfo/getAdmire")
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.admires = res.data;
}
})
.catch((error) => {
this.$message({
message: error.message,
type: "error"
});
});
},
getRecommendArticles() { getRecommendArticles() {
this.$http.post(this.$constant.baseURL + "/article/listArticle", this.pagination) this.$http.post(this.$constant.baseURL + "/article/listArticle", this.pagination)
.then((res) => { .then((res) => {
@ -120,7 +216,6 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
margin-bottom: 40px;
border-radius: 10px; border-radius: 10px;
position: relative; position: relative;
/*color: var(--white);*/ /*color: var(--white);*/
@ -250,4 +345,64 @@
cursor: pointer; cursor: pointer;
color: var(--white); color: var(--white);
} }
.sort-name {
font-weight: bold;
font-size: 25px;
margin-top: 30px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.sort-name:after {
top: 98px;
width: 22px;
left: 26px;
height: 2px;
background: var(--white);
content: "";
border-radius: 1px;
position: absolute;
}
.admire-box {
background: var(--springBg) center center / cover no-repeat;
padding: 25px;
border-radius: 10px;
animation: hideToShow 1s ease-in-out;
margin-top: 40px;
}
.admire-btn {
padding: 13px 15px;
background: var(--maxLightRed);
border-radius: 3rem;
color: var(--white);
width: 100px;
user-select: none;
cursor: pointer;
text-align: center;
margin: 20px auto 0;
transition: all 1s;
}
.admire-btn:hover {
transform: scale(1.2);
}
.admire-image {
margin: 0 auto 10px;
border-radius: 10px;
height: 150px;
width: 150px;
background: var(--admireImage) center center / cover no-repeat;
}
.admire-content {
font-size: 12px;
color: var(--maxGreyFont);
line-height: 1.5;
margin: 5px;
}
</style> </style>

@ -439,16 +439,6 @@
return true; return true;
}, },
changeDialog(value) { changeDialog(value) {
if (value === "修改头像") {
if (this.$common.isEmpty(this.currentUser.email)) {
this.$message({
message: "请先绑定邮箱!",
type: "error"
});
return;
}
}
if (value === "邮箱验证码") { if (value === "邮箱验证码") {
if (this.$common.isEmpty(this.email)) { if (this.$common.isEmpty(this.email)) {
this.$message({ this.$message({

@ -103,14 +103,6 @@
return; return;
} }
if (this.$common.isEmpty(this.$store.state.currentUser.email)) {
this.$message({
message: "请先绑定邮箱!",
type: "error"
});
return;
}
this.weiYanDialogVisible = true; this.weiYanDialogVisible = true;
}, },
handleClose() { handleClose() {
@ -143,14 +135,6 @@
return; return;
} }
if (this.$common.isEmpty(this.$store.state.currentUser.email)) {
this.$message({
message: "请先绑定邮箱!",
type: "error"
});
return;
}
this.$confirm('确认删除?', '提示', { this.$confirm('确认删除?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',

@ -32,6 +32,10 @@ const routes = [
path: "/love", path: "/love",
name: "love", name: "love",
component: () => import('../components/love') component: () => import('../components/love')
}, {
path: "/favorite",
name: "favorite",
component: () => import('../components/favorite')
}, { }, {
path: "/message", path: "/message",
name: "message", name: "message",

@ -42,11 +42,7 @@ export default new Vuex.Store({
}, },
navigationBar: state => { navigationBar: state => {
if (state.sortInfo !== null && state.sortInfo.length !== 0) { if (state.sortInfo !== null && state.sortInfo.length !== 0) {
return state.sortInfo.filter(f => { return state.sortInfo.filter(f => f.sortType === 0);
return f.sortType === 0;
}).sort((s1, s2) => {
return s1.priority - s2.priority;
})
} else { } else {
return []; return [];
} }
@ -57,7 +53,9 @@ export default new Vuex.Store({
state.toolbar = toolbarState; state.toolbar = toolbarState;
}, },
loadSortInfo(state, sortInfo) { loadSortInfo(state, sortInfo) {
state.sortInfo = sortInfo; if (sortInfo !== null && sortInfo.length !== 0) {
state.sortInfo = sortInfo.sort((s1, s2) => s1.priority - s2.priority);
}
}, },
loadCurrentUser(state, user) { loadCurrentUser(state, user) {
state.currentUser = user; state.currentUser = user;

@ -20,7 +20,9 @@ export default {
qiniuUrl: "https://upload.qiniup.com", qiniuUrl: "https://upload.qiniup.com",
qiniuDownload: "$$$$七牛云下载地址", qiniuDownload: "$$$$七牛云下载地址",
loveArticle: "https://s1.ax1x.com/2022/12/04/zsKgDs.jpg", favoriteVideo: "$$$$自己找一个视频链接作为百宝箱的封面",
loveWeiYan: "https://s1.ax1x.com/2022/12/04/zsKgDs.jpg",
loveMessage: "https://s1.ax1x.com/2022/12/04/zsKgDs.jpg", loveMessage: "https://s1.ax1x.com/2022/12/04/zsKgDs.jpg",
lovePhoto: "https://s1.ax1x.com/2022/12/04/zsKh5V.jpg", lovePhoto: "https://s1.ax1x.com/2022/12/04/zsKh5V.jpg",
loveLike: "https://cdn.cbd.int//hexo-butterfly-envelope/lib/violet.jpg", loveLike: "https://cdn.cbd.int//hexo-butterfly-envelope/lib/violet.jpg",
@ -46,6 +48,13 @@ export default {
before_color_2: "rgb(131, 123, 199)", before_color_2: "rgb(131, 123, 199)",
after_color_2: "linear-gradient(45deg, #f43f3b, #ec008c)", after_color_2: "linear-gradient(45deg, #f43f3b, #ec008c)",
sortColor: ["linear-gradient(to right, #358bff, #15c6ff)",
"linear-gradient(to right, #18e7ae, #1eebeb)",
"linear-gradient(to right, #ff6655, #ffbf37)",
"linear-gradient(120deg, rgba(255, 39, 232, 1) 0%, rgba(255, 128, 0, 1) 100%)",
"linear-gradient(120deg, rgba(91, 39, 255, 1) 0%, rgba(0, 212, 255, 1) 100%)"
],
pageColor: "#ee7752", pageColor: "#ee7752",
commentPageColor: "#23d5ab", commentPageColor: "#23d5ab",
userId: 1, userId: 1,

Loading…
Cancel
Save