@jx3box/jx3box-common-ui 9.0.10 → 9.0.12

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": "9.0.10",
3
+ "version": "9.0.12",
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.9.9",
34
- "@jx3box/jx3box-common": "^8.4.9",
34
+ "@jx3box/jx3box-common": "^8.5.2",
35
35
  "@jx3box/jx3box-data": "^3.7.0",
36
36
  "@jx3box/jx3box-editor": "^2.2.16",
37
37
  "@jx3box/reporter": "^0.0.4",
package/service/header.js CHANGED
@@ -2,10 +2,14 @@ import axios from "axios";
2
2
  import { $helper, $cms, $next } from "@jx3box/jx3box-common/js/https.js";
3
3
  import { __dataPath } from "@jx3box/jx3box-common/data/jx3box.json";
4
4
 
5
- function getMsg() {
5
+ function getLetter() {
6
6
  return $next({ mute: true }).get("/api/letter/unread/count");
7
7
  }
8
8
 
9
+ function getMsg() {
10
+ return $next({ mute: true }).get("/api/next2/userdata/messages/unread_total");
11
+ }
12
+
9
13
  function getNav(client = "std") {
10
14
  let file = client == "origin" ? "header_nav_origin.json" : "header_nav.json";
11
15
  return axios.get(__dataPath + `data/box/${file}`);
@@ -28,4 +32,4 @@ function getGames() {
28
32
  return axios.get(__dataPath + 'data/product/games.json')
29
33
  }
30
34
 
31
- export { getMsg, getNav, getPanel, getBox, getMenu, getGames };
35
+ export { getLetter, getNav, getPanel, getBox, getMenu, getGames, getMsg };
@@ -13,7 +13,7 @@
13
13
 
14
14
  <script>
15
15
  import { __Links } from "@jx3box/jx3box-common/data/jx3box.json";
16
- import { getMsg } from "../../service/header";
16
+ import { getLetter, getMsg } from "../../service/header";
17
17
  export default {
18
18
  name: "message",
19
19
  data: function () {
@@ -27,10 +27,10 @@ export default {
27
27
  },
28
28
  methods: {
29
29
  // 消息
30
- checkMSG: function () {
31
- getMsg().then((res) => {
32
- this.pop = !!(Math.max(~~res.data.data.letter, 0) + ~~res.data.data.message);
33
- });
30
+ checkMSG: async function () {
31
+ const letterRes = await getLetter();
32
+ const msgRes = await getMsg();
33
+ this.pop = !!(Math.max(~~letterRes.data.data.letter, 0) || Math.max(~~msgRes.data.data.unread_count, 0));
34
34
  },
35
35
  },
36
36
  };
package/vue.config.js CHANGED
@@ -45,7 +45,8 @@ module.exports = {
45
45
  },
46
46
  },
47
47
  "/api/cms": {
48
- target: process.env["DEV_SERVER"] == "true" ? "http://localhost:7100" : "https://cms.jx3box.com",
48
+ target: "https://cms.jx3box.com",
49
+ // target: process.env["DEV_SERVER"] == "true" ? "http://localhost:7100" : "https://cms.jx3box.com",
49
50
  },
50
51
  "/api/article": {
51
52
  target: "https://next2.jx3box.com",
@@ -72,7 +73,7 @@ module.exports = {
72
73
  },
73
74
  },
74
75
  "/api": {
75
- target: "https://next2.jx3box.com",
76
+ target: "https://dev.next2.jx3box.com",
76
77
  onProxyReq: function(request) {
77
78
  request.setHeader("origin", "");
78
79
  },