@jx3box/jx3box-common-ui 7.8.8 → 7.9.0

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.
@@ -412,6 +412,11 @@ body {
412
412
  border-top-right-radius: 4px;
413
413
  }
414
414
 
415
+ .u-expire {
416
+ font-size: 12px;
417
+ color: #999;
418
+ }
419
+
415
420
  .u-basic {
416
421
  .flex;
417
422
  align-items: center;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "7.8.8",
3
+ "version": "7.9.0",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -31,8 +31,8 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@jx3box/jx3box-comment-ui": "^1.7.16",
34
- "@jx3box/jx3box-common": "^8.0.2",
35
- "@jx3box/jx3box-data": "^3.5.2",
34
+ "@jx3box/jx3box-common": "^8.0.3",
35
+ "@jx3box/jx3box-data": "^3.5.3",
36
36
  "@jx3box/jx3box-editor": "^1.9.9",
37
37
  "@jx3box/reporter": "^0.0.4",
38
38
  "axios": "^0.26.1",
@@ -130,6 +130,19 @@
130
130
  import default_nav from "../../assets/data/nav.json";
131
131
  import { getMenu } from "../../service/header";
132
132
  import { trimSlash } from "../../assets/js/utils";
133
+
134
+ const activeNav = {
135
+ index: ['index'],
136
+ macro: ['macro', 'pz'],
137
+ tool: ['app', 'jx3dat', 'dbm'],
138
+ bps: ['bps', 'jcl', 'battle'],
139
+ fb: ['fb','baizhan','team', 'jdt', 'rank'],
140
+ cj: ['cj', 'item', 'knowledge', 'quest'],
141
+ pvx: ['face', 'adventure', 'pvg'],
142
+ bbs: ['bbs','topic','event'],
143
+ pvp: ['pvp']
144
+ }
145
+
133
146
  export default {
134
147
  props: [],
135
148
  data: function () {
@@ -170,7 +183,15 @@ export default {
170
183
  },
171
184
  methods: {
172
185
  isFocus: function (type) {
173
- return location.pathname.includes(type);
186
+ let active = '';
187
+ const pathname = location.pathname?.split('/')?.filter(Boolean)?.[0] || '';
188
+ for (const key in activeNav) {
189
+ if (activeNav[key].includes(pathname)) {
190
+ active = key;
191
+ break;
192
+ }
193
+ }
194
+ return type.includes(active);
174
195
  },
175
196
  matchedClient: function (client) {
176
197
  return client == "all" ? true : client == this.client;
@@ -44,6 +44,7 @@
44
44
  <img :src="super_author_icon" class="u-superauthor-profile" alt="superauthor" title="签约作者" :class="{ off: !isSuperAuthor }" /></a>
45
45
  <a class="u-vip" href="/vip/premium?from=header_usermenu" target="_blank" title="专业版账号">
46
46
  <i class="i-icon-vip" :class="{ on: isPRO }">{{ vipType }}</i>
47
+ <span class="u-expire" v-if="isPRO">(有效期至:{{ pro_expire_date }})</span>
47
48
  </a>
48
49
  </div>
49
50
  <div class="u-id">
@@ -81,6 +82,7 @@
81
82
  import User from "@jx3box/jx3box-common/js/user";
82
83
  import { showAvatar } from "@jx3box/jx3box-common/js/utils";
83
84
  import { getMyInfo } from "../../service/author";
85
+ import { showDate } from "@jx3box/jx3box-common/js/moment";
84
86
  import { __Links, __Root, __imgPath, __OriginRoot } from "@jx3box/jx3box-common/data/jx3box.json";
85
87
  import { copyText } from "../../assets/js/utils";
86
88
  import { getMenu } from "../../service/header";
@@ -135,6 +137,9 @@ export default {
135
137
  isEditor() {
136
138
  return User.isEditor();
137
139
  },
140
+ pro_expire_date: function() {
141
+ return this.asset.pro_expire_date ? showDate(this.asset.pro_expire_date) : '-';
142
+ },
138
143
  },
139
144
  mounted() {
140
145
  this.loadMyInfo();