@jx3box/jx3box-common-ui 6.1.2 → 6.1.5
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/author.less +6 -133
- package/assets/css/thx.less +1 -0
- package/assets/data/game_font.json +522 -0
- package/assets/img/author/bilibili.svg +1 -0
- package/assets/img/author/chat.png +0 -0
- package/assets/img/author/douyu.svg +1 -0
- package/assets/img/author/huya.svg +1 -0
- package/assets/img/author/msg.svg +55 -0
- package/index.js +5 -1
- package/package.json +4 -4
- package/service/resource.js +20 -0
- package/service/thx.js +23 -1
- package/src/App.vue +64 -37
- package/src/Author.vue +30 -203
- package/src/GameText.vue +144 -0
- package/src/author/AuthorFollow.vue +39 -54
- package/src/author/AuthorGift.vue +277 -0
- package/src/author/AuthorInfo.vue +199 -0
- package/src/author/AuthorLink.vue +80 -0
- package/src/author/AuthorMedals.vue +86 -0
- package/src/author/AuthorMsg.vue +25 -0
- package/src/author/AuthorPosts.vue +122 -0
- package/src/author/AuthorTeams.vue +98 -0
- package/src/interact/boxcoin_admin.vue +1 -1
- package/src/medal/medal.vue +0 -1
- package/src/single/Creators.vue +25 -25
- package/src/single/PostHeader.vue +1 -1
- package/src/single/Thx.vue +99 -46
- package/src/single/cms-single.vue +75 -58
- package/vue.config.js +6 -0
- package/assets/css/authorposts.less +0 -53
- package/src/author/Authorposts.vue +0 -64
- package/src/single/PostContents.vue +0 -23
|
@@ -10,7 +10,12 @@
|
|
|
10
10
|
<!-- 联合创作者 -->
|
|
11
11
|
<Creators class="m-single-creators" :postId="id" :postType="post_type" @load-authors="loadAuthors" />
|
|
12
12
|
<!-- 文集小册 -->
|
|
13
|
-
<Collection
|
|
13
|
+
<Collection
|
|
14
|
+
class="m-single-collection"
|
|
15
|
+
:id="collection_id"
|
|
16
|
+
:defaultVisible="collection_collapse"
|
|
17
|
+
@collectionUpdate="updateCollection"
|
|
18
|
+
/>
|
|
14
19
|
<slot name="single-prepend"></slot>
|
|
15
20
|
</div>
|
|
16
21
|
|
|
@@ -19,8 +24,8 @@
|
|
|
19
24
|
<el-divider content-position="left">JX3BOX</el-divider>
|
|
20
25
|
<div class="m-single-content">
|
|
21
26
|
<slot></slot>
|
|
22
|
-
<ArticleMarkdown v-if="isMarkdown" :content="post_content" @directoryRendered="updateDirectory"/>
|
|
23
|
-
<Article v-else :content="post_content" @directoryRendered="updateDirectory"/>
|
|
27
|
+
<ArticleMarkdown v-if="isMarkdown" :content="post_content" @directoryRendered="updateDirectory" />
|
|
28
|
+
<Article v-else :content="post_content" @directoryRendered="updateDirectory" />
|
|
24
29
|
</div>
|
|
25
30
|
</div>
|
|
26
31
|
<div class="m-single-null" v-else>
|
|
@@ -29,11 +34,20 @@
|
|
|
29
34
|
|
|
30
35
|
<!-- 文章后 -->
|
|
31
36
|
<div class="m-single-append">
|
|
32
|
-
|
|
33
37
|
<slot name="single-append"></slot>
|
|
34
38
|
|
|
35
39
|
<!-- 打赏 -->
|
|
36
|
-
<Thx
|
|
40
|
+
<Thx
|
|
41
|
+
class="m-single-thx"
|
|
42
|
+
:postId="id"
|
|
43
|
+
:postType="post_type"
|
|
44
|
+
:postTitle="post_title"
|
|
45
|
+
:userId="author_id"
|
|
46
|
+
:adminBoxcoinEnable="true"
|
|
47
|
+
:userBoxcoinEnable="true"
|
|
48
|
+
:authors="authors"
|
|
49
|
+
:client="post_client"
|
|
50
|
+
/>
|
|
37
51
|
|
|
38
52
|
<!-- 评论 -->
|
|
39
53
|
<div class="m-single-comment">
|
|
@@ -59,7 +73,7 @@ import Article from "@jx3box/jx3box-editor/src/Article.vue";
|
|
|
59
73
|
import ArticleMarkdown from "@jx3box/jx3box-editor/src/ArticleMarkdown.vue";
|
|
60
74
|
import Comment from "@jx3box/jx3box-comment-ui/src/Comment.vue";
|
|
61
75
|
import { __visibleMap } from "@jx3box/jx3box-common/data/jx3box.json";
|
|
62
|
-
import { getAppType } from
|
|
76
|
+
import { getAppType } from "@jx3box/jx3box-common/js/utils";
|
|
63
77
|
export default {
|
|
64
78
|
name: "cms-single",
|
|
65
79
|
components: {
|
|
@@ -72,10 +86,10 @@ export default {
|
|
|
72
86
|
Comment,
|
|
73
87
|
},
|
|
74
88
|
props: ["post", "stat"],
|
|
75
|
-
data: function() {
|
|
89
|
+
data: function () {
|
|
76
90
|
return {
|
|
77
|
-
collection_data
|
|
78
|
-
directory
|
|
91
|
+
collection_data: "",
|
|
92
|
+
directory: false,
|
|
79
93
|
|
|
80
94
|
// 创作者
|
|
81
95
|
other_authors: [],
|
|
@@ -83,95 +97,98 @@ export default {
|
|
|
83
97
|
};
|
|
84
98
|
},
|
|
85
99
|
computed: {
|
|
86
|
-
id: function() {
|
|
100
|
+
id: function () {
|
|
87
101
|
return ~~this.post?.ID || 0;
|
|
88
102
|
},
|
|
89
|
-
app_type: function() {
|
|
103
|
+
app_type: function () {
|
|
90
104
|
return getAppType();
|
|
91
105
|
},
|
|
92
|
-
post_type: function() {
|
|
106
|
+
post_type: function () {
|
|
93
107
|
return this.post?.post_type;
|
|
94
108
|
},
|
|
95
|
-
post_title
|
|
96
|
-
return this.post?.post_title
|
|
109
|
+
post_title: function () {
|
|
110
|
+
return this.post?.post_title;
|
|
97
111
|
},
|
|
98
|
-
author_id
|
|
99
|
-
return this.post?.post_author
|
|
112
|
+
author_id: function () {
|
|
113
|
+
return this.post?.post_author;
|
|
100
114
|
},
|
|
101
|
-
collection_id: function() {
|
|
115
|
+
collection_id: function () {
|
|
102
116
|
return this.post?.post_collection;
|
|
103
117
|
},
|
|
104
|
-
collection_collapse: function() {
|
|
118
|
+
collection_collapse: function () {
|
|
105
119
|
return this.post?.collection_collapse;
|
|
106
120
|
},
|
|
107
|
-
visible: function() {
|
|
121
|
+
visible: function () {
|
|
108
122
|
return !!this.post?._check;
|
|
109
123
|
},
|
|
110
|
-
null_tip: function() {
|
|
124
|
+
null_tip: function () {
|
|
111
125
|
let str = "作者设置了【";
|
|
112
126
|
str += __visibleMap[this.post?.visible];
|
|
113
127
|
str += "】";
|
|
114
128
|
return str;
|
|
115
129
|
},
|
|
116
|
-
post_content: function() {
|
|
130
|
+
post_content: function () {
|
|
117
131
|
return this.post?.post_content || "";
|
|
118
132
|
},
|
|
119
|
-
post_mode: function() {
|
|
133
|
+
post_mode: function () {
|
|
120
134
|
return this.post?.post_mode || "tinymce";
|
|
121
135
|
},
|
|
122
|
-
isMarkdown: function() {
|
|
136
|
+
isMarkdown: function () {
|
|
123
137
|
return this.post_mode == "markdown";
|
|
124
138
|
},
|
|
125
|
-
allow_comment
|
|
126
|
-
return !this.post?.comment
|
|
139
|
+
allow_comment: function () {
|
|
140
|
+
return !this.post?.comment;
|
|
127
141
|
},
|
|
128
|
-
extend_data
|
|
142
|
+
extend_data: function () {
|
|
129
143
|
return {
|
|
130
|
-
collection_data
|
|
131
|
-
directory
|
|
132
|
-
}
|
|
144
|
+
collection_data: this.collection_data,
|
|
145
|
+
directory: this.directory,
|
|
146
|
+
};
|
|
133
147
|
},
|
|
134
|
-
authors: function (){
|
|
148
|
+
authors: function () {
|
|
135
149
|
if (this.other_authors && this.other_authors.length) {
|
|
136
|
-
return [this.super_author, ...this.other_authors]
|
|
150
|
+
return [this.super_author, ...this.other_authors];
|
|
137
151
|
}
|
|
138
|
-
|
|
139
|
-
|
|
152
|
+
return [];
|
|
153
|
+
},
|
|
154
|
+
post_client: function () {
|
|
155
|
+
return this.post?.client || "all";
|
|
140
156
|
},
|
|
141
|
-
post_client : function (){
|
|
142
|
-
return this.post?.client || 'all'
|
|
143
|
-
}
|
|
144
157
|
},
|
|
145
|
-
methods
|
|
146
|
-
updateCollection
|
|
147
|
-
this.collection_data = val
|
|
158
|
+
methods: {
|
|
159
|
+
updateCollection: function (val) {
|
|
160
|
+
this.collection_data = val;
|
|
148
161
|
},
|
|
149
|
-
updateDirectory
|
|
150
|
-
this.directory = val
|
|
162
|
+
updateDirectory: function (val) {
|
|
163
|
+
this.directory = val;
|
|
151
164
|
},
|
|
152
|
-
loadAuthors({super_author, other_authors}) {
|
|
165
|
+
loadAuthors({ super_author, other_authors }) {
|
|
153
166
|
this.super_author = super_author;
|
|
154
|
-
this.other_authors = other_authors
|
|
155
|
-
}
|
|
167
|
+
this.other_authors = other_authors;
|
|
168
|
+
},
|
|
156
169
|
},
|
|
157
|
-
watch
|
|
158
|
-
extend_data
|
|
159
|
-
deep
|
|
160
|
-
immediate
|
|
161
|
-
handler
|
|
162
|
-
this.$emit(
|
|
163
|
-
}
|
|
170
|
+
watch: {
|
|
171
|
+
extend_data: {
|
|
172
|
+
deep: true,
|
|
173
|
+
immediate: true,
|
|
174
|
+
handler: function (val) {
|
|
175
|
+
this.$emit("extendUpdate", val);
|
|
176
|
+
},
|
|
164
177
|
},
|
|
165
178
|
post_type: {
|
|
166
|
-
deep
|
|
167
|
-
immediate
|
|
168
|
-
handler
|
|
179
|
+
deep: true,
|
|
180
|
+
immediate: true,
|
|
181
|
+
handler: function (val) {
|
|
182
|
+
if (location.host.includes("localhost")) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
|
|
169
186
|
if (val && val !== this.app_type) {
|
|
170
|
-
location.href = `/${val}/${this.id}
|
|
187
|
+
location.href = `/${val}/${this.id}`;
|
|
171
188
|
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
},
|
|
175
192
|
};
|
|
176
193
|
</script>
|
|
177
194
|
|
package/vue.config.js
CHANGED
|
@@ -65,6 +65,12 @@ module.exports = {
|
|
|
65
65
|
request.setHeader("origin", "");
|
|
66
66
|
},
|
|
67
67
|
},
|
|
68
|
+
"/api/cny":{
|
|
69
|
+
target: "https://pay.jx3box.com",
|
|
70
|
+
onProxyReq: function(request) {
|
|
71
|
+
request.setHeader("origin", "");
|
|
72
|
+
},
|
|
73
|
+
},
|
|
68
74
|
"/api": {
|
|
69
75
|
target: "https://next2.jx3box.com",
|
|
70
76
|
onProxyReq: function(request) {
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
.c-authorposts {
|
|
2
|
-
// margin:0 10px;
|
|
3
|
-
ul {
|
|
4
|
-
list-style: none;
|
|
5
|
-
margin: 0;
|
|
6
|
-
padding:0;
|
|
7
|
-
}
|
|
8
|
-
li {
|
|
9
|
-
.db;
|
|
10
|
-
}
|
|
11
|
-
.u-item{
|
|
12
|
-
.db;
|
|
13
|
-
padding:3px 10px 3px 5px;
|
|
14
|
-
.nobreak;
|
|
15
|
-
.fz(12px,2);
|
|
16
|
-
color:#666;
|
|
17
|
-
border-bottom:1px solid transparent;
|
|
18
|
-
&:hover{
|
|
19
|
-
color:@pink;
|
|
20
|
-
// background-color:#fff;
|
|
21
|
-
border-bottom:1px solid @border;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
.u-icon {
|
|
25
|
-
.fz(14px);
|
|
26
|
-
.size(14px);
|
|
27
|
-
// .y;
|
|
28
|
-
color:#999;
|
|
29
|
-
.mr(5px);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.u-label {
|
|
33
|
-
margin: 15px 0 10px 0;
|
|
34
|
-
padding: 0 5px 10px 5px;
|
|
35
|
-
i {
|
|
36
|
-
.mr(5px);
|
|
37
|
-
}
|
|
38
|
-
span {
|
|
39
|
-
.fz(13px);
|
|
40
|
-
}
|
|
41
|
-
border-bottom: 1px solid @border;
|
|
42
|
-
|
|
43
|
-
.pr;
|
|
44
|
-
.u-more{
|
|
45
|
-
.fz(12px);
|
|
46
|
-
.pa;.rb(0,10px);
|
|
47
|
-
color:#999;
|
|
48
|
-
&:hover{
|
|
49
|
-
color:@pink;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="c-authorposts" v-if="uid">
|
|
3
|
-
<div class="u-label">
|
|
4
|
-
<i class="el-icon-notebook-2"></i>
|
|
5
|
-
<span>作者最新作品</span>
|
|
6
|
-
<a :href="uid | authorLink" class="u-more" target="_blank">全部 »</a>
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
<ul v-if="data && data.length">
|
|
10
|
-
<li v-for="(item, i) in data" :key="i">
|
|
11
|
-
<a class="u-item" :href="url(item.ID, item.post_type)" target="_blank">
|
|
12
|
-
<span
|
|
13
|
-
><i class="u-icon el-icon-arrow-right"></i>
|
|
14
|
-
{{ item.post_title || item.post_type + "/无标题" }}</span
|
|
15
|
-
>
|
|
16
|
-
</a>
|
|
17
|
-
</li>
|
|
18
|
-
</ul>
|
|
19
|
-
</div>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script>
|
|
23
|
-
import { getUserPosts } from "../../service/author";
|
|
24
|
-
import { authorLink, getLink } from "@jx3box/jx3box-common/js/utils";
|
|
25
|
-
export default {
|
|
26
|
-
name: "Authorposts",
|
|
27
|
-
props: ["uid"],
|
|
28
|
-
data: function() {
|
|
29
|
-
return {
|
|
30
|
-
data: [],
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
computed: {},
|
|
34
|
-
watch: {
|
|
35
|
-
uid: {
|
|
36
|
-
immediate: true,
|
|
37
|
-
handler: function(user_id) {
|
|
38
|
-
if (user_id) this.init();
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
methods: {
|
|
43
|
-
url: function(pid, type) {
|
|
44
|
-
return getLink(type, pid);
|
|
45
|
-
},
|
|
46
|
-
init: function() {
|
|
47
|
-
getUserPosts(this.uid)
|
|
48
|
-
.then((data) => {
|
|
49
|
-
this.data = data.slice(0, 5);
|
|
50
|
-
})
|
|
51
|
-
.catch((err) => {
|
|
52
|
-
console.log(err);
|
|
53
|
-
});
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
filters: {
|
|
57
|
-
authorLink,
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
</script>
|
|
61
|
-
|
|
62
|
-
<style lang="less">
|
|
63
|
-
@import "../../assets/css/authorposts.less";
|
|
64
|
-
</style>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="m-single-contents">
|
|
3
|
-
<!-- TODO: -->
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
export default {
|
|
9
|
-
name : 'PostContents',
|
|
10
|
-
props:[],
|
|
11
|
-
components : {},
|
|
12
|
-
data : function(){
|
|
13
|
-
return {
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
computed:{},
|
|
18
|
-
watch:{},
|
|
19
|
-
methods:{},
|
|
20
|
-
created:function(){},
|
|
21
|
-
mounted:function(){},
|
|
22
|
-
}
|
|
23
|
-
</script>
|