guhongwei 2 years ago
parent
commit
8996412b85

+ 36 - 5
src/router/index.js

@@ -4,11 +4,42 @@ import VueRouter from 'vue-router';
 import common from './module/common';
 Vue.use(VueRouter);
 const routes = [
-  // {
-  //   path: '/',
-  //   meta: { title: '网站' },
-  //   component: () => import('../views/homeIndex.vue'),
-  // },
+  {
+    path: '/',
+    redirect: '/home',
+  },
+  {
+    path: '/home',
+    meta: { title: '自由天空', is_filter: true },
+    component: () => import('@common/src/components/web-frame/home.vue'),
+    children: [
+      {
+        path: '/home',
+        meta: { title: '自由天空', is_filter: true },
+        component: () => import('@/views/homeIndex.vue'),
+      },
+      {
+        path: '/solve',
+        meta: { title: '解决方案', is_filter: true },
+        component: () => import('@/views/solve/index.vue'),
+      },
+      {
+        path: '/brand',
+        meta: { title: '品牌理念', is_filter: true },
+        component: () => import('@/views/brand/index.vue'),
+      },
+      {
+        path: '/news',
+        meta: { title: '新闻资讯', is_filter: true },
+        component: () => import('@/views/news/index.vue'),
+      },
+      {
+        path: '/contact',
+        meta: { title: '联系我们', is_filter: true },
+        component: () => import('@/views/contact/index.vue'),
+      },
+    ],
+  },
   ...common,
 ];
 const router = new VueRouter({ mode: 'history', base: process.env.BASE_URL, routes });

+ 1 - 38
src/router/module/common.js

@@ -1,38 +1 @@
-export default [
-  {
-    path: '/',
-    redirect: '/home',
-  },
-  {
-    path: '/home',
-    meta: { title: '自由天空', is_filter: true },
-    component: () => import('@common/src/components/web-frame/home.vue'),
-    children: [
-      {
-        path: '/home',
-        meta: { title: '自由天空', is_filter: true },
-        component: () => import('@/views/homeIndex.vue'),
-      },
-      {
-        path: '/solve',
-        meta: { title: '解决方案', is_filter: true },
-        component: () => import('@/views/solve/index.vue'),
-      },
-      {
-        path: '/brand',
-        meta: { title: '品牌理念', is_filter: true },
-        component: () => import('@/views/brand/index.vue'),
-      },
-      {
-        path: '/news',
-        meta: { title: '新闻资讯', is_filter: true },
-        component: () => import('@/views/news/index.vue'),
-      },
-      {
-        path: '/contact',
-        meta: { title: '联系我们', is_filter: true },
-        component: () => import('@/views/contact/index.vue'),
-      },
-    ],
-  },
-];
+export default [];

+ 15 - 2
src/store/index.js

@@ -5,7 +5,12 @@ import * as umutations from '@common/src/store/user/mutations';
 // 管理员
 import admin from '@common/src/store/admin';
 import program from '@common/src/store/program';
