|
|
@@ -9,14 +9,22 @@
|
|
|
<p><span>{{all}}家</span></p>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <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>
|
|
|
+ <p v-if="payMoney">
|
|
|
+ <span>{{payMoney}}</span>
|
|
|
+ <span v-text="isMore?'万':'元'" v-if="!isShow"></span>
|
|
|
+ <span v-if="isShow">亿</span>
|
|
|
+ </p>
|
|
|
+ <p v-else><span>0元</span></p>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <p v-if="allCount[1].count"><span>{{allCount[1].count}}条</span></p>
|
|
|
- <p v-else><span>0</span></p>
|
|
|
+ <p v-if="inquirySheet.count">
|
|
|
+ <span>{{inquirySheet.count}}条</span>
|
|
|
+ </p>
|
|
|
+ <p v-else><span>0条</span></p>
|
|
|
</div>
|
|
|
- <a class="enter" @click="onRegisterClick"><img src="/images/all/enter.png"></a>
|
|
|
+ <a class="enter" @click="goStoreApply()">
|
|
|
+ <img src="/images/all/enter.png">
|
|
|
+ </a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -39,6 +47,10 @@
|
|
|
this.cardShow = false
|
|
|
},
|
|
|
formatNumber (num) {
|
|
|
+ if (num.toString().indexOf('E') !== -1) {
|
|
|
+ let arr = num.toString().split('E')
|
|
|
+ num = arr[0] * Math.pow(10, arr[1])
|
|
|
+ }
|
|
|
if (num > 99999999) {
|
|
|
this.isShow = true
|
|
|
let str2 = num.toString()
|
|
|
@@ -47,7 +59,7 @@
|
|
|
num = num + 1
|
|
|
}
|
|
|
}
|
|
|
- if (num > 9999 && num < 99999999) {
|
|
|
+ if (num > 9999) {
|
|
|
this.isMore = true
|
|
|
let str = num.toString()
|
|
|
num = Math.floor(num / 10000)
|
|
|
@@ -57,12 +69,16 @@
|
|
|
}
|
|
|
return num
|
|
|
},
|
|
|
- onRegisterClick () {
|
|
|
- this.$http.get('/register/page').then(response => {
|
|
|
- if (response.data) {
|
|
|
- window.location.href = response.data.content
|
|
|
+ goStoreApply: function () {
|
|
|
+ if (this.user.logged) {
|
|
|
+ if (this.enterprise && this.enterprise.isVendor === 313) {
|
|
|
+ window.location.href = '/vendor#/store-apply'
|
|
|
+ } else {
|
|
|
+ this.$router.push('/register-saler')
|
|
|
}
|
|
|
- })
|
|
|
+ } else {
|
|
|
+ this.$router.push('/auth/login')
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -72,10 +88,16 @@
|
|
|
payMoney () {
|
|
|
return this.formatNumber(this.allCount[0].count)
|
|
|
},
|
|
|
+ inquirySheet () {
|
|
|
+ return this.$store.state.count.inquirySheet.data
|
|
|
+ },
|
|
|
all () {
|
|
|
let count = this.$store.state.supplier.merchant.merchantAll.data
|
|
|
let supplierCount = count.content ? count.totalElements + '' : '0'
|
|
|
return supplierCount
|
|
|
+ },
|
|
|
+ enterprise () {
|
|
|
+ return this.user.data.enterprise
|
|
|
}
|
|
|
}
|
|
|
}
|