udxcms 1.0.3 → 1.0.5

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 (37) hide show
  1. package/dist/api/common.d.ts +28 -28
  2. package/dist/api/h5/axios.d.ts +1 -1
  3. package/dist/api/index.d.ts +2 -2
  4. package/dist/api/index.js +144 -2
  5. package/dist/utils/axiosRetry.d.ts +7 -0
  6. package/dist/utils/axiosRetry.js +14 -0
  7. package/dist/utils/connect.d.ts +6 -0
  8. package/dist/utils/connect.js +7 -2
  9. package/dist/utils/index.d.ts +55 -1
  10. package/dist/utils/index.js +712 -3
  11. package/dist/utils/parse.d.ts +5 -0
  12. package/dist/utils/parse.js +12 -0
  13. package/dist/utils/pdf.d.ts +4 -0
  14. package/dist/utils/pdf.js +5 -2
  15. package/dist/views/customService/academy.vue +78 -0
  16. package/dist/views/customService/api.vue +120 -0
  17. package/dist/views/customService/dapp.vue +42 -0
  18. package/dist/views/customService/dappDetail.vue +124 -0
  19. package/dist/views/customService/detail.vue +155 -0
  20. package/dist/views/customService/doc.vue +124 -0
  21. package/dist/views/customService/ecosystem/index.vue +374 -0
  22. package/dist/views/customService/help/entry.vue +29 -0
  23. package/dist/views/customService/help/helpDetail.vue +167 -0
  24. package/dist/views/customService/help/index.vue +145 -0
  25. package/dist/views/customService/help/nav.vue +68 -0
  26. package/dist/views/customService/recruit.vue +133 -0
  27. package/dist/views/customService/sdk.vue +126 -0
  28. package/dist/views/customService/team.vue +245 -0
  29. package/dist/views/customService/term.vue +88 -0
  30. package/dist/views/customService/vote.vue +133 -0
  31. package/dist/views/customService/whitepaper.vue +126 -0
  32. package/dist/views/customService/wiki.vue +126 -0
  33. package/dist/views/error/error404.vue +76 -0
  34. package/dist/views/error/error500.vue +74 -0
  35. package/dist/views/index.js +23 -48
  36. package/dist/views/login/login_wallet.vue +229 -0
  37. package/package.json +7 -3
@@ -8,3 +8,8 @@ export function isJSON(jsonString: any): boolean;
8
8
  * @param str 兼容格式 JSON.stringify的n层嵌套
9
9
  */
10
10
  export function unwrapJSONStr(str: any): any;
11
+ declare namespace _default {
12
+ export { isJSON };
13
+ export { unwrapJSONStr };
14
+ }
15
+ export default _default;
@@ -2,6 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isJSON = isJSON;
4
4
  exports.unwrapJSONStr = unwrapJSONStr;
5
+ /*
6
+ * @Author: lewis lewis@everylink.ai
7
+ * @Date: 2023-12-19 10:49:53
8
+ * @LastEditors: lewis lewis@everylink.ai
9
+ * @LastEditTime: 2025-09-19 17:07:58
10
+ * @FilePath: /localTools/Users/apple/web-front/web-front/src/common_modules/cms-submodule/utils/parse.js
11
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
12
+ */
5
13
  /**
6
14
  * 判断是否是json 字符串
7
15
  * @param {*} jsonString 字符串
@@ -29,3 +37,7 @@ function unwrapJSONStr(str) {
29
37
  }
30
38
  return str;
31
39
  }
40
+ exports.default = {
41
+ isJSON,
42
+ unwrapJSONStr
43
+ };
@@ -3,3 +3,7 @@ export function Pdfembed(): {
3
3
  pdfobjectversion: string;
4
4
  supportsPDFs: boolean;
5
5
  };
6
+ declare namespace _default {
7
+ export { Pdfembed };
8
+ }
9
+ export default _default;
package/dist/utils/pdf.js CHANGED
@@ -4,8 +4,8 @@ exports.Pdfembed = void 0;
4
4
  /*
5
5
  * @Author:
6
6
  * @Date: 2020-12-17 19:28:53
7
- * @LastEditTime: 2021-08-24 18:17:14
8
- * @LastEditors: Lewis
7
+ * @LastEditTime: 2025-09-19 17:07:04
8
+ * @LastEditors: lewis lewis@everylink.ai
9
9
  * @Description:
10
10
  */
