@jx3box/jx3box-common-ui 5.5.23 → 5.5.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/.editorconfig +13 -0
- package/.prettierrc +21 -0
- package/assets/css/author.less +51 -27
- package/jsconfig.json +9 -0
- package/package.json +65 -63
- package/readme.md +0 -1
- package/service/author.js +13 -4
- package/src/Author.vue +66 -110
- package/src/header/user.vue +42 -7
- package/src/interact/Contributors.vue +110 -0
- package/src/interact/boxcoin_admin.vue +14 -4
- package/src/interact/boxcoin_records.vue +1 -2
- package/src/interact/boxcoin_user.vue +13 -3
- package/src/single/Creators.vue +17 -0
- package/src/single/Thx.vue +3 -3
- package/src/single/cms-single.vue +18 -3
- package/vue.config.js +6 -0
package/.editorconfig
ADDED
package/.prettierrc
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tabWidth": 4,
|
|
3
|
+
"useTabs": false,
|
|
4
|
+
"endOfLine": "lf",
|
|
5
|
+
"printWidth": 120,
|
|
6
|
+
"semi": true,
|
|
7
|
+
"singleQuote": false,
|
|
8
|
+
"quoteProps": "as-needed",
|
|
9
|
+
"jsxSingleQuote": false,
|
|
10
|
+
"trailingComma": "es5",
|
|
11
|
+
"bracketSpacing": true,
|
|
12
|
+
"bracketSameLine": false,
|
|
13
|
+
"jsxBracketSameLine": false,
|
|
14
|
+
"arrowParens": "always",
|
|
15
|
+
"requirePragma": false,
|
|
16
|
+
"insertPragma": false,
|
|
17
|
+
"proseWrap": "preserve",
|
|
18
|
+
"htmlWhitespaceSensitivity": "css",
|
|
19
|
+
"vueIndentScriptAndStyle": false,
|
|
20
|
+
"embeddedLanguageFormatting": "auto"
|
|
21
|
+
}
|
package/assets/css/author.less
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
.clearfix;
|
|
4
4
|
.db;
|
|
5
5
|
.mb(10px);
|
|
6
|
+
.pr;
|
|
6
7
|
}
|
|
7
8
|
.u-avatar {
|
|
8
9
|
.fl;
|
|
@@ -10,12 +11,19 @@
|
|
|
10
11
|
.size(68px);
|
|
11
12
|
}
|
|
12
13
|
.u-name {
|
|
13
|
-
.lh(
|
|
14
|
+
.lh(1.6);
|
|
14
15
|
.bold;
|
|
15
16
|
color: @darkblue;
|
|
16
17
|
&:hover {
|
|
17
18
|
color: #f39;
|
|
18
19
|
}
|
|
20
|
+
.break(2);
|
|
21
|
+
}
|
|
22
|
+
.u-info{
|
|
23
|
+
.h(68px);
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
justify-content: center;
|
|
19
27
|
}
|
|
20
28
|
.u-bio {
|
|
21
29
|
.mb(10px);
|
|
@@ -24,6 +32,46 @@
|
|
|
24
32
|
color: #888;
|
|
25
33
|
padding: 0 5px;
|
|
26
34
|
}
|
|
35
|
+
.u-extend {
|
|
36
|
+
display: flex;
|
|
37
|
+
}
|
|
38
|
+
.u-level {
|
|
39
|
+
padding: 2px 15px;
|
|
40
|
+
.fz(12px, 14px);
|
|
41
|
+
color: #fff;
|
|
42
|
+
background-color: #aad2fd;
|
|
43
|
+
border-radius: 2px;
|
|
44
|
+
}
|
|
45
|
+
.u-vip {
|
|
46
|
+
.ml(5px);
|
|
47
|
+
.db;
|
|
48
|
+
.i-icon-vip {
|
|
49
|
+
.db;
|
|
50
|
+
vertical-align: baseline;
|
|
51
|
+
padding: 2px 6px;
|
|
52
|
+
.fz(12px, 14px);
|
|
53
|
+
font-style: normal;
|
|
54
|
+
border-radius: 2px;
|
|
55
|
+
background-color: #ddd;
|
|
56
|
+
color: #fff;
|
|
57
|
+
&.on {
|
|
58
|
+
background-color: #6f42c1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
.u-superauthor {
|
|
63
|
+
margin-left: 4px;
|
|
64
|
+
display: inline-block;
|
|
65
|
+
vertical-align: -2px;
|
|
66
|
+
img {
|
|
67
|
+
width: 16px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
.u-tips {
|
|
71
|
+
.db;
|
|
72
|
+
color: #555;
|
|
73
|
+
font-size: 12px;
|
|
74
|
+
}
|
|
27
75
|
.u-link {
|
|
28
76
|
border-top: 1px dashed #eee;
|
|
29
77
|
border-bottom: 1px dashed #eee;
|
|
@@ -109,11 +157,11 @@
|
|
|
109
157
|
.db;
|
|
110
158
|
background-color: #f2f6fc;
|
|
111
159
|
.mb(6px);
|
|
112
|
-
&:hover{
|
|
160
|
+
&:hover {
|
|
113
161
|
background-color: #e6f0fb;
|
|
114
162
|
// color:@color-link;
|
|
115
163
|
}
|
|
116
|
-
padding:2px 0;
|
|
164
|
+
padding: 2px 0;
|
|
117
165
|
}
|
|
118
166
|
.u-team-logo {
|
|
119
167
|
.size(26px);
|
|
@@ -125,30 +173,6 @@
|
|
|
125
173
|
color: #555;
|
|
126
174
|
}
|
|
127
175
|
}
|
|
128
|
-
|
|
129
|
-
.u-vip {
|
|
130
|
-
margin-left: 4px;
|
|
131
|
-
.i-icon-vip{
|
|
132
|
-
.dbi;vertical-align: baseline;
|
|
133
|
-
padding:2px 5px;
|
|
134
|
-
.fz(12px,14px);
|
|
135
|
-
font-style: normal;
|
|
136
|
-
border-radius: 2px;
|
|
137
|
-
background-color:#ddd;
|
|
138
|
-
color:#fff;
|
|
139
|
-
&.on{
|
|
140
|
-
background-color: #6f42c1;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
.u-superauthor {
|
|
145
|
-
margin-left: 4px;
|
|
146
|
-
display: inline-block;
|
|
147
|
-
vertical-align: -2px;
|
|
148
|
-
img {
|
|
149
|
-
width: 16px;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
176
|
}
|
|
153
177
|
|
|
154
178
|
.c-sidebar-left .c-author {
|
package/jsconfig.json
ADDED
package/package.json
CHANGED
|
@@ -1,68 +1,70 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
"name": "@jx3box/jx3box-common-ui",
|
|
3
|
+
"version": "5.5.26",
|
|
4
|
+
"description": "JX3BOX UI",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "cross-env DEV_SERVER=true vue-cli-service serve",
|
|
8
|
+
"serve": "vue-cli-service serve",
|
|
9
|
+
"build": "vue-cli-service build",
|
|
10
|
+
"lint": "vue-cli-service lint",
|
|
11
|
+
"inspect": "vue inspect > output.js",
|
|
12
|
+
"update": "npm --registry https://registry.npmjs.org install @jx3box/jx3box-common@latest @jx3box/jx3box-data@latest @jx3box/jx3box-editor@latest @jx3box/jx3box-comment-ui@latest",
|
|
13
|
+
"header": "vue-cli-service build --target lib --name newheader src/Header.vue && cp public/index.html dist/newheader.html"
|
|
14
|
+
},
|
|
15
|
+
"eslintConfig": {
|
|
16
|
+
"root": true,
|
|
17
|
+
"env": {
|
|
18
|
+
"node": true
|
|
14
19
|
},
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
"env": {
|
|
18
|
-
"node": true
|
|
19
|
-
},
|
|
20
|
-
"extends": [
|
|
21
|
-
"plugin:vue/essential"
|
|
22
|
-
],
|
|
23
|
-
"rules": {},
|
|
24
|
-
"parserOptions": {
|
|
25
|
-
"parser": "babel-eslint"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"browserslist": [
|
|
29
|
-
"> 1%",
|
|
30
|
-
"last 2 versions"
|
|
20
|
+
"extends": [
|
|
21
|
+
"plugin:vue/essential"
|
|
31
22
|
],
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"@jx3box/jx3box-data": "^1.8.3",
|
|
36
|
-
"@jx3box/jx3box-editor": "^1.2.4",
|
|
37
|
-
"axios": "^0.19.2",
|
|
38
|
-
"element-ui": "^2.13.2",
|
|
39
|
-
"jquery": "^3.5.1",
|
|
40
|
-
"lodash": "^4.17.15",
|
|
41
|
-
"qrcode.vue": "^1.7.0",
|
|
42
|
-
"url": "^0.11.0",
|
|
43
|
-
"vue": "^2.6.11"
|
|
44
|
-
},
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
|
|
47
|
-
"@vue/cli-plugin-babel": "~4.3.0",
|
|
48
|
-
"@vue/cli-plugin-eslint": "~4.3.0",
|
|
49
|
-
"@vue/cli-plugin-vuex": "^4.0.0",
|
|
50
|
-
"@vue/cli-service": "~4.3.0",
|
|
51
|
-
"babel-eslint": "^10.1.0",
|
|
52
|
-
"core-js": "^3.6.5",
|
|
53
|
-
"csslab": "^4.0.3",
|
|
54
|
-
"eslint": "^6.7.2",
|
|
55
|
-
"eslint-plugin-vue": "^6.2.2",
|
|
56
|
-
"less": "^3.0.4",
|
|
57
|
-
"less-loader": "^5.0.0",
|
|
58
|
-
"style-resources-loader": "^1.3.3",
|
|
59
|
-
"vue-cli-plugin-element": "~1.0.1",
|
|
60
|
-
"vue-svg-inline-loader": "^1.4.6",
|
|
61
|
-
"vue-template-compiler": "^2.6.11",
|
|
62
|
-
"weixin-js-sdk": "^1.6.0"
|
|
63
|
-
},
|
|
64
|
-
"repository": {
|
|
65
|
-
"type": "git",
|
|
66
|
-
"url": "git+https://github.com/JX3BOX/jx3box-common-ui.git"
|
|
23
|
+
"rules": {},
|
|
24
|
+
"parserOptions": {
|
|
25
|
+
"parser": "babel-eslint"
|
|
67
26
|
}
|
|
27
|
+
},
|
|
28
|
+
"browserslist": [
|
|
29
|
+
"> 1%",
|
|
30
|
+
"last 2 versions"
|
|
31
|
+
],
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@jx3box/jx3box-comment-ui": "^1.6.8",
|
|
34
|
+
"@jx3box/jx3box-common": "^7.0.21",
|
|
35
|
+
"@jx3box/jx3box-data": "^1.8.6",
|
|
36
|
+
"@jx3box/jx3box-editor": "^1.2.6",
|
|
37
|
+
"axios": "^0.26.1",
|
|
38
|
+
"dayjs": "^1.11.0",
|
|
39
|
+
"element-ui": "^2.13.2",
|
|
40
|
+
"jquery": "^3.5.1",
|
|
41
|
+
"lodash": "^4.17.15",
|
|
42
|
+
"qrcode.vue": "^1.7.0",
|
|
43
|
+
"url": "^0.11.0",
|
|
44
|
+
"vue": "^2.6.11"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
|
|
48
|
+
"@vue/cli-plugin-babel": "~4.3.0",
|
|
49
|
+
"@vue/cli-plugin-eslint": "~4.3.0",
|
|
50
|
+
"@vue/cli-plugin-vuex": "^4.0.0",
|
|
51
|
+
"@vue/cli-service": "~4.3.0",
|
|
52
|
+
"babel-eslint": "^10.1.0",
|
|
53
|
+
"core-js": "^3.6.5",
|
|
54
|
+
"cross-env": "^7.0.3",
|
|
55
|
+
"csslab": "^4.0.3",
|
|
56
|
+
"eslint": "^6.7.2",
|
|
57
|
+
"eslint-plugin-vue": "^6.2.2",
|
|
58
|
+
"less": "^3.0.4",
|
|
59
|
+
"less-loader": "^5.0.0",
|
|
60
|
+
"style-resources-loader": "^1.3.3",
|
|
61
|
+
"vue-cli-plugin-element": "~1.0.1",
|
|
62
|
+
"vue-svg-inline-loader": "^1.4.6",
|
|
63
|
+
"vue-template-compiler": "^2.6.11",
|
|
64
|
+
"weixin-js-sdk": "^1.6.0"
|
|
65
|
+
},
|
|
66
|
+
"repository": {
|
|
67
|
+
"type": "git",
|
|
68
|
+
"url": "git+https://github.com/JX3BOX/jx3box-common-ui.git"
|
|
69
|
+
}
|
|
68
70
|
}
|
package/readme.md
CHANGED
package/service/author.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
2
|
import { __imgPath } from "@jx3box/jx3box-common/data/jx3box.json";
|
|
3
|
-
import { $next, $cms, $team } from "@jx3box/jx3box-common/js/https.js";
|
|
3
|
+
import { $next, $cms, $team, $pay } from "@jx3box/jx3box-common/js/https.js";
|
|
4
4
|
|
|
5
5
|
function getUserInfo(uid) {
|
|
6
6
|
return $cms({ mute: true })
|
|
@@ -10,6 +10,14 @@ function getUserInfo(uid) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
function getMyInfo(){
|
|
14
|
+
return $cms({ mute: true })
|
|
15
|
+
.get(`/api/cms/user/my/info`)
|
|
16
|
+
.then(res => {
|
|
17
|
+
return res.data.data
|
|
18
|
+
})
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
function getUserPosts(uid) {
|
|
14
22
|
return $cms({ mute: true })
|
|
15
23
|
.get(`/api/cms/posts/user/${uid}/latest`)
|
|
@@ -56,8 +64,8 @@ function getSuperAuthor(uid) {
|
|
|
56
64
|
return $cms().get('/api/cms/user/is_super_author/' + uid)
|
|
57
65
|
}
|
|
58
66
|
|
|
59
|
-
function
|
|
60
|
-
return $
|
|
67
|
+
function userSignIn(){
|
|
68
|
+
return $pay({ mute: true }).get(`/api/personal/task/everyday/sign-in`)
|
|
61
69
|
}
|
|
62
70
|
|
|
63
71
|
export {
|
|
@@ -68,5 +76,6 @@ export {
|
|
|
68
76
|
getFrames,
|
|
69
77
|
getUserPublicTeams,
|
|
70
78
|
getSuperAuthor,
|
|
71
|
-
|
|
79
|
+
getMyInfo,
|
|
80
|
+
userSignIn,
|
|
72
81
|
};
|
package/src/Author.vue
CHANGED
|
@@ -1,56 +1,38 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="c-author" v-if="data">
|
|
3
3
|
<div class="u-author">
|
|
4
|
-
<Avatar
|
|
5
|
-
|
|
6
|
-
:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
<Avatar class="u-avatar" :uid="uid" :url="data.user_avatar" :size="68" :frame="data.user_avatar_frame" />
|
|
5
|
+
<div class="u-info">
|
|
6
|
+
<a class="u-name" :href="authorLink(uid)">
|
|
7
|
+
<span>{{ data.display_name.slice(0, 12) }}</span>
|
|
8
|
+
<el-tooltip class="item" effect="dark" content="签约作者" placement="top" v-if="isSuperAuthor">
|
|
9
|
+
<a class="u-superauthor" href="/dashboard/#/cooperation" target="_blank">
|
|
10
|
+
<img :src="super_author_icon" alt="superauthor" />
|
|
11
|
+
</a>
|
|
12
|
+
</el-tooltip>
|
|
13
13
|
</a>
|
|
14
|
-
<
|
|
15
|
-
class="item"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
:content="vipTypeTitle"
|
|
29
|
-
placement="top"
|
|
30
|
-
v-if="isPRO || isVIP"
|
|
31
|
-
>
|
|
32
|
-
<a class="u-vip" href="/vip/premium?from=sidebar_author" target="_blank">
|
|
33
|
-
<i class="i-icon-vip on">{{ vipType }}</i>
|
|
34
|
-
</a>
|
|
35
|
-
</el-tooltip>
|
|
14
|
+
<div class="u-extend">
|
|
15
|
+
<el-tooltip class="item u-level" effect="dark" placement="top">
|
|
16
|
+
<div slot="content">
|
|
17
|
+
<span class="u-tips">经验值:{{ data.experience }}</span>
|
|
18
|
+
</div>
|
|
19
|
+
<span>Lv.{{ level }}</span>
|
|
20
|
+
</el-tooltip>
|
|
21
|
+
<el-tooltip class="item" effect="dark" :content="vipTypeTitle" placement="top" v-if="isVip">
|
|
22
|
+
<a class="u-vip" href="/vip/premium?from=sidebar_author" target="_blank">
|
|
23
|
+
<i class="i-icon-vip on">{{ vipType }}</i>
|
|
24
|
+
</a>
|
|
25
|
+
</el-tooltip>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
36
28
|
</div>
|
|
37
29
|
<div class="u-bio">{{ data.user_bio }}</div>
|
|
38
30
|
<div class="u-link" v-if="hasLink">
|
|
39
|
-
<a
|
|
40
|
-
v-if="data.weibo_name"
|
|
41
|
-
class="u-weibo"
|
|
42
|
-
:href="weiboLink(data.weibo_id)"
|
|
43
|
-
target="_blank"
|
|
44
|
-
>
|
|
31
|
+
<a v-if="data.weibo_name" class="u-weibo" :href="weiboLink(data.weibo_id)" target="_blank">
|
|
45
32
|
<img svg-inline src="../assets/img/author/weibo.svg" />
|
|
46
33
|
{{ data.weibo_name }}
|
|
47
34
|
</a>
|
|
48
|
-
<a
|
|
49
|
-
v-if="data.github_name"
|
|
50
|
-
class="u-github"
|
|
51
|
-
:href="githubLink(data.github_name)"
|
|
52
|
-
target="_blank"
|
|
53
|
-
>
|
|
35
|
+
<a v-if="data.github_name" class="u-github" :href="githubLink(data.github_name)" target="_blank">
|
|
54
36
|
<img svg-inline src="../assets/img/author/github.svg" />
|
|
55
37
|
{{ data.github_name }}
|
|
56
38
|
</a>
|
|
@@ -87,9 +69,9 @@
|
|
|
87
69
|
<i class="el-icon-school"></i>
|
|
88
70
|
<span>所属团队</span>
|
|
89
71
|
</div>
|
|
90
|
-
<a class="u-team" v-for="(item,i) in teams" :key="i" :href="teamLink(item.team_id)" target="_blank">
|
|
72
|
+
<a class="u-team" v-for="(item, i) in teams" :key="i" :href="teamLink(item.team_id)" target="_blank">
|
|
91
73
|
<img class="u-team-logo" :src="showTeamLogo(item.team_logo)" />
|
|
92
|
-
<span class="u-team-name">{{item.team_name}}@{{item.team_server}}</span>
|
|
74
|
+
<span class="u-team-name">{{ item.team_name }}@{{ item.team_server }}</span>
|
|
93
75
|
</a>
|
|
94
76
|
</div>
|
|
95
77
|
<Authorposts :uid="uid" />
|
|
@@ -100,27 +82,16 @@
|
|
|
100
82
|
const liveStatusMap = ["等待开播", "直播中", "直播结束"];
|
|
101
83
|
import Avatar from "./author/Avatar.vue";
|
|
102
84
|
import Authorposts from "./author/Authorposts.vue";
|
|
103
|
-
import {
|
|
104
|
-
authorLink,
|
|
105
|
-
tvLink,
|
|
106
|
-
getLink,
|
|
107
|
-
getThumbnail,
|
|
108
|
-
} from "@jx3box/jx3box-common/js/utils";
|
|
85
|
+
import { authorLink, tvLink, getLink, getThumbnail } from "@jx3box/jx3box-common/js/utils";
|
|
109
86
|
import { __server, __imgPath } from "@jx3box/jx3box-common/data/jx3box.json";
|
|
110
|
-
import {
|
|
111
|
-
getUserInfo,
|
|
112
|
-
getDouyu,
|
|
113
|
-
getUserMedals,
|
|
114
|
-
getUserPublicTeams,
|
|
115
|
-
getSuperAuthor,
|
|
116
|
-
getIdentity,
|
|
117
|
-
} from "../service/author";
|
|
87
|
+
import { getUserInfo, getDouyu, getUserMedals, getUserPublicTeams } from "../service/author";
|
|
118
88
|
import { user as medal_map } from "@jx3box/jx3box-common/data/medals.json";
|
|
119
89
|
import User from "@jx3box/jx3box-common/js/user";
|
|
90
|
+
import { __userLevel } from "@jx3box/jx3box-common/data/jx3box.json";
|
|
120
91
|
export default {
|
|
121
92
|
name: "Author",
|
|
122
93
|
props: ["uid"],
|
|
123
|
-
data: function
|
|
94
|
+
data: function() {
|
|
124
95
|
return {
|
|
125
96
|
data: "",
|
|
126
97
|
tv: "",
|
|
@@ -133,50 +104,52 @@ export default {
|
|
|
133
104
|
// team_server : "蝶恋花"
|
|
134
105
|
// }
|
|
135
106
|
],
|
|
136
|
-
isSuperAuthor: false,
|
|
137
|
-
isPRO: false,
|
|
138
107
|
isVIP: false,
|
|
139
108
|
};
|
|
140
109
|
},
|
|
141
110
|
computed: {
|
|
142
|
-
tv_type: function
|
|
111
|
+
tv_type: function() {
|
|
143
112
|
return this.data && this.data.tv_type;
|
|
144
113
|
},
|
|
145
|
-
tv_id: function
|
|
114
|
+
tv_id: function() {
|
|
146
115
|
return (this.data && this.data.tv_id) || 0;
|
|
147
116
|
},
|
|
148
|
-
tv_img: function
|
|
117
|
+
tv_img: function() {
|
|
149
118
|
return __imgPath + "image/tv/" + this.tv_type + ".png";
|
|
150
119
|
},
|
|
151
|
-
tv_link: function
|
|
120
|
+
tv_link: function() {
|
|
152
121
|
return tvLink(this.tv_type, this.tv_id) || "";
|
|
153
122
|
},
|
|
154
|
-
tv_status: function
|
|
123
|
+
tv_status: function() {
|
|
155
124
|
return (this.tv && this.tv.show_status == 1) || false;
|
|
156
125
|
},
|
|
157
|
-
super_author_icon: function
|
|
126
|
+
super_author_icon: function() {
|
|
158
127
|
return __imgPath + "image/user/" + "superauthor.svg";
|
|
159
128
|
},
|
|
160
|
-
hasLink: function
|
|
161
|
-
return
|
|
162
|
-
this.data.weibo_name ||
|
|
163
|
-
this.data.github_name ||
|
|
164
|
-
this.data.tuilan_id ||
|
|
165
|
-
this.data.tv_id
|
|
166
|
-
);
|
|
129
|
+
hasLink: function() {
|
|
130
|
+
return this.data.weibo_name || this.data.github_name || this.data.tuilan_id || this.data.tv_id;
|
|
167
131
|
},
|
|
168
|
-
hasTrophy: function
|
|
132
|
+
hasTrophy: function() {
|
|
169
133
|
return this.medals.length;
|
|
170
134
|
},
|
|
171
|
-
vipType: function
|
|
172
|
-
return this.
|
|
135
|
+
vipType: function() {
|
|
136
|
+
return this.data?.is_pro ? "PRO" : "PRE";
|
|
137
|
+
},
|
|
138
|
+
vipTypeTitle: function() {
|
|
139
|
+
return this.data?.is_pro ? "专业版会员" : "高级版会员";
|
|
140
|
+
},
|
|
141
|
+
isVip: function() {
|
|
142
|
+
return this.data?.is_pro || this.data?.is_pre;
|
|
143
|
+
},
|
|
144
|
+
isSuperAuthor: function() {
|
|
145
|
+
return this.data?.sign;
|
|
173
146
|
},
|
|
174
|
-
|
|
175
|
-
return this.
|
|
147
|
+
level: function() {
|
|
148
|
+
return User.getLevel(this.data?.experience);
|
|
176
149
|
},
|
|
177
150
|
},
|
|
178
151
|
methods: {
|
|
179
|
-
loadData: function
|
|
152
|
+
loadData: function() {
|
|
180
153
|
return getUserInfo(this.uid)
|
|
181
154
|
.then((data) => {
|
|
182
155
|
this.data = data;
|
|
@@ -184,11 +157,9 @@ export default {
|
|
|
184
157
|
.then(() => {
|
|
185
158
|
this.loadMedals();
|
|
186
159
|
this.loadTeams();
|
|
187
|
-
this.checkSuperAuthor();
|
|
188
|
-
this.loadIdentity();
|
|
189
160
|
});
|
|
190
161
|
},
|
|
191
|
-
loadTV: function
|
|
162
|
+
loadTV: function() {
|
|
192
163
|
if (this.tv_type == "douyu") {
|
|
193
164
|
if (!this.tv_id || isNaN(this.tv_id)) return;
|
|
194
165
|
getDouyu(this.tv_id).then((data) => {
|
|
@@ -196,59 +167,44 @@ export default {
|
|
|
196
167
|
});
|
|
197
168
|
}
|
|
198
169
|
},
|
|
199
|
-
loadMedals: function
|
|
170
|
+
loadMedals: function() {
|
|
200
171
|
getUserMedals(this.uid).then((data) => {
|
|
201
172
|
this.medals = data;
|
|
202
173
|
});
|
|
203
174
|
},
|
|
204
|
-
loadTeams: function
|
|
175
|
+
loadTeams: function() {
|
|
205
176
|
getUserPublicTeams(this.uid).then((data) => {
|
|
206
177
|
this.teams = data && data.slice(0, 5);
|
|
207
178
|
});
|
|
208
179
|
},
|
|
209
|
-
async checkVIP() {
|
|
210
|
-
this.isPRO = await User.isPRO();
|
|
211
|
-
this.isVIP = await User.isVIP();
|
|
212
|
-
},
|
|
213
|
-
checkSuperAuthor: function () {
|
|
214
|
-
getSuperAuthor(this.uid).then((res) => {
|
|
215
|
-
this.isSuperAuthor = res.data.data;
|
|
216
|
-
});
|
|
217
|
-
},
|
|
218
|
-
loadIdentity: function () {
|
|
219
|
-
getIdentity(this.uid).then((res) => {
|
|
220
|
-
this.isPRO = res.data.data.isPRO;
|
|
221
|
-
this.isVIP = res.data.data.isPRE;
|
|
222
|
-
});
|
|
223
|
-
},
|
|
224
180
|
|
|
225
181
|
// filters
|
|
226
|
-
showMedalIcon: function
|
|
182
|
+
showMedalIcon: function(val) {
|
|
227
183
|
return __imgPath + "image/medals/user/" + val + ".gif";
|
|
228
184
|
},
|
|
229
|
-
showMedalDesc
|
|
230
|
-
return item.medal_desc || medal_map[item.medal]
|
|
185
|
+
showMedalDesc: function(item) {
|
|
186
|
+
return item.medal_desc || medal_map[item.medal];
|
|
231
187
|
},
|
|
232
188
|
authorLink,
|
|
233
|
-
weiboLink: function
|
|
189
|
+
weiboLink: function(val) {
|
|
234
190
|
return "https://weibo.com/" + val;
|
|
235
191
|
},
|
|
236
|
-
githubLink: function
|
|
192
|
+
githubLink: function(val) {
|
|
237
193
|
return "https://github.com/" + val;
|
|
238
194
|
},
|
|
239
|
-
teamLink: function
|
|
195
|
+
teamLink: function(team_id) {
|
|
240
196
|
return getLink("org", team_id);
|
|
241
197
|
},
|
|
242
|
-
showTeamLogo: function
|
|
198
|
+
showTeamLogo: function(val) {
|
|
243
199
|
return getThumbnail(val, 32);
|
|
244
200
|
},
|
|
245
201
|
},
|
|
246
202
|
watch: {
|
|
247
|
-
uid: function
|
|
203
|
+
uid: function() {
|
|
248
204
|
this.loadData();
|
|
249
205
|
},
|
|
250
206
|
},
|
|
251
|
-
mounted: function
|
|
207
|
+
mounted: function() {
|
|
252
208
|
this.uid && this.loadData();
|
|
253
209
|
},
|
|
254
210
|
components: {
|
package/src/header/user.vue
CHANGED
|
@@ -119,7 +119,10 @@ import {
|
|
|
119
119
|
} from "@jx3box/jx3box-common/data/jx3box.json";
|
|
120
120
|
import panel from "../../assets/data/panel.json";
|
|
121
121
|
import { getMsg, getMenu } from "../../service/header";
|
|
122
|
-
import {
|
|
122
|
+
import { getMyInfo, userSignIn } from "../../service/author";
|
|
123
|
+
import dayjs from 'dayjs';
|
|
124
|
+
import isToday from 'dayjs/plugin/isToday';
|
|
125
|
+
dayjs.extend(isToday);
|
|
123
126
|
export default {
|
|
124
127
|
props: [],
|
|
125
128
|
data: function () {
|
|
@@ -201,6 +204,12 @@ export default {
|
|
|
201
204
|
return __imgPath + "image/user/" + "superauthor.svg";
|
|
202
205
|
},
|
|
203
206
|
},
|
|
207
|
+
watch: {
|
|
208
|
+
fold(val) {
|
|
209
|
+
if (!val) {
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
204
213
|
methods: {
|
|
205
214
|
// 消息
|
|
206
215
|
checkMSG: function () {
|
|
@@ -242,6 +251,31 @@ export default {
|
|
|
242
251
|
});
|
|
243
252
|
});
|
|
244
253
|
},
|
|
254
|
+
// 签到
|
|
255
|
+
signIn: function (){
|
|
256
|
+
try {
|
|
257
|
+
let user_last_login = localStorage.getItem('user_last_login');
|
|
258
|
+
user_last_login = user_last_login && JSON.parse(user_last_login) || ''
|
|
259
|
+
|
|
260
|
+
if (user_last_login && dayjs(user_last_login).isToday()) {
|
|
261
|
+
console.log('已签到')
|
|
262
|
+
} else {
|
|
263
|
+
userSignIn().then(res => {
|
|
264
|
+
this.$message({
|
|
265
|
+
type: 'success',
|
|
266
|
+
message: '签到成功',
|
|
267
|
+
customClass: 'c-header-signin'
|
|
268
|
+
})
|
|
269
|
+
localStorage.setItem('user_last_login', JSON.stringify(dayjs()))
|
|
270
|
+
}).catch(err => {
|
|
271
|
+
localStorage.setItem('user_last_login', JSON.stringify(dayjs()))
|
|
272
|
+
console.log(dayjs.tz.guess())
|
|
273
|
+
}).finally(() => {})
|
|
274
|
+
}
|
|
275
|
+
} catch(e) {
|
|
276
|
+
console.log(e)
|
|
277
|
+
}
|
|
278
|
+
},
|
|
245
279
|
|
|
246
280
|
// 资产
|
|
247
281
|
loadAsset: function () {
|
|
@@ -249,10 +283,10 @@ export default {
|
|
|
249
283
|
this.asset = data;
|
|
250
284
|
});
|
|
251
285
|
},
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
this.isSuperAuthor = res.
|
|
255
|
-
})
|
|
286
|
+
loadMyInfo: function () {
|
|
287
|
+
getMyInfo().then(res => {
|
|
288
|
+
this.isSuperAuthor = !!res.sign
|
|
289
|
+
})
|
|
256
290
|
},
|
|
257
291
|
|
|
258
292
|
// 初始化
|
|
@@ -262,7 +296,8 @@ export default {
|
|
|
262
296
|
this.checkMSG();
|
|
263
297
|
this.loadPanel();
|
|
264
298
|
this.loadAsset();
|
|
265
|
-
this.
|
|
299
|
+
this.loadMyInfo()
|
|
300
|
+
this.signIn()
|
|
266
301
|
}
|
|
267
302
|
},
|
|
268
303
|
|
|
@@ -284,4 +319,4 @@ export default {
|
|
|
284
319
|
},
|
|
285
320
|
components: {},
|
|
286
321
|
};
|
|
287
|
-
</script>
|
|
322
|
+
</script>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="m-contributor">
|
|
3
|
+
<div class="m-author">
|
|
4
|
+
<el-radio
|
|
5
|
+
v-for="(item, i) in authors"
|
|
6
|
+
v-model="value"
|
|
7
|
+
:label="String(item.user_id)"
|
|
8
|
+
:key="i"
|
|
9
|
+
@change="handleAuthorChange"
|
|
10
|
+
>
|
|
11
|
+
<img
|
|
12
|
+
class="u-pic"
|
|
13
|
+
:src="showAvatar(item.user_avatar)"
|
|
14
|
+
:alt="item.display_name"
|
|
15
|
+
/>
|
|
16
|
+
<span class="u-txt" :title="item.display_name">
|
|
17
|
+
{{ item.display_name }}
|
|
18
|
+
</span>
|
|
19
|
+
</el-radio>
|
|
20
|
+
</div>
|
|
21
|
+
</section>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
import { showAvatar } from "@jx3box/jx3box-common/js/utils";
|
|
26
|
+
export default {
|
|
27
|
+
name: "Contributors",
|
|
28
|
+
props: {
|
|
29
|
+
authors: {
|
|
30
|
+
type: Array,
|
|
31
|
+
default: () => [],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
data() {
|
|
35
|
+
return {
|
|
36
|
+
value: "",
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
watch: {
|
|
40
|
+
authors: {
|
|
41
|
+
deep: true,
|
|
42
|
+
immediate: true,
|
|
43
|
+
handler(val) {
|
|
44
|
+
if (val && val.length) this.value = String(val[0]?.user_id)
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
value: {
|
|
48
|
+
immediate: true,
|
|
49
|
+
handler(val) {
|
|
50
|
+
val && this.$emit('chosen', this.value)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
methods: {
|
|
55
|
+
handleAuthorChange() {},
|
|
56
|
+
showAvatar,
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<style lang="less">
|
|
62
|
+
.m-contributor {
|
|
63
|
+
padding: 10px 10px 0 10px;
|
|
64
|
+
.m-author {
|
|
65
|
+
.u-pic {
|
|
66
|
+
.db;
|
|
67
|
+
.size(48px);
|
|
68
|
+
background-color: @bg-black;
|
|
69
|
+
.r(4px);
|
|
70
|
+
transition: 0.1s ease-in;
|
|
71
|
+
// .tm(0.4);
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
|
|
74
|
+
&:hover {
|
|
75
|
+
.tm(1);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
.u-txt {
|
|
79
|
+
.db;
|
|
80
|
+
.x;
|
|
81
|
+
.fz(12px, 2);
|
|
82
|
+
white-space: nowrap;
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
.w(48px);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.el-radio {
|
|
88
|
+
.ml(0);
|
|
89
|
+
.mr(15px);
|
|
90
|
+
}
|
|
91
|
+
.el-radio__input {
|
|
92
|
+
.none;
|
|
93
|
+
}
|
|
94
|
+
.el-radio__label {
|
|
95
|
+
.db;
|
|
96
|
+
padding-left: 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.is-checked {
|
|
100
|
+
.u-pic {
|
|
101
|
+
border: 3px solid @primary;
|
|
102
|
+
.tm(1);
|
|
103
|
+
}
|
|
104
|
+
.u-txt {
|
|
105
|
+
.bold;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
</style>
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
</div>
|
|
19
19
|
<div class="u-list">
|
|
20
20
|
<em class="u-label">❤️ 品鉴</em>
|
|
21
|
+
<Contributors v-if="authors && authors.length" :authors="authors" @chosen="handleChosen" />
|
|
21
22
|
<div class="u-points">
|
|
22
23
|
<el-radio-group v-model="count">
|
|
23
24
|
<el-radio :label="item" v-for="item in points" :key="item" border>
|
|
@@ -50,10 +51,13 @@
|
|
|
50
51
|
<script>
|
|
51
52
|
import { grantBoxcoin } from "../../service/thx.js";
|
|
52
53
|
import User from "@jx3box/jx3box-common/js/user";
|
|
54
|
+
import Contributors from './Contributors.vue';
|
|
53
55
|
export default {
|
|
54
56
|
name: "BoxcoinAdmin",
|
|
55
|
-
props: ["postType", "postId", "userId", "own", "points"],
|
|
56
|
-
components: {
|
|
57
|
+
props: ["postType", "postId", "userId", "own", "points", 'authors'],
|
|
58
|
+
components: {
|
|
59
|
+
Contributors
|
|
60
|
+
},
|
|
57
61
|
data: function () {
|
|
58
62
|
return {
|
|
59
63
|
visible: false,
|
|
@@ -61,7 +65,9 @@ export default {
|
|
|
61
65
|
count: 0,
|
|
62
66
|
remark: "辛苦,感谢!",
|
|
63
67
|
|
|
64
|
-
left : this.own
|
|
68
|
+
left : this.own,
|
|
69
|
+
|
|
70
|
+
chosen: '', // 被选中的人
|
|
65
71
|
};
|
|
66
72
|
},
|
|
67
73
|
computed: {
|
|
@@ -90,8 +96,12 @@ export default {
|
|
|
90
96
|
openBoxcoinPop: function () {
|
|
91
97
|
this.visible = true;
|
|
92
98
|
},
|
|
99
|
+
// 选择要打赏的对象
|
|
100
|
+
handleChosen(userId) {
|
|
101
|
+
this.chosen = userId
|
|
102
|
+
},
|
|
93
103
|
submit: function () {
|
|
94
|
-
grantBoxcoin(this.postType, this.postId, this.userId, this.count, {
|
|
104
|
+
grantBoxcoin(this.postType, this.postId, this.chosen || this.userId, this.count, {
|
|
95
105
|
remark: this.remark,
|
|
96
106
|
client : this.client
|
|
97
107
|
})
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<i class="el-icon-trophy"></i>
|
|
8
8
|
</span>
|
|
9
9
|
<span class="u-meta u-user">参与打赏</span>
|
|
10
|
-
<span class="u-meta u-user"
|
|
10
|
+
<span class="u-meta u-user">收益作者</span>
|
|
11
11
|
<span class="u-meta u-count">盒币</span>
|
|
12
12
|
<span class="u-meta u-remark">寄语</span>
|
|
13
13
|
<time class="u-meta u-time"></time>
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
<span>{{item.ext_operate_user_info.display_name}}</span>
|
|
31
31
|
</a>
|
|
32
32
|
<a
|
|
33
|
-
v-if="mode== 'wiki'"
|
|
34
33
|
class="u-meta u-user"
|
|
35
34
|
:href="authorLink(item.user_id)"
|
|
36
35
|
target="_blank"
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
</div>
|
|
16
16
|
<div class="u-list">
|
|
17
17
|
<em class="u-label">❤️ 打赏</em>
|
|
18
|
+
<Contributors v-if="authors && authors.length" :authors="authors" @chosen="handleChosen" />
|
|
18
19
|
<div class="u-points">
|
|
19
20
|
<el-radio-group v-model="count">
|
|
20
21
|
<el-radio :label="item" v-for="item in points" :key="item" border>
|
|
@@ -47,10 +48,13 @@
|
|
|
47
48
|
<script>
|
|
48
49
|
import { rewardBoxcoin } from "../../service/thx.js";
|
|
49
50
|
import User from "@jx3box/jx3box-common/js/user";
|
|
51
|
+
import Contributors from './Contributors.vue';
|
|
50
52
|
export default {
|
|
51
53
|
name: "BoxcoinUser",
|
|
52
|
-
props: ["boxcoin", "postType", "postId", "userId", "own", "points"],
|
|
53
|
-
components: {
|
|
54
|
+
props: ["boxcoin", "postType", "postId", "userId", "own", "points", "authors"],
|
|
55
|
+
components: {
|
|
56
|
+
Contributors
|
|
57
|
+
},
|
|
54
58
|
data: function () {
|
|
55
59
|
return {
|
|
56
60
|
visible: false,
|
|
@@ -61,6 +65,8 @@ export default {
|
|
|
61
65
|
left : this.own,
|
|
62
66
|
|
|
63
67
|
chargeLink: "/vip/boxcoin?redirect=" + location.href,
|
|
68
|
+
|
|
69
|
+
chosen: '', // 被选中的人
|
|
64
70
|
};
|
|
65
71
|
},
|
|
66
72
|
computed: {
|
|
@@ -93,8 +99,12 @@ export default {
|
|
|
93
99
|
User.toLogin();
|
|
94
100
|
}
|
|
95
101
|
},
|
|
102
|
+
// 选择要打赏的对象
|
|
103
|
+
handleChosen(userId) {
|
|
104
|
+
this.chosen = userId
|
|
105
|
+
},
|
|
96
106
|
submit: function () {
|
|
97
|
-
rewardBoxcoin(this.postType, this.postId, this.userId, this.count, {
|
|
107
|
+
rewardBoxcoin(this.postType, this.postId, this.chosen || this.userId, this.count, {
|
|
98
108
|
remark: this.remark,
|
|
99
109
|
client : this.client
|
|
100
110
|
})
|
package/src/single/Creators.vue
CHANGED
|
@@ -84,6 +84,23 @@ export default {
|
|
|
84
84
|
getPostAuthors(this.id).then((res) => {
|
|
85
85
|
this.super_author = res.data?.data.super_author;
|
|
86
86
|
this.other_authors = res.data?.data.other_authors;
|
|
87
|
+
|
|
88
|
+
const super_author = {
|
|
89
|
+
user_id: this.super_author.ID,
|
|
90
|
+
display_name: this.super_author.display_name,
|
|
91
|
+
user_avatar: this.super_author.user_avatar,
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const other_authors = this.other_authors?.map(item => {
|
|
95
|
+
return {
|
|
96
|
+
user_id: item.post_author_info?.ID,
|
|
97
|
+
display_name: item.post_author_info?.display_name,
|
|
98
|
+
user_avatar: item.post_author_info?.user_avatar,
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
// 将联合创作者传出去
|
|
103
|
+
this.$emit('load-authors', { super_author, other_authors })
|
|
87
104
|
});
|
|
88
105
|
},
|
|
89
106
|
showAvatar: function (val) {
|
package/src/single/Thx.vue
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="w-thx">
|
|
3
3
|
<div class="w-thx-panel">
|
|
4
|
-
<boxcoin-admin :postId="postId" :postType="postType" v-if="hasRight && adminBoxcoinEnable && boxcoin_enable" :userId="userId" :own="admin_left" :points="admin_points" @updateRecord="updateRecord" />
|
|
4
|
+
<boxcoin-admin :postId="postId" :postType="postType" v-if="hasRight && adminBoxcoinEnable && boxcoin_enable" :userId="userId" :own="admin_left" :points="admin_points" :authors="authors" @updateRecord="updateRecord" />
|
|
5
5
|
<Like :postId="postId" :postType="postType"></Like>
|
|
6
6
|
<fav :postId="postId" :postType="postType"></fav>
|
|
7
|
-
<boxcoin-user :postId="postId" :postType="postType" :boxcoin="boxcoin" :userId="userId" :own="user_left" :points="user_points" 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" />
|
|
8
8
|
<Share :postId="postId" :postType="postType" />
|
|
9
9
|
</div>
|
|
10
10
|
<div class="w-thx-records">
|
|
@@ -28,7 +28,7 @@ import User from '@jx3box/jx3box-common/js/user'
|
|
|
28
28
|
import {getPostBoxcoinConfig,getBoxcoinStatus} from '../../service/thx'
|
|
29
29
|
export default {
|
|
30
30
|
name: "Thx",
|
|
31
|
-
props: ["postId", "postType","userId","adminBoxcoinEnable","userBoxcoinEnable",'mode'],
|
|
31
|
+
props: ["postId", "postType","userId","adminBoxcoinEnable","userBoxcoinEnable",'mode', 'authors'],
|
|
32
32
|
components: {
|
|
33
33
|
Like,
|
|
34
34
|
Share,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<!-- 文章前 -->
|
|
9
9
|
<div class="m-single-prepend">
|
|
10
10
|
<!-- 联合创作者 -->
|
|
11
|
-
<Creators class="m-single-creators" :postId="id" :postType="post_type" />
|
|
11
|
+
<Creators class="m-single-creators" :postId="id" :postType="post_type" @load-authors="loadAuthors" />
|
|
12
12
|
<!-- 文集小册 -->
|
|
13
13
|
<Collection class="m-single-collection" :id="collection_id" :defaultVisible="collection_collapse" @collectionUpdate="updateCollection"/>
|
|
14
14
|
<slot name="single-prepend"></slot>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<slot name="single-append"></slot>
|
|
34
34
|
|
|
35
35
|
<!-- 打赏 -->
|
|
36
|
-
<Thx class="m-single-thx" :postId="id" :postType="post_type" :userId="author_id" :adminBoxcoinEnable="true" :userBoxcoinEnable="true"/>
|
|
36
|
+
<Thx class="m-single-thx" :postId="id" :postType="post_type" :userId="author_id" :adminBoxcoinEnable="true" :userBoxcoinEnable="true" :authors="authors" />
|
|
37
37
|
|
|
38
38
|
<!-- 评论 -->
|
|
39
39
|
<div class="m-single-comment">
|
|
@@ -74,7 +74,11 @@ export default {
|
|
|
74
74
|
data: function() {
|
|
75
75
|
return {
|
|
76
76
|
collection_data : '',
|
|
77
|
-
directory : false
|
|
77
|
+
directory : false,
|
|
78
|
+
|
|
79
|
+
// 创作者
|
|
80
|
+
other_authors: [],
|
|
81
|
+
super_author: "",
|
|
78
82
|
};
|
|
79
83
|
},
|
|
80
84
|
computed: {
|
|
@@ -119,6 +123,13 @@ export default {
|
|
|
119
123
|
collection_data : this.collection_data,
|
|
120
124
|
directory : this.directory
|
|
121
125
|
}
|
|
126
|
+
},
|
|
127
|
+
authors: function (){
|
|
128
|
+
if (this.other_authors && this.other_authors.length) {
|
|
129
|
+
return [this.super_author, ...this.other_authors]
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return []
|
|
122
133
|
}
|
|
123
134
|
},
|
|
124
135
|
methods : {
|
|
@@ -127,6 +138,10 @@ export default {
|
|
|
127
138
|
},
|
|
128
139
|
updateDirectory : function (val){
|
|
129
140
|
this.directory = val
|
|
141
|
+
},
|
|
142
|
+
loadAuthors({super_author, other_authors}) {
|
|
143
|
+
this.super_author = super_author;
|
|
144
|
+
this.other_authors = other_authors
|
|
130
145
|
}
|
|
131
146
|
},
|
|
132
147
|
watch : {
|
package/vue.config.js
CHANGED
|
@@ -57,6 +57,12 @@ module.exports = {
|
|
|
57
57
|
"/api/wiki": {
|
|
58
58
|
target: "https://helper.jx3box.com",
|
|
59
59
|
},
|
|
60
|
+
"/api/personal": {
|
|
61
|
+
target: "https://pay.jx3box.com",
|
|
62
|
+
onProxyReq: function(request) {
|
|
63
|
+
request.setHeader("origin", "");
|
|
64
|
+
},
|
|
65
|
+
},
|
|
60
66
|
"/api": {
|
|
61
67
|
target: "https://next.jx3box.com",
|
|
62
68
|
onProxyReq: function(request) {
|