|
@@ -17,6 +17,9 @@
|
|
|
|
|
|
<script>
|
|
|
import governmentDetail from '@/components/government/government.vue';
|
|
|
+import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
+const { mapActions: mapSite } = createNamespacedHelpers('site');
|
|
|
+const { mapActions: mapLink } = createNamespacedHelpers('link');
|
|
|
export default {
|
|
|
name: 'government',
|
|
|
props: {},
|
|
@@ -24,16 +27,7 @@ export default {
|
|
|
governmentDetail,
|
|
|
},
|
|
|
data: () => ({
|
|
|
- info: {
|
|
|
- logo: require('@/assets/logo.png'),
|
|
|
- banquan: '版权所有:吉林省计算中心',
|
|
|
- jishu: '技术支持:长春市福瑞科技有限公司',
|
|
|
- youbian: '邮编:130000',
|
|
|
- chuanzhen: '传真:239823982',
|
|
|
- address: '地址:吉林省长春市朝阳区前进大街1244号',
|
|
|
- phone: '电话:0431-1234567',
|
|
|
- email: '邮箱:123456@163.com',
|
|
|
- },
|
|
|
+ info: {},
|
|
|
photoNews: {
|
|
|
pic: require('@/assets/photoNews.jpg'),
|
|
|
title: '标题',
|
|
@@ -162,28 +156,34 @@ export default {
|
|
|
pic: require('@/assets/gk6.png'),
|
|
|
},
|
|
|
],
|
|
|
- linkList: [
|
|
|
- {
|
|
|
- url: '',
|
|
|
- pic: require('@/assets/link1.jpg'),
|
|
|
- },
|
|
|
- {
|
|
|
- url: '',
|
|
|
- pic: require('@/assets/link2.jpg'),
|
|
|
- },
|
|
|
- {
|
|
|
- url: '',
|
|
|
- pic: require('@/assets/link3.jpg'),
|
|
|
- },
|
|
|
- {
|
|
|
- url: '',
|
|
|
- pic: require('@/assets/link3.jpg'),
|
|
|
- },
|
|
|
- ],
|
|
|
+ linkList: [],
|
|
|
}),
|
|
|
- created() {},
|
|
|
+ created() {
|
|
|
+ this.searchSite();
|
|
|
+ this.searchLink();
|
|
|
+ },
|
|
|
computed: {},
|
|
|
- methods: {},
|
|
|
+ methods: {
|
|
|
+ ...mapSite(['showInfo']),
|
|
|
+ ...mapLink(['query']),
|
|
|
+ // 查询站点信息
|
|
|
+ async searchSite() {
|
|
|
+ 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');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 查询友情链接
|
|
|
+ async searchLink({ ...info } = {}) {
|
|
|
+ const res = await this.query({ ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `linkList`, res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|