@jx3box/jx3box-common-ui 7.2.0 → 7.2.2

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": "7.2.0",
3
+ "version": "7.2.2",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/App.vue CHANGED
@@ -39,13 +39,12 @@
39
39
  <el-button @click="visible = true">用户POP</el-button>
40
40
  <!-- :postId="23865" -->
41
41
  <Thx
42
- postType="bbs"
42
+ postType="bps"
43
43
  postTitle="bbs23865的标题"
44
- type="batchReward"
45
- :userId="7"
44
+ :userId="8"
46
45
  :adminBoxcoinEnable="true"
47
46
  :userBoxcoinEnable="true"
48
- :postId="[{ user_id: 10, article_id: '11111', article_type: '' }]"
47
+ :postId="5575"
49
48
  />
50
49
  <hr />
51
50
  <Like mode="heart" :count="100" :showCount="true" />
@@ -160,8 +160,8 @@ export default {
160
160
  getMyInfo().then((data) => {
161
161
  this.user = data;
162
162
  this.isSuperAuthor = !!data.sign;
163
-
164
- if (this.user.deleted) {
163
+ }).catch((err) => {
164
+ if (err?.data.code < -1) {
165
165
  this.logout(true);
166
166
  }
167
167
  });
@@ -79,11 +79,24 @@ export default {
79
79
  return this.total - this.left;
80
80
  },
81
81
  ready: function () {
82
- return this.isNotSelf && this.isEnough && this.count && this.remark;
82
+ // 不能给自己打赏,打赏目标不能是自己
83
+ // 打赏数量不能超过剩余数量
84
+ // 打赏数量不能为0
85
+ // 打赏寄语不能为空
86
+ return !!(
87
+ !this.isSelf &&
88
+ !this.targetIsSelf &&
89
+ this.isEnough &&
90
+ this.count &&
91
+ this.remark
92
+ );
83
93
  },
84
94
  isNotSelf: function () {
85
95
  return this.userId != User.getInfo().uid;
86
96
  },
97
+ targetIsSelf: function () {
98
+ return this.chosen == this.userId;
99
+ },
87
100
  isEnough: function () {
88
101
  return this.left && this.left >= this.count;
89
102
  },
@@ -52,7 +52,7 @@ export default {
52
52
  default: "normal",
53
53
  },
54
54
  postId: {
55
- type: Number,
55
+ type: [Number, Array],
56
56
  default: 0,
57
57
  },
58
58
  postType: {
@@ -77,7 +77,7 @@ export default {
77
77
  },
78
78
  client: {
79
79
  type: String,
80
- default: "origin",
80
+ default: "std",
81
81
  },
82
82
  allowGift: {
83
83
  type: Number,