zx 3 years ago
parent 60a4aa7dfb
commit ff46631522

@ -19,6 +19,7 @@
"pages/insight/pages/brandInsight/tailDataList/index",
"pages/insight/pages/brandInsight/brandDataList/index",
"pages/insight/pages/modalInsight/tailDataList/index",
"pages/insight/pages/modalInsight/modalDataList/index",
"pages/brandSearch/index",
"pages/varComm/index",
"pages/mine/index",
@ -104,7 +105,8 @@
"van-collapse": "@vant/weapp/collapse/index",
"van-collapse-item": "@vant/weapp/collapse-item/index",
"van-tag": "@vant/weapp/tag/index",
"van-picker": "@vant/weapp/picker/index"
"van-picker": "@vant/weapp/picker/index",
"van-switch": "@vant/weapp/switch/index"
}
}

@ -0,0 +1,91 @@
// 调性分布
export default function negaposiOption(dName=[], dPositive=[], dNegative = []) {
// let newValue = [];
// dValue.forEach(ele => {
// newValue.push(ele*1-100);
// })
return {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
legend: {
data: ['正面调性', '负面调性']
},
grid: {
top: 20,
left: 20,
containLabel: true
},
xAxis: [
{
type: 'value',
show: false
}
],
yAxis: [
{
type: 'category',
inverse: true,
axisTick: {
show: false
},
axisLabel: {
margin: 10,
fontSize: 12
},
data: dName
}
],
series: [
{
name: '正面调性',
type: 'bar',
barWidth:12,
stack: 'Total',
label: {
show: false,
position: 'right',
formatter: function (params) {
return (params.data)+'%';
},
},
itemStyle:{
normal:{
barBorderRadius:12,
color: '#0084FF'
},
},
emphasis: {
focus: 'series'
},
data: dPositive
},
{
name: '负面调性',
type: 'bar',
barWidth:12,
stack: 'Total',
label: {
show: false,
position: 'left',
formatter: function (params) {
return (params.data) +'%';
},
},
itemStyle:{
normal:{
barBorderRadius:12,
color: '#FFBF00',
},
},
emphasis: {
focus: 'series'
},
data: dNegative
}
]
};
}

