zx 3 years ago
parent 12a85b9c72
commit f26b37401d

@ -1,14 +1,14 @@
<view>
<view style="height: 40px;"></view>
<van-search style="width: 100%;" background="#006BFF" model:value="{{ brandForm.brand }}" placeholder="请输入品牌名称" bind:search="handlerSearch" />
<view class="bs-tabs">
<!-- <view class="bs-tabs">
<scroll-view class="bs-tab-sv" scroll-x="true">
<view class="bs-tab-sv-item" wx:for="{{recommandBrand}}" wx:key="index">
<!-- <image class="userAvatar" src="{{item.img}}" />
<view class="bs-tab-title">{{item.title}}</view> -->
<image class="userAvatar" src="{{item.img}}" />
<view class="bs-tab-title">{{item.title}}</view>
</view>
</scroll-view>
</view>
</view> -->
<van-index-bar class="bs-bar" sticky-offset-top="40">
<view wx:for="{{brandList}}" wx:for-item="item" wx:key="index">
<van-index-anchor index="{{item.name}}" />

@ -1,14 +1,14 @@
<view>
<view style="height: 40px;"></view>
<van-search style="width: 100%;" background="#006BFF" placeholder="请输入车型名称" bind:search="handlerSearch" />
<view class="bs-tabs">
<!-- <view class="bs-tabs">
<scroll-view class="bs-tab-sv" scroll-x="true">
<view class="bs-tab-sv-item" wx:for="{{recommandBrand}}" wx:key="index">
<!-- <image class="userAvatar" src="{{item.img}}" />
<view class="bs-tab-title">{{item.title}}</view> -->
<image class="userAvatar" src="{{item.img}}" />
<view class="bs-tab-title">{{item.title}}</view>
</view>
</scroll-view>
</view>
</view> -->
<van-index-bar class="bs-bar" sticky-offset-top="40">
<view wx:for="{{brandList}}" wx:for-item="item" wx:key="index">
<van-index-anchor index="{{item.name}}" />

