@jx3box/jx3box-vue3-ui 1.1.7 → 1.1.8

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.
@@ -36,6 +36,11 @@
36
36
 
37
37
  .w-boxcoin-block {
38
38
  .pointer;
39
+
40
+ &.disabled{
41
+ opacity:0.5;
42
+ cursor:not-allowed;
43
+ }
39
44
  }
40
45
  .w-boxcoin-admin {
41
46
  .x(left);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-vue3-ui",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "JX3BOX Vue3 UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,5 +1,8 @@
1
1
  <template>
2
2
  <el-form ref="form" :model="newComment" class="c-comment-box">
3
+ <div class="u-mask">
4
+ 参与评论,需先进行<a href="/dashboard/auth" class="u-link">账号认证</a>。
5
+ </div>
3
6
  <el-form-item>
4
7
  <el-input
5
8
  rows="3"
@@ -156,4 +159,24 @@ export default {
156
159
  }
157
160
  }
158
161
  }
162
+ .c-comment-box {
163
+ .pr;
164
+
165
+ .u-mask {
166
+ .pa;
167
+ top: 0;
168
+ left: 0;
169
+ width: 100%;
170
+ height: 100%;
171
+ background: rgba(255, 255, 255, 0.8);
172
+ z-index: 10;
173
+ display: none;
174
+ text-align: center;
175
+ align-content: center;
176
+ }
177
+
178
+ .u-link {
179
+ color: @primary;
180
+ }
181
+ }
159
182
  </style>
@@ -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
10
16
  title="投币打赏"
11
17
  v-model="visible"
@@ -68,7 +74,7 @@ import { debounce } from "lodash";
68
74
  import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
69
75
  export default {
70
76
  name: "BoxcoinUser",
71
- props: ["boxcoin", "postType", "postId", "userId", "own", "points", "authors", "client"],
77
+ props: ["boxcoin", "postType", "postId", "userId", "own", "points", "authors", "client","category","canGift"],
72
78
  components: {
73
79
  Contributors,
74
80
  },
@@ -139,6 +145,7 @@ export default {
139
145
  rewardBoxcoin(this.postType, this.postId, this.chosen || this.userId, count, {
140
146
  remark: this.remark,
141
147
  client: this.client || this.hostClient,
148
+ redirect: this.category ? `/${this.category}/${this.postId}` : undefined
142
149
  })
143
150
  .then((res) => {
144
151
  this.$message({
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <el-container class="c-comment" v-loading="loading">
2
+ <el-container class="c-comment" :class="{ 'c-comment-mask': showMask }" v-loading="loading">
3
3
  <el-main>
4
4
  <CommentInputForm @submit="userSubmitInputForm" />
5
5
  <div class="c-comment-panel">
@@ -85,6 +85,8 @@ import { showAvatar, authorLink } from "@jx3box/jx3box-common/js/utils";
85
85
  import CommentInputForm from "../comment/CommentInputForm.vue";
86
86
  import CommentWithReply from "../comment/CommentWithReply.vue";
87
87
  import { GET, POST, DELETE, PUT, getOrderMode, setOrderMode } from "../../service/comment";
88
+ import { getConfig } from "../../service/cms";
89
+ import User from "@jx3box/jx3box-common/js/user";
88
90
  export default {
89
91
  name: "CommentComp",
90
92
  props: ["id", "category", "normal", "order"],
@@ -111,6 +113,8 @@ export default {
111
113
  orderByLikes: false,
112
114
  openWhiteList: false,
113
115
  loading: false,
116
+
117
+ showMask: false,
114
118
  };
115
119
  },
116
120
  computed: {
@@ -279,6 +283,16 @@ export default {
279
283
  .finally(() => {
280
284
  this.reloadCommentList(1);
281
285
  });
286
+
287
+ getConfig({
288
+ key: "comment_strict",
289
+ }).then((res) => {
290
+ if (res.val == 1) {
291
+ if (User.isLogin()) {
292
+ this.showMask = User.getInfo().group < 16;
293
+ }
294
+ }
295
+ });
282
296
  },
283
297
  };
284
298
  </script>
@@ -293,6 +307,11 @@ export default {
293
307
  color: #fff !important;
294
308
  }
295
309
  }
310
+ .c-comment-mask {
311
+ .u-mask {
312
+ display: block;
313
+ }
314
+ }
296
315
  .u-uploader {
297
316
  margin-top: 10px;
298
317
  }
@@ -33,6 +33,7 @@
33
33
  @updateRecord="updateRecord"
34
34
  :client="finalClient"
35
35
  :category="category"
36
+ :can-gift="lvEnough"
36
37
  />
37
38
  <Share :postId="postId" :postType="postType" :client="client" />
38
39
  <watch-later :category="postType" :title="postTitle" :author-id="authorId" :banner="banner" :content-id="contentMetaId"></watch-later>
@@ -161,6 +162,8 @@ export default {
161
162
 
162
163
  admin_boxcoin_visible: 1,
163
164
  hasPermission: false,
165
+
166
+ lvEnough: false, // 用户等级是否足够
164
167
  };
165
168
  },
166
169
  computed: {
@@ -226,6 +229,16 @@ export default {
226
229
  this.admin_boxcoin_visible = Number(res?.val)
227
230
  });
228
231
 
232
+ getConfig({
233
+ key: `level_has_gift_permission`
234
+ }).then((res) => {
235
+ User.isLogin() && User.getAsset().then((data) => {
236
+ const asset = data;
237
+ this.lvEnough = asset && asset.experience >= Number(res?.val);
238
+ });
239
+ });
240
+
241
+
229
242
  User.isLogin() && getUserPermission().then(res => {
230
243
  const permissions = res.data.data.permission?.map(item => item.action)
231
244
  this.hasPermission = permissions.includes(`manage_boxcoin_${this.postType}`)
package/vue.config.js CHANGED
@@ -48,7 +48,7 @@ module.exports = {
48
48
  },
49
49
  },
50
50
  "/api/cms": {
51
- target: process.env["DEV_SERVER"] == "true" ? "http://localhost:7100" : "https://cms.jx3box.com",
51
+ target: "https://cms.jx3box.com",
52
52
  },
53
53
  "/api/article": {
54
54
  target: "https://next2.jx3box.com",