@jx3box/jx3box-common-ui 9.5.13 → 9.5.15

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/.env.staging CHANGED
@@ -1,7 +1,7 @@
1
1
  STATIC_PATH=mirror
2
2
  BASE_URL=/
3
3
 
4
- VUE_APP_CMS_API=http://cms.jx3box.com
4
+ VUE_APP_CMS_API=https://cms.jx3box.com
5
5
  VUE_APP_NEXT_API=/
6
6
  VUE_APP_PAY_API=/
7
7
  VUE_APP_TEAM_API=/
@@ -32,6 +32,11 @@
32
32
 
33
33
  .w-boxcoin-block{
34
34
  .pointer;
35
+
36
+ &.disabled{
37
+ opacity:0.5;
38
+ cursor:not-allowed;
39
+ }
35
40
  }
36
41
  .w-boxcoin-admin {
37
42
  .x(left);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "9.5.13",
3
+ "version": "9.5.15",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/App.vue CHANGED
@@ -278,7 +278,7 @@ export default {
278
278
  tab: "post",
279
279
 
280
280
  post: {},
281
- post_id: "19382",
281
+ post_id: "68836",
282
282
 
283
283
  author: "",
284
284
  wikiPost: null,
@@ -1,11 +1,17 @@
1
1
  <template>
2
2
  <div class="w-boxcoin-user" v-if="allowBoxcoin">
3
- <el-tooltip effect="dark" content="投币" placement="top-start">
3
+ <el-tooltip effect="dark" content="投币" placement="top-start" v-if="canGift">
4
4
  <div class="w-boxcoin-block" @click="openBoxcoinPop">
5
5
  <img class="u-icon" svg-inline :src="iconPath" />
6
6
  <span class="u-count" v-if="boxcoin">{{boxcoin}}</span>
7
7
  </div>
8
8
  </el-tooltip>
9
+ <el-tooltip effect="dark" content="您当前等级不够,不能够进行投币。" placement="top" v-else>
10
+ <div class="w-boxcoin-block disabled">
11
+ <img class="u-icon" svg-inline :src="iconPath" />
12
+ <span class="u-count" v-if="boxcoin">{{boxcoin}}</span>
13
+ </div>
14
+ </el-tooltip>
9
15
  <el-dialog title="投币打赏" :visible.sync="visible" custom-class="w-boxcoin-pop" append-to-body :close-on-click-modal="false">
10
16
  <div class="w-boxcoin-user-content">
11
17
  <div class="u-left">
@@ -55,7 +61,7 @@ import _ from "lodash";
55
61
  import { __cdn } from "@jx3box/jx3box-common/data/jx3box.json";
56
62
  export default {
57
63
  name: "BoxcoinUser",
58
- props: ["boxcoin", "postType", "postId", "userId", "own", "points", "authors",'client',"category"],
64
+ props: ["boxcoin", "postType", "postId", "userId", "own", "points", "authors",'client',"category","canGift"],
59
65
  components: {
60
66
  Contributors
61
67
  },
@@ -53,6 +53,7 @@
53
53
  :client="finalClient"
54
54
  :category="category"
55
55
  @updateRecord="updateRecord"
56
+ :canGift="lvEnough"
56
57
  />
57
58
  <watch-later :category="postType" :title="postTitle" :author-id="authorId" :banner="banner" :content-id="contentMetaId"></watch-later>
58
59
  <Share :postId="postId" :postType="postType" :client="client" />
@@ -189,6 +190,8 @@ export default {
189
190
 
190
191
  admin_boxcoin_visible: 1,
191
192
  hasPermission: false,
193
+
194
+ lvEnough: false, // 用户权限是否足够
192
195
  };
193
196
  },
194
197
  computed: {
@@ -254,9 +257,18 @@ export default {
254
257
  this.admin_boxcoin_visible = Number(res?.val)
255
258
  });
256
259
 
260
+ getConfig({
261
+ key: `level_has_gift_permission`
262
+ }).then((res) => {
263
+ User.isLogin() && User.getAsset().then((data) => {
264
+ const asset = data;
265
+ this.lvEnough = asset && asset.experience >= Number(res?.val);
266
+ });
267
+ });
268
+
257
269
  User.isLogin() && getUserPermission().then(res => {
258
270
  const permissions = res.data.data.permission?.map(item => item.action)
259
- this.hasPermission = permissions.includes(`manage_boxcoin_${this.postType}`) || User.isSuperAdmin();
271
+ this.hasPermission = permissions.includes(`manage_boxcoin_${this.postType}`);
260
272
  })
261
273
  },
262
274
  // 用户打赏