Commit e8dae17a by 匡雅琴

接口调整

1 parent bbb8988f
......@@ -96,18 +96,18 @@ export default {
}
},
created() {
this.$bus.$on('crowdFundingMonth', data => {
this.month = data
this.getBrandRank(data)
})
// this.$bus.$on('crowdFundingMonth', data => {
// this.month = data
// this.getBrandRank(data)
// })
this.getBrandRank()
},
mounted() {},
methods: {
async getBrandRank(month, queryItem) {
async getBrandRank(queryItem) {
const _params = {
month,
queryItem: queryItem || this.tabItem
}
const _result = await this.api.crowdFunding.getBrandRank(_params)
......@@ -121,23 +121,23 @@ export default {
changeTab(val) {
switch (val) {
case 0:
this.getBrandRank(this.month, 'AR')
this.getBrandRank('AR')
this.tabItem = 'AR'
break
case 1:
this.getBrandRank(this.month, 'navigation360')
this.getBrandRank('navigation360')
this.tabItem = 'navigation360'
break
case 2:
this.getBrandRank(this.month, 'seat')
this.getBrandRank('seat')
this.tabItem = 'seat'
break
case 3:
this.getBrandRank(this.month, 'light')
this.getBrandRank('light')
this.tabItem = 'light'
break
case 4:
this.getBrandRank(this.month, 'digitalbeauty')
case 4:
this.getBrandRank('digitalbeauty')
this.tabItem = 'digitalbeauty'
break
}
......
......@@ -3,7 +3,7 @@
<div class="flex">
<div v-for="(item, index) in tabList" :key="index" class="tab-item" :class="tabActive == index ? 'tab-item-active' : ''" @click="changeTab(index)">{{ item }}</div>
</div>
<div class="flex">
<div class="flex" v-show="showMonth">
<span class="month-text">统计月份:</span>
<div class="month-plugin">
<div class="month" @click.stop="switchMonth">
......@@ -38,6 +38,7 @@ export default {
return {
tabActive: 0,
isShow: false,
showMonth: true,
defaultMonth: {
label: new Date().format('yyyy-MM'),
statMonth: new Date().format('yyyy-MM')
......@@ -68,6 +69,7 @@ export default {
// tab切换
changeTab(index) {
this.tabActive = index
this.showMonth = index === 0
this.$emit('tabChange', index)
},
switchMonth() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!