udxcms 1.0.34 → 1.0.36

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.
Files changed (54) hide show
  1. package/dist/api/h5/axios.js +8 -7
  2. package/dist/api/index.js +7 -12
  3. package/dist/components/basicComponents/BaseMenu.vue +2 -2
  4. package/dist/components/basicComponents/PortfolioMenu.vue +2 -2
  5. package/dist/components/basicComponents/TokenAmountSelect.vue +1 -1
  6. package/dist/components/basicComponents/UserMenu.vue +3 -3
  7. package/dist/components/basicComponents/WalletConnected.vue +4 -4
  8. package/dist/components/businessComponents/About.vue +3 -3
  9. package/dist/components/businessComponents/ChainNetWork.vue +5 -4
  10. package/dist/components/businessComponents/Currency.vue +7 -3
  11. package/dist/components/businessComponents/Header.vue +1 -1
  12. package/dist/components/businessComponents/HeaderNetworkSelect.vue +1 -1
  13. package/dist/components/businessComponents/Language.vue +7 -3
  14. package/dist/components/businessComponents/NetworkSelect.vue +2 -2
  15. package/dist/components/businessComponents/Networklist.vue +4 -4
  16. package/dist/components/businessComponents/SignaturePopup.vue +2 -2
  17. package/dist/components/businessComponents/userPanel.vue +8 -7
  18. package/dist/components/businessComponents/walletPanel.vue +5 -4
  19. package/dist/components/cmsComponents/help/Index.vue +5 -4
  20. package/dist/components/cmsComponents/wiki/Wiki.vue +3 -4
  21. package/dist/components/h5Components/ChainNetH5Work.vue +4 -4
  22. package/dist/components/h5Components/Menu.vue +2 -2
  23. package/dist/components/h5Components/NavCenter.vue +1 -1
  24. package/dist/components/h5Components/Top.vue +3 -3
  25. package/dist/components/h5Components/walletconnectBottom.vue +10 -6
  26. package/dist/components/pageComponents/academy/academy_mobi.vue +2 -3
  27. package/dist/components/pageComponents/h5/IndexCommon.vue +3 -3
  28. package/dist/components/pageComponents/header/header_2mr.vue +4 -3
  29. package/dist/components/pageComponents/header/header_a.vue +8 -4
  30. package/dist/components/pageComponents/header/header_auction.vue +12 -8
  31. package/dist/components/pageComponents/header/header_b.vue +5 -5
  32. package/dist/components/pageComponents/header/header_b1.vue +14 -10
  33. package/dist/components/pageComponents/header/header_bridge.vue +5 -5
  34. package/dist/components/pageComponents/header/header_c.vue +15 -11
  35. package/dist/components/pageComponents/header/header_dex.vue +17 -13
  36. package/dist/components/pageComponents/header/header_dtx.vue +14 -10
  37. package/dist/components/pageComponents/header/header_dtx2.vue +8 -4
  38. package/dist/components/pageComponents/header/header_insure.vue +13 -9
  39. package/dist/components/pageComponents/header/header_lending.vue +12 -8
  40. package/dist/components/pageComponents/header/header_morse.vue +6 -6
  41. package/dist/components/pageComponents/header/header_morse_wallet.vue +4 -4
  42. package/dist/components/pageComponents/header/header_paragen.vue +9 -5
  43. package/dist/components/pageComponents/header/header_pointx.vue +5 -5
  44. package/dist/components/pageComponents/header/header_vortex.vue +5 -5
  45. package/dist/index.js +3 -3
  46. package/dist/utils/connect.js +4 -3
  47. package/dist/utils/http.js +6 -4
  48. package/dist/utils/index.js +1 -1
  49. package/dist/utils/storeBridge.d.ts +10 -0
  50. package/dist/utils/storeBridge.js +55 -0
  51. package/dist/views/customService/help/helpDetail.vue +0 -1
  52. package/dist/views/customService/help/index.vue +1 -2
  53. package/dist/views/login/login_wallet.vue +3 -3
  54. package/package.json +1 -1
