@jx3box/jx3box-common-ui 8.2.14 → 8.2.16

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.2.14",
3
+ "version": "8.2.16",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -31,7 +31,7 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@jx3box/jx3box-comment-ui": "^1.8.7",
34
- "@jx3box/jx3box-common": "^8.2.4",
34
+ "@jx3box/jx3box-common": "^8.2.7",
35
35
  "@jx3box/jx3box-data": "^3.5.6",
36
36
  "@jx3box/jx3box-editor": "^2.1.7",
37
37
  "@jx3box/reporter": "^0.0.4",
@@ -40,8 +40,7 @@ export default {
40
40
  clients = Object.assign({}, clients, {
41
41
  all: "全端",
42
42
  });
43
- }
44
- console.log(clients)
43
+ }
45
44
  return clients;
46
45
  },
47
46
  },
@@ -6,15 +6,15 @@
6
6
  <ul class="u-menu u-pop-content">
7
7
  <li v-for="item in userPanel" :key="item.label">
8
8
  <a :href="item.link" :target="item.target || '_self'" class="u-menu-item">
9
- <img :src="resolveImg(item.icon)" svg-inline class="u-menu-icon" :alt="item.icon">
9
+ <img :src="resolveImg(item.icon)" svg-inline class="u-menu-icon" :alt="item.icon" />
10
10
  {{ item.label }}
11
11
  </a>
12
12
  </li>
13
13
  <hr v-if="userPanel.length" />
14
- <template v-if="isEditor">
14
+ <template v-if="isTeammate">
15
15
  <li v-for="item in adminPanel" :key="item.label">
16
16
  <a :href="item.link" :target="item.target || '_self'" class="u-menu-item">
17
- <img :src="resolveImg(item.icon)" svg-inline class="u-menu-icon" :alt="item.icon">
17
+ <img :src="resolveImg(item.icon)" svg-inline class="u-menu-icon" :alt="item.icon" />
18
18
  {{ item.label }}
19
19
  </a>
20
20
  </li>
@@ -46,8 +46,8 @@ export default {
46
46
  return item.onlyAdmin;
47
47
  });
48
48
  },
49
- isEditor() {
50
- return User.isEditor();
49
+ isTeammate() {
50
+ return JSON.parse(sessionStorage.getItem("is_teammate"));
51
51
  },
52
52
  },
53
53
  mounted() {
@@ -72,7 +72,7 @@ export default {
72
72
  },
73
73
  resolveImg: function (img) {
74
74
  // return __imgPath + "image/header/panel/" + img;
75
- return 'https://img.jx3box.com/image/box/pvp.svg'
75
+ return "https://img.jx3box.com/image/box/pvp.svg";
76
76
  },
77
77
  },
78
78
  };
@@ -92,7 +92,6 @@ export default {
92
92
  svg {
93
93
  .size(19px);
94
94
  }
95
-
96
95
  }
97
96
  .u-menu {
98
97
  .u-menu-item {
@@ -103,7 +102,7 @@ export default {
103
102
  .u-menu-icon {
104
103
  width: 16px;
105
104
  height: 16px;
106
- }
105
+ }
107
106
  }
108
107
  }
109
108
  </style>
@@ -13,14 +13,14 @@
13
13
  <li>
14
14
  <a :href="url.publish">发布中心</a>
15
15
  </li>
16
- <hr>
16
+ <hr />
17
17
  <li v-for="item in userPanel" :key="item.label">
18
18
  <a :href="item.link" :target="item.target || '_self'">
19
19
  <!-- <i :class="item.icon || 'el-icon-present'"></i> -->
20
20
  {{ item.label }}
21
21
  </a>
22
22
  </li>
23
- <template v-if="isEditor">
23
+ <template v-if="isTeammate">
24
24
  <li v-for="item in adminPanel" :key="item.label">
25
25
  <a :href="item.link" :target="item.target || '_self'">