11
11
  /**
@@ -76,3 +76,6 @@ const Pdfembed = function () {
76
76
  };
77
77
  };
78
78
  exports.Pdfembed = Pdfembed;
79
+ exports.default = {
80
+ Pdfembed: exports.Pdfembed
81
+ };
@@ -0,0 +1,78 @@
1
+ <!--
2
+ * @Descripttion:
3
+ * @version:
4
+ * @Author:
5
+ * @Date: 2021-08-12 23:35:01
6
+ * @LastEditors: Lewis
7
+ * @LastEditTime: 2021-11-24 15:03:37
8
+ -->
9
+ <template>
10
+ <div class="cms-home academy-home">
11
+ <component :is="_componentId"></component>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ import AcademyWallet from "../../components/pageComponents/academy/academy_wallet.vue";
17
+ import AcademyMobi from "../../components/pageComponents/academy/academy_mobi.vue";
18
+ import {unwrapJSONStr} from "@/common_modules/cms-submodule/utils/parse";
19
+
20
+ export default {
21
+ name: "Academy-d",
22
+
23
+ components: {
24
+ AcademyWallet,
25
+ AcademyMobi,
26
+ },
27
+ props: {
28
+ componentName: {
29
+ type: String,
30
+ default: () => "",
31
+ },
32
+ },
33
+ data() {
34
+ return {
35
+ componentId: "",
36
+ };
37
+ },
38
+ computed: {
39
+ _componentId() {
40
+ return this.componentId || this.componentName || "AcademyWallet";
41
+ },
42
+ },
43
+ created() {
44
+ this.getComponentId();
45
+ },
46
+ methods: {
47
+ getComponentId() {
48
+ // TODO:全局解析服务端配置。
49
+ // 从配置中获取组件。
50
+ let indexConfigList =
51
+ theme_config &&
52
+ theme_config.length &&
53
+ theme_config[0].pageList &&
54
+ theme_config[0].pageList.filter((v) => {
55
+ return v.pageKey == "common";
56
+ });
57
+ let indexConfig =
58
+ indexConfigList &&
59
+ indexConfigList.length &&
60
+ indexConfigList[0].configList &&
61
+ indexConfigList[0].configList.filter((v) => {
62
+ return v.componentsKey == "common_conf";
63
+ });
64
+ let indexConfig_obj =
65
+ (indexConfig && indexConfig.length &&
66
+ indexConfig[0].config &&
67
+ unwrapJSONStr(indexConfig[0].config)) ||
68
+ {};
69
+ if (indexConfig_obj.academyType) {
70
+ this.componentId = indexConfig_obj.academyType;
71
+ }
72
+ },
73
+ },
74
+ };
75
+ </script>
76
+ <style lang="less">
77
+ @import "../../assets/css/academy/index.less";
78
+ </style>
@@ -0,0 +1,120 @@
1
+ <!-- api -->
2
+ <template>
3
+ <div class="page-api">
4
+ <div class="visible-pc">
5
+ <Header :showMiddleInfo="true" />
6
+ </div>
7
+ <div class="visible-h5">
8
+ <Top class="top" />
9
+ </div>
10
+ <div class="api-container">
11
+ <!-- {{listLoading}}----12312312 -->
12
+ <!-- loading -->
13
+ <div v-if="listLoading" class="loading-wrap">
14
+ <site-loading></site-loading>
15
+ </div>
16
+ <ApiMain v-else :list="list" :initPath="initPath" :type='type'></ApiMain>
17
+ </div>
18
+
19
+ <Footer />
20
+ </div>
21
+ </template>
22
+
23
+ <script>
24
+ import ApiMain from "../../components/cmsComponents/api/ApiMain.vue";
25
+ import conf from "../../config/index";
26
+ import { loadImportScript, loadImportCacheScript } from "../../utils/index";
27
+ import { mapState } from "vuex";
28
+
29
+ export default {
30
+ name: "PageApi",
31
+ data() {
32
+ return {
33
+ // color: window.themeColor || "var(--primary-color)",
34
+ list: [], // list data
35
+ initPath: "",
36
+ listLoading: false,
37
+ type: ''
38
+ };
39
+ },
40
+
41
+ components: {
42
+ ApiMain,
43
+ },
44
+
45
+ computed: mapState({
46
+ lang: (state) => state.language,
47
+ }),
48
+
49
+ created() {
50
+ console.log('create:')
51
+ this.type = this.$route.params.code
52
+ this.getListData();
53
+ },
54
+ watch: {
55
+ $route(val) {
56
+ if (val.name != 'doc-prodoc') {
57
+ this.type = ''
58
+ }
59
+ this.$nextTick(() => {
60
+ this.list = []
61
+ this.listLoading = false;
62
+ this.type = this.$route.params.code
63
+ this.getListData();
64
+ })
65
+ }
66
+ },
67
+
68
+ methods: {
69
+ /**
70
+ * 获取wiki树结构
71
+ */
72
+ async getListData() {
73
+ const hostName = window.mainHostname;
74
+ let type = this.type && '/' + this.type || ''
75
+ const url = `${conf.sitePath}${hostName}/${this.lang}/api${type}/all/classify_tree.js`;
76
+ this.listLoading = true;
77
+ await loadImportScript(url, null, "message")
78
+ .then((res) => {
79
+ console.log("res", res);
80
+ this.list = res.filter((v) => {
81
+ return v.content && v.content.length > 0;
82
+ });
83
+ })
84
+ .catch(() => false);
85
+ this.listLoading = false;
86
+ },
87
+ },
88
+ };
89
+ </script>
90
+ <style lang="less" scoped>
91
+ .page-api {
92
+ // background: #000;
93
+ font-size: 16px;
94
+ display: flex;
95
+ flex-direction: column;
96
+ min-height: 100vh;
97
+ // padding-top: 60px;
98
+ .api-container{
99
+ flex: auto;
100
+ // display: flex;
101
+ // flex-direction: column
102
+ }
103
+ .loading-wrap {
104
+ flex: auto;
105
+ min-height: 100vh;
106
+ text-align: center;
107
+ display: flex;
108
+ align-items: center;
109
+ justify-content: center;
110
+ }
111
+ }
112
+ // header
113
+ @media screen and (max-width: 768px) {
114
+ .page-api {
115
+ .header {
116
+ display: none;
117
+ }
118
+ }
119
+ }
120
+ </style>
@@ -0,0 +1,42 @@
1
+ <!--
2
+ * @Descripttion:
3
+ * @version:
4
+ * @Author:
5
+ * @Date: 2021-08-09 17:53:02
6
+ * @LastEditors: Lewis
7
+ * @LastEditTime: 2021-11-05 17:35:12
8
+ -->
9
+ <template>
10
+ <div class="container">
11
+ <Header :showMiddleInfo="true" class='visible-pc'/>
12
+ <Top class="top visible-h5" color='white' iconColor='black'/>
13
+ <Dapp class='dapp-container'/>
14
+ <Footer></Footer>
15
+ </div>
16
+ </template>
17
+
18
+ <script>
19
+ export default {
20
+ name: 'dapp',
21
+ data() {
22
+ return {
23
+ }
24
+ }
25
+ }
26
+ </script>
27
+
28
+ <style lang="less" scoped>
29
+ .container {
30
+ position: relative;
31
+ width: 100%;
32
+ min-height: 100vh;
33
+ overflow-x: hidden ;
34
+ display: flex;
35
+ flex-direction: column;
36
+ flex-wrap: wrap;
37
+ justify-content: space-between;
38
+ }
39
+ .dapp-container {
40
+ flex: 1;
41
+ }
42
+ </style>
@@ -0,0 +1,124 @@
1
+ <!--
2
+ * @Descripttion:
3
+ * @version:
4
+ * @Author:
5
+ * @Date: 2021-08-12 23:35:01
6
+ * @LastEditors: Lewis
7
+ * @LastEditTime: 2021-11-07 22:03:06
8
+ -->
9
+ <template>
10
+ <div class="cms-detail">
11
+ <Header :showMiddleInfo="true" v-if='!isPhone'/>
12
+ <GoHistory v-if='isPhone' class='history' />
13
+ <div class='cms-center'>
14
+ <div class="cms-container">
15
+ <div v-if="detail.id && !isPhone" class="bread-wrap">
16
+ <PowxBread :list="navList"> </PowxBread>
17
+ </div>
18
+ <CmsDetail v-if="detail.id" :detail="detail"></CmsDetail>
19
+ <!-- loading -->
20
+ <div v-else class="loading-wrap">
21
+ <site-loading></site-loading>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ <Footer></Footer>
26
+ </div>
27
+ </template>
28
+
29
+ <script>
30
+ import conf from "../../config/index"
31
+ import { loadImportScript, isPhone } from "../../utils/index"
32
+ import CmsDetail from "./../../components/cmsComponents/academy/CmsDetail.vue"
33
+
34
+ export default {
35
+ name: "dapp-detail",
36
+ components: {
37
+ CmsDetail,
38
+ },
39
+ data() {
40
+ return {
41
+ id: "",
42
+ categoryCode: "",
43
+ navList: [
44
+ { name: 'Dapp', path: "/cms/dapps" },
45
+ { name: "", path: "" },
46
+ ],
47
+ detail: {},
48
+ isPhone: isPhone()
49
+ }
50
+ },
51
+ mounted() {
52
+ let query = this.$route.query
53
+ this.fetchData(query)
54
+ // https://d1qu701gfywrk1.cloudfront.net/test.iswallet.me/en_US/academy/base_operation/how_to_transfer_between_layer2_accounts.js
55
+ },
56
+ methods: {
57
+ fetchData(query) {
58
+ let hostname = window.mainHostname
59
+ let lang = localStorage.getItem('language')
60
+ let codeArr = query.detailCode && query.detailCode.split(',') || []
61
+ loadImportScript(
62
+ `${conf.sitePath}${hostname}/${lang}/${codeArr[0]}/${codeArr[1]}/${codeArr[2]}.js`,
63
+ null,
64
+ 'message'
65
+ ).then(res => {
66
+ this.detail = res
67
+ this.navList.splice(1, 1, {
68
+ name: codeArr[1],
69
+ path: ""
70
+ })
71
+ }).catch(() => false)
72
+ }
73
+ }
74
+ }
75
+ </script>
76
+
77
+ <style lang="less" scoped>
78
+ .cms-detail {
79
+ padding: 20px 30px;
80
+ display: flex;
81
+ flex-direction: column;
82
+ justify-content: space-between;
83
+ min-height: 100vh;
84
+ align-items: center;
85
+ .history {
86
+ height: 60px;
87
+ width: 100%;
88
+ margin-bottom: 10px;
89
+ }
90
+ .cms-center {
91
+ flex: 1;
92
+ }
93
+ .bread-wrap {
94
+ margin-bottom: 40px;
95
+ }
96
+ .heartWidth {
97
+ width: auto;
98
+ max-width: 820px;
99
+ .ivu-breadcrumb {
100
+ font-size: 16px;
101
+ .ivu-breadcrumb-item-separator {
102
+ margin: 0 4px;
103
+ }
104
+ }
105
+ }
106
+
107
+ .loading-wrap {
108
+ height: 100vh;
109
+ text-align: center;
110
+ display: flex;
111
+ align-items: center;
112
+ justify-content: center;
113
+ }
114
+ .footer {
115
+ background: var(--footer-bg);
116
+ }
117
+ }
118
+ @media screen and (min-width: 1200px) {
119
+ .cms-detail {
120
+ // padding-top: 60px;
121
+ flex-wrap: wrap;
122
+ }
123
+ }
124
+ </style>
@@ -0,0 +1,155 @@
1
+ <!--
2
+ * @Descripttion:
3
+ * @version:
4
+ * @Author:
5
+ * @Date: 2021-08-12 23:35:01
6
+ * @LastEditors: Lewis
7
+ * @LastEditTime: 2021-08-26 22:30:47
8
+ -->
9
+ <template>
10
+ <div class="cms-detail">
11
+ <Header :showMiddleInfo="true" />
12
+ <div class="cms-container" id="js-article-content">
13
+ <div v-if="detail.id" class="bread-wrap">
14
+ <PowxBread :list="navList"> </PowxBread>
15
+ </div>
16
+ <CmsDetail v-if="detail.id" :key="detail.id" :detail="detail"></CmsDetail>
17
+ <!-- loading -->
18
+ <div v-else class="loading-wrap">
19
+ <site-loading></site-loading>
20
+ </div>
21
+ </div>
22
+ <Footer></Footer>
23
+ </div>
24
+ </template>
25
+
26
+ <script>
27
+ import conf from "../../config/index";
28
+ import { loadImportScript } from "../../utils/index";
29
+ import { mapState } from "vuex";
30
+
31
+ import CmsDetail from "./../../components/cmsComponents/academy/CmsDetail.vue";
32
+
33
+ export default {
34
+ name: "AcdemyDetail",
35
+ components: {
36
+ CmsDetail,
37
+ },
38
+ data() {
39
+ return {
40
+ id: "",
41
+ code: "",
42
+ categoryCode: "",
43
+ // Academy > 分类 > 标题
44
+ navList: [
45
+ {
46
+ name: this.$t("index_header_menu_academy"),
47
+ path: "/cms/academy",
48
+ },
49
+ ],
50
+ detail: {},
51
+ };
52
+ },
53
+ computed: mapState({
54
+ lang: (state) => state.language,
55
+ // localHostname: (state) => state.localHostname,
56
+ }),
57
+ watch:{
58
+ $route(to, from) {
59
+ this.init();
60
+ }
61
+ },
62
+ created() {
63
+ this.init();
64
+ },
65
+ methods: {
66
+ init() {
67
+ this.navList = [
68
+ {
69
+ name: this.$t("index_header_menu_academy"),
70
+ path: "/cms/academy",
71
+ },
72
+ ];
73
+
74
+ // console.log("this.$route", this.$route);
75
+ const { code, categoryCode } = this.$route.params || this.$route.query;
76
+ this.code = code;
77
+ this.categoryCode = categoryCode;
78
+ this.fetchData();
79
+
80
+ const el = document.getElementById('js-article-content');
81
+ el && el.scrollIntoView({
82
+ behavior: 'smooth',
83
+ block: 'start',
84
+ // inline: 'center'
85
+ });
86
+ },
87
+ fetchData() {
88
+ let hostname = window.mainHostname;
89
+ const url = `${conf.sitePath}${hostname}/${this.lang}/academy/${this.categoryCode}/${this.code}.js`;
90
+ console.log('url:', url);
91
+ // https://test-exbang.s3-ap-northeast-1.amazonaws.com/domain/academy/academy_list_language.js
92
+ loadImportScript(url, null, 'message')
93
+ .then((res) => {
94
+ console.log('res:', res);
95
+ // 内容替换
96
+ res.description = res.description.replace(/\$\{site_name\}/g, this.$t("site_common_site_name"));
97
+
98
+ this.detail = res;
99
+
100
+ this.navList.push({
101
+ name: this.detail.type_title,
102
+ path: "",
103
+ });
104
+ // this.navList.splice(2, 1, {
105
+ // name: this.detail.title,
106
+ // path: "",
107
+ // });
108
+ })
109
+ .catch(() => false);
110
+ },
111
+ },
112
+ };
113
+ </script>
114
+
115
+ <style lang="less" scoped>
116
+ .cms-detail {
117
+ // padding-top: 60px;
118
+ .cms-container{
119
+ max-width: 1132px;
120
+ padding: 0 20px;
121
+ margin-left: auto;
122
+ margin-right: auto;
123
+ }
124
+ .bread-wrap {
125
+ margin-bottom: 40px;
126
+ }
127
+ .heartWidth {
128
+ .ivu-breadcrumb {
129
+ font-size: 16px;
130
+ .ivu-breadcrumb-item-separator {
131
+ margin: 0 4px;
132
+ }
133
+ }
134
+ }
135
+
136
+ .loading-wrap {
137
+ height: 100vh;
138
+ text-align: center;
139
+ display: flex;
140
+ align-items: center;
141
+ justify-content: center;
142
+ }
143
+ .footer {
144
+ background: var(--footer-bg);
145
+ }
146
+ }
147
+
148
+ @media screen and (min-width: 1200px) {
149
+ .cms-detail {
150
+ .cms-container{
151
+ padding: 0;
152
+ }
153
+ }
154
+ }
155
+ </style>
@@ -0,0 +1,124 @@
1
+ <!-- api -->
2
+ <template>
3
+ <div class="page-api">
4
+ <div class="visible-pc">
5
+ <Header :showMiddleInfo="true" />
6
+ </div>
7
+ <div class="visible-h5">
8
+ <Top class="top" />
9
+ </div>
10
+ <div class="api-container">
11
+ <!-- loading -->
12
+ <div v-if="listLoading" class="loading-wrap">
13
+ <site-loading></site-loading>
14
+ </div>
15
+ <DocMain v-else :docList="docList" :initPath="initPath"></DocMain>
16
+ </div>
17
+
18
+ <Footer />
19
+ </div>
20
+ </template>
21
+
22
+ <script>
23
+ import DocMain from "../../components/cmsComponents/api/DocMain.vue";
24
+ import conf from "../../config/index";
25
+ import { loadImportScript } from "../../utils/index";
26
+ import { mapState } from "vuex";
27
+
28
+ export default {
29
+ name: "DocApi",
30
+ data() {
31
+ return {
32
+ // color: window.themeColor || "var(--primary-color)",
33
+ docList: [], // list data
34
+ initPath: "",
35
+ listLoading: false,
36
+ };
37
+ },
38
+
39
+ components: {
40
+ DocMain,
41
+ },
42
+
43
+ computed: mapState({
44
+ lang: (state) => state.language,
45
+ }),
46
+
47
+ created() {
48
+ console.log("this.$route", this.$route);
49
+ this.getProducData();
50
+ },
51
+
52
+ methods: {
53
+ /**
54
+ * 获取product树结构
55
+ */
56
+ async getProducData() {
57
+ const hostName = window.mainHostname;
58
+ const url = `${conf.sitePath}${hostName}/${this.lang}/api/production.js`;
59
+ // const url = `https://d1qu701gfywrk1.cloudfront.net/rinkeby-test.powx.io/en_US/api/production.js`
60
+ this.listLoading = true;
61
+ await loadImportScript(url, null, "message")
62
+ .then(async (res) => {
63
+ console.log("res", res);
64
+ let resList = [];
65
+ for(var i = 0; i < res.length; i++) {
66
+ let list = await this.getListData(res[i].name)
67
+ let temp = {
68
+ name: res[i].name,
69
+ id: res[i].id,
70
+ list: list
71
+ }
72
+ resList.push(temp)
73
+ }
74
+ this.docList = resList
75
+ this.$set(this, 'docList', resList)
76
+ })
77
+ .catch(() => false);
78
+ this.listLoading = false;
79
+ },
80
+ /**
81
+ * 获取wiki树结构
82
+ */
83
+ async getListData(type) {
84
+ const hostName = window.mainHostname;
85
+ // const url = `${conf.sitePath}${hostName}/${this.lang}/api/all/classify_tree.js`;
86
+ const url = `${conf.sitePath}${hostName}/${this.lang}/api/${type}/all/classify_tree.js`;
87
+ this.listLoading = true;
88
+ let apiList = await loadImportScript(url, null, "message")
89
+ return apiList || []
90
+ }
91
+ },
92
+ };
93
+ </script>
94
+ <style lang="less" scoped>
95
+ .page-api {
96
+ // background: #000;
97
+ font-size: 16px;
98
+ display: flex;
99
+ flex-direction: column;
100
+ min-height: 100vh;
101
+ // padding-top: 60px;
102
+ .api-container{
103
+ flex: auto;
104
+ // display: flex;
105
+ // flex-direction: column
106
+ }
107
+ .loading-wrap {
108
+ flex: auto;
109
+ min-height: 100vh;
110
+ text-align: center;
111
+ display: flex;
112
+ align-items: center;
113
+ justify-content: center;
114
+ }
115
+ }
116
+ // header
117
+ @media screen and (max-width: 768px) {
118
+ .page-api {
119
+ .header {
120
+ display: none;
121
+ }
122
+ }
123
+ }
124
+ </style>