@jx3box/jx3box-common-ui 6.2.1 → 6.2.3

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.
@@ -59,7 +59,7 @@
59
59
  animation-delay: 0.2s;
60
60
  }
61
61
 
62
- .u-fans{
62
+ .u-interact{
63
63
  .mt(5px);
64
64
  display: flex;
65
65
  }
package/index.js CHANGED
@@ -31,6 +31,7 @@ import zlpBy from "./src/filters/zlpBy.vue";
31
31
  import Thx from './src/single/Thx.vue'
32
32
  import WikiPanel from './src/wiki/WikiPanel.vue'
33
33
 
34
+ import Fans from './src/fans/fans.vue'
34
35
  const components = {
35
36
  Header,
36
37
  Breadcrumb,
@@ -64,7 +65,8 @@ const components = {
64
65
  clientBy,
65
66
  zlpBy,
66
67
 
67
- WikiPanel
68
+ WikiPanel,
69
+ Fans
68
70
  }
69
71
 
70
72
  const install = function (Vue, Option) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "6.2.1",
3
+ "version": "6.2.3",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/service/author.js CHANGED
@@ -68,6 +68,9 @@ function userSignIn(){
68
68
  return $pay({ mute: true }).get(`/api/personal/task/everyday/sign-in`)
69
69
  }
70
70
 
71
+ function getFansList(userid,limit) {
72
+ return $pay().get(`/api/cny/consume/user-charge/rank/of/${userid}?limit=0`,);
73
+ }
71
74
  export {
72
75
  getUserInfo,
73
76
  getUserPosts,
@@ -78,4 +81,5 @@ export {
78
81
  getSuperAuthor,
79
82
  getMyInfo,
80
83
  userSignIn,
84
+ getFansList
81
85
  };
package/src/App.vue CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  <LeftSidebar :open="true">
17
17
  <LeftSideToggle :mobileOnly="true" />
18
- <Author :author="author" :uid="7" />
18
+ <Author :author="author" :uid="28338" />
19
19
  </LeftSidebar>
20
20
 
21
21
  <Main :withoutLeft="false" :withoutRight="false">
@@ -172,7 +172,6 @@ import AuthorMedal from "./medal/medal.vue";
172
172
  import WikiPanel from "./wiki/WikiPanel.vue";
173
173
  import WikiRevisions from "./wiki/WikiRevisions.vue";
174
174
  import WikiComments from "./wiki/WikiComments.vue";
175
-
176
175
  import axios from "axios";
177
176
  import { __server } from "@jx3box/jx3box-common/data/jx3box.json";
178
177
  import { wiki } from "@jx3box/jx3box-common/js/wiki";
@@ -226,7 +225,7 @@ export default {
226
225
  WikiRevisions,
227
226
  WikiComments,
228
227
 
229
- UserPop
228
+ UserPop,
230
229
  },
231
230
  data: function () {
232
231
  return {
package/src/Author.vue CHANGED
@@ -2,7 +2,7 @@
2
2
  <div class="c-author">
3
3
  <AuthorInfo :uid="uid" @ready="installModules" />
4
4
  <template v-if="data">
5
- <div class="u-fans">
5
+ <div class="u-interact">
6
6
  <AuthorFollow style="margin-right: 8px;" :uid="uid" />
7
7
  <AuthorGift :uid="uid" />
8
8
  </div>
@@ -10,6 +10,7 @@
10
10
  <AuthorLink class="u-links" :uid="uid" :data="data" />
11
11
  <AuthorMedals class="u-trophy" :uid="uid" />
12
12
  <AuthorTeams class="u-teams" :uid="uid" />
13
+ <AuthorFans class="u-fans" :uid="uid" />
13
14
  <slot></slot>
14
15
  <AuthorPosts class="u-posts" :uid="uid" />
15
16
  </template>
@@ -22,6 +23,7 @@ import AuthorLink from "./author/AuthorLink.vue";
22
23
  import AuthorFollow from "./author/AuthorFollow.vue";
23
24
  // import AuthorMsg from "./author/AuthorMsg.vue";
24
25
  import AuthorGift from "./author/AuthorGift.vue";
26
+ import AuthorFans from "./author/AuthorFans.vue";
25
27
  import AuthorMedals from "./author/AuthorMedals.vue";
26
28
  import AuthorTeams from "./author/AuthorTeams.vue";
27
29
  import AuthorPosts from "./author/AuthorPosts.vue";
@@ -47,6 +49,7 @@ export default {
47
49
  AuthorMedals,
48
50
  AuthorTeams,
49
51
  AuthorPosts,
52
+ AuthorFans,
50
53
  },
51
54
  };
52
55
  </script>
@@ -0,0 +1,170 @@
1
+ <template>
2
+ <div class="c-author-fans" v-if="list && list.length">
3
+ <!--<div class="f-main-box">
4
+ <div class="f-left">
5
+ <div class="f-l-box"><div class="f-l-title">粉丝团</div></div>
6
+ </div>
7
+ <div class="f-right">
8
+ <div class="f-r-box"><div class="f-r-num">共{{list.length}}人</div></div>
9
+ <div class="f-r-line f-r-w-80 f-r-mb"></div>
10
+ <div class="f-r-line f-r-w-70 f-r-mb"></div>
11
+ <div class="f-r-line f-r-w-30 f-r-mb"></div>
12
+ <div class="f-r-line f-r-w-20 f-r-mb"></div>
13
+ <div class="f-r-line f-r-w-30 f-r-mb"></div>
14
+ <div class="f-r-line f-r-w-70 f-r-mb"></div>
15
+ <div class="f-r-line f-r-w-80"></div>
16
+ </div>
17
+ </div> -->
18
+ <div class="u-label">
19
+ <i class="el-icon-star-off"></i>
20
+ <span>粉丝榜</span>
21
+ </div>
22
+ <div class="f-avatar">
23
+ <el-row :gutter="10">
24
+ <el-col :span="4" v-for="(item, index) in list" :key="item.pay_user_id">
25
+ <el-tooltip
26
+ class="item"
27
+ effect="dark"
28
+ :content="item.money.toString()"
29
+ placement="top"
30
+ v-if="index < 5"
31
+ >
32
+ <el-avatar class="u-avatar" shape="circle" :size="30"
33
+ ><i class="el-icon-s-custom"></i
34
+ ></el-avatar>
35
+ </el-tooltip>
36
+ </el-col>
37
+ <el-col :span="4" v-if="list.length > 5">
38
+ <el-avatar class="u-avatar" shape="circle" :size="30">
39
+ <span class="f-avatar-num" v-if="list.length > 99">···</span>
40
+ <span class="f-avatar-num" v-else>+{{ list.length - 5 }}</span>
41
+ </el-avatar>
42
+ </el-col>
43
+ </el-row>
44
+ </div>
45
+ <div class="f-bottom">本赛季共 {{ list.length }} 人为TA赠礼</div>
46
+ </div>
47
+ </template>
48
+
49
+ <script>
50
+ import User from "@jx3box/jx3box-common/js/user";
51
+ import { getFansList } from "../../service/author";
52
+ export default {
53
+ name: "Fans",
54
+ components: {},
55
+ data() {
56
+ return {
57
+ list: [],
58
+ };
59
+ },
60
+ mounted() {
61
+ this.getData();
62
+ },
63
+ methods: {
64
+ getData() {
65
+ getFansList(User.getInfo().uid).then((res) => {
66
+ let data = res.data.data.list;
67
+ console.log(data)
68
+ if (data) {
69
+ this.list = data || [];
70
+ }
71
+ });
72
+ },
73
+ },
74
+ };
75
+ </script>
76
+
77
+ <style lang="less" scoped>
78
+ .c-author-fans {
79
+ box-sizing: border-box;
80
+ // padding: 10px;
81
+ // background: #ffffff;
82
+ font-family: "Microsoft YaHei";
83
+ font-style: normal;
84
+ // .h(133px);
85
+ .f-main-box {
86
+ display: flex;
87
+ justify-content: center;
88
+ width: 100%;
89
+ .f-left {
90
+ .w(65.3%);
91
+ .f-l-box {
92
+ .w(100%);
93
+ .h(50px);
94
+ background: #ff7cab;
95
+ border-radius: 5px 0px 0px 5px;
96
+ display: flex;
97
+ justify-content: center;
98
+ align-items: center;
99
+ flex: none;
100
+ .f-l-title {
101
+ .w(48px);
102
+ .h(21px);
103
+ .fz(16px, 21px);
104
+ font-weight: 700;
105
+ color: #ffffff;
106
+ }
107
+ }
108
+ }
109
+ .f-right {
110
+ position: relative;
111
+ .w(34.7%);
112
+ .f-r-box {
113
+ display: flex;
114
+ justify-content: center;
115
+ align-items: center;
116
+ flex: none;
117
+ .h(50px);
118
+ .w(100%);
119
+ z-index: 2;
120
+ position: absolute;
121
+ .f-r-num {
122
+ font-weight: 700;
123
+ .fz(10px, 13px);
124
+ .w(100%);
125
+ color: rgba(0, 0, 0, 0.5);
126
+ padding-left: 37.5%;
127
+ }
128
+ }
129
+ .f-r-line {
130
+ .h(5px);
131
+ background: #ff7cab;
132
+ border-radius: 0px 5px 5px 0px;
133
+ }
134
+ .f-r-mb {
135
+ .mb(2.5px);
136
+ }
137
+ .f-r-w-80 {
138
+ .w(100%);
139
+ }
140
+ .f-r-w-70 {
141
+ .w(87.5%);
142
+ }
143
+ .f-r-w-30 {
144
+ .w(37.5%);
145
+ }
146
+ .f-r-w-20 {
147
+ .w(25%);
148
+ }
149
+ }
150
+ }
151
+ .f-avatar {
152
+ .mt(10px);
153
+ height: 30px;
154
+ .f-avatar-num {
155
+ .fz(10px);
156
+ color: #434343;
157
+ font-weight: 700;
158
+ }
159
+ }
160
+ .u-avatar{
161
+ background-color:#d9d9d9;
162
+ }
163
+ .f-bottom {
164
+ .mt(10px);
165
+ .fz(12px, 14px);
166
+ font-weight: 400;
167
+ color: rgba(0, 0, 0, 0.5);
168
+ }
169
+ }
170
+ </style>
@@ -26,7 +26,7 @@
26
26
  {{ item.label }}
27
27
  </div>
28
28
  </div>
29
- <el-button class="u-btn" size="mini" :type="btnType" slot="reference"
29
+ <el-button class="u-trigger" size="mini" :type="btnType" slot="reference"
30
30
  >{{ btnText }}
31
31
  <!-- TODO:后续在粉丝榜中展示粉丝数 -->
32
32
  <!-- <span class="u-follow-count">{{ formatFansNum(fansNum) }}</span> -->
@@ -153,8 +153,23 @@ export default {
153
153
  </script>
154
154
 
155
155
  <style lang="less">
156
+ .c-author-follow {
157
+ .u-btn {
158
+ cursor: default;
159
+ &:hover {
160
+ cursor: pointer;
161
+ background: #ecf5ff;
162
+ }
163
+ }
164
+ /*.u-trigger {
165
+ &:hover {
166
+ cursor: default;
167
+ background: unset;
168
+ }
169
+ }*/
170
+ }
156
171
  .c-author-follow-popover {
157
- .u-follow-popover {
172
+ //.u-follow-popover {
158
173
  &.el-popover {
159
174
  min-width: 100px;
160
175
  padding: 0;
@@ -170,7 +185,7 @@ export default {
170
185
  }
171
186
  }
172
187
  }
173
- }
188
+ //}
174
189
  .u-follow-count {
175
190
  margin-left: 5px;
176
191
  }
@@ -7,6 +7,7 @@
7
7
  @click="openGiftDialog"
8
8
  :disabled="isSelf || !status"
9
9
  :title="btnTitle"
10
+ plain
10
11
  >赠礼</el-button
11
12
  >
12
13
 
@@ -201,14 +202,15 @@ export default {
201
202
  .c-author-gift {
202
203
  .u-btn {
203
204
  @color: #f9afd4;
204
- background-color: @color;
205
- color: #fff;
206
- border-color: darken(@color, 2%);
205
+
206
+ background-color: #fff;
207
+ color: darken(@color, 10%);
208
+ border-color: darken(@color, 10%);
207
209
 
208
210
  &:hover {
209
- background-color: #fff;
210
- color: darken(@color, 10%);
211
- border-color: darken(@color, 10%);
211
+ background-color: @color;
212
+ color: #fff;
213
+ border-color: darken(@color, 2%);
212
214
  }
213
215
 
214
216
  &.is-disabled {