chengkun
2025-09-12 b21e53f16f228d3192eb54178f081395878b2406
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<!DOCTYPE html>
<html lang="zh-CN">
 
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <include file="common:header" />
    <include file="common:title" />
    <include file="common:element-plus" />
    <include file="common:html-header" />
    <style>
        .cover_img {
            width: 360px;
            height: 240px;
            vertical-align: middle;
            object-fit: cover;
        }
 
        .blog-title {
            height: 53px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }
 
        .blog-desc {
            height: 77px;
            margin: 15px 0;
            padding: 0 0 0 0 !important;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
        }
    </style>
</head>
 
<body>
    <div class="main-container" id="vue_item" v-cloak>
        <!-- 顶部 导航栏 -->
        <include file="common:top-header" />
 
        <!-- 背景图-->
        <div class="breadcumb-area">
            <div class="container">
                <div class="row">
                    <div class="col-md-12 txtc  text-center ccase">
                        <div class="brpt">
                            <h2>{{ $t('message.header.blog') }}</h2>
                        </div>
                        <!-- <div class="breadcumb-inner">
                            <ul>
                                <li>You are currently here! <i class="fas fa-angle-right"></i> </li>
                                <li><a href="#" rel="v:url" property="v:title">Home</a></li>
                                <li><i class="fas fa-angle-right"></i></li>
                                <li><span class="current">Blog Grid</span></li>
                            </ul>
                        </div> -->
                    </div>
                </div>
            </div>
        </div>
 
        <!-- 内容 -->
        <div class="itpart_blog_area blog_grid_area">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="witr_section_title">
                            <div class="witr_section_title_inner text-center">
                                <!-- title top -->
                                <h2>{{ $t('message.header.blog') }}</h2>
                                <h3>{{ $t('message.blog.text-1') }}</h3>
                                <!-- title bottom -->
                                <!-- <h1>News &amp; Articles</h1> -->
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-12">
                        <!-- Blog Section -->
                        <div class="witr_blog_area12">
                            <div class="blog_active">
                                <!-- single blog -->
                                <volist name="list" id="item">
                                    <div class="witr_all_mb_30 col-md-12 col-xs-12 col-sm-12">
                                        <div class="busi_singleBlog">
                                            <!-- image -->
                                            <div class="witr_sb_thumb ">
                                                <a href="#"> <img src="{$item.cover_img}" alt="image" class="cover_img" /> </a>
                                                <div class="witr_top_category category_blog_grid">
                                                    <!-- category -->
                                                    <!-- <ul class="post-categories">
                                                    <li><a href="#">Developer</a></li>
                                                </ul> -->
                                                </div>
                                            </div>
                                            <div class="all_blog_color">
                                                <div class="witr_blog_con bs5">
                                                    <!-- title -->
                                                    <h2>
                                                        <a href="javascript:void(0)" @click="gotoBlogDetail({$item.id})" class="blog-title">
                                                            <template v-if="language=='zh-cn'">{$item.title}</template>
                                                            <template v-else>{$item.en_title}</template>
                                                        </a>
                                                    </h2>
                                                    <!--  post meta -->
                                                    <!-- <span><a href="#"><i class="icofont-user-alt-3"></i> Itpa</a></span> -->
                                                    <span><a href="#"><i class="icofont-ui-clock"></i></a>{{formatDate({$item.create_time})}}</span>
                                                    <!-- content -->
                                                    <p class="blog-desc">
                                                        <template v-if="language=='zh-cn'">{$item.desc}</template>
                                                        <template v-else>{$item.en_desc}</template>
                                                    </p>
                                                    <!-- <div class="learn_more_adn">
                                                        <a class="learn_btn adnbtn2" href="javascript:void(0)" @click="gotoBlogDetail({$item.id})">Read More</a>
                                                    </div> -->
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </volist>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
 
        <!-- 底部 -->
        <include file="common:footer" />
    </div>
    <!-- Vue App -->
    <script src="/static/vue/mixin.js"></script>
    <script>
        var language = localStorage.getItem('changjiang-park-lang') || 'zh-cn';
        const App = {
            mixins: [sharedMixin],
            data() {
                return {
                    language: language,
                    list: [],
                };
            },
            computed: {
 
            },
            mounted() {
                // this.getBlogList();
            },
            created() {
            },
            methods: {
                formatDate(time) {
                    return moment(time * 1000).format("YYYY-MM-DD");
                },
 
                /////进入博客详情/////
                gotoBlogDetail(id) {
                    window.location.href = '/home/blog/detail/id/' + id + '.html';
                },
 
                // 获取公告列表
                getBlogList() {
                    let that = this;
                    const loading = this.$loading({
                        lock: true,
                        text: '获取中',
                        spinner: 'el-icon-loading',
                        background: 'rgba(0, 0, 0, 0.2)'
                    });
                    let url = "/home/blog/get_blog_list.html"
                    postRequest(url, {}).then(res => {
                        loading.close();
                        if (res.data.code == 200) {
                            that.list = res.data.data;
                        }
                    }).catch(() => {
                        //取消,不做处理
                    });
                },
            },
        };
        const app = Vue.createApp(App);
        for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
            app.component(key, component)
        }
        app.use(ElementPlus, {
            locale: ElementPlusLocaleZhCn,
        });
        app.use(i18n);
        app.mount("#vue_item");
    </script>
    <include file="common:html-css-js" />
</body>
 
 
</html>