@ -12,7 +12,6 @@
}
.ei-item-hot {
width: 648rpx;
/* height: 90%; */
margin: 0rpx 0rpx 32rpx 32rpx;
padding: 24rpx 40rpx 16rpx 0rpx;
border-radius: 8rpx;

@ -104,10 +104,10 @@ Component({
}).then(res => {
let arr1 = [];
let skey = {
34: 6000,
3: 50000,
20: 180000,
23: 30000
34: 50,
3: 416,
20: 1500,
23: 250
};
Object.keys(res).forEach(key => {
let o = [key, res[key] / skey[wx.getStorageSync('sTimeType')]]

@ -34,6 +34,9 @@ Component({
modalHotData: [],
//调性分布
affNegaposi: negaposiOption([],[],[]),
//词云
wordCloudActive: 0,
wordCloudData: [],
//kol观点
kolActive: 0,
kolData: [],
@ -235,6 +238,7 @@ Component({
});
this.setData({affNegaposi: negaposiOption(dName,dPositive,dNegative)})
});
this.getWordCloud();
this.getKol();
},
getUserChar() {
@ -362,6 +366,31 @@ Component({
});
}
},
getWordCloud() {
app.globalData.request({
action: this.data.wordCloudActive == 0 ? 'getPositive':'getNegative', //正面词云 负面词云
token: 't%2BrswgjvzGM=',
sType: 'BrandWeiBo',
sTimeType: wx.getStorageSync('sTimeType') || 34,
sStartTime: wx.getStorageSync('sStartTime') || '',
sEndTime: wx.getStorageSync('sEndTime') || '',
sBrand: wx.getStorageSync('sBrand') || '',
}).then(res => {
let arr1 = [];
let skey = {
34: 50,
3: 416,
20: 1500,
23: 250
};
Object.keys(res).forEach(key => {
let o = [key, res[key] / skey[wx.getStorageSync('sTimeType')]]
arr1.push(o)
});
const resArr = arr1.slice(0,50);
this.setData({wordCloudData: resArr})
});
},
getKol() {
app.globalData.request({
action: 'getCoreDiffuseWeiBo0528', //kol正面观点
@ -385,6 +414,10 @@ Component({
this.setData({modalHotActive: event.detail.index})
this.getModalHot()
},
changeWordCloud(event) {
this.setData({wordCloudActive: event.detail.index});
this.getWordCloud()
},
changeKolActive(event) {
this.setData({kolActive: event.detail.index})
this.getKol()

@ -1,6 +1,7 @@
{
"usingComponents": {
"c-echars": "../../../../../components/c-echars/index"
"c-echars": "../../../../../components/c-echars/index",
"word-cloud": "../../../../../components/word-cloud/index"
},
"component": true
}

@ -158,6 +158,20 @@
<c-echars showChart="{{showChart}}" canvasId="wbsp-canvas" chartId="wbsp" chartOption="{{weiboSplit}}" height="100%"></c-echars>
</view>
</view>
<view class="wb-item">
<view class="wb-area-title">
<view style="width: 45%;">热门词云</view>
<view style="width: 55%;">
<van-tabs type="card" active="{{ wordCloudActive }}" color="#BBBBBB" bind:change="changeWordCloud">
<van-tab title="正面"></van-tab>
<van-tab title="负面"></van-tab>
</van-tabs>
</view>
</view>
<view class="brand">
<word-cloud canvasId="ta-wc" list="{{wordCloudData}}" width="100%" height="200" color="#FF1C20"></word-cloud>
</view>
</view>
<view class="wb-item">
<view class="wb-chart-title">调性分布</view>
<view class="wb-chart-item" style="height: 560rpx;width: 100%;">

@ -136,4 +136,15 @@
font-size: 9px;
font-weight: 600;
color: #333333;
}
/* 词云 */
.brand{
position: relative;
width: calc(100% - 32px);
height: 484rpx;
background-color: #fff;
margin-top: 32rpx;
border-radius: 4rpx;
padding: 16px;
overflow: hidden;
}

@ -12,6 +12,9 @@ Component({
weiyiTotal: pieOption(dColor,[]),
weiyiTotalData: [],
wyDataList: [],
//热门词云
wordCloudActive: 0,
wordCloudData: [],
},
methods: {
getData() {
@ -60,6 +63,7 @@ Component({
}
this.setData({ keyMediaData: histogram(dx,dValue,[],'#20CC62')})
});
this.getWordCloud();
app.globalData.request({
action: 'getList0528', //尾翼信息列表
token: 't%2BrswgjvzGM=',
@ -75,6 +79,32 @@ Component({
this.setData({wyDataList: res})
});
},
getWordCloud() {
app.globalData.request({
action: this.data.wordCloudActive == 0?'getPositive':'getNegative', //正面词云 负面词云
token: 't%2BrswgjvzGM=',
sType: 'BrandWeiYi',
sTimeType: wx.getStorageSync('sTimeType') || 34,
sStartTime: wx.getStorageSync('sStartTime') || '',
sEndTime: wx.getStorageSync('sEndTime') || '',
sBrand: wx.getStorageSync('sBrand') || '',
sSeriesName: wx.getStorageSync('sSeriesName') || ''
}).then(res => {
let arr1 = [];
let skey = {
34: 50,
3: 416,
20: 1500,
23: 250
};
Object.keys(res).forEach(key => {
let o = [key, res[key] / skey[wx.getStorageSync('sTimeType')]]
arr1.push(o)
});
const resArr = arr1.slice(0,50);
this.setData({wordCloudData: resArr})
});
},
toEventDetail(value) {
let id = value.currentTarget.dataset.id;
wx.setStorageSync('sRele', id);
@ -82,6 +112,10 @@ Component({
url: "/pages/insight/pages/eventInsight/index" + '?id=' + id
})
},
changeWordCloud(event) {
this.setData({wordCloudActive: event.detail.index});
this.getWordCloud()
},
toTailDataList() {
wx.navigateTo({
url: '/pages/insight/pages/brandInsight/tailDataList/index',

@ -1,6 +1,7 @@
{
"usingComponents": {
"c-echars": "../../../../../components/c-echars/index"
"c-echars": "../../../../../components/c-echars/index",
"word-cloud": "../../../../../components/word-cloud/index"
},
"component": true
}

@ -42,6 +42,20 @@
</view>
</view>
</view> -->
<view class="ta-item">
<view class="tt-area-title">
<view style="width: 45%;">热门词云</view>
<view style="width: 55%;">
<van-tabs type="card" active="{{ wordCloudActive }}" color="#BBBBBB" bind:change="changeWordCloud">
<van-tab title="正面"></van-tab>
<van-tab title="负面"></van-tab>
</van-tabs>
</view>
</view>
<view class="wd-cloud">
<word-cloud canvasId="ta-wc" list="{{wordCloudData}}" width="100%" height="200" color="#FF1C20"></word-cloud>
</view>
</view>
<view class="ta-item">
<view class="ta-chart-title" style="display: flex;justify-content: space-between;">
<view>尾翼信息列表</view>

@ -59,6 +59,15 @@
width: 318rpx;
height: 410rpx
}
.tt-area-title {
width: 100%;
font-size: 18px;
padding-left: 32rpx;
font-weight: 600;
color: #333333;
display: flex;
justify-content: flex-start;
}
/* 尾翼整体调性 */
.circle-chart {
width: 50%;
@ -134,4 +143,15 @@
.text_pinpai{
color: #999999;
font-size: 24rpx;
}
/* 词云 */
.wd-cloud {
position: relative;
width: calc(100% - 32px);
height: 484rpx;
background-color: #fff;
margin-top: 32rpx;
border-radius: 4rpx;
padding: 16px;
overflow: hidden;
}

@ -28,6 +28,9 @@ Component({
weiboTopVolumn: histogram([],[],[],'#20CC62'),
//微博传播裂变
mdWeiboSplit: splitOption([],[]),
//词云
wordCloudActive: 0,
wordCloudData: [],
//kol观点
kolActive: 0,
kolData: [],
@ -215,6 +218,7 @@ Component({
});
this.setData({mdWeiboSplit: splitOption(nodes,edges)})
});
this.getWordCloud();
this.getKol();
},
getUserChar() {
@ -269,6 +273,32 @@ Component({
this.setData({ weiboRegionData: sexArr,weiboUserChart: pieOption(dColor,sexArr)})
});
},
getWordCloud() {
app.globalData.request({
action: this.data.wordCloudActive == 0 ? 'getPositive':'getNegative', //正面词云 负面词云
token: 't%2BrswgjvzGM=',
sType: 'BrandWeiBo',
sTimeType: wx.getStorageSync('sTimeType') || 34,
sStartTime: wx.getStorageSync('sStartTime') || '',
sEndTime: wx.getStorageSync('sEndTime') || '',
sBrand: wx.getStorageSync('sBrand') || '',
sSeriesName: wx.getStorageSync('sSeriesName') || ''
}).then(res => {
let arr1 = [];
let skey = {
34: 5,
3: 41,
20: 150,
23: 25
};
Object.keys(res).forEach(key => {
let o = [key, res[key] / skey[wx.getStorageSync('sTimeType')]]
arr1.push(o)
});
const resArr = arr1.slice(0,50);
this.setData({wordCloudData: resArr})
});
},
getKol() {
app.globalData.request({
action: 'getCoreDiffuseWeiBo0528', //kol正面观点
@ -289,6 +319,10 @@ Component({
this.setData({weiboUserTabActibe: event.detail.index});
this.getUserChar()
},
changeWordCloud(event) {
this.setData({wordCloudActive: event.detail.index});
this.getWordCloud()
},
changeKolActive(event) {
this.setData({kolActive: event.detail.index})
this.getKol()

@ -1,6 +1,7 @@
{
"usingComponents": {
"c-echars": "../../../../../components/c-echars/index"
"c-echars": "../../../../../components/c-echars/index",
"word-cloud": "../../../../../components/word-cloud/index"
},
"component": true
}

@ -122,6 +122,20 @@
<c-echars showChart="{{showChart}}" canvasId="wbtopVolumn-canvas" chartId="wbtopVolumn" chartOption="{{weiboTopVolumn}}" height="100%"></c-echars>
</view>
</view>
<view class="wb-item">
<view class="wb-area-title">
<view style="width: 45%;">热门词云</view>
<view style="width: 55%;">
<van-tabs type="card" active="{{ wordCloudActive }}" color="#BBBBBB" bind:change="changeWordCloud">
<van-tab title="正面"></van-tab>
<van-tab title="负面"></van-tab>
</van-tabs>
</view>
</view>
<view class="brand">
<word-cloud canvasId="ta-wc" list="{{wordCloudData}}" width="100%" height="200" color="#FF1C20"></word-cloud>
</view>
</view>
<view class="wb-item">
<view class="wb-chart-title">微博传播裂变</view>
<view class="wb-chart-item">

@ -136,4 +136,15 @@
font-size: 9px;
font-weight: 600;
color: #333333;
}
/* 词云 */
.brand{
position: relative;
width: calc(100% - 32px);
height: 484rpx;
background-color: #fff;
margin-top: 32rpx;
border-radius: 4rpx;
padding: 16px;
overflow: hidden;
}
Loading…
Cancel
Save