zx 3 years ago
parent dfd881d215
commit c57680ab02

@ -21,14 +21,14 @@ Component({
toEventDetail(value) {
let id = value.currentTarget.dataset.id;
let token = wx.getStorageSync('token') || ''
wx.setStorageSync('sRele', id);
// wx.setStorageSync('sRele', id);
if (!token) {
wx.navigateTo({
url: '/pages/mine/pages/bindUser/index'
})
}else{
} else {
wx.navigateTo({
url: "/pages/insight/pages/eventInsight/index"
url: "/pages/insight/pages/eventInsight/index" + '?id=' + id
})
}
},

@ -97,22 +97,39 @@ Component({
})
},
Rankdetail() {
wx.navigateTo({
url: "/pages/index/Salesranking/Salesranking"
})
if (!wx.getStorageSync('token')) {
wx.navigateTo({
url: '/pages/mine/pages/bindUser/index'
})
} else {
wx.navigateTo({
url: "/pages/index/Salesranking/Salesranking"
})
}
},
//品牌排行
ranking() {
wx.navigateTo({
url: "/pages/index/Salesranking/Brandranking/Brandranking"
})
if (!wx.getStorageSync('token')) {
wx.navigateTo({
url: '/pages/mine/pages/bindUser/index'
})
} else {
wx.navigateTo({
url: "/pages/index/Salesranking/Brandranking/Brandranking"
})
}
},
//车型排行
vehicletype() {
wx.navigateTo({
url: "/pages/index/Salesranking/Salesranking"
})
if (!wx.getStorageSync('token')) {
wx.navigateTo({
url: '/pages/mine/pages/bindUser/index'
})
} else {
wx.navigateTo({
url: "/pages/index/Salesranking/Salesranking"
})
}
}
}

@ -23,43 +23,22 @@ Page({
component: 'theme-child'
}
],
recommandBrand: [
{
img: "./cars/audi.jpg",
title: "奥迪"
},
{
img: "./cars/audi.jpg",
title: "奥迪"
},
{
img: "./cars/audi.jpg",
title: "奥迪"
},
{
img: "./cars/audi.jpg",
title: "奥迪"
},
{
img: "./cars/audi.jpg",
title: "奥迪"
},
{
img: "./cars/audi.jpg",
title: "奥迪"
},
{
img: "./cars/audi.jpg",
title: "奥迪"
}
],
dataArr:[{title: 'a', up: false}, {title: 'b', up: false}],
brandForm: {
brand: ''
}
},
onLoad() {
},
onShow() {
this.getTabBar().init();
if(!wx.getStorageSync('token')) {
wx.navigateTo({
url: "/pages/mine/pages/bindUser/index",
})
} else {
this.getTabBar().init();
}
},
changeTab(val) {
let n = val.detail.index;

@ -12,6 +12,9 @@ Component({
weiyiTotal: pieOption(dColor,[]),
weiyiTotalData: [],
wyDataList: [],
//热门词云
wordCloudActive: 0,
wordCloudData: [],
},
methods: {
getData() {
@ -74,6 +77,7 @@ Component({
};
this.setData({ weiyiTotal: pieOption(dColor,arr), weiyiTotalData: arr})
});
this.getWordCloud();
app.globalData.request({
action: 'getList0528', //尾翼信息列表
token: 't%2BrswgjvzGM=',
@ -88,6 +92,31 @@ 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') || '',
}).then(res => {
let arr1 = [];
let skey = {
34: 6000,
3: 50000,
20: 180000,
23: 30000
};
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);
@ -99,6 +128,10 @@ Component({
wx.navigateTo({
url: '/pages/insight/pages/brandInsight/tailDataList/index',
})
},
changeWordCloud(event) {
this.setData({wordCloudActive: event.detail.index});
this.getWordCloud()
}
},
lifetimes: {

@ -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
}

@ -17,7 +17,8 @@
<view class="ta-chart-item">
<c-echars showChart="{{showChart}}" canvasId="wykm-canvas" chartId="wykm" chartOption="{{keyMediaData}}" height="100%"></c-echars>
</view>
</view><view class="ta-item">
</view>
<view class="ta-item">
<view class="ta-chart-title">尾翼整体调性</view>
<view style="display: flex;justify-content: flex-start;">
<view class="circle-chart" style="margin-right: 48rpx;">
@ -41,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;
}

@ -40,7 +40,7 @@
</view>
<view class="tr-item">
<view class="tr-chart-title">车型销量TOP</view>
<view class="tr-chart-subTitle">{{saleTopTitle}}</view>
<view class="tr-chart-subTitle" style="padding-bottom: 48rpx;">{{saleTopTitle}}</view>
<view class="tr-chart-item">
<c-echars showChart="{{showChart}}" canvasId="salesTop-canvas" chartId="salesTop" chartOption="{{saleTopOption}}" height="100%"></c-echars>
</view>

Loading…
Cancel
Save