dev
xiaowen 3 years ago
parent 6c31a36533
commit 746499cd22

@ -14,6 +14,8 @@ Component({
wyDataList: [],
//热门词云
wordCloudActive: 0,
wlvl: 36,
wShow: false,
wordCloudData: [],
},
methods: {
@ -87,7 +89,7 @@ Component({
iPageIndex: 1,
iPageSize: 10
}).then(res => {
this.setData({wyDataList: res})
this.setData({wyDataList: res, })
});
},
getWordCloud() {
@ -105,7 +107,7 @@ Component({
let o = [key, res[key]]
arr1.push(o)
});
this.setData({wordCloudData: arr1})
this.setData({wordCloudData: arr1, wShow: true})
});
},
toEventDetail(value) {
@ -121,7 +123,8 @@ Component({
})
},
changeWordCloud(event) {
this.setData({wordCloudActive: event.detail.index});
let sy = event.detail.index ? 27 : 36;
this.setData({wordCloudActive: event.detail.index, wlvl: sy, wShow: false});
this.getWordCloud()
}
},

@ -53,8 +53,8 @@
</view>
</view>
<view class="wd-cloud">
<!-- <word-cloud canvasId="ta-wc" list="{{wordCloudData}}" width="100%" height="200" color="#FF1C20"></word-cloud> -->
<c-echars showChart="{{showChart}}" canvasId="wdcd-canvas" chartId="wdcd" chartOption="{{wordCloudData}}" height="100%"></c-echars>
<word-cloud wx:if="{{wShow}}" canvasId="ta-wc" list="{{wordCloudData}}" width="100%" height="200" color="#FF1C20" lvl="{{wlvl}}"></word-cloud>
<!-- <c-echars showChart="{{showChart}}" canvasId="wdcd-canvas" chartId="wdcd" chartOption="{{wordCloudData}}" height="100%"></c-echars> -->
</view>
</view>
<view class="ta-item">

Loading…
Cancel
Save