|
|
@@ -169,28 +169,32 @@
|
|
|
itemCounts () {
|
|
|
let arr = []
|
|
|
let count = this.baseUtils.deepCopy(this.counter)
|
|
|
- count.forEach((value) => {
|
|
|
- if (value.usedFor === 'mall_home_banner') {
|
|
|
- value.type = value.detno === 2 ? 3: 1
|
|
|
- value.count = this.formatNumber(value.count)
|
|
|
- arr.push(value)
|
|
|
- }
|
|
|
- })
|
|
|
- arr = arr.sort((a,b) => {return a.detno - b.detno})
|
|
|
- arr.push({count: this.inquirySheet ? this.inquirySheet : 0, type: 2},
|
|
|
- {count: this.inquirySheetLast ? this.inquirySheetLast : 0, type: 2})
|
|
|
+ if(count.length){
|
|
|
+ count.forEach((value) => {
|
|
|
+ if (value.usedFor === 'mall_home_banner') {
|
|
|
+ value.type = value.detno === 2 ? 3: 1
|
|
|
+ value.count = this.formatNumber(value.count)
|
|
|
+ arr.push(value)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ arr = arr.sort((a,b) => {return a.detno - b.detno})
|
|
|
+ arr.push({count: this.inquirySheet ? this.inquirySheet : 0, type: 2},
|
|
|
+ {count: this.inquirySheetLast ? this.inquirySheetLast : 0, type: 2})
|
|
|
+ }
|
|
|
return arr
|
|
|
},
|
|
|
counts () {
|
|
|
let arr = []
|
|
|
let count = this.baseUtils.deepCopy(this.counter)
|
|
|
- count.forEach((value) => {
|
|
|
- if (value.usedFor === 'b2c_index') {
|
|
|
- value.logo = value.detno === 4 ? 0: 1
|
|
|
- arr.push(value)
|
|
|
- }
|
|
|
- })
|
|
|
- arr = arr.sort((a,b) => {return a.detno - b.detno})
|
|
|
+ if(count.length) {
|
|
|
+ count.forEach((value) => {
|
|
|
+ if (value.usedFor === 'b2c_index') {
|
|
|
+ value.logo = value.detno === 4 ? 0: 1
|
|
|
+ arr.push(value)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ arr = arr.sort((a,b) => {return a.detno - b.detno})
|
|
|
+ }
|
|
|
return arr
|
|
|
}
|
|
|
}
|