diff --git a/pages/varComm/pages/brandRatio/survey/index.js b/pages/varComm/pages/brandRatio/survey/index.js index fa8308c..fc9e696 100644 --- a/pages/varComm/pages/brandRatio/survey/index.js +++ b/pages/varComm/pages/brandRatio/survey/index.js @@ -15,6 +15,7 @@ Component({ brandOption2: histogram([],[],[],'#20cc62'), brandOption3:multipleColumn([],[],[]), brandOption4:sHistogram(), + brandOption5:multipleColumn([],[],[]), stackOption:stack([],[],['#00aaff','#20cc62','#ff4852']), boxArr:new Array(6), topActive:0, //品牌传播 @@ -147,6 +148,33 @@ Component({ brandOption3:multipleColumn(sBrand,channelMsg,arr), }) }) + //品牌事件对比 + app.globalData.request({ + action: 'getSourcetypeC', + sType:'HotEvent0528', + token: wx.getStorageSync('token'), + sTimeType:'34', + iContrastType:'1', + sBrand: sBrand.join(',') + },'http://cloud.sws010.com/api/v7.ashx').then(res=>{ + console.log(res); + let channelMsg = [] + let dataArr = [] + for(let [index,i] of res.entries()){ + if(index==0){ + channelMsg = Object.keys(i.Data) + } + let obj = {} + obj.name = i.Name + obj.data = Object.keys(i.Data).map(ele=>{ + return i.Data[ele] + }) + dataArr.push(obj) + } + this.setData({ + brandOption5:multipleColumn(sBrand,channelMsg,dataArr), + }) + }) //重点媒体 app.globalData.request({ action: 'getSourceCount0528C', diff --git a/pages/varComm/pages/brandRatio/survey/index.wxml b/pages/varComm/pages/brandRatio/survey/index.wxml index 8f09847..29f356c 100644 --- a/pages/varComm/pages/brandRatio/survey/index.wxml +++ b/pages/varComm/pages/brandRatio/survey/index.wxml @@ -125,4 +125,10 @@ - --> \ No newline at end of file + --> + + 品牌事件对比 + + + + \ No newline at end of file