@@ -4,7 +4,7 @@
4
4
  * @Author:
5
5
  * @Date: 2022-04-25 15:11:26
6
6
  * @LastEditors: lewis lewis@everylink.ai
7
- * @LastEditTime: 2025-09-24 11:06:52
7
+ * @LastEditTime: 2025-10-30 21:55:59
8
8
  -->
9
9
  <template>
10
10
  <div class='flex-space lending-header'>
@@ -58,14 +58,18 @@
58
58
  </template>
59
59
 
60
60
  <script>
61
- import { mapState } from "vuex";
62
61
  import { formatDateDecimal, formDataEthers, getStyleObj } from '../../../utils/index'
63
62
  import conf from "../../../config/index"
64
63
  // const Compound = require('@compound-finance/compound-js')
65
64
  export default {
66
65
  name: 'index-header',
67
66
  computed: {
68
- ...mapState("user", ["userInfo", "currency"]),
67
+ userInfo() {
68
+ return this.$store.state.user.userInfo || {}
69
+ },
70
+ currency() {
71
+ return this.$store.state.user.currency || {}
72
+ },
69
73
  logoSrc() {
70
74
  let path =
71
75
  this.$t("site_common_logo_base_url") +
@@ -78,13 +82,13 @@
78
82
  return this.$store.state.chainId;
79
83
  },
80
84
  account() {
81
- return this.$store.getters.account || '';
85
+ return this.$store.getters["wallet/account"] || '';
82
86
  },
83
87
  walletNetworks() {
84
- return this.$store.getters.walletNetworks;
88
+ return this.$store.getters["wallet/walletNetworks"];
85
89
  },
86
90
  walletIcon() {
87
- return this.$store.getters.walletIcon || '';
91
+ return this.$store.getters["wallet/walletIcon"] || '';
88
92
  }
89
93
  },
90
94
  props: {
@@ -144,8 +148,8 @@
144
148
  },
145
149
  methods: {
146
150
  initData() {
147
- this.$store.dispatch('getCommonTokenList')
148
- this.$store.dispatch('fetchNetworkList')
151
+ this.$store.dispatch('coin/getCommonTokenList')
152
+ this.$store.dispatch('coin/fetchNetworkList')
149
153
  // this.getCompoundDetail()
150
154
  this.$bus.$on("refreshCompoundData", compObj => {
151
155
  // this.getCompoundDetail(compObj)
@@ -241,26 +241,26 @@ export default {
241
241
  return this.$store.state.wallet.btcWallet || {}
242
242
  },
243
243
  account() {
244
- return this.btcWallet?.btcAccoount || this.$store.getters.account || "";
244
+ return this.btcWallet?.btcAccoount || this.$store.getters["wallet/account"] || "";
245
245
  },
246
246
  accountIsCustody() {
247
- return this.$store.getters.accountIsCustody;
247
+ return this.$store.getters["wallet/accountIsCustody"];
248
248
  },
249
249
  isLocked() {
250
- return this.$store.getters.isLocked;
250
+ return this.$store.getters["wallet/isLocked"];
251
251
  },
252
252
  chainId() {
253
253
  return this.$store.state.chainId;
254
254
  },
255
255
  walletNetworks() {
256
- return this.$store.getters.walletNetworks;
256
+ return this.$store.getters["wallet/walletNetworks"];
257
257
  },
258
258
  currency() {
259
259
  return this.$store.state.user.currency;
260
260
  },
261
261
 
262
262
  chainIcon() {
263
- const networkDetail = this.$store.getters.filterNetworkItem(
263
+ const networkDetail = this.$store.getters["coin/filterNetworkItem"](
264
264
  this.chainId,
265
265
  "L1"
266
266
  );
@@ -274,7 +274,7 @@ export default {
274
274
  },
275
275
  walletIcon() {
276
276
  return window.localStorage.getItem("selectedIcon");
277
- // return this.$store.getters.walletIcon || '';
277
+ // return this.$store.getters["wallet/walletIcon"] || '';
278
278
  },
279
279
  isBasic() {
280
280
  return this.$store.state.siteConfig.tradeMoel == 'Basic';
@@ -207,21 +207,21 @@ export default {
207
207
  },
208
208
  // user
209
209
  account() {
210
- return this.$store.getters.account || '';
210
+ return this.$store.getters["wallet/account"] || '';
211
211
  // return this.$store.state.wallet.wallet.address
212
212
  },
213
213
  chainId() {
214
214
  return this.$store.state.chainId;
215
215
  },
216
216
  walletNetworks() {
217
- return this.$store.getters.walletNetworks;
217
+ return this.$store.getters["wallet/walletNetworks"];
218
218
  },
219
219
  currency() {
220
220
  return this.$store.state.user.currency;
221
221
  },
222
222
 
223
223
  chainIcon() {
224
- const networkDetail = this.$store.getters.filterNetworkItem(
224
+ const networkDetail = this.$store.getters["coin/filterNetworkItem"](
225
225
  this.chainId,
226
226
  "L1"
227
227
  );
@@ -234,7 +234,7 @@ export default {
234
234
  return this.$store.state.navigation.user;
235
235
  },
236
236
  walletIcon() {
237
- return this.$store.getters.walletIcon || '';
237
+ return this.$store.getters["wallet/walletIcon"] || '';
238
238
  },
239
239
  isBasic() {
240
240
  return this.$store.state.siteConfig.tradeMoel == 'Basic'
@@ -3,8 +3,8 @@
3
3
  * @version:
4
4
  * @Author:
5
5
  * @Date: 2021-12-17 01:00:24
6
- * @LastEditors: Lewis
7
- * @LastEditTime: 2022-01-12 15:30:04
6
+ * @LastEditors: lewis lewis@everylink.ai
7
+ * @LastEditTime: 2025-10-30 21:56:10
8
8
  -->
9
9
  <template>
10
10
  <div :class="['header flex-space', false && active && 'headerActive']">
@@ -66,7 +66,6 @@
66
66
  import SubMenu from '../../cmsComponents/paragen/SubMenu.vue'
67
67
  import _ from 'lodash';
68
68
  import conf from '../../../config/index'
69
- import { mapState } from "vuex";
70
69
  import config from '../../../config/index'
71
70
  import {unwrapJSONStr} from "../../../utils/parse";
72
71
  export default {
@@ -106,7 +105,12 @@ export default {
106
105
  }
107
106
  },
108
107
  computed: {
109
- ...mapState("user", ["userInfo", "currency"]),
108
+ userInfo() {
109
+ return this.$store.state.user.userInfo || {}
110
+ },
111
+ currency() {
112
+ return this.$store.state.user.currency || {}
113
+ },
110
114
  logoSrc() {
111
115
  let path =
112
116
  this.$t("site_common_logo_base_url") +
@@ -116,7 +120,7 @@ export default {
116
120
  return path;
117
121
  },
118
122
  walletIcon() {
119
- return this.$store.getters.walletIcon || '';
123
+ return this.$store.getters["wallet/walletIcon"] || '';
120
124
  },
121
125
  isBasic() {
122
126
  return this.$store.state.siteConfig.tradeMoel == 'Basic'
@@ -123,10 +123,10 @@ export default {
123
123
  return this.$store.state.wallet.btcWallet || {}
124
124
  },
125
125
  account() {
126
- return this.btcWallet?.btcAccoount || this.$store.getters.account || "";
126
+ return this.btcWallet?.btcAccoount || this.$store.getters["wallet/account"] || "";
127
127
  },
128
128
  isLocked() {
129
- return this.$store.getters.isLocked;
129
+ return this.$store.getters["wallet/isLocked"];
130
130
  },
131
131
  walletAccount() {
132
132
  return this.walletData && this.walletData.getAddress()
@@ -135,10 +135,10 @@ export default {
135
135
  return this.$store.state.chainId;
136
136
  },
137
137
  walletNetworks() {
138
- return this.$store.getters.walletNetworks;
138
+ return this.$store.getters["wallet/walletNetworks"];
139
139
  },
140
140
  chainIcon() {
141
- const networkDetail = this.$store.getters.filterNetworkItem(
141
+ const networkDetail = this.$store.getters["coin/filterNetworkItem"](
142
142
  this.chainId,
143
143
  "L1"
144
144
  );
@@ -149,7 +149,7 @@ export default {
149
149
  return this.$store.state.navigation.user;
150
150
  },
151
151
  walletIcon() {
152
- return this.$store.getters.walletIcon || '';
152
+ return this.$store.getters["wallet/walletIcon"] || '';
153
153
  },
154
154
  isBasic() {
155
155
  return this.$store.state.siteConfig.tradeMoel == 'Basic'
@@ -226,10 +226,10 @@ export default {
226
226
  return this.$store.state.wallet.btcWallet || {}
227
227
  },
228
228
  account() {
229
- return this.btcWallet?.btcAccoount || this.$store.getters.account || "";
229
+ return this.btcWallet?.btcAccoount || this.$store.getters["wallet/account"] || "";
230
230
  },
231
231
  isLocked() {
232
- return this.$store.getters.isLocked;
232
+ return this.$store.getters["wallet/isLocked"];
233
233
  },
234
234
  walletAccount() {
235
235
  return this.walletData && this.walletData.getAddress()
@@ -238,13 +238,13 @@ export default {
238
238
  return this.$store.state.chainId;
239
239
  },
240
240
  walletNetworks() {
241
- return this.$store.getters.walletNetworks;
241
+ return this.$store.getters["wallet/walletNetworks"];
242
242
  },
243
243
  currency() {
244
244
  return this.$store.state.user.currency;
245
245
  },
246
246
  chainIcon() {
247
- const networkDetail = this.$store.getters.filterNetworkItem(
247
+ const networkDetail = this.$store.getters["coin/filterNetworkItem"](
248
248
  this.chainId,
249
249
  "L1"
250
250
  );
@@ -255,7 +255,7 @@ export default {
255
255
  return this.$store.state.navigation.user;
256
256
  },
257
257
  walletIcon() {
258
- return this.$store.getters.walletIcon || '';
258
+ return this.$store.getters["wallet/walletIcon"] || '';
259
259
  },
260
260
  isBasic() {
261
261
  return this.$store.state.siteConfig.tradeMoel == 'Basic'
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * @Author: lewis lewis@everylink.ai
3
3
  * @Date: 2025-09-17 10:50:27
4
4
  * @LastEditors: lewis lewis@everylink.ai
5
- * @LastEditTime: 2025-10-11 14:12:36
5
+ * @LastEditTime: 2025-10-24 11:42:03
6
6
  * @FilePath: /localTools/Users/apple/web-front/web-front/src/common_modules/cms-submodule/index.js
7
7
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
8
  */
@@ -19,14 +19,14 @@ let eventCenter = {};
19
19
  * @param {Object} events - 事件对象
20
20
  */
21
21
  export function setEventCenter(events) {
22
- eventCenter = events;
22
+ eventCenter = events || {};
23
23
  }
24
24
  /**
25
25
  * 获取事件事务中心
26
26
  * @returns {Object} 事件事务中心对象
27
27
  */
28
28
  export function getEventCenter() {
29
- return eventCenter;
29
+ return Object.assign({}, eventCenter);
30
30
  }
31
31
  // 重新导出模块 - 使用之前导入的模块重新导出
32
32
  export { cmsComponents };
@@ -4,7 +4,7 @@
4
4
  * @Author:
5
5
  * @Date: 2021-04-07 14:59:35
6
6
  * @LastEditors: lewis lewis@everylink.ai
7
- * @LastEditTime: 2025-09-24 10:59:39
7
+ * @LastEditTime: 2025-10-24 11:48:06
8
8
  */
9
9
  import SockJs from 'sockjs-client';
10
10
  import Stomp from 'webstomp-client';
@@ -64,6 +64,7 @@ export class ConnectSocketTool {
64
64
  }
65
65
  connect(errorCallBack) {
66
66
  return new Promise((resolve, reject) => {
67
+ var _a, _b, _c;
67
68
  console.log('connect...', new Date());
68
69
  console.log("connectType:", connectType);
69
70
  console.log("connectTemp:", connectTemp);
@@ -79,11 +80,11 @@ export class ConnectSocketTool {
79
80
  connectTemp.conncetedStr = 'connecting';
80
81
  let apiType = connectType === "market_ws" ? "ws" : "api";
81
82
  let base_url = site_config && getMarketApi(this.chainId, connectType, apiType) || '';
82
- if (store.state.trade.tradeMode == 'perpetual') {
83
+ if (((_b = (_a = store === null || store === void 0 ? void 0 : store.state) === null || _a === void 0 ? void 0 : _a.trade) === null || _b === void 0 ? void 0 : _b.tradeMode) == 'perpetual') {
83
84
  base_url = getMarketApi(this.chainId, 'perpetual', apiType);
84
85
  // 永续暂时不支持聚合
85
86
  if (!base_url) {
86
- base_url = getMarketApi(store.state.chainId, 'perpetual', apiType);
87
+ base_url = getMarketApi((_c = store === null || store === void 0 ? void 0 : store.state) === null || _c === void 0 ? void 0 : _c.chainId, 'perpetual', apiType);
87
88
  }
88
89
  }
89
90
  // console.log("this.chainId", this.chainId);
@@ -34,17 +34,19 @@ const instance = axios.create({
34
34
  retryDelay: retryDelay,
35
35
  });
36
36
  instance.interceptors.request.use((config) => {
37
+ var _a, _b;
37
38
  const { store } = getEventCenter();
38
39
  config.baseURL = getBaseUrl(0);
39
40
  config.headers["x-auth-token"] = Storage.get("TOKEN");
40
41
  config.headers["client_id"] = "WEB";
41
42
  config.headers["language"] = localStorage.getItem("language");
43
+ const userInfo = ((_b = (_a = store === null || store === void 0 ? void 0 : store.state) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.userInfo) || {};
42
44
  config.headers["timezone"] =
43
- (store.state.user.userInfo && store.state.user.userInfo.timezone) ||
45
+ userInfo.timezone ||
44
46
  getTimeZone() ||
45
47
  "";
46
48
  config.headers["country"] =
47
- (store.state.user.userInfo && store.state.user.userInfo.country) ||
49
+ userInfo.country ||
48
50
  "";
49
51
  return config;
50
52
  }, (error) => {
@@ -79,7 +81,7 @@ instance.interceptors.response.use((response) => {
79
81
  console.log("isNotGoToLogin2:", isNotGoToLogin);
80
82
  if (!isNotGoToLogin) {
81
83
  console.log('if');
82
- store.commit("logoutWallet");
84
+ (store === null || store === void 0 ? void 0 : store.commit) && store.commit("wallet/logoutWallet");
83
85
  response.data.showError = true;
84
86
  // Store.commit(
85
87
  // "setBackRouteName",
@@ -93,7 +95,7 @@ instance.interceptors.response.use((response) => {
93
95
  });
94
96
  }
95
97
  else {
96
- store.commit("user/logoutWallet");
98
+ (store === null || store === void 0 ? void 0 : store.commit) && store.commit("user/logoutWallet");
97
99
  }
98
100
  }
99
101
  return Promise.reject(data);
@@ -474,7 +474,7 @@ export const getExplorer = function (chainId) {
474
474
  };
475
475
  export const getHashBlockUrl = (hash = '', chainId, layer) => {
476
476
  const store = window.$Vue.$store;
477
- const url = store.getters.filterNetworkItem(chainId, layer).blockExplorerUrl;
477
+ const url = store.getters["coin/filterNetworkItem"](chainId, layer).blockExplorerUrl;
478
478
  if (url) {
479
479
  return url.endsWith("/") ? url + `tx/${hash}` : url + `/tx/${hash}`;
480
480
  }
@@ -0,0 +1,10 @@
1
+ export function connectStoreBridge(bridge: any): void;
2
+ export function disconnectStoreBridge(): void;
3
+ export function getBridgeSnapshot(): any;
4
+ export function getBridgeStore(): {
5
+ state: {};
6
+ commit: () => void;
7
+ dispatch: () => Promise<void>;
8
+ getters: {};
9
+ };
10
+ export function isBridgeConnected(): boolean;
@@ -0,0 +1,55 @@
1
+ import Vue from 'vue';
2
+ const bridgeSharedState = Vue.observable({});
3
+ let unsubscribe = null;
4
+ let bridgeRef = null;
5
+ let lastPayload = null;
6
+ function applyPayload(payload) {
7
+ if (!payload)
8
+ return;
9
+ lastPayload = payload;
10
+ const state = payload.state || payload.data || {};
11
+ if (!state || typeof state !== 'object')
12
+ return;
13
+ Object.keys(state).forEach((key) => {
14
+ Vue.set(bridgeSharedState, key, state[key]);
15
+ });
16
+ }
17
+ export function connectStoreBridge(bridge) {
18
+ if (!bridge)
19
+ return;
20
+ if (unsubscribe) {
21
+ unsubscribe();
22
+ unsubscribe = null;
23
+ }
24
+ bridgeRef = bridge;
25
+ const snapshot = bridge.getSnapshot ? bridge.getSnapshot() : null;
26
+ if (snapshot) {
27
+ applyPayload(snapshot);
28
+ }
29
+ if (typeof bridge.subscribe === 'function') {
30
+ unsubscribe = bridge.subscribe((payload) => {
31
+ applyPayload(payload);
32
+ }, true);
33
+ }
34
+ }
35
+ export function disconnectStoreBridge() {
36
+ if (unsubscribe) {
37
+ unsubscribe();
38
+ unsubscribe = null;
39
+ }
40
+ bridgeRef = null;
41
+ }
42
+ export function getBridgeSnapshot() {
43
+ return lastPayload;
44
+ }
45
+ export function getBridgeStore() {
46
+ return {
47
+ state: bridgeSharedState,
48
+ commit: () => { },
49
+ dispatch: () => Promise.resolve(),
50
+ getters: {},
51
+ };
52
+ }
53
+ export function isBridgeConnected() {
54
+ return !!bridgeRef;
55
+ }
@@ -24,7 +24,6 @@
24
24
  import HelpDetail from '../../../components/cmsComponents/help/detail.vue'
25
25
  import conf from "../../../config/index";
26
26
  import { loadImportScript, isPhone} from "../../../utils/index";
27
- import { mapState } from "vuex";
28
27
  import HelpNav from './nav.vue';
29
28
 
30
29
  export default {
@@ -23,8 +23,7 @@
23
23
  <script>
24
24
  import HelpSupport from '../../../components/cmsComponents/help/Index.vue'
25
25
  import conf from "../../../config/index";
26
- import { loadImportScript, isPhone} from "../../../utils/index";
27
- import { mapState } from "vuex";
26
+ import { loadImportScript, isPhone} from "../../../utils/index"
28
27
  import HelpNav from './nav.vue';
29
28
  import _ from 'lodash';
30
29
 
@@ -3,8 +3,8 @@
3
3
  * @version:
4
4
  * @Author:
5
5
  * @Date: 2021-05-21 14:57:52
6
- * @LastEditors: Lewis
7
- * @LastEditTime: 2022-08-12 19:51:43
6
+ * @LastEditors: lewis lewis@everylink.ai
7
+ * @LastEditTime: 2025-10-24 11:27:11
8
8
  -->
9
9
  <template>
10
10
  <div v-if="visible" class="containers flex-v login-wallet">
@@ -121,7 +121,7 @@ export default {
121
121
  }
122
122
 
123
123
  if (wallet && !token) {
124
- this.$store.dispatch('loginRest')
124
+ this.$store.dispatch('wallet/loginRest')
125
125
  } else {
126
126
  if (!wallet) {
127
127
  $Vue.$bus.$emit("linkWallet", () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "udxcms",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "description": "cms submodule",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",