@jx3box/jx3box-common-ui 9.0.24 → 9.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/service/author.js +8 -3
- package/src/Author.vue +9 -9
- package/src/Header.vue +2 -0
- package/src/author/AuthorFans.vue +100 -85
package/package.json
CHANGED
package/service/author.js
CHANGED
|
@@ -91,8 +91,12 @@ function userSignIn(){
|
|
|
91
91
|
return $pay({ mute: true }).get(`/api/personal/task/everyday/sign-in`)
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
function getFansList(userid,limit) {
|
|
95
|
-
return $
|
|
94
|
+
function getFansList(userid, limit) {
|
|
95
|
+
return $next().get(`/api/next2/rss/user-list/author/${userid}/vip-subscriber?limit=${limit}`)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function getSummary(uid) {
|
|
99
|
+
return $next().get(`/api/next2/rss/summary/author/${uid}`)
|
|
96
100
|
}
|
|
97
101
|
|
|
98
102
|
export {
|
|
@@ -108,5 +112,6 @@ export {
|
|
|
108
112
|
getFansList,
|
|
109
113
|
getUserInfoByUidOrName,
|
|
110
114
|
getUserHonors,
|
|
111
|
-
getUserHonor
|
|
115
|
+
getUserHonor,
|
|
116
|
+
getSummary
|
|
112
117
|
};
|
package/src/Author.vue
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
</el-button>
|
|
13
13
|
</div>
|
|
14
14
|
<!-- <AuthorMsg :uid="uid" /> -->
|
|
15
|
-
<AuthorLink class="u-block u-links" :uid="uid" :data="data" />
|
|
15
|
+
<!-- <AuthorLink class="u-block u-links" :uid="uid" :data="data" /> -->
|
|
16
16
|
<AuthorMedals class="u-block u-trophy" :uid="uid" />
|
|
17
|
-
<AuthorTeams class="u-block u-teams" :uid="uid" />
|
|
18
|
-
|
|
17
|
+
<!-- <AuthorTeams class="u-block u-teams" :uid="uid" /> -->
|
|
18
|
+
<AuthorFans class="u-block u-fans" :uid="uid" />
|
|
19
19
|
<slot></slot>
|
|
20
20
|
<AuthorPosts class="u-block u-posts" :uid="uid" />
|
|
21
21
|
</template>
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
|
|
25
25
|
<script>
|
|
26
26
|
import AuthorInfo from "./author/AuthorInfo.vue";
|
|
27
|
-
import AuthorLink from "./author/AuthorLink.vue";
|
|
27
|
+
// import AuthorLink from "./author/AuthorLink.vue";
|
|
28
28
|
// import AuthorFollow from "./author/AuthorFollow.vue";
|
|
29
29
|
// import AuthorMsg from "./author/AuthorMsg.vue";
|
|
30
30
|
// import AuthorGift from "./author/AuthorGift.vue";
|
|
31
|
-
|
|
31
|
+
import AuthorFans from "./author/AuthorFans.vue";
|
|
32
32
|
import AuthorMedals from "./author/AuthorMedals.vue";
|
|
33
|
-
import AuthorTeams from "./author/AuthorTeams.vue";
|
|
33
|
+
// import AuthorTeams from "./author/AuthorTeams.vue";
|
|
34
34
|
import AuthorPosts from "./author/AuthorPosts.vue";
|
|
35
35
|
import AuthorRss from "./author/AuthorRss.vue";
|
|
36
36
|
import {__cdn} from "@jx3box/jx3box-common/data/jx3box.json";
|
|
@@ -53,14 +53,14 @@ export default {
|
|
|
53
53
|
},
|
|
54
54
|
components: {
|
|
55
55
|
AuthorInfo,
|
|
56
|
-
AuthorLink,
|
|
56
|
+
// AuthorLink,
|
|
57
57
|
// AuthorFollow,
|
|
58
58
|
// AuthorMsg,
|
|
59
59
|
// AuthorGift,
|
|
60
60
|
AuthorMedals,
|
|
61
|
-
AuthorTeams,
|
|
61
|
+
// AuthorTeams,
|
|
62
62
|
AuthorPosts,
|
|
63
|
-
|
|
63
|
+
AuthorFans,
|
|
64
64
|
AuthorRss,
|
|
65
65
|
},
|
|
66
66
|
};
|
package/src/Header.vue
CHANGED
|
@@ -72,6 +72,8 @@ export default {
|
|
|
72
72
|
const appid = urlParams.get("appid");
|
|
73
73
|
const item = miniprogram?.find((item) => item.appid === appid);
|
|
74
74
|
|
|
75
|
+
document.documentElement.classList.add("v-miniprogram");
|
|
76
|
+
|
|
75
77
|
if (appid && item) {
|
|
76
78
|
document.documentElement.classList.add("env-miniprogram" + item.id);
|
|
77
79
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="c-author-fans"
|
|
2
|
+
<div class="c-author-fans">
|
|
3
3
|
<div class="u-label">
|
|
4
4
|
<!-- <i class="el-icon-star-off"></i> -->
|
|
5
5
|
<img svg-inline src="../../assets/img/leftsidebar/fans.svg" />
|
|
@@ -9,27 +9,26 @@
|
|
|
9
9
|
<el-tooltip
|
|
10
10
|
class="item"
|
|
11
11
|
effect="dark"
|
|
12
|
-
:content="'累计打赏' + item.
|
|
12
|
+
:content="'累计打赏' + item.summary.toString() + '盒币'"
|
|
13
13
|
placement="top"
|
|
14
14
|
v-for="item in list"
|
|
15
|
-
:key="item.
|
|
15
|
+
:key="item.user_id"
|
|
16
16
|
>
|
|
17
|
-
<a class="u-fan" :href="authorLink(item.
|
|
18
|
-
><el-avatar class="u-avatar" shape="circle" :size="20" :src="showAvatar(item.
|
|
17
|
+
<a class="u-fan" :href="authorLink(item.user_id)"
|
|
18
|
+
><el-avatar class="u-avatar" shape="circle" :size="20" :src="showAvatar(item.user_info.avatar)"
|
|
19
19
|
><i class="el-icon-s-custom"></i></el-avatar
|
|
20
20
|
></a>
|
|
21
21
|
</el-tooltip>
|
|
22
|
-
<el-avatar class="u-avatar u-more" shape="circle" :size="20" v-if="total > MAX_LENGTH">
|
|
23
|
-
<span class="f-avatar-num" v-if="total > 99">···</span>
|
|
24
|
-
<span class="f-avatar-num" v-else>+{{ total - MAX_LENGTH }}</span>
|
|
25
|
-
</el-avatar>
|
|
26
22
|
</div>
|
|
27
|
-
<div class="f-bottom"
|
|
23
|
+
<div class="f-bottom">
|
|
24
|
+
粉丝数: <span class="u-count">{{ fans_count }}</span
|
|
25
|
+
>,累计收到盒币打赏: <span class="u-count">{{ boxcoin_count }}</span>
|
|
26
|
+
</div>
|
|
28
27
|
</div>
|
|
29
28
|
</template>
|
|
30
29
|
|
|
31
30
|
<script>
|
|
32
|
-
import { getFansList } from "../../service/author";
|
|
31
|
+
import { getFansList, getSummary } from "../../service/author";
|
|
33
32
|
import { showAvatar, authorLink } from "@jx3box/jx3box-common/js/utils";
|
|
34
33
|
export default {
|
|
35
34
|
name: "AuthorFans",
|
|
@@ -38,20 +37,31 @@ export default {
|
|
|
38
37
|
type: Number,
|
|
39
38
|
default: 0,
|
|
40
39
|
},
|
|
40
|
+
fansLimit: {
|
|
41
|
+
type: Number,
|
|
42
|
+
default: 8,
|
|
43
|
+
},
|
|
41
44
|
},
|
|
42
45
|
data() {
|
|
43
46
|
return {
|
|
44
47
|
list: [],
|
|
45
48
|
total: 0,
|
|
46
|
-
MAX_LENGTH
|
|
49
|
+
MAX_LENGTH: 8,
|
|
50
|
+
|
|
51
|
+
fans_count: 0,
|
|
52
|
+
boxcoin_count: 0,
|
|
47
53
|
};
|
|
48
54
|
},
|
|
49
55
|
methods: {
|
|
50
56
|
getData() {
|
|
51
57
|
if (!~~this.uid) return;
|
|
52
|
-
|
|
53
|
-
this.
|
|
54
|
-
this.
|
|
58
|
+
getSummary(this.uid).then((res) => {
|
|
59
|
+
this.fans_count = res.data.data?.fans_count || 0;
|
|
60
|
+
this.boxcoin_count = res.data.data?.boxcoin_count || 0;
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
getFansList(this.uid, this.fansLimit).then((res) => {
|
|
64
|
+
this.list = res.data.data.list;
|
|
55
65
|
});
|
|
56
66
|
},
|
|
57
67
|
showAvatar,
|
|
@@ -69,6 +79,7 @@ export default {
|
|
|
69
79
|
</script>
|
|
70
80
|
|
|
71
81
|
<style lang="less">
|
|
82
|
+
@import "../../assets//css/mixin.less";
|
|
72
83
|
.c-author-fans {
|
|
73
84
|
box-sizing: border-box;
|
|
74
85
|
// padding: 10px;
|
|
@@ -76,80 +87,20 @@ export default {
|
|
|
76
87
|
font-family: "Microsoft YaHei";
|
|
77
88
|
font-style: normal;
|
|
78
89
|
// .h(133px);
|
|
79
|
-
|
|
80
|
-
display: flex;
|
|
81
|
-
justify-content: center;
|
|
82
|
-
width: 100%;
|
|
83
|
-
.f-left {
|
|
84
|
-
.w(65.3%);
|
|
85
|
-
.f-l-box {
|
|
86
|
-
.w(100%);
|
|
87
|
-
.h(50px);
|
|
88
|
-
background: #ff7cab;
|
|
89
|
-
border-radius: 5px 0px 0px 5px;
|
|
90
|
-
display: flex;
|
|
91
|
-
justify-content: center;
|
|
92
|
-
align-items: center;
|
|
93
|
-
flex: none;
|
|
94
|
-
.f-l-title {
|
|
95
|
-
.w(48px);
|
|
96
|
-
.h(21px);
|
|
97
|
-
.fz(16px, 21px);
|
|
98
|
-
font-weight: 700;
|
|
99
|
-
color: #ffffff;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
.f-right {
|
|
104
|
-
position: relative;
|
|
105
|
-
.w(34.7%);
|
|
106
|
-
.f-r-box {
|
|
107
|
-
display: flex;
|
|
108
|
-
justify-content: center;
|
|
109
|
-
align-items: center;
|
|
110
|
-
flex: none;
|
|
111
|
-
.h(50px);
|
|
112
|
-
.w(100%);
|
|
113
|
-
z-index: 2;
|
|
114
|
-
position: absolute;
|
|
115
|
-
.f-r-num {
|
|
116
|
-
font-weight: 700;
|
|
117
|
-
.fz(10px, 13px);
|
|
118
|
-
.w(100%);
|
|
119
|
-
color: rgba(0, 0, 0, 0.5);
|
|
120
|
-
padding-left: 37.5%;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
.f-r-line {
|
|
124
|
-
.h(5px);
|
|
125
|
-
background: #ff7cab;
|
|
126
|
-
border-radius: 0px 5px 5px 0px;
|
|
127
|
-
}
|
|
128
|
-
.f-r-mb {
|
|
129
|
-
.mb(2.5px);
|
|
130
|
-
}
|
|
131
|
-
.f-r-w-80 {
|
|
132
|
-
.w(100%);
|
|
133
|
-
}
|
|
134
|
-
.f-r-w-70 {
|
|
135
|
-
.w(87.5%);
|
|
136
|
-
}
|
|
137
|
-
.f-r-w-30 {
|
|
138
|
-
.w(37.5%);
|
|
139
|
-
}
|
|
140
|
-
.f-r-w-20 {
|
|
141
|
-
.w(25%);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
90
|
+
|
|
145
91
|
.f-avatar {
|
|
146
|
-
height:
|
|
92
|
+
height: 40px;
|
|
93
|
+
.flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
overflow: auto hidden;
|
|
96
|
+
align-items: center;
|
|
97
|
+
.scrollbar();
|
|
147
98
|
.f-avatar-num {
|
|
148
99
|
.fz(12px);
|
|
149
100
|
color: #888;
|
|
150
101
|
font-weight: 700;
|
|
151
102
|
}
|
|
152
|
-
.u-fan{
|
|
103
|
+
.u-fan {
|
|
153
104
|
.mr(5px);
|
|
154
105
|
}
|
|
155
106
|
}
|
|
@@ -158,8 +109,72 @@ export default {
|
|
|
158
109
|
.fz(12px, 14px);
|
|
159
110
|
font-weight: 400;
|
|
160
111
|
color: #888;
|
|
161
|
-
|
|
162
|
-
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
.f-main-box {
|
|
115
|
+
display: flex;
|
|
116
|
+
justify-content: center;
|
|
117
|
+
width: 100%;
|
|
118
|
+
.f-left {
|
|
119
|
+
.w(65.3%);
|
|
120
|
+
.f-l-box {
|
|
121
|
+
.w(100%);
|
|
122
|
+
.h(50px);
|
|
123
|
+
background: #ff7cab;
|
|
124
|
+
border-radius: 5px 0px 0px 5px;
|
|
125
|
+
display: flex;
|
|
126
|
+
justify-content: center;
|
|
127
|
+
align-items: center;
|
|
128
|
+
flex: none;
|
|
129
|
+
.f-l-title {
|
|
130
|
+
.w(48px);
|
|
131
|
+
.h(21px);
|
|
132
|
+
.fz(16px, 21px);
|
|
133
|
+
font-weight: 700;
|
|
134
|
+
color: #ffffff;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
.f-right {
|
|
139
|
+
position: relative;
|
|
140
|
+
.w(34.7%);
|
|
141
|
+
.f-r-box {
|
|
142
|
+
display: flex;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
align-items: center;
|
|
145
|
+
flex: none;
|
|
146
|
+
.h(50px);
|
|
147
|
+
.w(100%);
|
|
148
|
+
z-index: 2;
|
|
149
|
+
position: absolute;
|
|
150
|
+
.f-r-num {
|
|
151
|
+
font-weight: 700;
|
|
152
|
+
.fz(10px, 13px);
|
|
153
|
+
.w(100%);
|
|
154
|
+
color: rgba(0, 0, 0, 0.5);
|
|
155
|
+
padding-left: 37.5%;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
.f-r-line {
|
|
159
|
+
.h(5px);
|
|
160
|
+
background: #ff7cab;
|
|
161
|
+
border-radius: 0px 5px 5px 0px;
|
|
162
|
+
}
|
|
163
|
+
.f-r-mb {
|
|
164
|
+
.mb(2.5px);
|
|
165
|
+
}
|
|
166
|
+
.f-r-w-80 {
|
|
167
|
+
.w(100%);
|
|
168
|
+
}
|
|
169
|
+
.f-r-w-70 {
|
|
170
|
+
.w(87.5%);
|
|
171
|
+
}
|
|
172
|
+
.f-r-w-30 {
|
|
173
|
+
.w(37.5%);
|
|
174
|
+
}
|
|
175
|
+
.f-r-w-20 {
|
|
176
|
+
.w(25%);
|
|
177
|
+
}
|
|
163
178
|
}
|
|
164
179
|
}
|
|
165
180
|
</style>
|