udxcms 1.0.33 → 1.0.35
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/dist/api/h5/axios.js +8 -7
- package/dist/api/index.js +7 -12
- package/dist/components/basicComponents/BaseMenu.vue +2 -2
- package/dist/components/basicComponents/PortfolioMenu.vue +2 -2
- package/dist/components/basicComponents/TokenAmountSelect.vue +1 -1
- package/dist/components/basicComponents/UserMenu.vue +3 -3
- package/dist/components/basicComponents/WalletConnected.vue +4 -4
- package/dist/components/businessComponents/About.vue +3 -3
- package/dist/components/businessComponents/ChainNetWork.vue +5 -4
- package/dist/components/businessComponents/Header.vue +1 -1
- package/dist/components/businessComponents/HeaderNetworkSelect.vue +1 -1
- package/dist/components/businessComponents/NetworkSelect.vue +2 -2
- package/dist/components/businessComponents/Networklist.vue +4 -4
- package/dist/components/businessComponents/SignaturePopup.vue +2 -2
- package/dist/components/businessComponents/TradeChainNetWork.vue +1 -1
- package/dist/components/businessComponents/userPanel.vue +5 -5
- package/dist/components/h5Components/ChainNetH5Work.vue +4 -4
- package/dist/components/h5Components/Menu.vue +2 -2
- package/dist/components/h5Components/NavCenter.vue +1 -1
- package/dist/components/h5Components/Top.vue +3 -3
- package/dist/components/h5Components/walletconnectBottom.vue +4 -4
- package/dist/components/pageComponents/h5/IndexCommon.vue +3 -3
- package/dist/components/pageComponents/header/header_2mr.vue +4 -3
- package/dist/components/pageComponents/header/header_auction.vue +6 -6
- package/dist/components/pageComponents/header/header_b.vue +5 -5
- package/dist/components/pageComponents/header/header_b1.vue +8 -8
- package/dist/components/pageComponents/header/header_bridge.vue +5 -5
- package/dist/components/pageComponents/header/header_c.vue +9 -9
- package/dist/components/pageComponents/header/header_dex.vue +11 -11
- package/dist/components/pageComponents/header/header_dtx.vue +8 -8
- package/dist/components/pageComponents/header/header_dtx2.vue +1 -1
- package/dist/components/pageComponents/header/header_insure.vue +7 -7
- package/dist/components/pageComponents/header/header_lending.vue +6 -6
- package/dist/components/pageComponents/header/header_morse.vue +6 -6
- package/dist/components/pageComponents/header/header_morse_wallet.vue +4 -4
- package/dist/components/pageComponents/header/header_paragen.vue +1 -1
- package/dist/components/pageComponents/header/header_pointx.vue +5 -5
- package/dist/components/pageComponents/header/header_vortex.vue +5 -5
- package/dist/index.js +3 -3
- package/dist/utils/connect.js +4 -3
- package/dist/utils/http.js +6 -4
- package/dist/utils/index.js +1 -1
- package/dist/utils/storeBridge.d.ts +10 -0
- package/dist/utils/storeBridge.js +55 -0
- package/dist/views/login/login_wallet.vue +3 -3
- package/package.json +1 -3
|
@@ -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
|
+
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @version:
|
|
4
4
|
* @Author:
|
|
5
5
|
* @Date: 2021-05-21 14:57:52
|
|
6
|
-
* @LastEditors:
|
|
7
|
-
* @LastEditTime:
|
|
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.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"description": "cms submodule",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,11 +20,9 @@
|
|
|
20
20
|
"clipboard-copy": "^4.0.1",
|
|
21
21
|
"ethers": "^5.4.0",
|
|
22
22
|
"dayjs": "^1.11.2",
|
|
23
|
-
"d3": "^6.3.0",
|
|
24
23
|
"swiper": "^5.4.5",
|
|
25
24
|
"vue-awesome-swiper": "4.1.1",
|
|
26
25
|
"bignumber.js": "^9.0.2",
|
|
27
|
-
"vue-echarts": "^6.7.3",
|
|
28
26
|
"echarts": "^5.3.3"
|
|
29
27
|
}
|
|
30
28
|
}
|