@jx3box/jx3box-common-ui 6.0.0 → 6.0.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.
- package/assets/css/thx.less +5 -1
- package/package.json +2 -2
- package/src/Author.vue +1 -4
- package/src/author/AuthorFollow.vue +69 -29
- package/src/interact/boxcoin_records.vue +3 -2
- package/src/single/Thx.vue +1 -1
package/assets/css/thx.less
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jx3box/jx3box-common-ui",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3",
|
|
4
4
|
"description": "JX3BOX UI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@jx3box/jx3box-comment-ui": "^1.7.0",
|
|
34
|
-
"@jx3box/jx3box-common": "^7.3.
|
|
34
|
+
"@jx3box/jx3box-common": "^7.3.6",
|
|
35
35
|
"@jx3box/jx3box-data": "^1.10.2",
|
|
36
36
|
"@jx3box/jx3box-editor": "^1.4.3",
|
|
37
37
|
"axios": "^0.26.1",
|
package/src/Author.vue
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
29
29
|
<div class="u-bio">{{ data.user_bio }}</div>
|
|
30
|
-
<AuthorFollow
|
|
30
|
+
<AuthorFollow class="u-follow-box" :uid="uid" />
|
|
31
31
|
<div class="u-link" v-if="hasLink">
|
|
32
32
|
<a v-if="data.weibo_name" class="u-weibo" :href="weiboLink(data.weibo_id)" target="_blank">
|
|
33
33
|
<img svg-inline src="../assets/img/author/weibo.svg" />
|
|
@@ -152,9 +152,6 @@ export default {
|
|
|
152
152
|
level: function() {
|
|
153
153
|
return User.getLevel(this.data?.experience);
|
|
154
154
|
},
|
|
155
|
-
isLogin: function() {
|
|
156
|
-
return User.isLogin();
|
|
157
|
-
},
|
|
158
155
|
},
|
|
159
156
|
methods: {
|
|
160
157
|
loadData: function() {
|
|
@@ -1,34 +1,49 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="u-follow">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
<template v-if="isLogin">
|
|
4
|
+
<template v-if="isSelf">
|
|
5
|
+
<div class="u-fans-box">
|
|
6
|
+
<span class="u-fans-label">粉丝数</span>
|
|
7
|
+
<span class="u-fans">{{ formatFansNum(fansNum) }}</span>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
<template v-else>
|
|
11
|
+
<el-button
|
|
12
|
+
v-if="!isFollow"
|
|
13
|
+
:class="{ 'is-follow': isFollow }"
|
|
14
|
+
size="mini"
|
|
15
|
+
:icon="btnIcon"
|
|
16
|
+
@click="follow"
|
|
17
|
+
:type="btnType"
|
|
18
|
+
:loading="loading"
|
|
19
|
+
>
|
|
20
|
+
{{ btnText }}<span class="u-follow-count">{{ formatFansNum(fansNum) }}</span>
|
|
21
|
+
</el-button>
|
|
22
|
+
<el-popover
|
|
23
|
+
v-else
|
|
24
|
+
placement="bottom"
|
|
25
|
+
trigger="hover"
|
|
26
|
+
popper-class="u-follow-popover"
|
|
27
|
+
:visible-arrow="false"
|
|
28
|
+
>
|
|
29
|
+
<div class="u-action-list">
|
|
30
|
+
<div class="u-action-item" v-for="item in actions" :key="item.label" @click.stop="item.action">{{ item.label }}</div>
|
|
31
|
+
</div>
|
|
32
|
+
<el-button class="u-unfollow-btn" size="mini" :type="btnType" slot="reference">{{ btnText }}<span class="u-follow-count">{{ formatFansNum(fansNum) }}</span></el-button>
|
|
33
|
+
</el-popover>
|
|
34
|
+
<el-button size="mini" icon="el-icon-message" disabled title="Lv4+可用">私信</el-button>
|
|
35
|
+
</template>
|
|
36
|
+
</template>
|
|
37
|
+
<el-button class="u-fans-box" disabled size="mini" v-else>
|
|
38
|
+
<span class="u-fans-label">粉丝数</span>
|
|
39
|
+
<span class="u-fans">{{ formatFansNum(fansNum) }}</span>
|
|
13
40
|
</el-button>
|
|
14
|
-
<el-popover
|
|
15
|
-
v-else
|
|
16
|
-
placement="bottom"
|
|
17
|
-
trigger="hover"
|
|
18
|
-
popper-class="u-follow-popover"
|
|
19
|
-
:visible-arrow="false"
|
|
20
|
-
>
|
|
21
|
-
<div class="u-action-list">
|
|
22
|
-
<div class="u-action-item" v-for="item in actions" :key="item.label" @click.stop="item.action">{{ item.label }}</div>
|
|
23
|
-
</div>
|
|
24
|
-
<el-button class="u-unfollow-btn" size="mini" :type="btnType" slot="reference">{{ btnText }}<span class="u-follow-count">{{ formatFansNum(fansNum) }}</span></el-button>
|
|
25
|
-
</el-popover>
|
|
26
|
-
<el-button size="mini" icon="el-icon-message" disabled title="Lv4+可用">私信</el-button>
|
|
27
41
|
</div>
|
|
28
42
|
</template>
|
|
29
43
|
|
|
30
44
|
<script>
|
|
31
|
-
import { follow, unfollow,
|
|
45
|
+
import { follow, unfollow, getFansCount } from "../../service/follow";
|
|
46
|
+
import User from "@jx3box/jx3box-common/js/user";
|
|
32
47
|
export default {
|
|
33
48
|
name: "AuthorFollow",
|
|
34
49
|
props: {
|
|
@@ -49,7 +64,7 @@ export default {
|
|
|
49
64
|
return this.isFollow ? "已关注" : "关注";
|
|
50
65
|
},
|
|
51
66
|
btnIcon() {
|
|
52
|
-
return this.isFollow ? "" : "el-icon-plus";
|
|
67
|
+
return this.isSelf ? "" : (this.isFollow ? "" : "el-icon-plus");
|
|
53
68
|
},
|
|
54
69
|
btnType() {
|
|
55
70
|
return this.isFollow ? "info" : "warning"
|
|
@@ -63,16 +78,30 @@ export default {
|
|
|
63
78
|
},
|
|
64
79
|
},
|
|
65
80
|
];
|
|
66
|
-
}
|
|
81
|
+
},
|
|
82
|
+
isSelf() {
|
|
83
|
+
return this.uid == this.user.uid;
|
|
84
|
+
},
|
|
85
|
+
user() {
|
|
86
|
+
return User.getInfo();
|
|
87
|
+
},
|
|
88
|
+
isLogin: function() {
|
|
89
|
+
return User.isLogin();
|
|
90
|
+
},
|
|
67
91
|
},
|
|
68
|
-
|
|
69
|
-
|
|
92
|
+
watch: {
|
|
93
|
+
uid: {
|
|
94
|
+
immediate: true,
|
|
95
|
+
handler(val) {
|
|
96
|
+
val && this.loadFans();
|
|
97
|
+
},
|
|
98
|
+
}
|
|
70
99
|
},
|
|
71
100
|
methods: {
|
|
72
101
|
// 格式化粉丝数
|
|
73
102
|
formatFansNum(num) {
|
|
74
103
|
if (num < 10000) {
|
|
75
|
-
return num;
|
|
104
|
+
return num === 0 ? "" : num;
|
|
76
105
|
} else {
|
|
77
106
|
return (num / 10000).toFixed(1) + "万";
|
|
78
107
|
}
|
|
@@ -151,4 +180,15 @@ export default {
|
|
|
151
180
|
color:#fff;
|
|
152
181
|
margin-left:5px;
|
|
153
182
|
}
|
|
183
|
+
|
|
184
|
+
.u-fans-box {
|
|
185
|
+
cursor: default !important;
|
|
186
|
+
.u-fans-label {
|
|
187
|
+
color: #999;
|
|
188
|
+
margin-right: 5px;
|
|
189
|
+
}
|
|
190
|
+
.u-fans {
|
|
191
|
+
color: #333;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
154
194
|
</style>
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
</span>
|
|
44
44
|
<span class="u-meta u-remark">{{item.remark}}</span>
|
|
45
45
|
<time class="u-meta u-time">{{showTime(item.created_at)}}</time>
|
|
46
|
-
<span class="u-
|
|
46
|
+
<span class="u-client" v-if="isSuperAdmin">{{item.client}}</span>
|
|
47
|
+
<span class="u-delete" v-if="isSuperAdmin" @click="recovery(item,i)">
|
|
47
48
|
<i class="el-icon-delete"></i>撤销
|
|
48
49
|
</span>
|
|
49
50
|
</li>
|
|
@@ -89,7 +90,7 @@ export default {
|
|
|
89
90
|
return {
|
|
90
91
|
pageSize: this.per,
|
|
91
92
|
pageIndex: this.page,
|
|
92
|
-
client : this.postClient,
|
|
93
|
+
//client : this.postClient,
|
|
93
94
|
};
|
|
94
95
|
},
|
|
95
96
|
},
|
package/src/single/Thx.vue
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<boxcoin-admin :postId="postId" :postType="postType" v-if="hasRight && adminBoxcoinEnable && boxcoin_enable" :userId="userId" :max="admin_max" :min="admin_min" :own="admin_left" :total="admin_total" :points="admin_points" :authors="authors" @updateRecord="updateRecord" :client="client" />
|
|
5
5
|
<Like :postId="postId" :postType="postType"></Like>
|
|
6
6
|
<fav :postId="postId" :postType="postType" :postTitle="postTitle"></fav>
|
|
7
|
-
<boxcoin-user :postId="postId" :postType="postType" :boxcoin="boxcoin" :userId="userId" :own="user_left" :points="user_points" :authors="authors" v-if="userBoxcoinEnable && boxcoin_enable" @updateRecord="updateRecord" />
|
|
7
|
+
<boxcoin-user :postId="postId" :postType="postType" :boxcoin="boxcoin" :userId="userId" :own="user_left" :points="user_points" :authors="authors" v-if="userBoxcoinEnable && boxcoin_enable" @updateRecord="updateRecord" :client="client" />
|
|
8
8
|
<Share :postId="postId" :postType="postType" :client="client" />
|
|
9
9
|
</div>
|
|
10
10
|
<div class="w-thx-records">
|