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
@@ -0,0 +1,145 @@
1
+ <!-- Help & Support -->
2
+ <template>
3
+ <div class="help">
4
+ <Header class="visible-pc" :showMiddleInfo="true" />
5
+ <OtherNav class="visible-h5" bottom="10">{{
6
+ $t("cms_help_bread_title")
7
+ }}</OtherNav>
8
+ <div v-if="!loading" class="content">
9
+ <!-- <HelpNav class="nav"/> -->
10
+ <PowxBread :list="bread" class="nav"></PowxBread>
11
+ <HelpSupport :list="list"/>
12
+ </div>
13
+ <div v-else class="loading-wrap">
14
+ <site-loading></site-loading>
15
+ </div>
16
+ <!-- TODO:Footer改为后端配置,全局统一 -->
17
+ <Footer v-if='!version' class="footer" type="fixed" />
18
+ <!-- 2mr统一新的页脚 -->
19
+ <footer-wrap v-else/>
20
+ </div>
21
+ </template>
22
+
23
+ <script>
24
+ import HelpSupport from '../../../components/cmsComponents/help/Index.vue'
25
+ import conf from "../../../config/index";
26
+ import { loadImportScript, isPhone} from "../../../utils/index";
27
+ import { mapState } from "vuex";
28
+ import HelpNav from './nav.vue';
29
+ import _ from 'lodash';
30
+
31
+ export default {
32
+ name: 'HelpPage',
33
+ data() {
34
+ return {
35
+ list: [], // help list data
36
+ isPhone: isPhone(),
37
+ bread: [
38
+ {
39
+ path: "/help",
40
+ name: this.$t("cms_help_bread_title"),
41
+ },
42
+ ],
43
+ loading: true
44
+ };
45
+ },
46
+
47
+ components: {
48
+ HelpSupport,
49
+ HelpNav
50
+ },
51
+
52
+ computed: {
53
+ lang() {
54
+ return this.$store.state.language
55
+ },
56
+ version() {
57
+ return this.$store.state.siteConfig.footerMsgVersion || ''
58
+ }
59
+ },
60
+
61
+ mounted() {
62
+ this.getListData();
63
+ },
64
+
65
+ methods: {
66
+ /**
67
+ * 获取help树结构
68
+ */
69
+ getListData() {
70
+ const hostName = window.mainHostname
71
+ const url = `${conf.sitePath}${hostName}/${this.lang}/help/all/classify_tree.js`
72
+ loadImportScript(url, null, 'message')
73
+ .then((res) => {
74
+ _.forEach(res, (firstItem) => {
75
+ if (firstItem.children && firstItem.children.length !== 0) {
76
+ _.forEach(firstItem.children, (secItem) => {
77
+ if (secItem.children && secItem.children.length !== 0) {
78
+ _.forEach(secItem.children, (thirdItem, thirdIndex) => {
79
+ thirdItem.isExpand = thirdIndex === 0;
80
+ })
81
+ }
82
+ })
83
+ }
84
+ })
85
+ this.list = res;
86
+ this.loading = false;
87
+ // 滚动到锚点
88
+ this.$nextTick(() => {
89
+ this.goAnchor();
90
+ })
91
+ })
92
+ .catch((err) => {
93
+ console.error(err);
94
+ this.loading = false;
95
+ });
96
+ },
97
+ goAnchor() {
98
+ const hash = this.$route.hash;
99
+
100
+ if (hash) {
101
+ const el = document.querySelector(hash);
102
+ window.scrollTo({
103
+ top: el.offsetTop - 80,
104
+ behavior: "smooth",
105
+ });
106
+ }
107
+ }
108
+ }
109
+ };
110
+
111
+ </script>
112
+ <style lang='less' scoped>
113
+ .help{
114
+ display: flex;
115
+ flex-direction: column;
116
+ .content{
117
+ padding: 0 20px;
118
+ max-width: 1190px;
119
+ flex: 1;
120
+ .nav{
121
+ border-bottom: 1px solid var(--border-color-base);
122
+ }
123
+ }
124
+ .loading-wrap {
125
+ flex: auto;
126
+ text-align: center;
127
+ display: flex;
128
+ align-items: center;
129
+ justify-content: center;
130
+ }
131
+ }
132
+ @media screen and (min-width: 768px) {
133
+ .help{
134
+ min-height: 100vh;
135
+ .content{
136
+ margin: 0 auto 60px;
137
+ width: 100%;
138
+ .nav{
139
+ margin-bottom: 32px;
140
+ }
141
+ }
142
+ }
143
+ }
144
+ @media screen and (min-width: 1200px) {}
145
+ </style>
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <div class="help-nav">
3
+ <div class="module-title" @click="goBackToHelp">{{moduleTitle}}</div>
4
+ <div v-if="classificationName !== ''">&gt;</div>
5
+ <div v-if="classificationName !== ''">{{classificationName}}</div>
6
+ </div>
7
+ </template>
8
+
9
+ <script>
10
+ export default {
11
+ name: 'HelpNav',
12
+ props: {
13
+ classificationName: {
14
+ type: String,
15
+ default: ''
16
+ }
17
+ },
18
+ data() {
19
+ return {
20
+ moduleTitle: this.$t("cms_help_bread_title"),
21
+ };
22
+ },
23
+
24
+ components: {},
25
+
26
+ computed: {},
27
+
28
+ mounted() {},
29
+
30
+ methods: {
31
+ goBackToHelp() {
32
+ if (this.classificationName === '') return;
33
+ const { rootId, expandId } = this.$route.query;
34
+ const query = {
35
+ rootId
36
+ }
37
+ if (expandId) {
38
+ Object.assign(query, {expandId});
39
+ }
40
+ this.$router.push({path: '/help', query});
41
+ }
42
+ }
43
+ };
44
+
45
+ </script>
46
+ <style lang='less' scoped>
47
+ .help-nav{
48
+ padding: 16px 0;
49
+ width: 100%;
50
+ display: flex;
51
+ align-items: center;
52
+ border-bottom: 1px solid var(--border-color-base);
53
+ color: #3D5066;
54
+ font-family: Font;
55
+ >div{
56
+ line-height: 24px;
57
+ font-size: 16px;
58
+ }
59
+ .module-title{
60
+ cursor: pointer;
61
+ }
62
+ >div:nth-child(2) {
63
+ margin: 0 4px;
64
+ position: relative;
65
+ top: 2px;
66
+ }
67
+ }
68
+ </style>
@@ -0,0 +1,133 @@
1
+ <!-- 文章详情 -->
2
+ <template>
3
+ <div class="help-detail">
4
+ <Header class="visible-pc" :showMiddleInfo="true" />
5
+ <OtherNav class="visible-h5" bottom="10">{{
6
+ $t("cms_help_bread_title")
7
+ }}</OtherNav>
8
+ <div v-if="!loading" class="content">
9
+ <!-- <HelpNav class="nav" :classificationName="classificationName"/> -->
10
+ <PowxBread :list="bread" class="nav"></PowxBread>
11
+ <HelpDetail :articleTitle="articleTitle" :updateTime="updateTime" :detailArticle="detailArticle" :articleImg="articleImg"/>
12
+ </div>
13
+ <div v-else class="loading-wrap">
14
+ <site-loading></site-loading>
15
+ </div>
16
+ <Footer/>
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+ import HelpDetail from '../../components/cmsComponents/help/detail.vue'
22
+ import conf from "../../config/index";
23
+ import { loadImportScript } from "../../utils/index";
24
+ import { mapState } from "vuex";
25
+ import HelpNav from './help/index.vue';
26
+
27
+ export default {
28
+ name: 'HelpDetailPage',
29
+ data() {
30
+ return {
31
+ loading: true,
32
+ bread: [
33
+ {
34
+ path: "/help",
35
+ name: this.$t("cms_recruit_bread_title"),
36
+ },
37
+ ],
38
+ classificationName: '',
39
+ name: '', // 文章对应cdn文件名称Recruit
40
+ classification: '', // 分类
41
+ articleTitle: '', // 文章标题
42
+ updateTime: '', // 更新时间
43
+ detailArticle: '', // 文章详情
44
+ articleImg: ''
45
+ };
46
+ },
47
+
48
+ components: {
49
+ HelpDetail,
50
+ HelpNav
51
+ },
52
+
53
+ computed: mapState({
54
+ lang: (state) => state.language,
55
+ }),
56
+
57
+ created() {
58
+ const { name } = this.$route.params;
59
+ this.classification = 'recruit'
60
+ this.name = name
61
+ },
62
+ mounted() {
63
+ this.getDetail();
64
+ },
65
+
66
+ methods: {
67
+ /**
68
+ * 获取文章详情
69
+ */
70
+ getDetail() {
71
+ const hostName = window.mainHostname
72
+ const url = `${conf.sitePath}${hostName}/${this.lang}/announcement/${this.classification}/${this.name}.js`
73
+ loadImportScript(url, null, 'message')
74
+ .then((res) => {
75
+ const { title, description, update_time, type_title, image_url } = res;
76
+ const date = new Date(update_time);
77
+ const year = date.getFullYear();
78
+ const month = date.getMonth() + 1;
79
+ const day = date.getDate();
80
+ this.articleTitle = title;
81
+ this.updateTime = `${month}/${day}/${year}`;
82
+ this.detailArticle = description;
83
+ this.classificationName = type_title;
84
+ this.bread.push({
85
+ name: type_title
86
+ })
87
+ // this.articleImg = 'https://d1qu701gfywrk1.cloudfront.net/2021/10/27/bcde1058-2eb3-492a-8513-7009b60a7e24.png';
88
+ this.articleImg = image_url;
89
+ this.loading = false;
90
+ })
91
+ .catch((err) => {
92
+ console.error(err);
93
+ this.loading = false;
94
+ });
95
+ }
96
+ }
97
+ };
98
+
99
+ </script>
100
+ <style lang='less' scoped>
101
+ .help-detail{
102
+ display: flex;
103
+ flex-direction: column;
104
+ .content{
105
+ padding: 0 20px;
106
+ max-width: 1100px;
107
+ flex: 1;
108
+ .nav{
109
+ border-bottom: 1px solid var(--border-color-base);
110
+ }
111
+ }
112
+ .loading-wrap {
113
+ flex: auto;
114
+ text-align: center;
115
+ display: flex;
116
+ align-items: center;
117
+ justify-content: center;
118
+ }
119
+ }
120
+ @media screen and (min-width: 768px) {
121
+ .help-detail{
122
+ min-height: 100vh;
123
+ .content{
124
+ margin: 0 auto 40px;
125
+ width: 100%;
126
+ .nav{
127
+ margin-bottom: 32px;
128
+ }
129
+ }
130
+ }
131
+ }
132
+ </style>
133
+
@@ -0,0 +1,126 @@
1
+ <!-- sdk -->
2
+ <template>
3
+ <div class="page-sdk">
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="wiki-container">
11
+ <div class="wiki-article" v-if="list.length">
12
+ <SDK :list="list" :initPath="initPath"></SDK>
13
+ </div>
14
+
15
+ <!-- loading -->
16
+ <div v-else class="loading-wrap">
17
+ <site-loading></site-loading>
18
+ </div>
19
+ </div>
20
+
21
+ <Footer />
22
+ </div>
23
+ </template>
24
+
25
+ <script>
26
+ import SDK from "../../components/cmsComponents/sdk/index.vue";
27
+ import conf from "../../config/index";
28
+ import { loadImportScript, isPhone } from "../../utils/index";
29
+ import { mapState } from "vuex";
30
+
31
+ export default {
32
+ name: "WikiPage",
33
+ data() {
34
+ return {
35
+ // color: window.themeColor || "var(--primary-color)",
36
+ list: [], // help list data
37
+ navList: [{ name: this.$t("cms_help_bread_title") }],
38
+ // article: {},
39
+ isPhone: isPhone(),
40
+ // initName: [],
41
+ initPath: "",
42
+ // nextPageList: [{ show: false }, { show: false }],
43
+ };
44
+ },
45
+
46
+ components: {
47
+ SDK,
48
+ },
49
+
50
+ computed: mapState({
51
+ lang: (state) => state.language,
52
+ }),
53
+
54
+ created() {
55
+ console.log('this.$route', this.$route)
56
+ this.getListData();
57
+ },
58
+
59
+ methods: {
60
+ /**
61
+ * 获取wiki树结构
62
+ */
63
+ getListData() {
64
+ const hostName = window.mainHostname;
65
+ const url = `${conf.sitePath}${hostName}/${this.lang}/sdk/all/classify_tree.js`;
66
+ loadImportScript(url, null, "message")
67
+ .then((res) => {
68
+ console.log("res", res);
69
+ this.list = res.filter((v) => {
70
+ return v.content && v.content.length > 0;
71
+ });
72
+
73
+ })
74
+ .catch(() => false);
75
+ },
76
+ /**
77
+ * 获取文章
78
+ * */
79
+ getArticle(path) {
80
+ const hostName = window.mainHostname;
81
+ const url = `${conf.sitePath}${hostName}/${this.lang}/sdk/${path}.js`;
82
+ this.article = {};
83
+ loadImportScript(url, null, "message")
84
+ .then((res) => {
85
+ console.log("article res", res);
86
+ this.article = res;
87
+ })
88
+ .catch(() => false);
89
+ },
90
+ },
91
+ };
92
+ </script>
93
+ <style lang='less' scoped>
94
+ .page-sdk {
95
+ // background: #000;
96
+ font-size: 16px;
97
+ display: flex;
98
+ flex-direction: column;
99
+ min-height: 100vh;
100
+ // padding-top: 70px;
101
+
102
+ .wiki-container {
103
+ // min-height: 100vh;
104
+ flex: auto;
105
+ display: flex;
106
+ }
107
+ .wiki-article{
108
+ flex: auto;
109
+ }
110
+ .content {
111
+ margin-bottom: 70px;
112
+ }
113
+ .nav-bread {
114
+ // width: 1100px;
115
+ margin: 70px auto 40px;
116
+ }
117
+ .loading-wrap {
118
+ flex: auto;
119
+ text-align: center;
120
+ display: flex;
121
+ align-items: center;
122
+ justify-content: center;
123
+ }
124
+ }
125
+
126
+ </style>