zx 3 years ago
parent 115047b300
commit 6129034537

@ -15,6 +15,7 @@
"pages/insight/pages/eventInsight/index",
"pages/insight/pages/themeAnalize/index",
"pages/insight/pages/addTheme/index",
"pages/insight/pages/editTheme/index",
"pages/insight/pages/brandInsight/tailDataList/index",
"pages/insight/pages/brandInsight/brandDataList/index",
"pages/insight/pages/modalInsight/tailDataList/index",

@ -32,6 +32,12 @@ Component({
token: 't%2BrswgjvzGM=',
}).then(res => {
let arr = []
let recommandArr = [];
res.forEach(ele => {
if(ele.firstword == '热门') {
recommandArr.push(ele)
}
});
for (let i = 65; i <= 90; i++) {
arr.push({
name: String.fromCharCode(i),
@ -46,19 +52,20 @@ Component({
}
}
this.setData({
brandList:arr
brandList:arr,
recommandBrand: recommandArr,
});
setTimeout(() =>{
wx.hideToast();
},500)
});
//推荐品牌
app.globalData.request({
action: 'getRecommendSeries',
token: 't%2BrswgjvzGM=',
}).then(res => {
console.log(res);
});
// app.globalData.request({
// action: 'getRecommendSeries',
// token: 't%2BrswgjvzGM=',
// }).then(res => {
// console.log(res);
// });
},
},
})

@ -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">
<view class="bs-tab-sv-item" wx:for="{{recommandBrand}}" wx:key="index" data-id="{{it.brandname}}" bindtap="toBrandInsight">
<image class="userAvatar" src="{{item.img}}" />
<view class="bs-tab-title">{{item.title}}</view>
<view class="bs-tab-title">{{item.brandname}}</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}}" />

