allcommunit.js 560 B

123456789101112131415161718192021222324252627282930
  1. import { mapState } from 'vuex';
  2. export default {
  3. data() {
  4. return {
  5. loadding: true,
  6. }
  7. },
  8. computed: {
  9. //全局社区
  10. ...mapState(['homeCommunityAll']),
  11. resize() {
  12. // 通过scale值来判断窗口是变化
  13. return this.$store.getters['getScale'];
  14. }
  15. },
  16. watch: {
  17. //全局社区接口调用
  18. 'homeCommunityAll'(n) {
  19. this.mixins_query.communityId = n;
  20. this.getData();
  21. }
  22. },
  23. methods: {
  24. },
  25. created() {
  26. this.mixins_query.communityId = this.homeCommunityAll;
  27. this.getData();
  28. }
  29. }