@jx3box/jx3box-common-ui 5.8.2 → 5.8.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/header.less
CHANGED
package/package.json
CHANGED
package/src/header/user.vue
CHANGED
|
@@ -116,6 +116,7 @@ import {
|
|
|
116
116
|
__Links,
|
|
117
117
|
__Root,
|
|
118
118
|
__imgPath,
|
|
119
|
+
__OriginRoot,
|
|
119
120
|
} from "@jx3box/jx3box-common/data/jx3box.json";
|
|
120
121
|
import panel from "../../assets/data/panel.json";
|
|
121
122
|
import { getMsg, getMenu } from "../../service/header";
|
|
@@ -203,6 +204,9 @@ export default {
|
|
|
203
204
|
super_author_icon: function () {
|
|
204
205
|
return __imgPath + "image/user/" + "superauthor.svg";
|
|
205
206
|
},
|
|
207
|
+
siteRoot : function (){
|
|
208
|
+
return location.host.includes('origin') ? __OriginRoot : __Root
|
|
209
|
+
}
|
|
206
210
|
},
|
|
207
211
|
watch: {
|
|
208
212
|
fold(val) {
|
|
@@ -250,7 +254,7 @@ export default {
|
|
|
250
254
|
.then((res) => {
|
|
251
255
|
this.isLogin = false;
|
|
252
256
|
if (location.pathname.startsWith('/dashboard') || location.pathname.startsWith('/publish')) {
|
|
253
|
-
location.href =
|
|
257
|
+
location.href = this.siteRoot;
|
|
254
258
|
}
|
|
255
259
|
})
|
|
256
260
|
.then(() => {
|
|
@@ -57,7 +57,7 @@ import { getBreadcrumb } from "@jx3box/jx3box-common/js/api_misc";
|
|
|
57
57
|
import Contributors from './Contributors.vue';
|
|
58
58
|
export default {
|
|
59
59
|
name: "BoxcoinAdmin",
|
|
60
|
-
props: ["postType", "postId", "userId", "own", "total", "points", "max", "min", 'authors'],
|
|
60
|
+
props: ["postType", "postId", "userId", "own", "total", "points", "max", "min", 'authors','client'],
|
|
61
61
|
components: {
|
|
62
62
|
Contributors
|
|
63
63
|
},
|
|
@@ -89,9 +89,9 @@ export default {
|
|
|
89
89
|
allowBoxcoin : function (){
|
|
90
90
|
return this.postType && this.postId && (this.userId || (this.authors && this.authors.length))
|
|
91
91
|
},
|
|
92
|
-
|
|
92
|
+
hostClient : function (){
|
|
93
93
|
return location.href.includes('origin') ? 'origin' : 'std'
|
|
94
|
-
}
|
|
94
|
+
},
|
|
95
95
|
},
|
|
96
96
|
watch: {
|
|
97
97
|
own : function (val){
|
|
@@ -110,7 +110,7 @@ export default {
|
|
|
110
110
|
this.submitting = true;
|
|
111
111
|
grantBoxcoin(this.postType, this.postId, this.chosen || this.userId, this.count, {
|
|
112
112
|
remark: this.remark,
|
|
113
|
-
client : this.client
|
|
113
|
+
client : this.client || this.hostClient
|
|
114
114
|
})
|
|
115
115
|
.then((res) => {
|
|
116
116
|
this.$message({
|
|
@@ -51,7 +51,7 @@ import User from "@jx3box/jx3box-common/js/user";
|
|
|
51
51
|
import Contributors from './Contributors.vue';
|
|
52
52
|
export default {
|
|
53
53
|
name: "BoxcoinUser",
|
|
54
|
-
props: ["boxcoin", "postType", "postId", "userId", "own", "points", "authors"],
|
|
54
|
+
props: ["boxcoin", "postType", "postId", "userId", "own", "points", "authors",'client'],
|
|
55
55
|
components: {
|
|
56
56
|
Contributors
|
|
57
57
|
},
|
|
@@ -82,7 +82,7 @@ export default {
|
|
|
82
82
|
allowBoxcoin : function (){
|
|
83
83
|
return this.postType && this.postId && (this.userId || (this.authors && this.authors.length))
|
|
84
84
|
},
|
|
85
|
-
|
|
85
|
+
hostClient : function (){
|
|
86
86
|
return location.href.includes('origin') ? 'origin' : 'std'
|
|
87
87
|
}
|
|
88
88
|
},
|
|
@@ -106,7 +106,7 @@ export default {
|
|
|
106
106
|
submit: function () {
|
|
107
107
|
rewardBoxcoin(this.postType, this.postId, this.chosen || this.userId, this.count, {
|
|
108
108
|
remark: this.remark,
|
|
109
|
-
client : this.client
|
|
109
|
+
client : this.client || this.hostClient
|
|
110
110
|
})
|
|
111
111
|
.then((res) => {
|
|
112
112
|
this.$message({
|
package/src/single/Thx.vue
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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" :max="admin_max" :min="admin_min" :own="admin_left" :total="admin_total" :points="admin_points" :authors="authors" @updateRecord="updateRecord" />
|
|
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"
|
|
8
|
-
<Share :postId="postId" :postType="postType" />
|
|
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
|
+
<Share :postId="postId" :postType="postType" :client="client" />
|
|
9
9
|
</div>
|
|
10
10
|
<div class="w-thx-records">
|
|
11
11
|
<boxcoin-records :postId="postId" :postType="postType" :cacheRecord="cacheRecord" :mode="mode"/>
|
|
@@ -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", "postTitle", "userId","adminBoxcoinEnable","userBoxcoinEnable",'mode', 'authors'],
|
|
31
|
+
props: ["postId", "postType", "postTitle", "userId","adminBoxcoinEnable","userBoxcoinEnable",'mode', 'authors',"client"],
|
|
32
32
|
components: {
|
|
33
33
|
Like,
|
|
34
34
|
Share,
|
|
@@ -97,4 +97,4 @@ export default {
|
|
|
97
97
|
|
|
98
98
|
<style lang="less">
|
|
99
99
|
@import "../../assets/css/thx.less";
|
|
100
|
-
</style>
|
|
100
|
+
</style>
|
|
@@ -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" :postTitle="post_title" :userId="author_id" :adminBoxcoinEnable="true" :userBoxcoinEnable="true" :authors="authors" />
|
|
36
|
+
<Thx class="m-single-thx" :postId="id" :postType="post_type" :postTitle="post_title" :userId="author_id" :adminBoxcoinEnable="true" :userBoxcoinEnable="true" :authors="authors" :client="post_client"/>
|
|
37
37
|
|
|
38
38
|
<!-- 评论 -->
|
|
39
39
|
<div class="m-single-comment">
|
|
@@ -133,6 +133,9 @@ export default {
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
return []
|
|
136
|
+
},
|
|
137
|
+
post_client : function (){
|
|
138
|
+
return this.post?.client || 'all'
|
|
136
139
|
}
|
|
137
140
|
},
|
|
138
141
|
methods : {
|