From 4822304b63e1bd6327860af7f3db0133cecf167f Mon Sep 17 00:00:00 2001
From: chengkun <chengkun@ishangstudy.com>
Date: Fri, 05 Sep 2025 17:58:42 +0800
Subject: [PATCH] 提交

---
 app/admin/controller/OnlineMessage.php         |   52 +++
 public/static/admin/js/online_message/index.js |   48 +-
 public/static/js/language/language.js          |    7 
 app/home/controller/Index.php                  |    2 
 public/static/home/images/parent-1.png         |    0 
 public/static/home/images/parent-3.png         |    0 
 public/static/home/images/parent-5.png         |    0 
 app/home/view/blog/index.html                  |  219 ++++++--------
 app/home/controller/Blog.php                   |   78 +++++
 app/home/view/blog/detail.html                 |  151 ++++++++++
 public/static/home/images/parent-2.png         |    0 
 app/admin/view/online_message/index.html       |   14 
 public/static/vue/mixin.js                     |    1 
 public/static/home/images/parent-4.png         |    0 
 app/home/view/index/index.html                 |  279 ++++++------------
 15 files changed, 519 insertions(+), 332 deletions(-)

diff --git a/app/admin/controller/OnlineMessage.php b/app/admin/controller/OnlineMessage.php
index 34124f8..c6a5c1a 100644
--- a/app/admin/controller/OnlineMessage.php
+++ b/app/admin/controller/OnlineMessage.php
@@ -4,6 +4,7 @@
 
 use think\Exception;
 use think\facade\Db;
+use think\facade\Request;
 use think\facade\View;
 use think\response\Json;
 
@@ -13,11 +14,27 @@
         return View::fetch();
     }
     
+    /**
+     * 获取在线留言列表
+     * @return Json
+     */
     public function get_online_message_list(): Json {
         try {
+            if (!Request::isPost()) {
+                throw new Exception('请求方式错误');
+            }
             $page   = input('page', 1);
             $limit  = input('limit', 10);
+            $kw     = input('kw', '');
+            $status = input('status', '');
             $where  = [];
+            if ($kw) {
+                $where[] = ['name|phone|email|subject|message', 'like', "%{$kw}%"];
+            }
+            
+            if (in_array($status, [0, 1])) {
+                $where[] = ['status', '=', $status];
+            }
             $total  = Db::name('online_message')->where($where)->count();
             $list   = Db::name('online_message')->where($where)->order('id desc')->page($page, $limit)->select()->toArray();
             $result = [
@@ -36,4 +53,39 @@
         }
         return json($result);
     }
+    
+    /**
+     * 修改留言状态
+     * @return Json
+     */
+    public function change_message_status(): Json {
+        try {
+            if (!Request::isPost()) {
+                throw new Exception('请求方式错误');
+            }
+            $id = input('id', 0);
+            if (!$id || !is_numeric($id)) {
+                throw new Exception('参数错误');
+            }
+            $info = Db::name('online_message')->where('id', $id)->find();
+            if (!$info) {
+                throw new Exception('留言不存在');
+            }
+            $status        = $info['status'] ? 0 : 1;
+            $update_result = Db::name('online_message')->where('id', $id)->save(['status' => $status]);
+            if (!$update_result) {
+                throw new Exception('操作失败');
+            }
+            $result = [
+                'code'    => 200,
+                'message' => '操作成功',
+            ];
+        } catch (Exception $exc) {
+            $result = [
+                'code'    => $exc->getCode(),
+                'message' => $exc->getMessage(),
+            ];
+        }
+        return json($result);
+    }
 }
\ No newline at end of file
diff --git a/app/admin/view/online_message/index.html b/app/admin/view/online_message/index.html
index b7dde14..533ee46 100644
--- a/app/admin/view/online_message/index.html
+++ b/app/admin/view/online_message/index.html
@@ -26,9 +26,15 @@
                         <template #header>
                             <div class="card-header">官网留言({{count}})</div>
                         </template>
