diff --git a/components/indexCom/eventChild/index.js b/components/indexCom/eventChild/index.js index bb0391d..003567b 100644 --- a/components/indexCom/eventChild/index.js +++ b/components/indexCom/eventChild/index.js @@ -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 }) } }, diff --git a/components/indexCom/rankingChild/index.js b/components/indexCom/rankingChild/index.js index 86cdf20..4c6e483 100644 --- a/components/indexCom/rankingChild/index.js +++ b/components/indexCom/rankingChild/index.js @@ -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" + }) + } } } diff --git a/pages/insight/index.js b/pages/insight/index.js index af5ca9b..6f4deda 100644 --- a/pages/insight/index.js +++ b/pages/insight/index.js @@ -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; diff --git a/pages/insight/pages/brandInsight/TailInsight/index.js b/pages/insight/pages/brandInsight/TailInsight/index.js index 3d2c5e9..518f2fd 100644 --- a/pages/insight/pages/brandInsight/TailInsight/index.js +++ b/pages/insight/pages/brandInsight/TailInsight/index.js @@ -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: { diff --git a/pages/insight/pages/brandInsight/TailInsight/index.json b/pages/insight/pages/brandInsight/TailInsight/index.json index d4f7169..3598f02 100644 --- a/pages/insight/pages/brandInsight/TailInsight/index.json +++ b/pages/insight/pages/brandInsight/TailInsight/index.json @@ -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 } \ No newline at end of file diff --git a/pages/insight/pages/brandInsight/TailInsight/index.wxml b/pages/insight/pages/brandInsight/TailInsight/index.wxml index 572d3c4..dd2cd4d 100644 --- a/pages/insight/pages/brandInsight/TailInsight/index.wxml +++ b/pages/insight/pages/brandInsight/TailInsight/index.wxml @@ -17,7 +17,8 @@ - + + 尾翼整体调性 @@ -41,6 +42,20 @@ + + + 热门词云 + + + + + + + + + + + 尾翼信息列表 diff --git a/pages/insight/pages/brandInsight/TailInsight/index.wxss b/pages/insight/pages/brandInsight/TailInsight/index.wxss index ad47d1c..8c5f64b 100644 --- a/pages/insight/pages/brandInsight/TailInsight/index.wxss +++ b/pages/insight/pages/brandInsight/TailInsight/index.wxss @@ -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; } \ No newline at end of file diff --git a/pages/insight/pages/brandInsight/totalReview/index.wxml b/pages/insight/pages/brandInsight/totalReview/index.wxml index 5440204..a816b86 100644 --- a/pages/insight/pages/brandInsight/totalReview/index.wxml +++ b/pages/insight/pages/brandInsight/totalReview/index.wxml @@ -40,7 +40,7 @@ 车型销量TOP - {{saleTopTitle}} + {{saleTopTitle}}