Commit 5799be72 by 胡悦

提交

1 parent e2ca2e40
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-06-30 10:59:56
* @LastEditTime: 2022-06-30 17:18:27
-->
<template>
<div>
......@@ -21,11 +21,11 @@
</div>
<div class="ranking-content">
<div class="ranking-item" v-for="(item, index) in flowData" :key="index">
<span>{{ item.id }}</span>
<span>{{ index + 1 }}</span>
<span class="ranking-name">
<marquee :direction="directionTimer" :delay="delayTimer" :text="item.name" />
<marquee :direction="directionTimer" :delay="delayTimer" :text="item.brand" />
</span>
<span class="ranking-text">{{ item.num }}</span>
<span class="ranking-text">{{ item.value }}</span>
</div>
</div>
</div>
......@@ -204,9 +204,26 @@ export default {
api = 'storeSaleTrans'
}
this.api.sales[api](params).then(res => {
const { topList, lastList } = res.data.dataList[0]
this.topList = topList ? JSON.parse(topList) : []
this.lastList = lastList ? JSON.parse(lastList) : []
console.log(res)
this.topList = []
this.lastList = []
let { topList, lastList } = res.data.dataList[0]
topList = topList ? JSON.parse(topList) : []
lastList = lastList ? JSON.parse(lastList) : []
for (const key in topList) {
this.topList.push({
brand: key,
value: topList[key]
})
}
for (const key in lastList) {
this.lastList.push({
brand: key,
value: lastList[key]
})
}
// this.lastList = lastList ? JSON.parse(lastList) : []
console.log(this.topList, this.lastList)
// this.topList = [
// {
// id: 1,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!