Commit 59c0f8a423e50987d81fda90f7e016e3853e3b5e

Authored by liuqimichale
1 parent a1bafdec

vuex

src/components/chinaMap/index.vue
... ... @@ -13,7 +13,7 @@
13 13 <table class="parkTotalTb">
14 14 <tr>
15 15 <td><div class="memberTotalImg"></div></td>
16   - <td><div class="infoBox"><div><countTo :startVal='memberParams.startVal' :endVal='$store.state.ParkingTotal' :duration='animationTime'></countTo></div><div>会员总数</div></div> </td>
  16 + <td><div class="infoBox"><div><countTo :startVal='memberParams.startVal' :endVal='getParkingTotal' :duration='animationTime'></countTo></div><div>会员总数</div></div> </td>
17 17 </tr>
18 18 </table>
19 19 </div>
... ... @@ -58,9 +58,7 @@
58 58 ...mapGetters(['getParkingTotal'])
59 59 },
60 60 mounted() {
61   - this.parkParams.endVal = this.$store.state.ParkingTotal
62 61  
63   - console.log(this.getParkingTotal)
64 62 this.mapChart= this.createPie();
65 63 const _self=this;
66 64 //var tmpCount=0;
... ...
src/store/index.js
... ... @@ -6,7 +6,7 @@ import createLogger from &#39;vuex/dist/logger&#39;
6 6 Vue.use(Vuex)
7 7  
8 8 const state = {
9   - ParkingTotal: 10000
  9 + ParkingTotal: 0
10 10  
11 11 }
12 12  
... ...