@jx3box/jx3box-common-ui 8.5.4 → 8.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "8.5.4",
3
+ "version": "8.5.5",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -10,7 +10,7 @@
10
10
  :own="admin_left"
11
11
  :points="admin_points"
12
12
  :authors="authors"
13
- :client="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="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="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="client"
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.client == "origin") {
190
+ if (this.finalClient == "origin") {
185
191
  this.user_left = res.data.data.asUserBoxCoinRemainOrigin + res.data.data.asUserBoxCoinRemainAll;
186
- } else if (this.client == "std") {
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>