udxcms 1.0.3 → 1.0.4

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.
@@ -0,0 +1,374 @@
1
+ <template>
2
+ <div class="page-apps">
3
+ <div class="visible-pc">
4
+ <Header :showMiddleInfo="true" class='page-top'/>
5
+ </div>
6
+ <div class="visible-h5">
7
+ <Top class="top" />
8
+ </div>
9
+ <img class="bg" :src="require('../../../assets/apps-bg.svg')" />
10
+ <div class="container ecosystem-container">
11
+ <div class="apps-top">
12
+ <h1>{{ $t('cms_ecosystem_apps_title') }}</h1>
13
+ <p>{{ $t('cms_ecosystem_apps_subtitle', {siteName: this.$t('site_common_site_name')}) }}</p>
14
+ </div>
15
+ <div class="app-tags">
16
+ <span :class="['tag-item', activeIndex == -1 && 'active']" @click="setItem(-1)">{{$t('cms_ecosystem_apps_all')}}</span>
17
+ <span
18
+ :class="['tag-item', activeIndex == index && 'active']"
19
+ v-for="(item, index) in tagList"
20
+ :key="index"
21
+ @click="setItem(index)"
22
+ >{{ item.name }}</span>
23
+ </div>
24
+ <div class="apps-wrapper">
25
+ <div
26
+ class="apps-item"
27
+ v-for="(item, index) in storeList.slice(0, !checkMore ? checkMoreCount : storeList.length)"
28
+ :key="index" @click='goUrl(item)'
29
+ >
30
+ <div class="cover" :style="'background-image: url(' + item.image_url + ');'"></div>
31
+ <div class="apps-content">
32
+ <div class="title">{{ item.title }}</div>
33
+ <div class="subtitle">{{ item.brief }}</div>
34
+ </div>
35
+ <div class="tag-box">
36
+ <span class="tag" v-for="(item, index) in item.tagList" :key="index">{{ item }}</span>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ <div
41
+ class="apps-more"
42
+ v-if="storeList.length >= checkMoreCount && !checkMore"
43
+ @click="checkMore = true"
44
+ >
45
+ <span>{{ $t('cms_ecosystem_apps_learn_more') }}</span>
46
+ <img class="icon" :src="require('../../../assets/icon-link.svg')" />
47
+ </div>
48
+ <div class="apps-bottom">
49
+ <div class="apps-left">
50
+ <div class="tags">
51
+ <span class="tag">{{ $t('cms_ecosystem_apps_bottom_left_tag') }}</span>
52
+ </div>
53
+ <div class="bottom">
54
+ <div class="title">{{ $t('cms_ecosystem_apps_bottom_left_title') }}<img class="icon" :src="require('../../../assets/icon-arrow-right.svg')" /></div>
55
+ <div class="subtitle">{{ $t('cms_ecosystem_apps_bottom_left_subtitle') }}</div>
56
+ </div>
57
+ </div>
58
+ <router-link to="/staking" class="apps-right">
59
+ <div class="tags">
60
+ <span class="tag">{{ $t('cms_ecosystem_apps_bottom_right_tag') }}</span>
61
+ </div>
62
+ <div class="title">{{ $t('cms_ecosystem_apps_bottom_right_title') }}<img class="icon" :src="require('../../../assets/icon-arrow-right.svg')" /></div>
63
+ <div class="subtitle">{{ $t('cms_ecosystem_apps_bottom_right_subtitle') }}</div>
64
+ </router-link>
65
+ </div>
66
+ </div>
67
+ <div class='ecosystem-footer'>
68
+ <Footer class='ecosystem-inner-footer'/>
69
+ </div>
70
+ </div>
71
+ </template>
72
+
73
+ <script>
74
+ import { loadImportScript } from '../../../utils/index'
75
+ import conf from '../../../config/index'
76
+ export default {
77
+ data() {
78
+ return {
79
+ storeList: [],
80
+ storeInitList: [],
81
+ tags: [],
82
+ activeIndex: -1,
83
+ activeText: '',
84
+ checkMore: false,
85
+ checkMoreCount: 9,
86
+ tagList: []
87
+ }
88
+ },
89
+ watch: {
90
+ activeText(val) {
91
+ if (!val) this.storeList = this.storeInitList
92
+ else this.storeList = this.storeInitList.filter(v => {
93
+ return !!~v.tagList.indexOf(val)
94
+ })
95
+ }
96
+ },
97
+ mounted() {
98
+ this.getDappList()
99
+ this.getTaglist()
100
+ // this.animationFactory()
101
+ },
102
+ methods: {
103
+ getDappList() {
104
+ let hostname = window.location.hostname
105
+ let lang = localStorage.getItem('language')
106
+ let src = `${conf.sitePath}${hostname}/${lang}/app_store/all/classify_tree.js`
107
+ this.loading = true
108
+ loadImportScript(`${conf.sitePath}${hostname}/${lang}/app_store/all/classify_tree.js`, null, 'message').then(res => {
109
+ console.log('message', res)
110
+ let dappsList = res || []
111
+ let storeList = []
112
+ let tags = []
113
+ dappsList.map(v => {
114
+ if (v.content) {
115
+ storeList = storeList.concat(v.content)
116
+ }
117
+ })
118
+ this.storeList = storeList.map(v => {
119
+ v.tagList = v.tags && v.tags.map(tag => {
120
+ return tag.name
121
+ })
122
+ if (v.tagList) tags = tags.concat(v.tagList)
123
+ return v
124
+ })
125
+ this.storeInitList = Object.assign([], this.storeList)
126
+ this.tags = Array.from(new Set(tags))
127
+ console.log('this.storeList', this.storeList, this.tags)
128
+ this.loading = false
129
+ })
130
+ },
131
+ getTaglist() {
132
+ let hostname = window.location.hostname
133
+ let lang = localStorage.getItem('language')
134
+ let src = `${conf.sitePath}${hostname}/all/app_store/all/all_tag.js`
135
+ loadImportScript(src, null, 'message').then(res => {
136
+ console.log('getTaglist', res)
137
+ this.tagList = Object.assign([], res)
138
+ })
139
+ },
140
+ setItem(index) {
141
+ this.activeIndex = index
142
+ this.activeText = index == -1 ? '' : this.tagList[index].name
143
+ },
144
+
145
+ goUrl(item) {
146
+ item.link && window.open(item.link, '_blank')
147
+ }
148
+ }
149
+ }
150
+ </script>
151
+
152
+ <style lang="less">
153
+
154
+ .ecosystem-footer {
155
+ position: relative;
156
+ z-index: 2;
157
+ }
158
+
159
+ .page-apps {
160
+ overflow: hidden;
161
+ min-height: 100vh;
162
+ position: relative;
163
+ // padding-top: 80px;
164
+ background: black;
165
+ .page-top {
166
+ z-index: 20000;
167
+ }
168
+ .bg {
169
+ position: absolute;
170
+ left: 50%;
171
+ transform: translateX(-50%);
172
+ top: -50px;
173
+ z-index:1;
174
+ }
175
+ .container{
176
+ padding: 20px;
177
+ position: relative;
178
+ z-index: 10;
179
+ }
180
+
181
+ .apps-top{
182
+ color: #fff;
183
+ max-width: 800px;
184
+ margin: 100px auto 85px;
185
+ text-align: center;
186
+ h1{
187
+ font-size: 40px;
188
+ }
189
+ p{
190
+ color: rgba(255, 255, 255, 0.82);
191
+ }
192
+ }
193
+ .app-tags {
194
+ display: flex;
195
+ width: 100%;
196
+ justify-content: center;
197
+ margin-top: 60px;
198
+ margin-bottom: 60px;
199
+ flex-wrap: wrap;
200
+ .tag-item {
201
+ font-family: FontMedium;
202
+ padding: 8px 10px;
203
+ border-radius: 6px;
204
+ background: rgba(255, 255, 255, 0.12);
205
+ text-align: center;
206
+ font-size: 16px;
207
+ line-height: 16px;
208
+ margin-right: 16px;
209
+ color: white;
210
+ margin-bottom: 16px;
211
+ cursor: pointer;
212
+ &:hover {
213
+ background: rgba(255, 255, 255, 0.42);
214
+ }
215
+ }
216
+ .tag-item.active {
217
+ background: var(--primary-bg-color);
218
+ }
219
+ }
220
+
221
+ .apps-wrapper {
222
+ display: grid;
223
+ gap: 20px;
224
+ min-height: 200px;
225
+ .apps-item {
226
+ border-radius: 12px;
227
+ overflow: hidden;
228
+ position: relative;
229
+ background: white;
230
+ .cover {
231
+ padding-top: 50%;
232
+ // border-radius: 12px 12px 0 0;
233
+ // background-color: #eee;
234
+ background-position: center center;
235
+ background-repeat: no-repeat;
236
+ background-size: cover;
237
+ }
238
+ .tag-box {
239
+ position: absolute;
240
+ z-index: 2;
241
+ top: 12px;
242
+ right: 12px;
243
+ display: flex;
244
+ justify-content: flex-end;
245
+ flex-wrap: wrap;
246
+ .tag {
247
+ padding: 6px 10px;
248
+ font-size: 12px;
249
+ line-height: 16px;
250
+ color: white;
251
+ border-radius: 8px;
252
+ background: rgba(0, 0, 0, 0.4);
253
+ margin-left: 0.5em;
254
+ font-family: FontMedium;
255
+ }
256
+ }
257
+ .apps-content {
258
+ padding: 20px;
259
+ width: 100%;
260
+ // height: 104px;
261
+ .title {
262
+ font-size: 16px;
263
+ font-family: FontMedium;
264
+ // color: var(--text-color-secondary);
265
+ }
266
+ .subtitle {
267
+ margin-top: 6px;
268
+ font-size: 14px;
269
+ color: var(--text-color-secondary);
270
+ font-family: FontRegular;
271
+ line-height: 1.5;
272
+ overflow: hidden;
273
+ text-overflow: ellipsis;
274
+ // display: -webkit-box;
275
+ // -webkit-line-clamp: 2;
276
+ // -webkit-box-orient: vertical;
277
+ }
278
+ }
279
+ }
280
+ }
281
+
282
+ .apps-more {
283
+ margin-top: 56px;
284
+ display: flex;
285
+ justify-content: center;
286
+ font-size: 20px;
287
+ line-height: 26px;
288
+ color: white;
289
+ cursor: pointer;
290
+ .icon {
291
+ margin-left: 10px;
292
+ width: 24px;
293
+ transform: rotate(90deg);
294
+ }
295
+ }
296
+
297
+ .apps-bottom {
298
+ display: grid;
299
+ gap: 30px;
300
+ margin: 100px auto;
301
+ .apps-left,
302
+ .apps-right {
303
+ // padding-top: 42.4779%; // 240 / 565 * 100%
304
+ overflow: hidden;
305
+ border-radius: 12px;
306
+ padding: 30px;
307
+ background: url("../../../assets/apps-article-cover-1.svg");
308
+ background-size: cover;
309
+ background-position: center;
310
+ }
311
+ .apps-right {
312
+ background: url("../../../assets/apps-article-cover-2.svg");
313
+ background-size: cover;
314
+ background-position: center;
315
+ }
316
+ .tags {
317
+ .tag {
318
+ font-size: 12px;
319
+ line-height: 16px;
320
+ font-family: FontSemiBold;
321
+ color: white;
322
+ }
323
+ }
324
+ .title {
325
+ margin-top: 100px;
326
+ font-size: 28px;
327
+ line-height: 36px;
328
+ color: white;
329
+ font-weight: 800;
330
+ .icon{
331
+ width: 32px;
332
+ margin-left: 4px;
333
+ }
334
+ }
335
+ .subtitle {
336
+ margin-top: 8px;
337
+ font-size: 16px;
338
+ line-height: 20px;
339
+ color: rgba(255, 255, 255, 0.82);
340
+ font-family: FontMedium;
341
+ }
342
+ }
343
+ }
344
+ @media screen and (min-width: 768px) {
345
+ .page-apps {
346
+ .apps-bottom {
347
+ grid-template-columns: repeat(2, 1fr);
348
+ }
349
+ .apps-wrapper {
350
+ grid-template-columns: repeat(2, 1fr);
351
+ }
352
+ }
353
+ }
354
+
355
+ @media screen and (min-width: 1200px) {
356
+ .page-apps {
357
+ // padding-top: 120px;
358
+ .container{
359
+ padding: 0;
360
+ }
361
+ .apps-top {
362
+ h1{
363
+ font-size: 64px;
364
+ }
365
+ }
366
+ .apps-wrapper {
367
+ grid-template-columns: repeat(3, 1fr);
368
+ }
369
+ .apps-bottom {
370
+ grid-template-columns: repeat(2, 1fr);
371
+ }
372
+ }
373
+ }
374
+ </style>
@@ -0,0 +1,29 @@
1
+ <!-- -->
2
+ <template>
3
+ <router-view />
4
+ </template>
5
+
6
+ <script>
7
+ export default {
8
+ name: '',
9
+ data() {
10
+ return {
11
+ };
12
+ },
13
+
14
+ components: {},
15
+
16
+ computed: {},
17
+
18
+ mounted() {},
19
+
20
+ methods: {},
21
+
22
+ beforeDestroy() {
23
+ sessionStorage.removeItem('helpExpandNode')
24
+ }
25
+ };
26
+
27
+ </script>
28
+ <style lang='less' scoped>
29
+ </style>
@@ -0,0 +1,167 @@
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" id="js-article-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
+ <!-- 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 HelpDetail from '../../../components/cmsComponents/help/detail.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
+
30
+ export default {
31
+ name: 'HelpDetailPage',
32
+ data() {
33
+ return {
34
+ loading: true,
35
+ bread: [
36
+ {
37
+ path: "/help",
38
+ name: this.$t("cms_help_bread_title"),
39
+ },
40
+ ],
41
+ classificationName: '',
42
+ name: '', // 文章对应cdn文件名称
43
+ classification: '', // 分类
44
+ articleTitle: '', // 文章标题
45
+ updateTime: '', // 更新时间
46
+ detailArticle: '', // 文章详情
47
+ articleImg: ''
48
+ };
49
+ },
50
+
51
+ components: {
52
+ HelpDetail,
53
+ HelpNav
54
+ },
55
+
56
+ computed: {
57
+ lang() {
58
+ return this.$store.state.language
59
+ },
60
+ version() {
61
+ return this.$store.state.siteConfig.footerMsgVersion || ''
62
+ }
63
+ },
64
+
65
+ watch:{
66
+ $route(to, from) {
67
+ this.init();
68
+ }
69
+ },
70
+
71
+ created() {
72
+ this.init();
73
+ },
74
+
75
+ methods: {
76
+ init() {
77
+ this.bread = [
78
+ {
79
+ path: "/help",
80
+ name: this.$t("cms_help_bread_title"),
81
+ },
82
+ ];
83
+ const { name, categoryCode } = this.$route.params;
84
+ this.name = name;
85
+ this.classification = categoryCode;
86
+ this.getDetail();
87
+
88
+
89
+ const el = document.getElementById('js-article-content');
90
+ el && el.scrollIntoView({
91
+ behavior: 'smooth',
92
+ block: 'start',
93
+ // inline: 'center'
94
+ });
95
+ },
96
+ /**
97
+ * 获取文章详情
98
+ */
99
+ getDetail() {
100
+ const hostname = window.mainHostname;
101
+ const url = `${conf.sitePath}${hostname}/${this.lang}/help/${this.classification}/${this.name}.js`
102
+ loadImportScript(url, null, 'message')
103
+ .then((res) => {
104
+ let { title, description, update_time, type_title, image_url } = res;
105
+ const date = new Date(update_time);
106
+ const year = date.getFullYear();
107
+ const month = date.getMonth() + 1;
108
+ const day = date.getDate();
109
+ this.articleTitle = title;
110
+ this.updateTime = `${month}/${day}/${year}`;
111
+
112
+ // 替换内容
113
+ description = description.replace(/\$\{site_name\}/g, this.$t("site_common_site_name"));
114
+
115
+ this.detailArticle = description;
116
+ // '<a href=\"/#/help/list#faq_iswallet\" rel=\"nofollow\">go to a</a>'
117
+ this.classificationName = type_title;
118
+ this.bread.push({
119
+ name: type_title
120
+ })
121
+ // this.articleImg = 'https://d1qu701gfywrk1.cloudfront.net/2021/10/27/bcde1058-2eb3-492a-8513-7009b60a7e24.png';
122
+ this.articleImg = image_url;
123
+ this.loading = false;
124
+ })
125
+ .catch((err) => {
126
+ console.error(err);
127
+ this.loading = false;
128
+ });
129
+ }
130
+ }
131
+ };
132
+
133
+ </script>
134
+ <style lang='less' scoped>
135
+ .help-detail{
136
+ display: flex;
137
+ flex-direction: column;
138
+ .content{
139
+ padding: 0 20px;
140
+ max-width: 1100px;
141
+ flex: 1;
142
+ .nav{
143
+ border-bottom: 1px solid var(--border-color-base);
144
+ }
145
+ }
146
+ .loading-wrap {
147
+ flex: auto;
148
+ text-align: center;
149
+ display: flex;
150
+ align-items: center;
151
+ justify-content: center;
152
+ }
153
+ }
154
+ @media screen and (min-width: 768px) {
155
+ .help-detail{
156
+ min-height: 100vh;
157
+ .content{
158
+ margin: 0 auto 40px;
159
+ width: 100%;
160
+ .nav{
161
+ margin-bottom: 32px;
162
+ }
163
+ }
164
+ }
165
+ }
166
+ </style>
167
+