-                        <el-form :model="searchForm" label-width="auto" size="large">
-                            <el-input v-model="searchForm.kw" placeholder="请输入标题" style="width: 300px;" clearable></el-input>
-                            &ensp;
+                        <el-form :model="searchForm" label-width="auto" size="default">
+                            <el-input v-model="searchForm.kw" placeholder="请输入关键词" style="width: 300px;" clearable></el-input>
+                            &nbsp;
+                            <el-select v-model="searchForm.status" placeholder="请选择处理状态" style="width: 150px;">
+                                <el-option label="全部" value=""></el-option>
+                                <el-option label="已处理" value="1"></el-option>
+                                <el-option label="未处理" value="0"></el-option>
+                            </el-select>
+                            &nbsp;
                             <el-button type="success" icon="Search" @click="getOnlineMessageList()">搜索</el-button>
                         </el-form>
                         <br />
@@ -45,7 +51,7 @@
                             </el-table-column>
                             <el-table-column label="状态" width="150" align="center">
                                 <template #default="scope">
-                                    <el-switch @change="updateExt(scope.row,'status')" v-model="scope.row.status" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ccc" :active-value="1" :inactive-value="0" inline-prompt active-text="已处理" inactive-text="未处理" />
+                                    <el-switch @change="changeMessageStatus(scope.row.id)" v-model="scope.row.status" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ccc" :active-value="1" :inactive-value="0" inline-prompt active-text="已处理" inactive-text="未处理" />
                                 </template>
                             </el-table-column>
                         </el-table>
diff --git a/app/home/controller/Blog.php b/app/home/controller/Blog.php
index 3ec3077..43f4528 100644
--- a/app/home/controller/Blog.php
+++ b/app/home/controller/Blog.php
@@ -2,12 +2,90 @@
 
 namespace app\home\controller;
 
+use think\db\exception\DataNotFoundException;
+use think\db\exception\DbException;
+use think\db\exception\ModelNotFoundException;
+use think\Exception;
+use think\facade\Db;
 use think\facade\View;
 use think\facade\Request;
 use app\BaseController;
+use think\response\Json;
 
 class Blog extends BaseController {
     public function index() {
+        $list = Db::name('blog')->where('status', 1)->limit(10)->order('id desc')->select()->toArray();
+        View::assign('list', $list);
         return View::fetch('index');
     }
+    
+    /**
+     * 获取博客列表
+     * @return Json
+     */
+    public function get_blog_list(): Json {
+        try {
+            if (!Request::isPost()) {
+                throw new Exception('请求方式错误');
+            }
+            $list   = Db::name('blog')->where('status', 1)->limit(10)->order('id desc')->select()->toArray();
+            $result = [
+                'code'    => 200,
+                'message' => '获取成功',
+                'data'    => $list,
+            ];
+        } catch (Exception $exc) {
+            $result = [
+                'code'    => $exc->getCode(),
+                'message' => $exc->getMessage(),
+            ];
+        }
+        return json($result);
+    }
+    
+    /**
+     * 博客详情页
+     * @param int $id
+     * @return string
+     */
+    public function detail(int $id = 0): string {
+        if (!$id || !is_numeric($id)) {
+            $this->error('参数错误');
+        }
+        // $info = Db::name('blog')->where('id', $id)->find();
+        // if (!$info) {
+        //     $this->error('数据不存在');
+        // }
+        // View::assign('info', $info);
+        View::assign('id', $id);
+        return View::fetch('detail');
+    }
+    
+    /**
+     * 获取博客内容
+     * @return Json
+     */
+    public function get_blog_info(): Json {
+        try {
+            $id = input('id', 0);
+            if (!$id || !is_numeric($id)) {
+                throw new Exception('参数错误');
+            }
+            $info = Db::name('blog')->where('id', $id)->find();
+            if (!$info) {
+                throw new Exception('数据不存在');
+            }
+            $result = [
+                'code'    => 200,
+                'message' => '获取成功',
+                'data'    => $info,
+            ];
+        } catch (Exception $exc) {
+            $result = [
+                'code'    => $exc->getCode(),
+                'message' => $exc->getMessage(),
+            ];
+        }
+        return json($result);
+    }
 }