-
+// 网站
+import company from '@common/src/store/web/company';
+import banner from '@common/src/store/web/banner';
+import news from '@common/src/store/web/news';
+import cases from '@common/src/store/web/cases';
+import leavemess from '@common/src/store/web/leavemess';
 Vue.use(Vuex);
 
 export default new Vuex.Store({
@@ -13,5 +18,13 @@ export default new Vuex.Store({
   getters: {},
   mutations: { ...umutations },
   actions: {},
-  modules: { admin, program },
+  modules: {
+    admin,
+    program,
+    company,
+    banner,
+    news,
+    cases,
+    leavemess,
+  },
 });

+ 14 - 21
src/views/brand/index.vue

@@ -25,7 +25,7 @@
             <span></span>
           </el-col>
           <el-col :span="24" class="two_1">
-            {{ brandInfo.content_1 }}
+            {{ siteInfo.idea }}
           </el-col>
         </el-col>
         <el-col :span="24" class="zero thr">
@@ -40,25 +40,10 @@
           </el-col>
           <el-col :span="24" class="thr_2">
             <el-col :span="24" class="thr_2_1" v-if="type_active == '0'">
-              <p>{{ brandInfo.content_2 }}</p>
-              <p>{{ brandInfo.content_3 }}</p>
+              <p>{{ siteInfo.unique }}</p>
             </el-col>
-            <el-col :span="24" class="thr_2_2" v-else-if="type_active == '1'">
-              111
-              <!-- <swiper :list="thr2List" :options="options">
-                <template v-slot="{ index, item }">
-                  <el-image :src="item.url"></el-image>
-                </template>
-              </swiper> -->
-            </el-col>
-            <el-col :span="24" class="thr_2_3" v-else-if="type_active == '2'">
-              <p>{{ brandInfo.content_4 }}</p>
-              <p>{{ brandInfo.content_5 }}</p>
-              <p>{{ brandInfo.content_6 }}</p>
-              <p>{{ brandInfo.content_7 }}</p>
-              <p>{{ brandInfo.content_8 }}</p>
-              <p>{{ brandInfo.content_9 }}</p>
-              <p>{{ brandInfo.content_10 }}</p>
+            <el-col :span="24" class="thr_2_3" v-else-if="type_active == '1'">
+              <p>{{ siteInfo.join }}</p>
             </el-col>
           </el-col>
         </el-col>
@@ -75,6 +60,8 @@ export default {
   components: {},
   data: function () {
     return {
+      // 基本信息
+      siteInfo: {},
       // 轮播图
       bannerList: [{ url: require('@a/brand_1.jpg') }],
       // 新闻
@@ -117,7 +104,7 @@ export default {
         content_10: '联系地址:吉林省长春市',
       },
       // 第三部分
-      typeList: [{ title: '独特优势' }, { title: '优秀团队' }, { title: '加入我们' }],
+      typeList: [{ title: '独特优势' }, { title: '加入我们' }],
       type_active: '0',
       thr2List: [{ url: require('@a/brand_1.jpg') }, { url: require('@a/contact_1.jpg') }],
       options: {
@@ -131,8 +118,14 @@ export default {
       },
     };
   },
-  created() {},
+  created() {
+    this.search();
+  },
   methods: {
+    search() {
+      let companyInfo = sessionStorage.getItem('companyInfo');
+      this.$set(this, `siteInfo`, JSON.parse(companyInfo));
+    },
     typeEnter(e, index) {
       this.$set(this, `type_active`, index);
     },

+ 1 - 1
src/views/contact/index.vue

@@ -20,7 +20,7 @@
         </el-col>
         <el-col :span="24" class="zero two">
           <el-col :span="24" class="common_1">
-            <span>解决方案</span>
+            <span>联系我们</span>
             <span></span>
             <span></span>
           </el-col>

+ 24 - 29
src/views/homeIndex.vue

@@ -19,11 +19,11 @@
           </el-col>
         </el-col>
         <el-col :span="24" class="zero two">
-          <el-col :span="6" class="twoList" v-for="(item, index) in twoList" :key="index">
-            <el-col :span="24" class="title">{{ item.title }}</el-col>
+          <el-col :span="6" class="twoList" v-for="(item, index) in siteInfo.advantage" :key="index">
+            <el-col :span="24" class="title">{{ item.name }}</el-col>
             <el-col :span="24" class="brief">{{ item.brief }}</el-col>
             <el-col :span="24" class="image">
-              <el-image :src="item.url"></el-image>
+              <el-image :src="item.img_url && item.img_url.length > 0 ? item.img_url[0].uri : ''"></el-image>
             </el-col>
           </el-col>
         </el-col>
@@ -67,7 +67,8 @@
 </template>
 
 <script>
-import { mapState, createNamespacedHelpers } from 'vuex';
+import { mapState, mapGetters, mapMutations, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('company');
 const moment = require('moment');
 export default {
   name: 'homeIndex',
@@ -75,6 +76,8 @@ export default {
   components: {},
   data: function () {
     return {
+      // 基本信息
+      siteInfo: {},
       // 轮播图
       bannerList: [{ url: require('@a/photo_1.jpg') }],
       // 新闻
@@ -100,29 +103,6 @@ export default {
           brief: '作为网购整个流程中的重要一环,快递的作用可想而知,作为网购整个流程中的重要一环,快递的作用可想而知,',
         },
       ],
-      // 第二部分
-      twoList: [
-        {
-          title: '商业模式开发',
-          brief: '我们拥有专业的企业管理专家、咨询师,我们专为传统企业转型生活提供解决方案',
-          url: require('@a/two_1.png'),
-        },
-        {
-          title: '电子商务平台',
-          brief: '我们拥有专业的企业管理专家、咨询师,我们专为传统企业转型生活提供解决方案',
-          url: require('@a/two_2.png'),
-        },
-        {
-          title: '电子商务平台',
-          brief: '我们拥有专业的企业管理专家、咨询师,我们专为传统企业转型生活提供解决方案',
-          url: require('@a/two_3.png'),
-        },
-        {
-          title: '系统开发与集成',
-          brief: '我们拥有专业的企业管理专家、咨询师,我们专为传统企业转型生活提供解决方案',
-          url: require('@a/two_4.png'),
-        },
-      ],
       // 第三部分
       thr_url: require('@a/thr_1.jpg'),
       // 第四部分
@@ -166,8 +146,22 @@ export default {
       ],
     };
   },
-  created() {},
+  created() {
+    this.search();
+  },
   methods: {
+    ...mapMutations(['deleteUser']),
+    ...mapActions(['query']),
+    async search() {
+      // 公司信息
+      let res;
+      res = await this.query();
+      if (this.$checkRes(res)) {
+        console.log(res.data);
+        this.$set(this, `siteInfo`, res.data);
+        sessionStorage.setItem('companyInfo', JSON.stringify(res.data));
+      }
+    },
     typeEnter(e, index) {
       this.$set(this, `type_active`, index);
       console.log(index);
@@ -186,7 +180,8 @@ export default {
     },
   },
   computed: {
-    ...mapState(['user']),
+    ...mapState(['user', 'test']),
+    ...mapGetters(['lab_id']),
   },
   metaInfo() {
     return { title: this.$route.meta.title };

+ 14 - 23
src/views/solve/index.vue

@@ -25,11 +25,11 @@
             <span></span>
           </el-col>
           <el-col :span="24" class="two_2">
-            <el-col :span="8" class="twoList" v-for="(item, index) in twoList" :key="index">
-              <el-image class="image" :src="item.url"></el-image>
+            <el-col :span="8" class="twoList" v-for="(item, index) in siteInfo.programme" :key="index">
+              <el-image class="image" :src="item.img_url && item.img_url.length > 0 ? item.img_url[0].uri : ''"></el-image>
               <el-col :span="24" class="other">
                 <el-col :span="24" class="title textOver">
-                  <span>{{ item.title }}</span>
+                  <span>{{ item.name }}</span>
                 </el-col>
                 <el-col :span="24" class="brief">
                   {{ item.brief }}
@@ -64,6 +64,8 @@ export default {
   components: {},
   data: function () {
     return {
+      // 基本信息
+      siteInfo: {},
       // 轮播图
       bannerList: [{ url: require('@a/photo_2.jpg') }],
       // 新闻
@@ -89,24 +91,6 @@ export default {
           brief: '作为网购整个流程中的重要一环,快递的作用可想而知,作为网购整个流程中的重要一环,快递的作用可想而知,',
         },
       ],
-      // 第二部分
-      twoList: [
-        {
-          url: require('@a/solve_1.jpg'),
-          title: '微商-微信二维码',
-          brief: '微柜-微信二维码柜,一种基于微信的新物联网智能柜,它可以通过微信扫一扫来控制柜子的开、关。',
-        },
-        {
-          url: require('@a/solve_2.jpg'),
-          title: '视频直播APP软件',
-          brief: '视频直播APP软件方案成熟,经过专业视频团队打造,已有成功案例。可应用于视频门户、视频社交、在线教育、企业视频等。',
-        },
-        {
-          url: require('@a/solve_3.jpg'),
-          title: '智能快递柜系统',
-          brief: '提供的智能快递柜控制系统软硬整体解决方案,方案成熟可靠,已运行在上千柜体中!可定制开发适用于如:早餐柜、快递柜等。',
-        },
-      ],
       // 第三部分
       thrList: [
         {
@@ -136,8 +120,15 @@ export default {
       ],
     };
   },
-  created() {},
-  methods: {},
+  created() {
+    this.search();
+  },
+  methods: {
+    search() {
+      let companyInfo = sessionStorage.getItem('companyInfo');
+      this.$set(this, `siteInfo`, JSON.parse(companyInfo));
+    },
+  },
   computed: {
     ...mapState(['user']),
   },

+ 2 - 2
vue.config.js

@@ -19,10 +19,10 @@ module.exports = {
     port: '8001',
     proxy: {
       '/files': {
-        target: 'http://broadcast.waityou24.cn',
+        target: 'http://47.93.34.200',
       },
       '/projectadmin/api': {
-        target: 'http://47.93.34.200', //http://127.0.0.1:10102  http://www.freeskyghw.cn
+        target: 'http://127.0.0.1:10102', //http://127.0.0.1:10102  http://www.freeskyghw.cn
         changeOrigin: true,
         ws: false,
       },