|
@@ -2,7 +2,7 @@
|
|
<div id="home">
|
|
<div id="home">
|
|
<el-container>
|
|
<el-container>
|
|
<el-header>
|
|
<el-header>
|
|
- <header-1></header-1>
|
|
|
|
|
|
+ <header-1 :siteInfo="siteInfo"></header-1>
|
|
</el-header>
|
|
</el-header>
|
|
<el-main>
|
|
<el-main>
|
|
<div class="w_1200">
|
|
<div class="w_1200">
|
|
@@ -10,14 +10,15 @@
|
|
</div>
|
|
</div>
|
|
</el-main>
|
|
</el-main>
|
|
<el-footer>
|
|
<el-footer>
|
|
- <footer-1></footer-1>
|
|
|
|
|
|
+ <footer-1 :siteInfo="siteInfo"></footer-1>
|
|
</el-footer>
|
|
</el-footer>
|
|
</el-container>
|
|
</el-container>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
|
|
|
+import { mapState, createNamespacedHelpers, createLogger } from 'vuex';
|
|
|
|
+const { mapActions } = createNamespacedHelpers('company');
|
|
export default {
|
|
export default {
|
|
name: 'home',
|
|
name: 'home',
|
|
props: {},
|
|
props: {},
|
|
@@ -26,10 +27,24 @@ export default {
|
|
footer1: () => import('./web-parts-one/footer-1.vue'),
|
|
footer1: () => import('./web-parts-one/footer-1.vue'),
|
|
},
|
|
},
|
|
data: function () {
|
|
data: function () {
|
|
- return {};
|
|
|
|
|
|
+ return {
|
|
|
|
+ siteInfo: {},
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ async created() {
|
|
|
|
+ await this.search();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ ...mapActions(['query']),
|
|
|
|
+ async search() {
|
|
|
|
+ // 公司信息
|
|
|
|
+ let res;
|
|
|
|
+ res = await this.query();
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `siteInfo`, res.data);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
- created() {},
|
|
|
|
- methods: {},
|
|
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user']),
|
|
...mapState(['user']),
|
|
},
|
|
},
|