@ -155,10 +155,12 @@ Page({
wx.showModal({
title: '添加成功!',
showCancel: false,
success: function() {
wx.navigateBack({
delta: 1,
})
success: function(result) {
if(result.cancel == false) {
wx.navigateBack({
delta: 1,
})
}
}
});
});

@ -0,0 +1,200 @@
import moment from "moment"
const app = getApp();
Page({
data: {
steps: [
{
text: '名称设置',
inactiveIcon: 'more-o',
activeIcon: 'more',
},
{
text: '分析词设置',
inactiveIcon: 'more-o',
activeIcon: 'more',
},
{
text: '定向监测',
inactiveIcon: 'more-o',
activeIcon: 'more',
}
],
Guid: '',
//表单
Name: '',
StartTime: '',
EndTime: '',
DetailsData: [],
AnalyzeWord: '', // 和 或 的主体词
HuoWord:'', // 和 或 的可选词
PaiChu: '', // 排除词
highAnalizeWord: '', // 高级模式分析词
Source: '', // 定向监测媒体
UserAuthor: '', // 定向监测作者
//
active: 0,
activeNames: [],
show1: false,
show2: false,
dt: '',
dt2: '',
// 总体模式
totalMode: 0, // 0便捷 1高级
/* 分析词设置 */
currWordType: '必选词和的关系',
wtShow: false,
wtColumns: ['必选词和的关系','主题词或的关系'],
// 是否推送信息
infoPushChecked: false,
},
onLoad: function(options) {
this.setData({Guid: options.Guid});
},
onShow() {
app.globalData.request({
action: 'getSchemeDataByGuid',
token: 't%2BrswgjvzGM=',
Guids: this.data.Guid,
}).then(res => {
if(res.DetailsData) {
if(res.DetailsData[0].IsAdvancedQuery == 1) {
this.setData({totalMode: 1, highAnalizeWord: res.DetailsData[0].AnalyzeWord,})
} else if(res.DetailsData[0].IsAdvancedQuery == 0) {
this.setData({totalMode: 0, currWordType: '必选词和的关系'})
} else {
this.setData({totalMode: 0, currWordType: '主题词或的关系'})
}
this.setData({
AnalyzeWord: res.DetailsData[0].AnalyzeWord,
HuoWord: res.DetailsData[0].HuoWord,
PaiChu: res.DetailsData[0].PaiChu,
UserAuthor: res.DetailsData[0].UserAuthor,
Source: res.DetailsData[0].Source,
})
}
this.setData({
Name: res.Name,
StartTime: res.StartTime,
start: res.StartTime,
EndTime: res.EndTime,
end: res.EndTime,
})
});
},
//表单
themeNameInput(event) {
this.setData({ Name: event.detail.value})
},
//
changeTips(value) {
this.setData({
activeNames: value.detail,
});
},
onConfirm(event) {
var time = moment(event.detail).format("YYYY-MM-DD HH:mm:ss")
this.setData({
show1: false,
StartTime: time,
start: time
});
},
onConfirm2(event) {
var time = moment(event.detail).format("YYYY-MM-DD HH:mm:ss")
this.setData({
show2: false,
EndTime: time,
end: time
});
},
onDisplay() {
this.setData({ show1: true });
},
onDisplay2() {
this.setData({ show2: true });
},
onCancel() {
this.setData({ show1: false, });
},
onCancel2() {
this.setData({ show2: false, });
},
changeTotalMode(event) {
this.setData({ totalMode: event.detail.index });
},
wordType() {
this.setData({ wtShow: true });
},
wtConfirm(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 })
},
goNextStep() {
this.setData({ active: this.data.active + 1 })
},
// 分析词设置
bindAnalyzeWord(event) {
this.setData({ AnalyzeWord: event.detail.value})
},
bindHuoWord(event) {
this.setData({ HuoWord: event.detail.value})
},
bindPaiChu(event) {
this.setData({ PaiChu: event.detail.value})
},
bindHighAnalizeWord(event) {
this.setData({ highAnalizeWord: event.detail.value})
},
// 定向监测
bindSource(event) {
this.setData({ Source: event.detail.value})
},
bindUserAuthor(event) {
this.setData({ UserAuthor: event.detail.value})
},
themeSave() {
let dtData = {
"AnalyzeWord": this.data.AnalyzeWord,
"HuoWord": this.data.HuoWord,
"PaiChu": this.data.PaiChu,
"IsAdvancedQuery": this.data.totalMode == 0&&this.data.currWordType == '必选词和的关系'?0:this.data.totalMode == 1 ? 1:2,
"Source": this.data.Source,
"UserAuthor": this.data.UserAuthor
};
let jsonObj = {
"Guids": this.data.Guid,
"Name": this.data.Name,
"Classify": 0,
"StartTime": this.data.StartTime,
"EndTime": this.data.EndTime,
"Types": "theme",
"DetailsData": [dtData]
}
var dtJson = JSON.stringify(jsonObj)
app.globalData.request({
action: 'setSchemeData', //数据列表
token: 't%2BrswgjvzGM=',
DataJson: dtJson,
}).then(res => {
wx.showModal({
title: '编辑成功!',
showCancel: false,
success: function(result) {
if(result.cancel == false) {
wx.navigateBack({
delta: 1,
})
}
}
});
});
}
})

@ -0,0 +1,8 @@
{
"usingComponents": {
},
"navigationBarTitleText":"编辑主题",
"navigationBarBackgroundColor":"#ffffff",
"navigationBarTextStyle":"black"
}

