You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.4 KiB
71 lines
2.4 KiB
import brokenLines from "../../../components/option/stackingLineOption"
|
|
const app = getApp()
|
|
const dColor = ['#FF4852','#FFBF00', '#FF6E25', '#20CC62', '#00D6D6', '#00AAFF', '#7257FF']
|
|
Component({
|
|
data: {
|
|
imageUrl: getApp().globalData.imageUrl,
|
|
showChart: true,
|
|
transformOption2: brokenLines([], [], [], []),
|
|
boxArr: new Array(6),
|
|
brandTop: [],
|
|
brandTopData: []
|
|
},
|
|
lifetimes: {
|
|
attached() {
|
|
let brandRatioTime = wx.getStorageSync('brandRatioTime')
|
|
let eventData = wx.getStorageSync('eventData');
|
|
let arr = [];
|
|
eventData.forEach(ele => {
|
|
arr.push(JSON.parse(ele));
|
|
})
|
|
this.setData({
|
|
boxArr: arr
|
|
})
|
|
let sRele = []
|
|
this.data.boxArr.forEach((ele) => {
|
|
if (ele) sRele.push(ele.events_id)
|
|
})
|
|
// 品牌传播TOP媒体
|
|
app.globalData.request({
|
|
action: 'getSourceTopCount0528C',
|
|
token: app.globalData.getStorage('token'),
|
|
sType: 'BrandWeiYi',
|
|
...brandRatioTime,
|
|
iContrastType: '3',
|
|
sRele:sRele.join(',')
|
|
}).then(res => {
|
|
this.setData({
|
|
brandTop: [res[0], res[1]],
|
|
brandTopData: res
|
|
})
|
|
})
|
|
//尾翼趋势
|
|
app.globalData.request({
|
|
action: 'getCountTime0528C',
|
|
token: app.globalData.getStorage('token'),
|
|
sType: 'BrandWeiYi',
|
|
iContrastType: '3',
|
|
sRele:sRele.join(',')
|
|
}).then(res => {
|
|
let dDate = []
|
|
let dVal = new Array(res[0].value.length).fill([])
|
|
dVal = dVal.map(ele => {
|
|
ele = JSON.stringify(ele)
|
|
ele = JSON.parse(ele)
|
|
return ele
|
|
})
|
|
for (let i of res) {
|
|
dDate.push(i.key)
|
|
for (let [index, j] of i.value.entries()) {
|
|
dVal[index].push(j)
|
|
}
|
|
}
|
|
this.setData({
|
|
salesDate: res.Time,
|
|
transformOption2: brokenLines(['事件一','事件二'], dVal, ['#1282e6','#30c86e'], dDate),
|
|
})
|
|
})
|
|
},
|
|
|
|
},
|
|
}) |