@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 +1 -1
- package/assets/css/thx.less +5 -0
- package/package.json +1 -1
- package/src/App.vue +1 -1
- package/src/interact/boxcoin_user.vue +8 -2
- package/src/single/Thx.vue +13 -1
package/.env.staging
CHANGED
package/assets/css/thx.less
CHANGED
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -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
|
},
|
package/src/single/Thx.vue
CHANGED
|
@@ -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}`)
|
|
271
|
+
this.hasPermission = permissions.includes(`manage_boxcoin_${this.postType}`);
|
|
260
272
|
})
|
|
261
273
|
},
|
|
262
274
|
// 用户打赏
|