index.vue 1.6 KB
Newer Older
Esteban Choque's avatar
Esteban Choque committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<template>
  <section
    class="container page">
    <div class="page-header">
      <div class="page-title">
        <h1 v-html="'Participa En Cualquiera De Nuestros Proyectos'"></h1>
      </div>
    </div>
    <el-row>
      <el-col
        v-for="forum in forums"
        :key="forum.id_forum"
        :sm="12">
        <el-card
          :body-style="{ padding: '0px' }"
          shadow="hover"
          class="post">
          <div
            class="post-type"
            v-html="'Participa'"></div>
          <div
            :style="{ 'background-image': `url(` + forum.img_dest + `)` }"
            class="post-image"></div>
          <nuxt-link
            :to="$i18n.path(`participa/`+forum.id_forum+`/`+forum.slug)"
            class="post-details">
            {{ forum.name }}
          </nuxt-link>
        </el-card>
      </el-col>
    </el-row>
    <p-box></p-box>
  </section>
</template>

<script>
import axios from 'axios';
export default {
  head () {
    return {
      title: 'Participa'
    };
  },
  data() {
    return {
      forums: []
    };
  },
  mounted () {
    this.$store.commit('CLOSE_MENU');
    this.$util.setBackgroundImage();
    this.getTopics();
  },
  methods: {
    getTopics() {
56
57
     //axios.get('http://localhost/wordpress/index.php?rest_route=/fm/v1/')
     axios.get(this.$foro.url+'/fm/v1/')
Esteban Choque's avatar
Esteban Choque committed
58
59
60
61
62
63
      .then(response => {
        this.forums = response.data;
        console.log('ffs');
        //console.log(response.data); // ex.: { user: 'Your User'}
        console.log(response.status); // ex.: 200
     }); 
64
    }
Esteban Choque's avatar
Esteban Choque committed
65
66
67
68
69
  }
};
</script>

<style lang="scss" src="./page.scss"></style>