@ -0,0 +1,125 @@
<view class="at-content">
<van-tabs class="view-tabs" active="{{ totalMode }}" bind:change="changeTotalMode">
<van-tab title="便捷模式"></van-tab>
<van-tab title="高级模式"></van-tab>
</van-tabs>
<view class="form-content">
<van-steps class="view-step" steps="{{ steps }}" active="{{ active }}" active-color="#027AFF">
</van-steps>
</view>
<!-- 表单 -->
<view>
<view class="form-content" wx:if="{{active == 0}}">
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">主题名称</view>
<input value="{{Name}}" bindinput="themeNameInput" placeholder="请输入主题名称" placeholder-class="placeholder-style" ></input>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 32rpx">监测开始时间</view>
<van-cell-group inset>
<van-cell title="请选择时间" custom-class="date-picker-cell" is-link value="{{ start }}" bind:click="onDisplay" />
</van-cell-group>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 32rpx">监测结束时间</view>
<van-cell-group inset>
<van-cell title="请选择时间" custom-class="date-picker-cell" is-link value="{{ end }}" bind:click="onDisplay2" />
</van-cell-group>
<van-popup show="{{ show1 }}" position="bottom">
<van-datetime-picker type="datetime" bind:confirm="onConfirm" bind:cancel="onCancel" />
</van-popup>
<van-popup show="{{ show2 }}" position="bottom">
<van-datetime-picker type="datetime" bind:confirm="onConfirm2" bind:cancel="onCancel2" />
</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;" 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> 词语中至少有一个匹配可选词与必选词是或的关系最大字符不能超过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> 排除相关内容 主要是去除信息中的冗余、垃圾信息。最大字符不能超过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>
必选词(宝马,大众):同时包含宝马和大众的数据。
<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" 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 value="{{AnalyzeWord}}" placeholder="请输入主题词多个词用隔开最多支持5个主题词" placeholder-class="placeholder-style" bindinput="bindAnalyzeWord"></textarea>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">可选词(可选词与必选词是或的关系)</view>
<textarea value="{{HuoWord}}" placeholder="请输入关键词多个词用隔开最多支持5个关键词" placeholder-class="placeholder-style" bindinput="bindHuoWord"></textarea>
</view>
<view wx:if="{{currWordType == '主题词或的关系'}}">
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">主体词(主体词逗号之间是或的关系)</view>
<textarea value="{{AnalyzeWord}}" placeholder="请输入主题词多个词用隔开最多支持5个主题词" placeholder-class="placeholder-style" bindinput="bindAnalyzeWord"></textarea>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">关键词组(主体词逗号之间是或的关系)</view>
<textarea value="{{HuoWord}}" placeholder="请输入关键词多个词用隔开最多支持5个关键词" placeholder-class="placeholder-style" bindinput="bindHuoWord"></textarea>
</view>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">排除词(搜索结果将不会含有排除词的数据)</view>
<textarea value="{{PaiChu}}" placeholder="请输入排除词多个词用隔开最多支持5个排除词" placeholder-class="placeholder-style" bindinput="bindPaiChu"></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 value="{{highAnalizeWord}}" placeholder="请输入分析词" placeholder-class="placeholder-style" bindinput="bindHighAnalizeWord"></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>
<textarea placeholder="请输入媒体名称多个用隔开最多支持5个" placeholder-class="placeholder-style" bindinput="bindSource"></textarea>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">作者</view>
<textarea placeholder="请输入作者名称多个用隔开最多支持5个" placeholder-class="placeholder-style" bindinput="bindUserAuthor"></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>
<!-- 下方确认框 -->
<view wx:if="{{active == 0}}">
<van-button bind:click="goNextStep" class="next-btn" color="#0084FF" block>下一步</van-button>
</view>
<view style="display: flex;justify-content: space-between;">
<van-button wx:if="{{active != 0}}" bind:click="goBeforeStep" class="next-btn" color="#0084FF" plain block>上一步</van-button>
<van-button wx:if="{{active == 1}}" bind:click="goNextStep" class="next-btn" color="#0084FF" block>下一步</van-button>
<van-button wx:if="{{active == 2}}" bind:click="themeSave" class="next-btn" color="#0084FF" block>保存</van-button>
</view>
</view>

