dev
xiaowen 3 years ago
parent 6c31a36533
commit 746499cd22

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

@ -53,8 +53,8 @@
</view> </view>
</view> </view>
<view class="wd-cloud"> <view class="wd-cloud">
<!-- <word-cloud canvasId="ta-wc" list="{{wordCloudData}}" width="100%" height="200" color="#FF1C20"></word-cloud> --> <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> <!-- <c-echars showChart="{{showChart}}" canvasId="wdcd-canvas" chartId="wdcd" chartOption="{{wordCloudData}}" height="100%"></c-echars> -->
</view> </view>
</view> </view>
<view class="ta-item"> <view class="ta-item">

Loading…
Cancel
Save