26
26
  <!-- <i :class="item.icon || 'el-icon-present'"></i> -->
@@ -41,14 +41,27 @@
41
41
  showUserName(user.display_name)
42
42
  }}</a>
43
43
  <a class="u-sign" href="/dashboard/cooperation">
44
- <img :src="super_author_icon" class="u-superauthor-profile" alt="superauthor" title="签约作者" :class="{ off: !isSuperAuthor }" /></a>
45
- <a class="u-vip" href="/vip/premium?from=header_usermenu" target="_blank" title="专业版账号">
44
+ <img
45
+ :src="super_author_icon"
46
+ class="u-superauthor-profile"
47
+ alt="superauthor"
48
+ title="签约作者"
49
+ :class="{ off: !isSuperAuthor }"
50
+ /></a>
51
+ <a
52
+ class="u-vip"
53
+ href="/vip/premium?from=header_usermenu"
54
+ target="_blank"
55
+ title="专业版账号"
56
+ >
46
57
  <i class="i-icon-vip" :class="{ on: isPRO }">{{ vipType }}</i>
47
58
  <span class="u-expire" v-if="isPRO">(有效期至:{{ pro_expire_date }})</span>
48
59
  </a>
49
60
  </div>
50
61
  <div class="u-id">
51
- <span>魔盒UID:<b>{{ user.ID }}</b></span>
62
+ <span
63
+ >魔盒UID:<b>{{ user.ID }}</b></span
64
+ >
52
65
  <i class="el-icon-document-copy u-copy" @click.stop="copyText(user.ID)"></i>
53
66
  </div>
54
67
  </div>
@@ -62,7 +75,8 @@
62
75
  <div class="u-other">
63
76
  <a href="/dashboard/fav" class="u-item"><i class="el-icon-star-off"></i>收藏订阅 </a>
64
77
  <a href="/team/role/manage" class="u-item"><i class="el-icon-user"></i>角色管理 </a>
65
- <a href="/dashboard/purchases" class="u-item"><i class="el-icon-shopping-cart-2"></i>已购资源
78
+ <a href="/dashboard/purchases" class="u-item"
79
+ ><i class="el-icon-shopping-cart-2"></i>已购资源
66
80
  </a>
67
81
  <a href="/dashboard/mall" class="u-item"><i class="el-icon-shopping-bag-1"></i>订单中心 </a>
68
82
  <hr />
@@ -134,11 +148,11 @@ export default {
134
148
  return item.onlyAdmin;
135
149
  });
136
150
  },
137
- isEditor() {
138
- return User.isEditor();
151
+ isTeammate() {
152
+ return JSON.parse(sessionStorage.getItem("is_teammate"));
139
153
  },
140
- pro_expire_date: function() {
141
- return this.asset.pro_expire_date ? showDate(this.asset.pro_expire_date) : '-';
154
+ pro_expire_date: function () {
155
+ return this.asset.pro_expire_date ? showDate(this.asset.pro_expire_date) : "-";
142
156
  },
143
157
  },
144
158
  mounted() {
@@ -174,6 +188,7 @@ export default {
174
188
  .then((data) => {
175
189
  this.user = data;
176
190
  this.isSuperAuthor = !!data.sign;
191
+ sessionStorage.setItem("is_teammate", JSON.stringify(data.is_teammate));
177
192
  })
178
193
  .catch((err) => {
179
194
  if (err?.data.code < -1) {
@@ -114,7 +114,7 @@ export default {
114
114
  methods: {
115
115
  loadData: function () {
116
116
  getPostBoxcoinRecords(this.postType, this.postId, this.params).then((res) => {
117
- this.list = res.data.data.list;
117
+ this.list = res.data.data?.list || [];
118
118
  this.total = res.data.data.page.total;
119
119
  this.boxcoin = res.data.data.fromManager + res.data.data.fromUser;
120
120
  this.$parent.boxcoin = this.boxcoin;