|
|
@@ -6,13 +6,16 @@
|
|
|
<count-box></count-box>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <p><span v-text="all"></span></p>
|
|
|
+ <p v-if="allCount[1].count"><span v-text="allCount[1].count"></span></p>
|
|
|
+ <p v-else><span>0</span></p>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <p><span v-text="payMoney"></span></p>
|
|
|
+ <p v-if="payMoney"><span>${{payMoney}}</span><span v-if="isShow">亿</span><span v-if="isMore">万</span></p>
|
|
|
+ <p v-else><span>0</span></p>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <p><span v-text="inquirySheet"></span></p>
|
|
|
+ <p v-if="allCount[3].count"><span v-text="allCount[3].count"></span></p>
|
|
|
+ <p v-else><span>0</span></p>
|
|
|
</div>
|
|
|
<a class="enter" @click="onRegisterClick"><img src="/images/all/enter.png"></a>
|
|
|
</div>
|
|
|
@@ -24,7 +27,9 @@
|
|
|
name: 'display-card',
|
|
|
data () {
|
|
|
return {
|
|
|
- cardShow: true
|
|
|
+ cardShow: true,
|
|
|
+ isShow: false,
|
|
|
+ isMore: false
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
@@ -34,6 +39,25 @@
|
|
|
cardClose () {
|
|
|
this.cardShow = false
|
|
|
},
|
|
|
+ formatNumber (num) {
|
|
|
+ if (num > 99999999) {
|
|
|
+ this.isShow = true
|
|
|
+ let str2 = num.toString()
|
|
|
+ num = Math.floor(num / 100000000)
|
|
|
+ if (parseInt(str2.charAt(str2.length - 8)) > 8) {
|
|
|
+ num = num + 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (num > 9999 && num < 99999999) {
|
|
|
+ this.isMore = true
|
|
|
+ let str = num.toString()
|
|
|
+ num = Math.floor(num / 10000)
|
|
|
+ if (parseInt(str.charAt(str.length - 4)) > 4) {
|
|
|
+ num = num + 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return num
|
|
|
+ },
|
|
|
onRegisterClick () {
|
|
|
this.$http.get('/register/page').then(response => {
|
|
|
if (response.data) {
|
|
|
@@ -43,20 +67,11 @@
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- payMoney () {
|
|
|
- let count = this.$store.state.count.payMoney.data
|
|
|
- let supplierCount = count.content ? count.totalElements + '' : '0'
|
|
|
- return supplierCount
|
|
|
+ allCount () {
|
|
|
+ return this.$store.state.count.allCount.data
|
|
|
},
|
|
|
- inquirySheet () {
|
|
|
- let count = this.$store.state.count.inquirySheet.data
|
|
|
- let supplierCount = count.content ? count.totalElements + '' : '0'
|
|
|
- return supplierCount
|
|
|
- },
|
|
|
- all () {
|
|
|
- let count = this.$store.state.supplier.merchant.merchantAll.data
|
|
|
- let supplierCount = count.content ? count.totalElements + '' : '0'
|
|
|
- return supplierCount
|
|
|
+ payMoney () {
|
|
|
+ return this.formatNumber(this.allCount[2].count)
|
|
|
}
|
|
|
}
|
|
|
}
|