|
@@ -15,6 +15,8 @@
|
|
|
|
|
|
<script>
|
|
|
import indexDetail from '@/components/index.vue';
|
|
|
+import { createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions } = createNamespacedHelpers('site');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -22,16 +24,7 @@ export default {
|
|
|
indexDetail,
|
|
|
},
|
|
|
data: () => ({
|
|
|
- info: {
|
|
|
- logo: require('@/assets/logo.png'),
|
|
|
- banquan: '版权所有:吉林省计算中心',
|
|
|
- jishu: '技术支持:长春市福瑞科技有限公司',
|
|
|
- youbian: '邮编:130000',
|
|
|
- chuanzhen: '传真:239823982',
|
|
|
- address: '地址:吉林省长春市朝阳区前进大街1244号',
|
|
|
- phone: '电话:0431-1234567',
|
|
|
- email: '邮箱:123456@163.com',
|
|
|
- },
|
|
|
+ info: {},
|
|
|
map: require('@/assets/map.jpg'),
|
|
|
zixunList: [
|
|
|
{
|
|
@@ -102,9 +95,22 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
}),
|
|
|
- created() {},
|
|
|
+ created() {
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
computed: {},
|
|
|
- methods: {},
|
|
|
+ methods: {
|
|
|
+ ...mapActions(['showInfo']),
|
|
|
+ async search() {
|
|
|
+ let res = await this.showInfo();
|
|
|
+ let object = JSON.parse(JSON.stringify(res.data));
|
|
|
+ if (object) {
|
|
|
+ this.$set(this, `info`, res.data);
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.errmsg ? res.errmsg : 'error');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|