udxcms 1.0.27 → 1.0.29
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author:
|
|
3
3
|
* @Date: 2020-11-19 12:38:02
|
|
4
|
-
* @LastEditTime: 2025-09
|
|
4
|
+
* @LastEditTime: 2025-10-09 18:54:36
|
|
5
5
|
* @LastEditors: lewis lewis@everylink.ai
|
|
6
6
|
* @Description:
|
|
7
7
|
-->
|
|
@@ -78,9 +78,7 @@
|
|
|
78
78
|
},
|
|
79
79
|
computed: {
|
|
80
80
|
...mapState('user', ['currency', 'userInfo']),
|
|
81
|
-
currencyList
|
|
82
|
-
return this.$store.state.cmsstore.currencyList || []
|
|
83
|
-
}
|
|
81
|
+
...mapState('cmsstore', ['currencyList'])
|
|
84
82
|
},
|
|
85
83
|
data() {
|
|
86
84
|
return {
|
|
@@ -90,27 +88,50 @@
|
|
|
90
88
|
}
|
|
91
89
|
},
|
|
92
90
|
created() {
|
|
93
|
-
|
|
91
|
+
console.log('Currency component created, initial currencyList:', this.currencyList)
|
|
92
|
+
|
|
93
|
+
if (!this.currencyList || !this.currencyList.length) {
|
|
94
|
+
console.log('Fetching currency data...')
|
|
94
95
|
getCurrency().then(res => {
|
|
95
96
|
if (res.code == 200) {
|
|
96
97
|
let resData = res.data
|
|
97
98
|
let currencyList = resData && resData.map(v => v.currency_list)
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
console.log('Fetched currency data:', currencyList)
|
|
100
|
+
|
|
101
|
+
// 确保数据扁平化
|
|
102
|
+
const flatCurrencyList = [].concat.apply([], currencyList)
|
|
103
|
+
console.log('Flattened currency list:', flatCurrencyList)
|
|
104
|
+
|
|
105
|
+
this.$store.commit('setCurrencyList', flatCurrencyList)
|
|
106
|
+
console.log('After commit - store state:', this.$store.state.cmsstore)
|
|
107
|
+
console.log('After commit - computed currencyList:', this.currencyList)
|
|
108
|
+
|
|
109
|
+
this.$nextTick(() => {
|
|
110
|
+
this.initCurreny()
|
|
111
|
+
})
|
|
100
112
|
}
|
|
101
113
|
}).catch(e => console.log(e))
|
|
102
114
|
} else {
|
|
115
|
+
console.log('Currency list already exists:', this.currencyList)
|
|
103
116
|
this.initCurreny()
|
|
104
117
|
}
|
|
105
118
|
this.getLangList()
|
|
106
119
|
this.$nextTick(() => {
|
|
107
|
-
$Vue
|
|
108
|
-
|
|
109
|
-
|
|
120
|
+
if (typeof $Vue !== 'undefined' && $Vue.$bus) {
|
|
121
|
+
$Vue.$bus.$on('setLang', () => {
|
|
122
|
+
this.setLang()
|
|
123
|
+
})
|
|
124
|
+
}
|
|
110
125
|
})
|
|
111
|
-
|
|
112
126
|
},
|
|
113
127
|
watch: {
|
|
128
|
+
currencyList: {
|
|
129
|
+
handler(newVal, oldVal) {
|
|
130
|
+
console.log('currencyList watch - new:', newVal, 'old:', oldVal)
|
|
131
|
+
},
|
|
132
|
+
immediate: true,
|
|
133
|
+
deep: true
|
|
134
|
+
},
|
|
114
135
|
value: function(val,oldValue) {
|
|
115
136
|
if (!val) {
|
|
116
137
|
document.removeEventListener('click',closeFn)
|
package/dist/components/index.js
CHANGED
|
@@ -116,4 +116,5 @@ export { default as PopList } from './h5Components/PopList.vue'
|
|
|
116
116
|
export { default as SearchInput } from './h5Components/SearchInput.vue'
|
|
117
117
|
export { default as SvgCircle } from './h5Components/SvgCircle.vue'
|
|
118
118
|
export { default as Top } from './h5Components/Top.vue'
|
|
119
|
-
export { default as walletconnectBottom } from './h5Components/walletconnectBottom.vue'
|
|
119
|
+
export { default as walletconnectBottom } from './h5Components/walletconnectBottom.vue'
|
|
120
|
+
export { default as brigdePage } from './pageComponents/index/component/bridge-page.vue'
|
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-09
|
|
5
|
+
* @LastEditTime: 2025-10-09 18:53:51
|
|
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
|
*/
|
|
@@ -106,75 +106,77 @@ export function init({ Vue, router, store, Parent, onComponentsRegistered, onRou
|
|
|
106
106
|
console.log(`模块结构 - state:`, !!actualModule.state, 'mutations:', !!actualModule.mutations, 'actions:', !!actualModule.actions);
|
|
107
107
|
if (actualModule.state || actualModule.mutations || actualModule.actions) {
|
|
108
108
|
console.log(`注册模块 ${v} 成功`);
|
|
109
|
+
// 使用原始模块名,不进行小写转换
|
|
110
|
+
const moduleName = v === 'CmsStore' ? 'cmsstore' : v;
|
|
111
|
+
store.registerModule(moduleName, actualModule, { preserveState: false });
|
|
109
112
|
// 特殊处理 CmsStore - 直接合并到根 store
|
|
110
|
-
if (v === 'CmsStore') {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
113
|
+
// if (v === 'CmsStore') {
|
|
114
|
+
// console.log('将 CmsStore 直接合并到根 store');
|
|
115
|
+
// // 1. 直接修改根 state 来添加 cms 命名空间
|
|
116
|
+
// if (actualModule.state) {
|
|
117
|
+
// if (!store.state.cmsstore) {
|
|
118
|
+
// store.state.cmsstore = {};
|
|
119
|
+
// }
|
|
120
|
+
// Object.keys(actualModule.state).forEach(key => {
|
|
121
|
+
// store.state.cmsstore[key] = actualModule.state[key];
|
|
122
|
+
// });
|
|
123
|
+
// }
|
|
124
|
+
// // 2. 直接修改 store._mutations 来添加根级别 mutations
|
|
125
|
+
// if (actualModule.mutations) {
|
|
126
|
+
// console.log('添加根级别 mutations:', Object.keys(actualModule.mutations));
|
|
127
|
+
// console.log('当前 store._mutations:', Object.keys(store._mutations));
|
|
128
|
+
// Object.keys(actualModule.mutations).forEach(mutationName => {
|
|
129
|
+
// if (!store._mutations[mutationName]) {
|
|
130
|
+
// store._mutations[mutationName] = [];
|
|
131
|
+
// }
|
|
132
|
+
// // 添加 mutation 处理器
|
|
133
|
+
// store._mutations[mutationName].push(function(payload) {
|
|
134
|
+
// // 获取当前模块状态
|
|
135
|
+
// const moduleState = store.state.cmsstore || actualModule.state;
|
|
136
|
+
// // 调用原始 mutation
|
|
137
|
+
// return actualModule.mutations[mutationName](moduleState, payload);
|
|
138
|
+
// });
|
|
139
|
+
// console.log(`已注册 mutation: ${mutationName}`);
|
|
140
|
+
// });
|
|
141
|
+
// console.log('注册后的 store._mutations:', Object.keys(store._mutations));
|
|
142
|
+
// }
|
|
143
|
+
// // 3. 直接修改 store._actions 来添加根级别 actions
|
|
144
|
+
// if (actualModule.actions) {
|
|
145
|
+
// console.log('添加根级别 actions:', Object.keys(actualModule.actions));
|
|
146
|
+
// Object.keys(actualModule.actions).forEach(actionName => {
|
|
147
|
+
// if (!store._actions[actionName]) {
|
|
148
|
+
// store._actions[actionName] = [];
|
|
149
|
+
// }
|
|
150
|
+
// // 添加 action 处理器
|
|
151
|
+
// store._actions[actionName].push(function(payload) {
|
|
152
|
+
// // 创建正确的 context
|
|
153
|
+
// const context = {
|
|
154
|
+
// state: store.state.cmsstore || actualModule.state,
|
|
155
|
+
// rootState: store.state,
|
|
156
|
+
// commit: store.commit,
|
|
157
|
+
// dispatch: store.dispatch,
|
|
158
|
+
// getters: store.getters,
|
|
159
|
+
// rootGetters: store.getters
|
|
160
|
+
// };
|
|
161
|
+
// // 调用原始 action
|
|
162
|
+
// return actualModule.actions[actionName](context, payload);
|
|
163
|
+
// });
|
|
164
|
+
// });
|
|
165
|
+
// }
|
|
166
|
+
// // 4. 直接修改 store._wrappedGetters 来添加根级别 getters
|
|
167
|
+
// if (actualModule.getters) {
|
|
168
|
+
// console.log('添加根级别 getters:', Object.keys(actualModule.getters));
|
|
169
|
+
// Object.keys(actualModule.getters).forEach(getterName => {
|
|
170
|
+
// store._wrappedGetters[getterName] = function() {
|
|
171
|
+
// const moduleState = store.state.cmsstore || actualModule.state;
|
|
172
|
+
// return actualModule.getters[getterName](moduleState, store.getters, store.state, store.getters);
|
|
173
|
+
// };
|
|
174
|
+
// });
|
|
175
|
+
// }
|
|
176
|
+
// } else {
|
|
177
|
+
// // 其他模块按正常方式注册
|
|
178
|
+
// store.registerModule(v, actualModule, { preserveState: true });
|
|
179
|
+
// }
|
|
178
180
|
}
|
|
179
181
|
else {
|
|
180
182
|
console.warn(`模块 ${v} 结构不正确:`, actualModule);
|
package/dist/store/CmsStore.js
CHANGED
|
@@ -13,7 +13,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
13
13
|
* @Author:
|
|
14
14
|
* @Date: 2021-07-30 10:46:1
|
|
15
15
|
* @LastEditors: lewis lewis@everylink.ai
|
|
16
|
-
* @LastEditTime: 2025-09
|
|
16
|
+
* @LastEditTime: 2025-10-09 18:55:01
|
|
17
17
|
*/
|
|
18
18
|
import { getSignleSymbolPrice } from '../api/common';
|
|
19
19
|
export default {
|
|
@@ -71,7 +71,7 @@ export default {
|
|
|
71
71
|
// state.coins = coins || [];
|
|
72
72
|
// },
|
|
73
73
|
setCurrencyList(state, currencyList) {
|
|
74
|
-
state.currencyList = currencyList
|
|
74
|
+
state.currencyList = [...currencyList];
|
|
75
75
|
},
|
|
76
76
|
setExplorerSets(state, explorerSets) {
|
|
77
77
|
state.explorerSets = explorerSets;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -59,6 +59,8 @@ export { default as connect } from "./connect.js";
|
|
|
59
59
|
export { default as http } from "./http.js";
|
|
60
60
|
export { default as parse } from "./parse.js";
|
|
61
61
|
export { default as pdf } from "./pdf.js";
|
|
62
|
-
export { unwrapJSONStr };
|
|
63
62
|
export * from "./connect.js";
|
|
64
63
|
import { unwrapJSONStr } from "./parse";
|
|
64
|
+
import { toDataUrl } from "./blockies";
|
|
65
|
+
import { isJSON } from "./parse";
|
|
66
|
+
export { unwrapJSONStr, toDataUrl, isJSON };
|
package/dist/utils/index.js
CHANGED
|
@@ -12,7 +12,8 @@ import { ethers, utils } from 'ethers';
|
|
|
12
12
|
import dayjs from 'dayjs';
|
|
13
13
|
import BNP from "bignumber.js";
|
|
14
14
|
import conf from '../config/index';
|
|
15
|
-
import { unwrapJSONStr } from "./parse";
|
|
15
|
+
import { unwrapJSONStr, isJSON } from "./parse";
|
|
16
|
+
import { toDataUrl } from "./blockies";
|
|
16
17
|
export const AccountForm = (account, accountType) => {
|
|
17
18
|
let AccArr = account.split("");
|
|
18
19
|
if (accountType === "Phone") {
|
|
@@ -697,5 +698,5 @@ export { default as connect } from './connect.js';
|
|
|
697
698
|
export { default as http } from './http.js';
|
|
698
699
|
export { default as parse } from './parse.js';
|
|
699
700
|
export { default as pdf } from './pdf.js';
|
|
700
|
-
export { unwrapJSONStr };
|
|
701
|
+
export { unwrapJSONStr, toDataUrl, isJSON };
|
|
701
702
|
export * from './connect.js';
|