From 261617fc12e854365e17e0d1cf0df4e62dbba676 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E8=8E=AB=E5=94=90=E5=B0=BC?= <1431128779@qq.com>
Date: Thu, 15 Dec 2022 14:25:54 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E4=BF=AE=E5=A4=8D?=
=?UTF-8?q?=E6=81=8B=E7=88=B1=E6=97=A5=E8=AE=B0=E5=9C=A8=E5=BE=AE=E4=BF=A1?=
=?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8Fios=E4=B8=8B=E7=9A=84=E6=97=A5?=
=?UTF-8?q?=E6=9C=9F=E8=BD=AC=E6=8D=A2=E9=94=99=E8=AF=AFbug=EF=BC=9B=20?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E4=BF=AE=E5=A4=8D=E6=B5=B7=E6=8A=A5?=
=?UTF-8?q?=E5=88=86=E4=BA=AB=E5=9B=A0=E4=B8=BA=E6=97=A0=E5=9B=BE=E4=BD=BF?=
=?UTF-8?q?=E7=94=A8=E9=9A=8F=E6=9C=BA=E5=9B=BE=E5=9C=A8=E5=BE=AE=E4=BF=A1?=
=?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E4=B8=8B=E5=BC=82=E5=B8=B8bug?=
=?UTF-8?q?=EF=BC=9B=20=E6=96=B0=E5=A2=9E=EF=BC=9Ahalo.config.template.js?=
=?UTF-8?q?=20=E6=96=B0=E5=A2=9E=E4=B8=80=E4=B8=AA=E9=85=8D=E7=BD=AE?=
=?UTF-8?q?=E9=A1=B9=20defaultStaticThumbnailUrl=20=E9=BB=98=E8=AE=A4?=
=?UTF-8?q?=E9=9D=99=E6=80=81=E5=9B=BE=E7=89=87=E7=94=A8=E4=BA=8E=E6=B5=B7?=
=?UTF-8?q?=E6=8A=A5=E5=9C=A8=E6=97=A0=E5=9B=BE=E4=B8=94=E4=BD=BF=E7=94=A8?=
=?UTF-8?q?=E4=BA=86=E9=9A=8F=E6=9C=BA=E5=9B=BE=E6=97=B6=E5=80=99=E7=9A=84?=
=?UTF-8?q?=E5=B0=81=E9=9D=A2=E5=9B=BE=E7=89=87=E5=9C=B0=E5=9D=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../article-min-card/article-min-card.vue | 2 +-
config/halo.config.template.js | 1 +
pages/tabbar/category/category.vue | 4 +++-
pages/tabbar/gallery/gallery.vue | 21 ++++++++++---------
pagesA/article-detail/article-detail.vue | 9 ++++----
pagesA/love/list.vue | 3 ++-
pagesA/love/love.vue | 3 ++-
utils/index.js | 5 ++++-
8 files changed, 29 insertions(+), 19 deletions(-)
diff --git a/components/article-min-card/article-min-card.vue b/components/article-min-card/article-min-card.vue
index 6bd6987..b5d9856 100644
--- a/components/article-min-card/article-min-card.vue
+++ b/components/article-min-card/article-min-card.vue
@@ -56,7 +56,7 @@ export default {
margin: 12rpx 24rpx;
margin-bottom: 24rpx;
padding: 16rpx;
- box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.05);
+ box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
&.lr_image_text {
}
diff --git a/config/halo.config.template.js b/config/halo.config.template.js
index 7867c3d..1b2df78 100644
--- a/config/halo.config.template.js
+++ b/config/halo.config.template.js
@@ -65,6 +65,7 @@ export default {
},
defaultThumbnailUrl: '', // 默认封面图地址
+ defaultStaticThumbnailUrl: '', // 静态默认封面图(不可以是随机图地址)
defaultImageUrl: '', // 默认图片地址
defaultAvatarUrl: '', // 默认头像地址
diff --git a/pages/tabbar/category/category.vue b/pages/tabbar/category/category.vue
index 08cd0a6..274d5d8 100644
--- a/pages/tabbar/category/category.vue
+++ b/pages/tabbar/category/category.vue
@@ -11,7 +11,7 @@
-
+
-
+
@@ -9,14 +9,12 @@
-
-
-
-
-
+
+
+
-
+
@@ -25,7 +23,7 @@
-
+
@@ -50,7 +48,7 @@
-
+
@@ -301,7 +299,7 @@ export default {
display: flex;
flex-direction: column;
padding-bottom: 24rpx;
- background-color: #fafafd;
+ background-color: #fafafa;
&.is-balck {
background-color: #212121;
@@ -323,4 +321,7 @@ export default {
box-sizing: border-box;
padding: 24rpx;
}
+.card {
+ box-shadow: 0rpx 4rpx 24rpx rgba(0, 0, 0, 0.03);
+}
diff --git a/pagesA/article-detail/article-detail.vue b/pagesA/article-detail/article-detail.vue
index cb4b0af..23296e7 100644
--- a/pagesA/article-detail/article-detail.vue
+++ b/pagesA/article-detail/article-detail.vue
@@ -95,7 +95,7 @@
- 版权信息
+ 版权声明
版权归属:{{ copyright.author }}
版权说明:{{ copyright.description }}
@@ -392,6 +392,8 @@ export default {
fnCreatePoster(callback) {
this.$nextTick(async () => {
const systemInfo = await uni.getSystemInfoSync();
+ const _bloggerAvatar = this.$utils.checkAvatarUrl(this.bloggerInfo.avatar, true);
+ const _articleCover = this.$utils.checkThumbnailUrl(this.result.thumbnail, true);
// 初始化
await this.$refs.rCanvas.init({
canvas_id: 'rCanvas',
@@ -416,11 +418,10 @@ export default {
icon: 'none'
});
});
- console.log(this.$utils.checkAvatarUrl(this.bloggerInfo.avatar, true));
// 博主信息
await this.$refs.rCanvas
.drawImage({
- url: this.$utils.checkAvatarUrl(this.bloggerInfo.avatar, true),
+ url: _bloggerAvatar,
x: 12,
y: 12,
w: 48,
@@ -467,7 +468,7 @@ export default {
// 文章封面图
await this.$refs.rCanvas
.drawImage({
- url: this.$utils.checkThumbnailUrl(this.result.thumbnail),
+ url: _articleCover,
x: 12,
y: 75,
w: 312,
diff --git a/pagesA/love/list.vue b/pagesA/love/list.vue
index 40d6803..ce0a486 100644
--- a/pagesA/love/list.vue
+++ b/pagesA/love/list.vue
@@ -89,7 +89,8 @@ export default {
},
computed: {
calcLoveDays() {
- const start = new Date(this.loveConfig.loveStartDate),
+ const formatStartDate = this.loveConfig.loveStartDate.replace(/-/g, '/');
+ const start = new Date(formatStartDate),
now = new Date();
const T = now.getTime() - start.getTime();
const i = 24 * 60 * 60 * 1000;
diff --git a/pagesA/love/love.vue b/pagesA/love/love.vue
index 5d901e2..82cfa0f 100644
--- a/pagesA/love/love.vue
+++ b/pagesA/love/love.vue
@@ -84,7 +84,8 @@ export default {
clearTimeout(this.loveDayTimer);
const _countDownFn = () => {
this.loveDayTimer = setTimeout(_countDownFn, 1000);
- const start = new Date(this.loveConfig.loveStartDate),
+ const formatStartDate = this.loveConfig.loveStartDate.replace(/-/g, '/');
+ const start = new Date(formatStartDate),
now = new Date();
const T = now.getTime() - start.getTime();
const i = 24 * 60 * 60 * 1000;
diff --git a/utils/index.js b/utils/index.js
index 319b929..d433808 100644
--- a/utils/index.js
+++ b/utils/index.js
@@ -32,7 +32,10 @@ const utils = {
},
// 检查封面图
- checkThumbnailUrl: function(thumbnail) {
+ checkThumbnailUrl: function(thumbnail, mustRealUrl = false) {
+ if (!thumbnail && mustRealUrl) {
+ return HaloConfig.defaultStaticThumbnailUrl
+ }
if (!HaloConfig.defaultThumbnailUrl) {
// logUtils.saveLog(logTypes.config, {
// path: 'checkThumbnailUrl',