@jx3box/jx3box-common-ui 8.5.4 → 8.5.6
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/package.json +2 -2
- package/src/header/nav.vue +27 -14
- package/src/single/Thx.vue +12 -6
- package/src/single/cms-single.vue +15 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jx3box/jx3box-common-ui",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.6",
|
|
4
4
|
"description": "JX3BOX UI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -68,4 +68,4 @@
|
|
|
68
68
|
"type": "git",
|
|
69
69
|
"url": "git+https://github.com/JX3BOX/jx3box-common-ui.git"
|
|
70
70
|
}
|
|
71
|
-
}
|
|
71
|
+
}
|
package/src/header/nav.vue
CHANGED
|
@@ -132,16 +132,29 @@ import { getMenu } from "../../service/header";
|
|
|
132
132
|
import { trimSlash } from "../../assets/js/utils";
|
|
133
133
|
|
|
134
134
|
const activeNav = {
|
|
135
|
-
index: [
|
|
136
|
-
macro: [
|
|
137
|
-
tool: [
|
|
138
|
-
bps: [
|
|
139
|
-
fb: [
|
|
140
|
-
cj: [
|
|
141
|
-
pvx: [
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
135
|
+
index: ["index"],
|
|
136
|
+
macro: ["macro", "pz"],
|
|
137
|
+
tool: ["app", "jx3dat", "dbm", "tool"],
|
|
138
|
+
bps: ["bps", "jcl", "battle"],
|
|
139
|
+
fb: ["fb", "baizhan", "team", "jdt", "rank"],
|
|
140
|
+
cj: ["wiki", "item", "knowledge", "quest", "cj"],
|
|
141
|
+
pvx: [
|
|
142
|
+
"face",
|
|
143
|
+
"adventure",
|
|
144
|
+
"pvg",
|
|
145
|
+
"pvx",
|
|
146
|
+
"homeland",
|
|
147
|
+
"pet",
|
|
148
|
+
"horse",
|
|
149
|
+
"furniture",
|
|
150
|
+
"reputation",
|
|
151
|
+
"book",
|
|
152
|
+
"exam",
|
|
153
|
+
"body",
|
|
154
|
+
],
|
|
155
|
+
bbs: ["bbs", "topic", "emotion", "joke", "namespace", "collection", "community"],
|
|
156
|
+
pvp: ["pvp"],
|
|
157
|
+
};
|
|
145
158
|
|
|
146
159
|
export default {
|
|
147
160
|
props: [],
|
|
@@ -178,13 +191,13 @@ export default {
|
|
|
178
191
|
return location.href.includes("origin") ? "origin" : "std";
|
|
179
192
|
},
|
|
180
193
|
prefix() {
|
|
181
|
-
return this.client ===
|
|
182
|
-
}
|
|
194
|
+
return this.client === "std" ? "www" : "origin";
|
|
195
|
+
},
|
|
183
196
|
},
|
|
184
197
|
methods: {
|
|
185
198
|
isFocus: function (type) {
|
|
186
|
-
let active =
|
|
187
|
-
const pathname = location.pathname?.split(
|
|
199
|
+
let active = "";
|
|
200
|
+
const pathname = location.pathname?.split("/")?.filter(Boolean)?.[0] || "";
|
|
188
201
|
for (const key in activeNav) {
|
|
189
202
|
if (pathname && activeNav[key].includes(pathname)) {
|
|
190
203
|
active = key;
|
package/src/single/Thx.vue
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
:own="admin_left"
|
|
11
11
|
:points="admin_points"
|
|
12
12
|
:authors="authors"
|
|
13
|
-
:client="
|
|
13
|
+
:client="finalClient"
|
|
14
14
|
v-if="hasRight && adminBoxcoinEnable && boxcoin_enable"
|
|
15
15
|
:max="admin_max"
|
|
16
16
|
:min="admin_min"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
:points="admin_points"
|
|
33
33
|
:authors="authors"
|
|
34
34
|
@updateRecord="updateRecord"
|
|
35
|
-
:client="
|
|
35
|
+
:client="finalClient"
|
|
36
36
|
/>
|
|
37
37
|
<Like :postId="postId" :postType="postType"></Like>
|
|
38
38
|
<fav :postId="postId" :postType="postType" :postTitle="postTitle"></fav>
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
:authors="authors"
|
|
47
47
|
v-if="userBoxcoinEnable && boxcoin_enable && allowGift"
|
|
48
48
|
@updateRecord="updateRecord"
|
|
49
|
-
:client="
|
|
49
|
+
:client="finalClient"
|
|
50
50
|
/>
|
|
51
51
|
<Share :postId="postId" :postType="postType" :client="client" />
|
|
52
52
|
</div>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<boxcoin-records
|
|
55
55
|
:postId="postId"
|
|
56
56
|
:postType="postType"
|
|
57
|
-
:postClient="
|
|
57
|
+
:postClient="finalClient"
|
|
58
58
|
:cacheRecord="cacheRecord"
|
|
59
59
|
:mode="mode"
|
|
60
60
|
/>
|
|
@@ -158,6 +158,12 @@ export default {
|
|
|
158
158
|
post_keys: function () {
|
|
159
159
|
return [this.postId, this.postType];
|
|
160
160
|
},
|
|
161
|
+
finalClient: function() {
|
|
162
|
+
if (this.client == 'wujie') {
|
|
163
|
+
return "std"
|
|
164
|
+
}
|
|
165
|
+
return this.client
|
|
166
|
+
}
|
|
161
167
|
},
|
|
162
168
|
watch: {
|
|
163
169
|
post_keys: {
|
|
@@ -181,9 +187,9 @@ export default {
|
|
|
181
187
|
this.user_points = res.data.data.limit.user_points || [10, 1000];
|
|
182
188
|
// 根据多端展示剩余币
|
|
183
189
|
// 作品是n端,接受n端币+all币
|
|
184
|
-
if (this.
|
|
190
|
+
if (this.finalClient == "origin") {
|
|
185
191
|
this.user_left = res.data.data.asUserBoxCoinRemainOrigin + res.data.data.asUserBoxCoinRemainAll;
|
|
186
|
-
} else if (this.
|
|
192
|
+
} else if (this.finalClient == "std") {
|
|
187
193
|
this.user_left = res.data.data.asUserBoxCoinRemainStd + res.data.data.asUserBoxCoinRemainAll;
|
|
188
194
|
} else {
|
|
189
195
|
this.user_left =
|
|
@@ -164,6 +164,9 @@ export default {
|
|
|
164
164
|
post_client: function () {
|
|
165
165
|
return this.post?.client || "all";
|
|
166
166
|
},
|
|
167
|
+
community_id: function () {
|
|
168
|
+
return this.post?.community_id || 0;
|
|
169
|
+
},
|
|
167
170
|
},
|
|
168
171
|
methods: {
|
|
169
172
|
updateCollection: function (val) {
|
|
@@ -204,6 +207,18 @@ export default {
|
|
|
204
207
|
}
|
|
205
208
|
},
|
|
206
209
|
},
|
|
210
|
+
community_id: {
|
|
211
|
+
immediate: true,
|
|
212
|
+
handler(val) {
|
|
213
|
+
if (val && val != 0) {
|
|
214
|
+
// 防止死循环
|
|
215
|
+
if (location.href.includes(`/community/${val}`)) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
location.href = `/community/${val}`;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
207
222
|
},
|
|
208
223
|
};
|
|
209
224
|
</script>
|