@ -0,0 +1,56 @@
.at-content{
margin-top: 34rpx;
width: 92%;
/* height: 528rpx; */
margin-left:32rpx;
padding: 0rpx 0rpx 32rpx 0rpx;
}
.form-content {
font-size: 28rpx;
font-weight: bolder;
margin-top: 32rpx;
padding: 24rpx 10rpx 24rpx 10rpx;
background: #ffffff;
}
.next-btn {
font-size: 28rpx;
width: 50%;
font-weight: bolder;
padding: 24rpx 0rpx 24rpx 0rpx;
background: #f9f9f9;
}
.at-content input{
height: 96rpx;
width: 570rpx;
background-color: #f9f9f9;
margin-top: 24rpx;
margin-left: 32rpx;
padding-left: 32rpx;
font-size: 28rpx;
color: #333333;
}
.at-content textarea{
height: 128rpx;
width: 570rpx;
background-color: #f9f9f9;
margin-top: 24rpx;
margin-left: 32rpx;
padding: 32rpx 8rpx 32rpx 24rpx;
font-size: 28rpx;
color: #333333;
}
.placeholder-style{
font-size: 28rpx;
}
.date-picker-cell {
background-color: #f9f9f9;
margin-top: 24rpx;
}
/* tabs */
.view-tabs .van-tab--active{
font-weight: 600;
}
/* steps */
.van-step__title{
font-size: 14px !important;
}

@ -19,6 +19,10 @@ Page({
dataList: [],
//全选
isSelectAll: [],
//搜索
sTitleType: -1,
searchOption: [],
sTitle: '',
},
onLoad: function(options) {
this.setData({Guid: options.Guid})
@ -40,6 +44,17 @@ Page({
}).then(res => {
this.setData({qgList: res})
});
app.globalData.request({
action: 'getQueryType', //获取查询类型
token: 't%2BrswgjvzGM=',
}).then(res => {
let option = [];
res.forEach(ele => {
let obj = {text: ele.value, value: ele.key};
option.push(obj)
});
this.setData({searchOption: option})
});
},
getData() {
app.globalData.request({
@ -50,7 +65,8 @@ Page({
sEndTime: wx.getStorageSync('sEndTime') || '',
sQuDao: (this.data.sQuDao).join(',') || '-1',
sQingGan: (this.data.sQingGan).join(',') || '-1',
sTitle: '',
sTitle: this.data.sTitle,
sTitleType: this.data.sTitleType,
iPageIndex: 1,
iPageSize: 20,
sType: 'ZhuTiFenXiBl',
@ -79,6 +95,7 @@ Page({
iGroupByChange(event) {this.setData({ iGroupBy: event.detail });this.getData()},
iTimeTypeChange(event) {this.setData({ iTimeType: event.detail });this.getData()},
listTypeChange(event) {this.setData({ listType: event.detail });this.getData()},
sTitleChange(event) {this.setData({ sTitle: event.detail });this.getData()},
changeSelectAll(event) {
this.setData({ isSelectAll: event.detail});
},

@ -1,4 +1,14 @@
<view class="edl-content">
<view class="top-tab" style="display: flex; justify-content: flex-start;">
<view style="margin-top: 14rpx;">
<van-dropdown-menu>
<van-dropdown-item value="{{sTitleType}}" options="{{searchOption}}"></van-dropdown-item>
</van-dropdown-menu>
</view>
<view style="width: 88%;">
<van-search value="{{ sTitle }}" bind:search="sTitleChange" placeholder="请输入搜索关键词"></van-search>
</view>
</view>
<view class="top-tab">
<van-dropdown-menu>
<van-dropdown-item id="allSource" title="全部渠道">

@ -58,10 +58,26 @@ Component({
})
},
editTheme(event) {
console.log(event.currentTarget.dataset.id)
let id = event.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/insight/pages/editTheme/index' + '?Guid=' + id,
})
},
deleteTheme(event) {
console.log(event.currentTarget.dataset.id)
wx.showModal({
title: '是否要删除该主题?',
success: (result) => {
if(result.cancel == false) {
app.globalData.request({
action: 'delCarBigDataByGuid',
token: 't%2BrswgjvzGM=',
Guids: event.currentTarget.dataset.id
}).then(res => {
this.getData()
});
}
}
});
}
},
lifetimes: {

Loading…
Cancel
Save