From a856fc7f18f62ade588599d5633b96ea535074fb Mon Sep 17 00:00:00 2001
From: mutoe
Date: Thu, 13 Dec 2018 16:08:10 +0800
Subject: [PATCH] =?UTF-8?q?fix(SPA):=20=E6=89=93=E8=B5=8F=E7=94=A8?=
=?UTF-8?q?=E6=88=B7=E4=B8=BA=E8=AE=A4=E8=AF=81=E7=94=A8=E6=88=B7=E7=BC=BA?=
=?UTF-8?q?=E5=B0=91=E8=AE=A4=E8=AF=81=E6=A0=87=E5=BF=97=E7=9A=84=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
issue slimkit/plus#512
---
resources/spa/src/components/Avatar.vue | 30 ++++++++----
.../components/common/ArticleLikeBadge.vue | 25 +++++++---
.../components/common/ArticleRewardBadge.vue | 46 +++++++++++++------
resources/spa/src/page/feed/FeedList.vue | 2 +-
.../src/page/rank/components/RankListItem.vue | 2 +-
5 files changed, 75 insertions(+), 30 deletions(-)
diff --git a/resources/spa/src/components/Avatar.vue b/resources/spa/src/components/Avatar.vue
index 06fe393b3..48903dbb4 100644
--- a/resources/spa/src/components/Avatar.vue
+++ b/resources/spa/src/components/Avatar.vue
@@ -15,6 +15,7 @@
@@ -37,6 +38,11 @@ export default {
sex () {
return ~~this.user.sex
},
+ iconClass () {
+ if (this.anonymity) return false
+ const { verified = {} } = this.user
+ return verified.type
+ },
icon () {
// 如果是匿名用户 不显示
if (this.anonymity) return false
@@ -48,15 +54,8 @@ export default {
// 如果有设置图标 使用设置的图标
if (verified.icon) return { 'background-image': `url("${verified.icon}")` }
// 否则根据认证类型使用相应的默认图标
- else if (verified.type === 'user') {
- return {
- 'background-image': 'url(' + require('@/images/cert_user.png') + ')',
- }
- } else if (verified.type === 'org') {
- return {
- 'background-image': 'url(' + require('@/images/cert_org.png') + ')',
- }
- } else return false
+ else if (verified.type) return {}
+ else return false
},
path () {
return this.uid ? `/users/${this.uid}` : 'javascript:;'
@@ -84,3 +83,16 @@ export default {
},
}
+
+
diff --git a/resources/spa/src/components/common/ArticleLikeBadge.vue b/resources/spa/src/components/common/ArticleLikeBadge.vue
index 2ca7656fc..f41e0bbc7 100644
--- a/resources/spa/src/components/common/ArticleLikeBadge.vue
+++ b/resources/spa/src/components/common/ArticleLikeBadge.vue
@@ -5,15 +5,15 @@
to="likers"
append
>
-
+
{{ total | formatNum }}人点赞
@@ -41,7 +41,20 @@ export default {
align-items: center;
.avatar-list {
+ position: relative;
flex: none;
+
+ &::after {
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ display: block;
+ background: transparent;
+ z-index: 7;
+ }
}
.total {
diff --git a/resources/spa/src/components/common/ArticleRewardBadge.vue b/resources/spa/src/components/common/ArticleRewardBadge.vue
index a2d016f2d..849f79702 100644
--- a/resources/spa/src/components/common/ArticleRewardBadge.vue
+++ b/resources/spa/src/components/common/ArticleRewardBadge.vue
@@ -5,23 +5,23 @@
共 {{ ~~amount }} {{ currencyUnit }}
-
-
-
-
+
+
@@ -42,3 +42,23 @@ export default {
},
}
+
+
diff --git a/resources/spa/src/page/feed/FeedList.vue b/resources/spa/src/page/feed/FeedList.vue
index 61cb567af..3e9fb9a03 100644
--- a/resources/spa/src/page/feed/FeedList.vue
+++ b/resources/spa/src/page/feed/FeedList.vue
@@ -88,7 +88,7 @@ export default {
},
computed: {
feedType () {
- return this.$route.query.type
+ return this.$route.query.type || 'hot'
},
feeds () {
return this.$store.getters[`feed/${this.feedType}`]
diff --git a/resources/spa/src/page/rank/components/RankListItem.vue b/resources/spa/src/page/rank/components/RankListItem.vue
index a1a910694..1c93510e5 100644
--- a/resources/spa/src/page/rank/components/RankListItem.vue
+++ b/resources/spa/src/page/rank/components/RankListItem.vue
@@ -2,7 +2,7 @@