\ No newline at end of file
diff --git a/app/home/controller/Index.php b/app/home/controller/Index.php
index 4673ba3..1f2feb7 100644
--- a/app/home/controller/Index.php
+++ b/app/home/controller/Index.php
@@ -10,6 +10,8 @@
 
 class Index extends BaseController {
     public function index() {
+        $list = Db::name('blog')->where('status', 1)->limit(10)->order('id desc')->select()->toArray();
+        View::assign('list', $list);
         return View::fetch('index');
     }
     
diff --git a/app/home/view/blog/detail.html b/app/home/view/blog/detail.html
new file mode 100644
index 0000000..bd0b94a
--- /dev/null
+++ b/app/home/view/blog/detail.html
@@ -0,0 +1,151 @@
+<!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>
+        .blog-container {
+            padding: 50px 0;
+        }
+
+        .blog-title {
+            text-align: center;
+            font-size: 24px;
+            font-weight: bold;
+        }
+
+        .blog-time {
+            text-align: center;
+            font-size: 14px;
+            margin-top: 10px;
+        }
+
+        .blog-content {
+            margin: 20px 0;
+        }
+    </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>
+                </div>
+            </div>
+        </div>
+        <!-- 内容 -->
+        <div class="blog-container">
+            <div class="container" v-if="language=='zh-cn'">
+                <el-page-header @back="goBack">
+                    <template #content>
+                        <span class="text-large font-600 mr-3"> {{ $t('message.header.blog') }} </span>
+                    </template>
+                </el-page-header>
+                <div class="blog-title" v-if="language=='zh-cn'">{{info.title}}</div>
+                <div class="blog-time">{{formatDate(info.create_time)}}</div>
+                <div class="blog-content" v-html="info.content"></div>
+            </div>
+            <div class="container" v-else>
+                <el-page-header @back="goBack">
+                    <template #content>
+                        <span class="text-large font-600 mr-3"> {{ $t('message.header.blog') }} </span>
+                    </template>
+                </el-page-header>
+                <div class="blog-title">{{info.en_title}}</div>
+                <div class="blog-time">{{formatDate(info.create_time)}}</div>
+                <div class="blog-content" v-html="info.en_content"></div>
+            </div>
+        </div>
+
+        <!-- 底部 -->
+        <include file="common:footer" />
+    </div>
+
+    <input type="hidden" id="id" value="{$id}">
+    <!-- Vue App -->
+    <script src="/static/vue/mixin.js"></script>
+    <script>
+        var language = localStorage.getItem('changjiang-park-lang') || 'zh-cn';
+        var blog_id = $('#id').val();
+        const App = {
+            mixins: [sharedMixin],
+            data() {
+                return {
+                    blog_id: blog_id,
+                    language: language,
+                    info: [],
+                };
+            },
+            computed: {
+
+            },
+            mounted() {
+                this.getBlogInfo();
+            },
+            created() {
+            },
+            methods: {
+                formatDate(time) {
+                    return moment(time * 1000).format("YYYY-MM-DD");
+                },
+
+                goBack() {
+                    window.history.back();
+                },
+
+                /////进入博客详情/////
+                gotoBlogDetail(id) {
+                    window.location.href = '/home/blog/detail/id/' + id + '.html';
+                },
+
+                // 获取公告列表
+                getBlogInfo() {
+                    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_info.html"
+                    postRequest(url, { id: that.blog_id }).then(res => {
+                        loading.close();
+                        if (res.data.code == 200) {
+                            that.info = 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>
+</body>
+
+<include file="common:html-css-js" />
+
+</html>
\ No newline at end of file
diff --git a/app/home/view/blog/index.html b/app/home/view/blog/index.html
index ae16f2e..42d84af 100644
--- a/app/home/view/blog/index.html
+++ b/app/home/view/blog/index.html
@@ -8,6 +8,34 @@
     <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>
@@ -15,7 +43,7 @@
         <!-- 顶部 导航栏 -->
         <include file="common:top-header" />
 
-        <!-- breadcumb area -->
+        <!-- 背景图-->
         <div class="breadcumb-area">
             <div class="container">
                 <div class="row">
@@ -35,9 +63,8 @@
                 </div>
             </div>
         </div>
-        <!-- End breadcumb area -->
-         
-        <!-- itpart blog area -->
+
+        <!-- 内容 -->
         <div class="itpart_blog_area blog_grid_area">
             <div class="container">
                 <div class="row">
@@ -45,134 +72,56 @@
                         <div class="witr_section_title">
                             <div class="witr_section_title_inner text-center">
                                 <!-- title top -->
-                                <h2>News &amp; blog</h2>
-                                <h3>You Can Check Out Our Work. </h3>
+                                <!-- <h2>News &amp; blog</h2> -->
+                                <h3>{{ $t('message.blog.text-1') }}</h3>
                                 <!-- title bottom -->
-                                <h1>News &amp; Articles</h1>
+                                <!-- <h1>News &amp; Articles</h1> -->
                             </div>
                         </div>
                     </div>
                     <div class="col-lg-12">
                         <!-- Blog Section -->
                         <div class="witr_blog_area12">
-                            <div class="blog_active ">
+                            <div class="blog_active">
                                 <!-- single blog -->
-                                <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="/static/home/assets/images/blog1.jpg" alt="image" /> </a>
-                                            <div class="witr_top_category category_blog_grid">
-                                                <!-- category -->
-                                                <ul class="post-categories">
+                                <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>
+                                                </ul> -->
+                                                </div>
                                             </div>
-                                        </div>
-                                        <div class="all_blog_color">
-                                            <div class="witr_blog_con bs5">
-                                                <!-- title -->
-                                                <h2><a href="single-blog.html">How investing in depended increasing to business.</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> 24 Aug 2021</span>
-                                                <!-- content -->
-                                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do</p>
-                                                <div class="learn_more_adn">
-                                                    <a class="learn_btn adnbtn2" href="#">Read More</a>
+                                            <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>
-                                </div>
-                                <!-- 02 single blog -->
-                                <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="/static/home/assets/images/blog2.jpg" alt="image" /> </a>
-                                            <div class="witr_top_category category_blog_grid">
-                                                <!-- category -->
-                                                <ul class="post-categories">
-                                                    <li><a href="#">It Service</a></li>
-                                                </ul>
-                                            </div>
-                                        </div>
-                                        <div class="all_blog_color">
-                                            <div class="witr_blog_con bs5">
-                                                <!-- title -->
-                                                <h2><a href="single-blog.html">Email marketing tips that will increase your sales.</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> 29 Aug 2021</span>
-                                                <!-- content -->
-                                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do</p>
-                                                <div class="learn_more_adn">
-                                                    <a class="learn_btn adnbtn2" href="#">Read More</a>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                                <!-- 03 single blog -->
-                                <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="/static/home/assets/images/blog3.jpg" alt="image" /> </a>
-                                            <div class="witr_top_category category_blog_grid">
-                                                <!-- category -->
-                                                <ul class="post-categories">
-                                                    <li><a href="#">Management</a></li>
-                                                </ul>
-                                            </div>
-                                        </div>
-                                        <div class="all_blog_color">
-                                            <div class="witr_blog_con bs5">
-                                                <!-- title -->
-                                                <h2><a href="single-blog.html">Productivity tips to avoid burn out when working.</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>24 Jun 2021</span>
-                                                <!-- content -->
-                                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do</p>
-                                                <div class="learn_more_adn">
-                                                    <a class="learn_btn adnbtn2" href="#">Read More</a>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                                <!-- 04 single blog -->
-                                <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="/static/home/assets/images/blog11.jpg" alt="image" /> </a>
-                                            <div class="witr_top_category category_blog_grid">
-                                                <!-- category -->
-                                                <ul class="post-categories">
-                                                    <li><a href="#">Marketing</a></li>
-                                                </ul>
-                                            </div>
-                                        </div>
-                                        <div class="all_blog_color">
-                                            <div class="witr_blog_con bs5">
-                                                <!-- title -->
-                                                <h2><a href="single-blog.html">How investing in depended increasing to business.</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> 24 Aug 2021</span>
-                                                <!-- content -->
-                                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do</p>
-                                                <div class="learn_more_adn">
-                                                    <a class="learn_btn adnbtn2" href="#">Read More</a>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-
+                                </volist>
                             </div>
                         </div>
                     </div>
@@ -186,22 +135,52 @@
     <!-- 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);
@@ -214,8 +193,8 @@
         app.use(i18n);
         app.mount("#vue_item");
     </script>
+    <include file="common:html-css-js" />
 </body>
 
-<include file="common:html-css-js" />
 
 </html>
\ No newline at end of file
diff --git a/app/home/view/index/index.html b/app/home/view/index/index.html
index 5061afa..4106c69 100644
--- a/app/home/view/index/index.html
+++ b/app/home/view/index/index.html
@@ -9,6 +9,34 @@
     <include file="common:element-plus" />
     <link rel="stylesheet" href="/static/home/css/index/index.css?x=3">
     <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>
@@ -858,6 +886,31 @@
                         <div class="testimonial_active">
                             <!-- single testimonial -->
                             <div class="witr_testi_itemt testi-width all_color_testimonial">
+                                <div class="">
+                                    <img src="/static/home/images/parent-1.png" alt="image" />
+                                </div>
+                            </div>
+                            <div class="witr_testi_itemt testi-width all_color_testimonial">
+                                <div class="">
+                                    <img src="/static/home/images/parent-2.png" alt="image" />
+                                </div>
+                            </div>
+                            <div class="witr_testi_itemt testi-width all_color_testimonial">
+                                <div class="">
+                                    <img src="/static/home/images/parent-3.png" alt="image" />
+                                </div>
+                            </div>
+                            <div class="witr_testi_itemt testi-width all_color_testimonial">
+                                <div class="">
+                                    <img src="/static/home/images/parent-4.png" alt="image" />
+                                </div>
+                            </div>
+                            <div class="witr_testi_itemt testi-width all_color_testimonial">
+                                <div class="">
+                                    <img src="/static/home/images/parent-5.png" alt="image" />
+                                </div>
+                            </div>
+                            <!-- <div class="witr_testi_itemt testi-width all_color_testimonial">
                                 <div class="em_single_testimonial">
                                     <div class="em_test_thumb test-part">
                                         <img src="/static/home/assets/images/t1.png" alt="image" />
@@ -871,7 +924,6 @@
                                     </div>
                                     <div class="em_testi_content">
                                         <div class="em_testi_text">
-                                            <!-- content -->
                                             <p>Through gaining experience in various economic periods, our team are able to identify the best opportunities hether we are in good times or bad times.</p>
                                         </div>
                                     </div>
@@ -891,79 +943,7 @@
                                         </ul>
                                     </div>
                                 </div>
-                            </div>
-                            <!-- 02 single testimonial -->
-                            <div class="witr_testi_itemt testi-width all_color_testimonial">
-                                <div class="em_single_testimonial">
-                                    <div class="em_test_thumb test-part">
-                                        <img src="/static/home/assets/images/t2.png" alt="image" />
-                                    </div>
-                                    <div class="em_testi_title">
-                                        <h2>Chicana males <span>Manager</span></h2>
-                                    </div>
-                                    <div class="em_testi_logo">
-                                        <div class="em_testilogo_inner">
-                                        </div>
-                                    </div>
-                                    <div class="em_testi_content">
-                                        <div class="em_testi_text">
-                                            <!-- content -->
-                                            <p>Through gaining experience in various economic periods, our team are able to identify the best opportunities hether we are in good times or bad times.</p>
-                                        </div>
-                                    </div>
-                                    <div class="test-part">
-                                        <ul>
-                                            <li>
-                                                <div class="execllent_toggol">
-                                                    <div class="em_crating">
-                                                        <i class="icofont-star active"></i>
-                                                        <i class="icofont-star active"></i>
-                                                        <i class="icofont-star active"></i>
-                                                        <i class="icofont-star active"></i>
-                                                        <i class="icofont-star active"></i>
-                                                    </div>
-                                                </div>
-                                            </li>
-                                        </ul>
-                                    </div>
-                                </div>
-                            </div>
-                            <!-- 03 single testimonial -->
-                            <div class="witr_testi_itemt testi-width all_color_testimonial">
-                                <div class="em_single_testimonial">
-                                    <div class="em_test_thumb test-part">
-                                        <img src="/static/home/assets/images/t1.png" alt="image" />
-                                    </div>
-                                    <div class="em_testi_title">
-                                        <h2>David Markers <span>Co- Of Officer</span></h2>
-                                    </div>
-                                    <div class="em_testi_logo">
-                                        <div class="em_testilogo_inner">
-                                        </div>
-                                    </div>
-                                    <div class="em_testi_content">
-                                        <div class="em_testi_text">
-                                            <!-- content -->
-                                            <p>Through gaining experience in various economic periods, our team are able to identify the best opportunities hether we are in good times or bad times.</p>
-                                        </div>
-                                    </div>
-                                    <div class="test-part">
-                                        <ul>
-                                            <li>
-                                                <div class="execllent_toggol">
-                                                    <div class="em_crating">
-                                                        <i class="icofont-star active"></i>
-                                                        <i class="icofont-star active"></i>
-                                                        <i class="icofont-star active"></i>
-                                                        <i class="icofont-star active"></i>
-                                                        <i class="icofont-star active"></i>
-                                                    </div>
-                                                </div>
-                                            </li>
-                                        </ul>
-                                    </div>
-                                </div>
-                            </div>
+                            </div> -->
 
                         </div>
                     </div>
@@ -1153,122 +1133,44 @@
                         <div class="witr_blog_area12">
                             <div class="blog_active ">
                                 <!-- single blog -->
-                                <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="/static/home/assets/images/blog1.jpg" alt="image" /> </a>
-                                            <div class="witr_top_category">
-                                                <!-- category -->
-                                                <ul class="post-categories">
+                                <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>
+                                                </ul> -->
+                                                </div>
                                             </div>
-                                        </div>
-                                        <div class="all_blog_color">
-                                            <div class="witr_blog_con bs5">
-                                                <!--  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> 24 Aug 2021</span>
-                                                <!-- title -->
-                                                <h2><a href="single-blog.html">How investing in depended increasing to business.</a></h2>
-                                                <!-- content -->
-                                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore</p>
-                                                <div class="wbutton_right_icon">
-                                                    <a href="#"><i class="ti-arrow-right"></i></a>
+                                            <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>
-                                </div>
-                                <!-- 02 single blog -->
-                                <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="/static/home/assets/images/blog2.jpg" alt="image" /> </a>
-                                            <div class="witr_top_category">
-                                                <!-- category -->
-                                                <ul class="post-categories">
-                                                    <li><a href="#">Support</a></li>
-                                                </ul>
-                                            </div>
-                                        </div>
-                                        <div class="all_blog_color">
-                                            <div class="witr_blog_con bs5">
-                                                <!--  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> 29 Aug 2021</span>
-                                                <!-- title -->
-                                                <h2><a href="single-blog.html">Email marketing tips that will increase your sales.</a></h2>
-                                                <!-- content -->
-                                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore</p>
-                                                <div class="wbutton_right_icon">
-                                                    <a href="#"><i class="ti-arrow-right"></i></a>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                                <!-- 03 single blog -->
-                                <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="/static/home/assets/images/blog3.jpg" alt="image" /> </a>
-                                            <div class="witr_top_category">
-                                                <!-- category -->
-                                                <ul class="post-categories">
-                                                    <li><a href="#">It Service</a></li>
-                                                </ul>
-                                            </div>
-                                        </div>
-                                        <div class="all_blog_color">
-                                            <div class="witr_blog_con bs5">
-                                                <!--  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>24 Jun 2021</span>
-                                                <!-- title -->
-                                                <h2><a href="single-blog.html">Productivity tips to avoid burn out when working.</a></h2>
-                                                <!-- content -->
-                                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore</p>
-                                                <div class="wbutton_right_icon">
-                                                    <a href="#"><i class="ti-arrow-right"></i></a>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                                <!-- 04 single blog -->
-                                <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="/static/home/assets/images/blog11.jpg" alt="image" /> </a>
-                                            <div class="witr_top_category">
-                                                <!-- category -->
-                                                <ul class="post-categories">
-                                                    <li><a href="#">Management</a></li>
-                                                </ul>
-                                            </div>
-                                        </div>
-                                        <div class="all_blog_color">
-                                            <div class="witr_blog_con bs5">
-                                                <!--  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> 24 Aug 2021</span>
-                                                <!-- title -->
-                                                <h2><a href="single-blog.html">How investing in depended increasing to business.</a></h2>
-                                                <!-- content -->
-                                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore</p>
-                                                <div class="wbutton_right_icon">
-                                                    <a href="#"><i class="ti-arrow-right"></i></a>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-
+                                </volist>
                             </div>
                         </div>
                     </div>
@@ -1406,10 +1308,12 @@
     <!-- 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,
                     form: {
                         name: '',
                         email: '',
@@ -1427,7 +1331,14 @@
             created() {
             },
             methods: {
+                formatDate(time) {
+                    return moment(time * 1000).format("YYYY-MM-DD");
+                },
 
+                /////进入博客详情/////
+                gotoBlogDetail(id) {
+                    window.location.href = '/home/blog/detail/id/' + id + '.html';
+                },
                 submitForm() {
                     var that = this;
                     that.submitDisabled = true;
diff --git a/public/static/admin/js/online_message/index.js b/public/static/admin/js/online_message/index.js
index 703fcab..451d66a 100644
--- a/public/static/admin/js/online_message/index.js
+++ b/public/static/admin/js/online_message/index.js
@@ -8,7 +8,7 @@
             count: 0,
             searchForm: {
                 page: 1,
-                page_size: 20,
+                limit: 20,
                 kw: '',
             },
         };
@@ -22,28 +22,30 @@
             return moment(time * 1000).format("YYYY-MM-DD H:m");
         },
         ///修改扩展字段的值////
-        updateExt(row, field) {
-            if (row.id) {
-                let that = this;
-                let url = "/admin/" + viewPath + "/updateExt.html"
-                postRequest(url, { id: row.id, [field]: row[field] }).then(res => {
-                    if (res.data.code == 200) {
-                        that.$notify({
-                            title: "成功",
-                            message: res.data.message,
-                            position: "top-left",
-                            type: "success",
-                        });
-                    }
-                    else {
-                        that.$notify.error({
-                            title: "错误",
-                            position: "top-left",
-                            message: res.data.message,
-                        });
-                    }
-                });
-            }
+        changeMessageStatus(id) {
+            let that = this;
+            let url = "/admin/onlineMessage/change_message_status.html"
+            postRequest(url, { id: id }).then(res => {
+                if (res.data.code == 200) {
+                    that.$message({
+                        message: res.data.message,
+                        type: 'success',
+                        duration: 1000,
+                        center: true,
+                        onClose: function () {
+                            that.getOnlineMessageList();
+                        }
+                    });
+                } else {
+                    that.$message({
+                        message: res.data.message,
+                        type: 'error',
+                        duration: 2000,
+                        center: true
+                    });
+                }
+            });
+
         },
 
         handleSizeChange(val) {
diff --git a/public/static/home/images/parent-1.png b/public/static/home/images/parent-1.png
new file mode 100644
index 0000000..6bfdf86
--- /dev/null
+++ b/public/static/home/images/parent-1.png
Binary files differ
diff --git a/public/static/home/images/parent-2.png b/public/static/home/images/parent-2.png
new file mode 100644
index 0000000..7088c9e
--- /dev/null
+++ b/public/static/home/images/parent-2.png
Binary files differ
diff --git a/public/static/home/images/parent-3.png b/public/static/home/images/parent-3.png
new file mode 100644
index 0000000..cfde427
--- /dev/null
+++ b/public/static/home/images/parent-3.png
Binary files differ
diff --git a/public/static/home/images/parent-4.png b/public/static/home/images/parent-4.png
new file mode 100644
index 0000000..17bbbf7
--- /dev/null
+++ b/public/static/home/images/parent-4.png
Binary files differ
diff --git a/public/static/home/images/parent-5.png b/public/static/home/images/parent-5.png
new file mode 100644
index 0000000..d1d27b9
--- /dev/null
+++ b/public/static/home/images/parent-5.png
Binary files differ
diff --git a/public/static/js/language/language.js b/public/static/js/language/language.js
index c90c786..d24a197 100644
--- a/public/static/js/language/language.js
+++ b/public/static/js/language/language.js
@@ -165,6 +165,9 @@
                 'text-4': '国内电话',
                 'text-5': '国际电话',
             },
+            blog: {
+                'text-1': '你可以看看我们的工作',
+            }
         }
     },
     'en-us': {
@@ -317,7 +320,6 @@
                 'text-13': 'Overseas Warehouse Service',
                 'text-14': 'Manage localized SA warehouses with one - stop services (storage, dropshipping, returns).',
             },
-
             partners: {
                 'text-1': 'Our Collaborators',
                 'text-2': "We're Backed by Quality Institutions",
@@ -329,6 +331,9 @@
                 'text-4': 'Domestic',
                 'text-5': 'International',
             },
+            blog: {
+                'text-1': 'You Can Check Out Our Work',
+            }
         }
     }
 }
diff --git a/public/static/vue/mixin.js b/public/static/vue/mixin.js
index 220d187..6e2e6d8 100644
--- a/public/static/vue/mixin.js
+++ b/public/static/vue/mixin.js
@@ -35,6 +35,7 @@
             this.i18n.locale = newLang;
             this.i18n.currentLocale = newLang;
             localStorage.setItem('changjiang-park-lang', newLang);
+            window.location.reload();
         },
     }
 }
\ No newline at end of file

--
Gitblit v1.9.0