|
|
@@ -9,39 +9,17 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
<ul class="list-unstyled">
|
|
|
- <li v-for="(c, index) in counts.data" :style="'top: -' + 30 * timerIndex + 'px'" :class="{'top': isTop}">
|
|
|
- <count-item :value ="c.count"></count-item>
|
|
|
+ <li v-for="(c, index) in counts" :style="'top: -' + 30 * timerIndex + 'px'" :class="{'top': isTop}">
|
|
|
+ <count-item :value ="c" :index ="index"></count-item>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
- <div>
|
|
|
- <p><span v-html="all"></span><span style="color: #333">家</span>
|
|
|
+ <div v-for="item in itemCounts">
|
|
|
+ <p><span v-html="item.count"></span>
|
|
|
+ <span style="color: #333" v-if="item.type === 3">家</span>
|
|
|
+ <span style="color: #333" v-if="item.type === 2">条</span>
|
|
|
</p>
|
|
|
</div>
|
|
|
- <div>
|
|
|
- <p v-if="payMoney">
|
|
|
- <span v-html="payMoney"></span>
|
|
|
- </p>
|
|
|
- <p v-else><span>0元</span></p>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <p v-if="payMoneyLast">
|
|
|
- <span v-html="payMoneyLast"></span>
|
|
|
- </p>
|
|
|
- <p v-else><span>0元</span></p>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <p v-if="inquirySheet">
|
|
|
- <span v-html="inquirySheet"></span><span style="color: #333">条</span>
|
|
|
- </p>
|
|
|
- <p v-else><span>0条</span></p>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <p v-if="inquirySheetLast">
|
|
|
- <span v-html="inquirySheetLast"></span><span style="color: #333">条</span>
|
|
|
- </p>
|
|
|
- <p v-else><span>0条</span></p>
|
|
|
- </div>
|
|
|
<a class="enter" @click="goStoreApply()">
|
|
|
<img src="/images/all/enter2.png">
|
|
|
</a>
|
|
|
@@ -58,7 +36,7 @@
|
|
|
timerIndex: 0,
|
|
|
isTop: false, // 判断是否滚动至顶,
|
|
|
timer: {}, // 定时器实体
|
|
|
- title: [ '品牌', '现货', '规格书' ]
|
|
|
+ title: [ '品牌', '现货', '规格书', '店铺' ]
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
@@ -74,7 +52,12 @@
|
|
|
if (flag) {
|
|
|
this.timer = setInterval(() => {
|
|
|
this.timerIndex ++
|
|
|
- this.isTop = (this.timerIndex % 3 === 0)
|
|
|
+// let title = this.title.shift()
|
|
|
+// let count = this.counts.shift()
|
|
|
+// this.title.push(title)
|
|
|
+// this.counts.push(count)
|
|
|
+// this.timerIndex = 0
|
|
|
+ this.isTop = (this.timerIndex === 4)
|
|
|
if (this.isTop) {
|
|
|
this.timerIndex = 0
|
|
|
}
|
|
|
@@ -107,7 +90,7 @@
|
|
|
}
|
|
|
num += '<span style="color: #333">万</span>'
|
|
|
} else {
|
|
|
- if (type === 1 || type === 2) {
|
|
|
+ if (type === 1) {
|
|
|
num += '<span style="color: #333">元</span>'
|
|
|
} else {
|
|
|
num += ''
|
|
|
@@ -123,9 +106,9 @@
|
|
|
num = arr[0] * Math.pow(10, arr[1])
|
|
|
}
|
|
|
if (num > 99999999) {
|
|
|
- num = (num / 100000000).toFixed(2).slice(num.length - 1, 4) + '亿'
|
|
|
+ num = (num / 100000000).toFixed(2).slice(num.length - 1, 4) + '<span style="color: #333">亿</span>'
|
|
|
} else if (num > 9999) {
|
|
|
- num = (num / 10000).toFixed(2).slice(num.length - 1, 4) + '万'
|
|
|
+ num = (num / 10000).toFixed(2).slice(num.length - 1, 4) + '<span style="color: #333">万</span>'
|
|
|
} else {
|
|
|
num += ''
|
|
|
}
|
|
|
@@ -149,26 +132,43 @@
|
|
|
return this.$store.state.count.allCount.data
|
|
|
},
|
|
|
payMoneyLast () {
|
|
|
- return this.allCount[0] ? this.formatNumber(this.allCount[0].count, 2) : 0
|
|
|
+ return this.allCount[0] ? this.formatNumber(this.allCount[0].count, 1) : 0
|
|
|
},
|
|
|
payMoney () {
|
|
|
return this.allCount[1] ? this.formatNumber(this.allCount[1].count, 1) : 0
|
|
|
},
|
|
|
inquirySheet () {
|
|
|
- let sheetNum = this.$store.state.count.inquirySheet.data.count
|
|
|
- return this.formatDouble(sheetNum)
|
|
|
+ let sheetNum = this.$store.state.count.inquirySheet.data
|
|
|
+ return sheetNum ? this.formatDouble(sheetNum.count) : 0
|
|
|
},
|
|
|
inquirySheetLast () {
|
|
|
- let lastSheetNum = this.$store.state.count.inquirySheetLast.data.count
|
|
|
- return this.formatDouble(lastSheetNum)
|
|
|
+ let lastSheetNum = this.$store.state.count.inquirySheetLast.data
|
|
|
+ return lastSheetNum ? this.formatDouble(lastSheetNum.count) : 0
|
|
|
},
|
|
|
all () {
|
|
|
let count = this.$store.state.supplier.merchant.merchantAll.data
|
|
|
- let supplierCount = count.content ? count.totalElements + '' : '0'
|
|
|
+ let supplierCount = count.content ? count.totalElements + '' : 0
|
|
|
return this.formatNumber(supplierCount, 0)
|
|
|
},
|
|
|
+ itemCounts () {
|
|
|
+ let arr = []
|
|
|
+ arr.push({count: this.all ? this.all : 0, type: 3}, {count: this.payMoney ? this.payMoney : 0, type: 1}, {count: this.payMoneyLast ? this.payMoneyLast : 0, type: 1}, {count: this.inquirySheet ? this.inquirySheet : 0, type: 2}, {count: this.inquirySheetLast ? this.inquirySheetLast : 0, type: 2})
|
|
|
+ return arr
|
|
|
+ },
|
|
|
+ list () {
|
|
|
+ let list = JSON.parse(JSON.stringify(this.$store.state.provider.stores.storeList.data))
|
|
|
+ return list
|
|
|
+ },
|
|
|
counts () {
|
|
|
- return this.$store.state.product.common.counts
|
|
|
+ let arr = []
|
|
|
+ let countM = this.$store.state.product.common.counts.data
|
|
|
+ if (countM) {
|
|
|
+ countM.forEach((value, key, $data) => {
|
|
|
+ arr.push(value.count)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ arr.push(this.list.totalElements)
|
|
|
+ return arr
|
|
|
},
|
|
|
enterprise () {
|
|
|
return this.user.data.enterprise
|
|
|
@@ -227,12 +227,12 @@
|
|
|
-moz-transition: top 1s; /* Firefox 4 */
|
|
|
-webkit-transition: top 1s; /* Safari and Chrome */
|
|
|
-o-transition: top 1s; /* Opera */
|
|
|
- /* &.top {
|
|
|
+ &.top {
|
|
|
transition: top 0s;
|
|
|
- -moz-transition: top 0s; !* Firefox 4 *!
|
|
|
- -webkit-transition: top 0s; !* Safari and Chrome *!
|
|
|
- -o-transition: top 0s; !* Opera *!
|
|
|
- }*/
|
|
|
+ -moz-transition: top 0s; /* Firefox 4 */
|
|
|
+ -webkit-transition: top 0s; /* Safari and Chrome */
|
|
|
+ -o-transition: top 0s; /* Opera */
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
&:last-child{
|
|
|
@@ -254,12 +254,12 @@
|
|
|
-moz-transition: top 1s; /* Firefox 4 */
|
|
|
-webkit-transition: top 1s; /* Safari and Chrome */
|
|
|
-o-transition: top 1s; /* Opera */
|
|
|
- /*&.top {
|
|
|
+ &.top {
|
|
|
transition: top 0s;
|
|
|
- -moz-transition: top 0s; !* Firefox 4 *!
|
|
|
- -webkit-transition: top 0s; !* Safari and Chrome *!
|
|
|
- -o-transition: top 0s; !* Opera *!
|
|
|
- }*/
|
|
|
+ -moz-transition: top 0s; /* Firefox 4 */
|
|
|
+ -webkit-transition: top 0s; /* Safari and Chrome */
|
|
|
+ -o-transition: top 0s; /* Opera */
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|