@ -21,6 +21,11 @@ Component({
},
lifetimes: {
attached() {
wx.showToast({
title: '加载中',
icon: 'loading',
duration: 300000
})
//页面数据
app.globalData.request({
action: 'getUserBrand',
@ -43,13 +48,16 @@ Component({
this.setData({
brandList:arr
});
setTimeout(() =>{
wx.hideToast();
},500)
});
//推荐品牌
app.globalData.request({
action: 'getRecommendSeries',
token: 't%2BrswgjvzGM=',
}).then(res => {
console.log(res)
console.log(res);
});
},
},

@ -28,10 +28,14 @@ Page({
show2: false,
dt: '',
dt2: '',
// 总体模式
totalMode: 0,
/* 分析词设置 */
currWordType: '必选词和的关系',
wtShow: false,
wtColumns: ['必选词和的关系','主题词或的关系']
wtColumns: ['必选词和的关系','主题词或的关系'],
// 是否推送信息
infoPushChecked: false,
},
onShow() {
@ -69,16 +73,21 @@ Page({
show2: false,
});
},
changeTotalMode(event) {
this.setData({ totalMode: event.detail.index });
},
wordType() {
this.setData({ wtShow: true });
},
wtConfirm(event) {
console.log(event)
this.setData({ wtShow: false, currWordType: event.detail.value });
},
wtCancel() {
this.setData({ wtShow: false });
},
infoPushChange(event) {
this.setData({ infoPushChecked: event.detail });
},
goBeforeStep() {
this.setData({
active: this.data.active - 1

@ -1,5 +1,5 @@
<view class="at-content">
<van-tabs class="view-tabs">
<van-tabs class="view-tabs" active="{{ totalMode }}" bind:change="changeTotalMode">
<van-tab title="便捷模式"></van-tab>
<van-tab title="高级模式"></van-tab>
</van-tabs>
@ -28,42 +28,76 @@
</van-popup>
</view>
<view class="form-content" wx:if="{{active == 0}}">
<view style="font-size:28rpx;font-weight:bold;margin-left: 32rpx;margin-bottom: 8rpx;font-size: 18px;">便捷模式注释</view>
<van-collapse value="{{ activeNames }}" bind:change="changeTips">
<view style="font-size:28rpx;font-weight:bold;margin-left: 32rpx;margin-bottom: 8rpx;font-size: 18px;" wx:if="{{totalMode == 0}}">便捷模式注释</view>
<view style="font-size:28rpx;font-weight:bold;margin-left: 32rpx;margin-bottom: 8rpx;font-size: 18px;" wx:if="{{totalMode == 1}}">高级模式注释</view>
<van-collapse value="{{ activeNames }}" bind:change="changeTips" wx:if="{{totalMode == 0}}">
<van-collapse-item name="1">
<view slot="title"><van-tag type="primary">Q</van-tag> 必选关键词含义</view>
<van-tag style="margin-left: 3rpx;" type="primary">A</van-tag> 所有词语全部匹配关键词之间是和的关系最大字符不能超过50个中文字符必选关键词用逗号分词。
</van-collapse-item>
<van-collapse-item name="2">
<view slot="title"><van-tag type="primary">Q</van-tag> 可选关键词含义</view>
<van-tag style="margin-left: 3rpx;" type="primary">A</van-tag> 所有词语全部匹配关键词之间是和的关系最大字符不能超过50个中文字符选关键词用逗号分词。
<van-tag style="margin-left: 3rpx;" type="primary">A</van-tag> 词语中至少有一个匹配可选词与必选词是或的关系最大字符不能超过250个中文字符选关键词用逗号分词。
</van-collapse-item>
<van-collapse-item name="3">
<view slot="title"><van-tag type="primary">Q</van-tag> 排除关键词</view>
<van-tag style="margin-left: 3rpx;" type="primary">A</van-tag> 所有词语全部匹配关键词之间是和的关系最大字符不能超过50个中文字符必选关键词用逗号分词。
<van-tag style="margin-left: 3rpx;" type="primary">A</van-tag> 排除相关内容 主要是去除信息中的冗余、垃圾信息。最大字符不能超过250个中文字符排除关键词用逗号分词。
</van-collapse-item>
<van-collapse-item name="4">
<view slot="title"><van-tag type="primary">Q</van-tag> 示例解释</view>
<van-tag style="margin-left: 3rpx;" type="primary">A</van-tag> 所有词语全部匹配关键词之间是和的关系最大字符不能超过50个中文字符必选关键词用逗号分词。
<van-tag style="margin-left: 3rpx;" type="primary">A</van-tag>
必选词(宝马,大众):同时包含宝马和大众的数据。
<view>可选词(别克,吉利):包含别克或吉利的数据。</view>
<view>可选词(别克,吉利)+ 排除词(促销,广告):包含别克或吉利同时不包含促销和广告的数据。</view>
<view>必要词(宝马,吉利)+ 可选词(别克,吉利)+ 排除词(促销):包含宝马和吉利,同时包含别克或吉利,且不包含促销的数据。</view>
</van-collapse-item>
</van-collapse>
<van-collapse value="{{ activeNames }}" bind:change="changeTips" wx:if="{{totalMode == 1}}">
<van-collapse-item name="1">
<view slot="title"><van-tag type="primary">Q</van-tag> 符号含义</view>
<van-tag style="margin-left: 3rpx;" type="primary">A</van-tag> 高级模式由关键词及 + - | () 4种符号组成。(1)“+”:和的关系,同时包含。(2)“-”:排除的关系,不包含。(3)“|”:或的关系。
</van-collapse-item>
<van-collapse-item name="2">
<view slot="title"><van-tag type="primary">Q</van-tag> 示例解释</view>
<van-tag style="margin-left: 3rpx;" type="primary">A</van-tag>
(1)宝马 + 大众:同时包含宝马及大众的数据。
<view>(2)宝马- 大众:包含宝马,但不包含大众的数据</view>
<view>(3)宝马| 大众:包含宝马或大众的数据</view>
<view>(4)(宝马+ 大众)|(别克+吉利):同时包含宝马及大众 或者 同时包含别克及吉利的数据</view>
<view>(5)(宝马| 大众)+(别克|吉利)-(促销|广告):包含'宝马'或'大众' 同时包含'别克'或'吉利' 且不包含'促销'或'广告'的数据</view>
</van-collapse-item>
</van-collapse>
</view>
<view class="form-content" wx:if="{{active == 1}}">
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">必选词与主题词</view>
<van-cell-group inset>
<van-cell title="{{currWordType}}" custom-class="date-picker-cell" is-link bind:click="wordType" />
</van-cell-group>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">主题词(主题词逗号之间是或的关系)</view>
<textarea placeholder="请输入主题词多个词用隔开最多支持5个主题词" placeholder-class="placeholder-style" ></textarea>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">关键词组一(主题词逗号之间是或的关系)</view>
<textarea placeholder="请输入关键词多个词用隔开最多支持5个关键词" placeholder-class="placeholder-style" ></textarea>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">关键词组二(主题词逗号之间是或的关系)</view>
<textarea placeholder="请输入关键词多个词用隔开最多支持5个关键词" placeholder-class="placeholder-style" ></textarea>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">排除词(搜索结果将不会含有排除词的数据)</view>
<textarea placeholder="请输入排除词多个词用隔开最多支持5个排除词" placeholder-class="placeholder-style" ></textarea>
<van-popup show="{{ wtShow }}" position="bottom">
<van-picker columns="{{ wtColumns }}" bind:cancel="wtCancel" bind:confirm="wtConfirm" show-toolbar />
</van-popup>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx" wx:if="{{totalMode == 0}}">必选词与主题词</view>
<view wx:if="{{totalMode == 0}}">
<van-cell-group inset>
<van-cell title="{{currWordType}}" custom-class="date-picker-cell" is-link bind:click="wordType" />
</van-cell-group>
<view wx:if="{{currWordType == '必选词和的关系'}}">
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">必选词(必选词逗号间是和的关系)</view>
<textarea placeholder="请输入主题词多个词用隔开最多支持5个主题词" placeholder-class="placeholder-style" ></textarea>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">可选词(可选词与必选词是或的关系)</view>
<textarea placeholder="请输入关键词多个词用隔开最多支持5个关键词" placeholder-class="placeholder-style" ></textarea>
</view>
<view wx:if="{{currWordType == '主题词或的关系'}}">
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">主题词(主题词逗号之间是或的关系)</view>
<textarea placeholder="请输入主题词多个词用隔开最多支持5个主题词" placeholder-class="placeholder-style" ></textarea>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">关键词组一(主题词逗号之间是或的关系)</view>
<textarea placeholder="请输入关键词多个词用隔开最多支持5个关键词" placeholder-class="placeholder-style" ></textarea>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">关键词组二(主题词逗号之间是或的关系)</view>
<textarea placeholder="请输入关键词多个词用隔开最多支持5个关键词" placeholder-class="placeholder-style" ></textarea>
</view>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">排除词(搜索结果将不会含有排除词的数据)</view>
<textarea placeholder="请输入排除词多个词用隔开最多支持5个排除词" placeholder-class="placeholder-style" ></textarea>
<van-popup show="{{ wtShow }}" position="bottom">
<van-picker columns="{{ wtColumns }}" bind:cancel="wtCancel" bind:confirm="wtConfirm" show-toolbar />
</van-popup>
</view>
<view wx:if="{{totalMode == 1}}">
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">分析词设置</view>
<textarea placeholder="请输入分析词" placeholder-class="placeholder-style" ></textarea>
</view>
</view>
<view class="form-content" wx:if="{{active == 2}}">
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">媒体</view>
@ -72,6 +106,13 @@
<textarea placeholder="请输入作者名称多个用隔开最多支持5个" placeholder-class="placeholder-style" ></textarea>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">域名</view>
<textarea placeholder="请输入域名多个用隔开最多支持5个" placeholder-class="placeholder-style" ></textarea>
<view style="display: flex;justify-content: space-between;margin-top: 16rpx">
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;">是否配置推送消息</view>
<van-switch checked="{{ infoPushChecked }}" bind:change="infoPushChange" />
</view>
<view>
</view>
</view>
</view>
<!-- 下方确认框 -->

@ -19,6 +19,11 @@ Component({
},
methods: {
getData() {
wx.showToast({
title: '加载中',
icon: 'loading',
duration: 300000
});
app.globalData.request({
action: 'getCartypeTop10',
token: 't%2BrswgjvzGM=',
@ -56,7 +61,10 @@ Component({
});
this.setData({
transformOption: brokenLine(dName,dValue,dColor,dx)
})
});
setTimeout(() =>{
wx.hideToast();
},500)
});
app.globalData.request({
action: 'getWebsite',

@ -4,6 +4,7 @@ import singleLine from "../../../../../components/option/sgOption"
import circleOption from '../../../../../components/option/circleOption'
import pieOption from '../../../../../components/option/pieOption'
import pictographicOption from '../../../../../components/option/pictographicOption'
import negaposiOption from '../../../../../components/option/negaposiOption'
const app = getApp();
const dColor=['#FF4852','#FF6E25','#FFBF00','#20CC62','#00D6D6']
Component({
@ -31,12 +32,19 @@ Component({
//车型热度
modalHotActive: 0,
modalHotData: [],
//调性分布
affNegaposi: negaposiOption([],[],[]),
//kol观点
kolActive: 0,
kolData: [],
},
methods: {
getData() {
wx.showToast({
title: '加载中',
icon: 'loading',
duration: 300000
});
app.globalData.request({
action: 'getBrandWeiBoCount0528', //数据总量
token: 't%2BrswgjvzGM=',
@ -79,6 +87,9 @@ Component({
dx.push(ele.Time); dValue.push(ele.value)
});
this.setData({ yqTransform: singleLine(dValue,dx) })
setTimeout(() =>{
wx.hideToast();
},500)
});
app.globalData.request({
action: 'getBoauthenCount0528', //微博KOL
@ -212,7 +223,17 @@ Component({
sEndTime: wx.getStorageSync('sEndTime') || '',
sBrand: wx.getStorageSync('sBrand') || '',
}).then(res => {
console.log(res)
let dName = []; let dPositive = [];let dNegative = [];
res.forEach(ele => {
dName.push(ele.key);
let total = 0;
ele.value.forEach(e => {
total = total + e.value * 1
})
dPositive.push((ele.value[0].value * 100 / total).toFixed(0));
dNegative.push((ele.value[2].value * 100 / total).toFixed(0));
});
this.setData({affNegaposi: negaposiOption(dName,dPositive,dNegative)})
});
this.getKol();
},

@ -158,6 +158,12 @@
<c-echars showChart="{{showChart}}" canvasId="wbsp-canvas" chartId="wbsp" chartOption="{{weiboSplit}}" height="100%"></c-echars>
</view>
</view>
<view class="wb-item">
<view class="wb-chart-title">调性分布</view>
<view class="wb-chart-item" style="height: 560rpx;width: 100%;">
<c-echars showChart="{{showChart}}" canvasId="wbsp-canvas" chartId="wbsp" chartOption="{{affNegaposi}}" height="125%"></c-echars>
</view>
</view>
<view class="wb-item">
<view class="wb-area-title">
<view style="width: 55%;">KOL观点</view>

@ -60,7 +60,9 @@ Page({
});
},
toDataList() {
console.log('test')
wx.navigateTo({
url: '/pages/insight/pages/modalInsight/modalDataList/index',
})
},
goBack() {
wx.navigateBack({ delta: 1 })

@ -15,6 +15,11 @@ Component({
},
methods: {
getData() {
wx.showToast({
title: '加载中',
icon: 'loading',
duration: 300000
});
app.globalData.request({
action: 'getSourcetypeTime',
token: 't%2BrswgjvzGM=',
@ -36,6 +41,9 @@ Component({
this.setData({
transformOption: brokenLine(dName,dValue,dColor,dx)
})
setTimeout(() =>{
wx.hideToast();
},500)
});
app.globalData.request({
action: 'getWebsite',

@ -34,6 +34,11 @@ Component({
},
methods: {
getData() {
wx.showToast({
title: '加载中',
icon: 'loading',
duration: 300000
});
app.globalData.request({
action: 'getBrandWeiBoCount0528', //数据总量
token: 't%2BrswgjvzGM=',
@ -79,6 +84,9 @@ Component({
dx.push(ele.Time); dValue.push(ele.value)
});
this.setData({ yqTransform: singleLine(dValue,dx) })
setTimeout(() =>{
wx.hideToast();
},500)
});
app.globalData.request({
action: 'getBoauthenCount0528', //微博KOL

Loading…
Cancel
Save