@jx3box/jx3box-common-ui 6.1.4 → 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 +2 -2
- 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/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
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="c-author-posts" v-if="ready">
|
|
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 class="u-list" 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 { authorLink, getLink } from "@jx3box/jx3box-common/js/utils";
|
|
24
|
+
import { getUserPosts } from "../../service/author";
|
|
25
|
+
export default {
|
|
26
|
+
name: "AuthorPosts",
|
|
27
|
+
props: ["uid"],
|
|
28
|
+
data: function () {
|
|
29
|
+
return {
|
|
30
|
+
data: [],
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
computed: {
|
|
34
|
+
ready: function () {
|
|
35
|
+
return this.uid && this.data && this.data.length;
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
watch: {
|
|
39
|
+
uid: {
|
|
40
|
+
immediate: true,
|
|
41
|
+
handler: function (val) {
|
|
42
|
+
val && this.init();
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
methods: {
|
|
47
|
+
url: function (pid, type) {
|
|
48
|
+
return getLink(type, pid);
|
|
49
|
+
},
|
|
50
|
+
init: function () {
|
|
51
|
+
getUserPosts(this.uid)
|
|
52
|
+
.then((data) => {
|
|
53
|
+
this.data = data.slice(0, 5);
|
|
54
|
+
})
|
|
55
|
+
.catch((err) => {
|
|
56
|
+
console.log(err);
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
filters: {
|
|
61
|
+
authorLink,
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<style scoped lang="less">
|
|
67
|
+
.c-author-posts {
|
|
68
|
+
// margin:0 10px;
|
|
69
|
+
ul {
|
|
70
|
+
list-style: none;
|
|
71
|
+
margin: 0;
|
|
72
|
+
padding: 0;
|
|
73
|
+
}
|
|
74
|
+
li {
|
|
75
|
+
.db;
|
|
76
|
+
}
|
|
77
|
+
.u-item {
|
|
78
|
+
.db;
|
|
79
|
+
padding: 3px 10px 3px 5px;
|
|
80
|
+
.nobreak;
|
|
81
|
+
.fz(12px,2);
|
|
82
|
+
color: #666;
|
|
83
|
+
border-bottom: 1px solid transparent;
|
|
84
|
+
&:hover {
|
|
85
|
+
color: @pink;
|
|
86
|
+
// background-color:#fff;
|
|
87
|
+
border-bottom: 1px solid @border;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
.u-icon {
|
|
91
|
+
.fz(12px);
|
|
92
|
+
.size(12px);
|
|
93
|
+
// .y;
|
|
94
|
+
color: #999;
|
|
95
|
+
// .mr(5px);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.u-label {
|
|
99
|
+
margin: 15px 0 10px 0;
|
|
100
|
+
padding: 0 5px 10px 5px;
|
|
101
|
+
i {
|
|
102
|
+
.mr(5px);
|
|
103
|
+
.y;
|
|
104
|
+
}
|
|
105
|
+
span {
|
|
106
|
+
.fz(13px);
|
|
107
|
+
}
|
|
108
|
+
border-bottom: 1px solid @border;
|
|
109
|
+
|
|
110
|
+
.pr;
|
|
111
|
+
.u-more {
|
|
112
|
+
.fz(12px);
|
|
113
|
+
.pa;
|
|
114
|
+
.rb(0,10px);
|
|
115
|
+
color: #999;
|
|
116
|
+
&:hover {
|
|
117
|
+
color: @pink;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
</style>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="c-author-teams" v-if="ready">
|
|
3
|
+
<div class="u-label">
|
|
4
|
+
<i class="el-icon-school"></i>
|
|
5
|
+
<span>所属团队</span>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="u-teams">
|
|
8
|
+
<a class="u-team" v-for="(item, i) in teams" :key="i" :href="teamLink(item.team_id)" target="_blank">
|
|
9
|
+
<img class="u-team-logo" :src="showTeamLogo(item.team_logo)" />
|
|
10
|
+
<span class="u-team-name">{{ item.team_name }}@{{ item.team_server }}</span>
|
|
11
|
+
</a>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
import { getLink, getThumbnail } from "@jx3box/jx3box-common/js/utils";
|
|
18
|
+
import { getUserPublicTeams } from "../../service/author";
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
name: "AuthorTeams",
|
|
22
|
+
props: ["uid"],
|
|
23
|
+
components: {},
|
|
24
|
+
data: function () {
|
|
25
|
+
return {
|
|
26
|
+
teams: [
|
|
27
|
+
// {
|
|
28
|
+
// team_name : '诗画印象',
|
|
29
|
+
// team_logo : 'https://oss.jx3box.com/2019/09/logo.png',
|
|
30
|
+
// team_server : "蝶恋花"
|
|
31
|
+
// }
|
|
32
|
+
],
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
computed: {
|
|
36
|
+
ready: function () {
|
|
37
|
+
return this.uid && this.teams && this.teams.length;
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
watch: {
|
|
41
|
+
uid: {
|
|
42
|
+
immediate: true,
|
|
43
|
+
handler: function (val) {
|
|
44
|
+
val && this.loadTeams();
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
methods: {
|
|
49
|
+
loadTeams: function () {
|
|
50
|
+
getUserPublicTeams(this.uid).then((data) => {
|
|
51
|
+
this.teams = data && data.slice(0, 5);
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
teamLink: function (team_id) {
|
|
55
|
+
return getLink("org", team_id);
|
|
56
|
+
},
|
|
57
|
+
showTeamLogo: function (val) {
|
|
58
|
+
return getThumbnail(val, 96);
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
created: function () {},
|
|
62
|
+
mounted: function () {},
|
|
63
|
+
};
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<style scoped lang="less">
|
|
67
|
+
.c-author-teams {
|
|
68
|
+
.mt(10px);
|
|
69
|
+
.u-label{
|
|
70
|
+
i{
|
|
71
|
+
.y;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
.u-team {
|
|
75
|
+
.db;
|
|
76
|
+
background-color: #f5f7fa;
|
|
77
|
+
.mb(6px);
|
|
78
|
+
&:hover {
|
|
79
|
+
// background-color: #e6f0fb;
|
|
80
|
+
.u-team-name{
|
|
81
|
+
color:@pink;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
padding: 4px 4px;
|
|
85
|
+
.r(3px);
|
|
86
|
+
}
|
|
87
|
+
.u-team-logo {
|
|
88
|
+
.size(24px);
|
|
89
|
+
.y;
|
|
90
|
+
.mr(4px);
|
|
91
|
+
.r(4px);
|
|
92
|
+
}
|
|
93
|
+
.u-team-name {
|
|
94
|
+
.fz(12px);
|
|
95
|
+
color: #555;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
</style>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<div class="w-boxcoin-admin-content">
|
|
15
15
|
<div class="u-left">
|
|
16
16
|
<em class="u-label">本月状态</em>
|
|
17
|
-
|
|
17
|
+
已用<b>{{this.used}}</b> 剩余<b>{{this.left}}</b> 总计<b>{{this.total}}</b>
|
|
18
18
|
<el-progress :percentage="100 - (this.used * 100 / this.total)" :stroke-width="15" :text-inside="true"></el-progress>
|
|
19
19
|
</div>
|
|
20
20
|
<div class="u-list">
|
package/src/medal/medal.vue
CHANGED
package/src/single/Creators.vue
CHANGED
|
@@ -8,21 +8,21 @@
|
|
|
8
8
|
target="_blank"
|
|
9
9
|
>
|
|
10
10
|
<img class="u-avatar" :src="showAvatar(super_author.user_avatar)" />
|
|
11
|
-
<span class="u-name">{{super_author.display_name}}</span>
|
|
11
|
+
<span class="u-name">{{ super_author.display_name }}</span>
|
|
12
12
|
<i class="u-up">UP</i>
|
|
13
13
|
</a>
|
|
14
14
|
<div class="w-creators-authors" v-if="other_authors">
|
|
15
15
|
<a
|
|
16
16
|
class="w-creators-author w-creators-item"
|
|
17
|
-
v-for="(item,i) in other_authors"
|
|
17
|
+
v-for="(item, i) in other_authors"
|
|
18
18
|
:key="i"
|
|
19
19
|
:href="authorLink(item.post_author_info.ID)"
|
|
20
20
|
target="_blank"
|
|
21
21
|
v-show="item.status"
|
|
22
22
|
>
|
|
23
23
|
<img class="u-avatar" :src="showAvatar(item.post_author_info.user_avatar)" />
|
|
24
|
-
<span class="u-name">{{item.post_author_info.display_name}}</span>
|
|
25
|
-
<i class="u-label">{{formatLabel(item.label)}}</i>
|
|
24
|
+
<span class="u-name">{{ item.post_author_info.display_name }}</span>
|
|
25
|
+
<i class="u-label">{{ formatLabel(item.label) }}</i>
|
|
26
26
|
</a>
|
|
27
27
|
</div>
|
|
28
28
|
<a class="w-creators-edit" :href="editLink" v-if="isCreator">
|
|
@@ -33,11 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
<script>
|
|
35
35
|
import { getPostAuthors } from "../../service/cms";
|
|
36
|
-
import {
|
|
37
|
-
showAvatar,
|
|
38
|
-
authorLink,
|
|
39
|
-
editLink,
|
|
40
|
-
} from "@jx3box/jx3box-common/js/utils";
|
|
36
|
+
import { showAvatar, authorLink, editLink } from "@jx3box/jx3box-common/js/utils";
|
|
41
37
|
import User from "@jx3box/jx3box-common/js/user";
|
|
42
38
|
export default {
|
|
43
39
|
name: "Creators",
|
|
@@ -89,27 +85,31 @@ export default {
|
|
|
89
85
|
user_id: this.super_author.ID,
|
|
90
86
|
display_name: this.super_author.display_name,
|
|
91
87
|
user_avatar: this.super_author.user_avatar,
|
|
92
|
-
}
|
|
88
|
+
};
|
|
93
89
|
|
|
94
|
-
const other_authors = this.other_authors?.map(item => {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
90
|
+
const other_authors = this.other_authors?.map((item) => {
|
|
91
|
+
if (item.status) {
|
|
92
|
+
return {
|
|
93
|
+
user_id: item.post_author_info?.ID,
|
|
94
|
+
display_name: item.post_author_info?.display_name,
|
|
95
|
+
user_avatar: item.post_author_info?.user_avatar,
|
|
96
|
+
};
|
|
99
97
|
}
|
|
100
|
-
})
|
|
98
|
+
}).filter((item) => {
|
|
99
|
+
return !!item;
|
|
100
|
+
});
|
|
101
101
|
|
|
102
102
|
// 将联合创作者传出去
|
|
103
|
-
this.$emit(
|
|
103
|
+
this.$emit("load-authors", { super_author, other_authors });
|
|
104
104
|
});
|
|
105
105
|
},
|
|
106
106
|
showAvatar: function (val) {
|
|
107
107
|
return showAvatar(val, 144);
|
|
108
108
|
},
|
|
109
109
|
authorLink,
|
|
110
|
-
formatLabel
|
|
111
|
-
return str && str.slice(0,8)
|
|
112
|
-
}
|
|
110
|
+
formatLabel: function (str) {
|
|
111
|
+
return str && str.slice(0, 8);
|
|
112
|
+
},
|
|
113
113
|
},
|
|
114
114
|
created: function () {},
|
|
115
115
|
mounted: function () {},
|
|
@@ -166,7 +166,7 @@ export default {
|
|
|
166
166
|
color: @color;
|
|
167
167
|
margin-bottom: 2px;
|
|
168
168
|
.nobreak;
|
|
169
|
-
max-width:120px;
|
|
169
|
+
max-width: 120px;
|
|
170
170
|
}
|
|
171
171
|
&:hover {
|
|
172
172
|
.u-name {
|
|
@@ -177,7 +177,7 @@ export default {
|
|
|
177
177
|
.dbi;
|
|
178
178
|
.fz(12px,1);
|
|
179
179
|
font-style: normal;
|
|
180
|
-
border:1px solid @pink;
|
|
180
|
+
border: 1px solid @pink;
|
|
181
181
|
color: @pink;
|
|
182
182
|
padding: 3px 10px;
|
|
183
183
|
.r(2px);
|
|
@@ -185,12 +185,12 @@ export default {
|
|
|
185
185
|
}
|
|
186
186
|
.u-label {
|
|
187
187
|
.nobreak;
|
|
188
|
-
max-width:120px;
|
|
188
|
+
max-width: 120px;
|
|
189
189
|
.dbi;
|
|
190
190
|
.fz(12px,1);
|
|
191
191
|
font-style: normal;
|
|
192
|
-
border:1px solid @color-link;
|
|
193
|
-
color
|
|
192
|
+
border: 1px solid @color-link;
|
|
193
|
+
color: @color-link;
|
|
194
194
|
padding: 3px 10px;
|
|
195
195
|
.r(2px);
|
|
196
196
|
.mt(5px);
|
package/src/single/Thx.vue
CHANGED
|
@@ -1,17 +1,48 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="w-thx">
|
|
3
3
|
<div class="w-thx-panel">
|
|
4
|
-
<boxcoin-admin
|
|
4
|
+
<boxcoin-admin
|
|
5
|
+
:postId="postId"
|
|
6
|
+
:postType="postType"
|
|
7
|
+
v-if="hasRight && adminBoxcoinEnable && boxcoin_enable"
|
|
8
|
+
:userId="userId"
|
|
9
|
+
:max="admin_max"
|
|
10
|
+
:min="admin_min"
|
|
11
|
+
:own="admin_left"
|
|
12
|
+
:total="admin_total"
|
|
13
|
+
:points="admin_points"
|
|
14
|
+
:authors="authors"
|
|
15
|
+
@updateRecord="updateRecord"
|
|
16
|
+
:client="client"
|
|
17
|
+
/>
|
|
5
18
|
<Like :postId="postId" :postType="postType"></Like>
|
|
6
19
|
<fav :postId="postId" :postType="postType" :postTitle="postTitle"></fav>
|
|
7
|
-
<boxcoin-user
|
|
20
|
+
<boxcoin-user
|
|
21
|
+
:postId="postId"
|
|
22
|
+
:postType="postType"
|
|
23
|
+
:boxcoin="boxcoin"
|
|
24
|
+
:userId="userId"
|
|
25
|
+
:own="user_left"
|
|
26
|
+
:points="user_points"
|
|
27
|
+
:authors="authors"
|
|
28
|
+
v-if="userBoxcoinEnable && boxcoin_enable"
|
|
29
|
+
@updateRecord="updateRecord"
|
|
30
|
+
:client="client"
|
|
31
|
+
/>
|
|
8
32
|
<Share :postId="postId" :postType="postType" :client="client" />
|
|
9
33
|
</div>
|
|
10
34
|
<div class="w-thx-records">
|
|
11
|
-
<boxcoin-records
|
|
35
|
+
<boxcoin-records
|
|
36
|
+
:postId="postId"
|
|
37
|
+
:postType="postType"
|
|
38
|
+
:postClient="client"
|
|
39
|
+
:cacheRecord="cacheRecord"
|
|
40
|
+
:mode="mode"
|
|
41
|
+
/>
|
|
12
42
|
</div>
|
|
13
43
|
<div class="w-thx-copyright">
|
|
14
|
-
©
|
|
44
|
+
©
|
|
45
|
+
所有原创作品,著作权归作者所有,所有未经授权的非署名转载或抄袭将有权追究法律责任,所有法律事务由专聘律师代理。<br />
|
|
15
46
|
签约作者独家特约稿件,及所有魔盒官方评分作品用户一经兑现则视为有偿付费稿件,所有商业稿件的转载引用需同时征得魔盒平台授权。
|
|
16
47
|
</div>
|
|
17
48
|
</div>
|
|
@@ -21,74 +52,96 @@
|
|
|
21
52
|
import Like from "../interact/Like2.vue";
|
|
22
53
|
import Share from "../interact/Share2.vue";
|
|
23
54
|
import Fav from "../interact/Fav2.vue";
|
|
24
|
-
import BoxcoinRecords from
|
|
25
|
-
import BoxcoinAdmin from
|
|
26
|
-
import BoxcoinUser from
|
|
27
|
-
import User from
|
|
28
|
-
import {getPostBoxcoinConfig,getBoxcoinStatus} from
|
|
55
|
+
import BoxcoinRecords from "../interact/boxcoin_records.vue";
|
|
56
|
+
import BoxcoinAdmin from "../interact/boxcoin_admin.vue";
|
|
57
|
+
import BoxcoinUser from "../interact/boxcoin_user.vue";
|
|
58
|
+
import User from "@jx3box/jx3box-common/js/user";
|
|
59
|
+
import { getPostBoxcoinConfig, getBoxcoinStatus } from "../../service/thx";
|
|
29
60
|
export default {
|
|
30
61
|
name: "Thx",
|
|
31
|
-
props: [
|
|
62
|
+
props: [
|
|
63
|
+
"postId",
|
|
64
|
+
"postType",
|
|
65
|
+
"postTitle",
|
|
66
|
+
"userId",
|
|
67
|
+
"adminBoxcoinEnable",
|
|
68
|
+
"userBoxcoinEnable",
|
|
69
|
+
"mode",
|
|
70
|
+
"authors",
|
|
71
|
+
"client",
|
|
72
|
+
],
|
|
32
73
|
components: {
|
|
33
74
|
Like,
|
|
34
75
|
Share,
|
|
35
76
|
Fav,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
77
|
+
"boxcoin-records": BoxcoinRecords,
|
|
78
|
+
"boxcoin-admin": BoxcoinAdmin,
|
|
79
|
+
"boxcoin-user": BoxcoinUser,
|
|
39
80
|
},
|
|
40
81
|
data: function () {
|
|
41
82
|
return {
|
|
42
|
-
boxcoin
|
|
43
|
-
hasRight
|
|
83
|
+
boxcoin: 0,
|
|
84
|
+
hasRight: User.getInfo().group >= 32,
|
|
44
85
|
user: User.getInfo(),
|
|
45
86
|
|
|
46
|
-
admin_max
|
|
47
|
-
admin_min
|
|
48
|
-
admin_left
|
|
87
|
+
admin_max: 0,
|
|
88
|
+
admin_min: 0,
|
|
89
|
+
admin_left: 0,
|
|
49
90
|
admin_total: 0,
|
|
50
|
-
admin_points
|
|
91
|
+
admin_points: [100],
|
|
51
92
|
|
|
52
|
-
user_left
|
|
53
|
-
user_points
|
|
93
|
+
user_left: 0,
|
|
94
|
+
user_points: [100],
|
|
54
95
|
|
|
55
96
|
cacheRecord: null,
|
|
56
|
-
boxcoin_enable
|
|
97
|
+
boxcoin_enable: 0,
|
|
57
98
|
};
|
|
58
99
|
},
|
|
59
100
|
computed: {
|
|
60
|
-
post_keys
|
|
61
|
-
return [this.postId,this.postType]
|
|
62
|
-
}
|
|
101
|
+
post_keys: function () {
|
|
102
|
+
return [this.postId, this.postType];
|
|
103
|
+
},
|
|
63
104
|
},
|
|
64
105
|
watch: {
|
|
65
|
-
post_keys
|
|
66
|
-
immediate
|
|
67
|
-
deep:true,
|
|
68
|
-
handler
|
|
69
|
-
this.postType && this.postId && this.loadBoxcoinConfig()
|
|
70
|
-
}
|
|
71
|
-
}
|
|
106
|
+
post_keys: {
|
|
107
|
+
immediate: true,
|
|
108
|
+
deep: true,
|
|
109
|
+
handler: function () {
|
|
110
|
+
this.postType && this.postId && this.loadBoxcoinConfig();
|
|
111
|
+
},
|
|
112
|
+
},
|
|
72
113
|
},
|
|
73
114
|
methods: {
|
|
74
|
-
loadBoxcoinConfig
|
|
75
|
-
User.isLogin() &&
|
|
76
|
-
this.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
115
|
+
loadBoxcoinConfig: function () {
|
|
116
|
+
User.isLogin() &&
|
|
117
|
+
getPostBoxcoinConfig(this.postType).then((res) => {
|
|
118
|
+
this.admin_max = res.data.data.limit.admin_max || 0;
|
|
119
|
+
this.admin_min = res.data.data.limit.admin_min || 0;
|
|
120
|
+
this.admin_points = res.data.data.limit.admin_points || [10, 1000];
|
|
121
|
+
this.admin_left = res.data.data.asManagerBoxCoinRemain || 0;
|
|
122
|
+
this.admin_total = res.data.data.asManagerBoxCoinTotal || 0;
|
|
81
123
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
124
|
+
this.user_points = res.data.data.limit.user_points || [10, 1000];
|
|
125
|
+
// 根据多端展示剩余币
|
|
126
|
+
// 作品是n端,接受n端币+all币,但转化为n端币
|
|
127
|
+
if (this.client == "origin") {
|
|
128
|
+
this.user_left = res.data.data.asUserBoxCoinRemainOrigin + res.data.data.asUserBoxCoinRemainAll;
|
|
129
|
+
} else if (this.client == "std") {
|
|
130
|
+
this.user_left = res.data.data.asUserBoxCoinRemainStd + res.data.data.asUserBoxCoinRemainAll;
|
|
131
|
+
} else {
|
|
132
|
+
this.user_left =
|
|
133
|
+
res.data.data.asUserBoxCoinRemainAll +
|
|
134
|
+
res.data.data.asUserBoxCoinRemainStd +
|
|
135
|
+
res.data.data.asUserBoxCoinRemainOrigin;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
85
138
|
getBoxcoinStatus().then((res) => {
|
|
86
|
-
this.boxcoin_enable = !!~~res.data.data.val
|
|
87
|
-
})
|
|
139
|
+
this.boxcoin_enable = !!~~res.data.data.val;
|
|
140
|
+
});
|
|
88
141
|
},
|
|
89
142
|
// 用户打赏
|
|
90
|
-
updateRecord: function (data){
|
|
91
|
-
this.cacheRecord = data
|
|
143
|
+
updateRecord: function (data) {
|
|
144
|
+
this.cacheRecord = data;
|
|
92
145
|
},
|
|
93
146
|
},
|
|
94
147
|
created: function () {},
|