dev
parent
685a585cf3
commit
01382e9fbe
@ -0,0 +1,71 @@
|
||||
const app = getApp();
|
||||
Component({
|
||||
properties: {
|
||||
id: String
|
||||
},
|
||||
data: {
|
||||
//form
|
||||
sQuDao: [],
|
||||
sQingGan: [],
|
||||
sCrisis: [],
|
||||
//API
|
||||
affList: [],
|
||||
qgList: [],
|
||||
wjList: [{key: 1,value: '低级危机'},{key: 2,value: '中级危机'},{key: 3,value: '高级危机'}],
|
||||
//列表
|
||||
dataList: []
|
||||
},
|
||||
methods: {
|
||||
getApi() {
|
||||
app.globalData.request({
|
||||
action: 'getQuDao', //获取所有渠道
|
||||
token: 't%2BrswgjvzGM=',
|
||||
}).then(res => {
|
||||
this.setData({affList: res})
|
||||
});
|
||||
app.globalData.request({
|
||||
action: 'getQingGan', //获取所有情感
|
||||
token: 't%2BrswgjvzGM=',
|
||||
}).then(res => {
|
||||
this.setData({qgList: res})
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
app.globalData.request({
|
||||
action: 'getList', //数据列表
|
||||
token: 't%2BrswgjvzGM=',
|
||||
sTimeType: wx.getStorageSync('sTimeType') || 34,
|
||||
sQuDao: (this.data.sQuDao).join(',') || '-1',
|
||||
sQingGan: (this.data.sQingGan).join(',') || '-1',
|
||||
iPageIndex: 1,
|
||||
iPageSize: 10,
|
||||
sType: 'BrandDataHot',
|
||||
isSourcetype: 0, //1返回渠道 0不返回
|
||||
iTimeType: 0, //0发布时间 1入库时间
|
||||
sCrisis: (this.data.sCrisis).join(','),
|
||||
sRele: wx.getStorageSync('sRele') || '',
|
||||
}).then(res => {
|
||||
this.setData({dataList: res})
|
||||
});
|
||||
},
|
||||
changeTime(event) {
|
||||
wx.setStorageSync('sTimeType', event.detail.sTimeType);
|
||||
if(event.detail.sStartTime) {
|
||||
wx.setStorageSync('sStartTime', event.detail.sStartTime);
|
||||
};
|
||||
if(event.detail.sEndTime) {
|
||||
wx.setStorageSync('sEndTime', event.detail.sEndTime);
|
||||
};
|
||||
this.getData();
|
||||
},
|
||||
changeSource(event) {this.setData({ sQuDao: event.detail });this.getData()},
|
||||
changeQingGan(event) {this.setData({ sQingGan: event.detail });this.getData()},
|
||||
changeWeiJi(event) {this.setData({ sCrisis: event.detail });this.getData()}
|
||||
},
|
||||
lifetimes: {
|
||||
attached() {
|
||||
this.getApi();
|
||||
this.getData();
|
||||
}
|
||||
}
|
||||
})
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"time-component":"/components/timecomponent/index"
|
||||
},
|
||||
"component": true
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
<view class="edl-content">
|
||||
<view class="top-tab">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item id="allSource" title="全部渠道">
|
||||
<van-checkbox-group value="{{ sQuDao }}" bind:change="changeSource">
|
||||
<van-checkbox wx:for="{{affList}}" wx:key="key" name="{{item.key}}" shape="square">{{item.value}}</van-checkbox>
|
||||
</van-checkbox-group>
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item id="allAff" title="全部调性">
|
||||
<van-checkbox-group value="{{ sQingGan }}" bind:change="changeQingGan">
|
||||
<van-checkbox wx:for="{{qgList}}" wx:key="key" name="{{item.key}}" shape="square">{{item.value}}</van-checkbox>
|
||||
</van-checkbox-group>
|
||||
<van-checkbox-group value="{{ sCrisis }}" bind:change="changeWeiJi">
|
||||
<van-checkbox wx:for="{{wjList}}" wx:key="key" name="{{item.key}}" shape="square">{{item.value}}</van-checkbox>
|
||||
</van-checkbox-group>
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item id="sort" title="时间范围">
|
||||
<view style="margin-top: -32rpx;">
|
||||
<time-component bind:change="changeTime"></time-component>
|
||||
</view>
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item id="back" title="更多筛选">
|
||||
|
||||
</van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</view>
|
||||
<view class="tdl-content">
|
||||
<view class="tdl-item" wx:for="{{dataList}}" wx:key="index">
|
||||
<view class="top-time">
|
||||
<view class="top-time-item">{{item._source.sourcetime}}</view>
|
||||
<view style="line-height: 12rpx;">
|
||||
<van-tag wx:if="{{item._source.crisis == 1}}" color="#FFE9A8" text-color="#FFBF00">低级危机</van-tag>
|
||||
<van-tag wx:if="{{item._source.crisis == 2}}" color="#FFDFCF" text-color="#FF6E25">中级危机</van-tag>
|
||||
<van-tag wx:if="{{item._source.crisis == 3}}" color="#FFF0F1" text-color="#FF4852">高级危机</van-tag>
|
||||
<van-tag wx:if="{{item._source.affections == 1}}" color="#F0F8FF" text-color="#0084FF">正面</van-tag>
|
||||
<van-tag wx:if="{{item._source.affections == 3}}" color="#FFFBF0" text-color="#FDCD42">中性</van-tag>
|
||||
<van-tag wx:if="{{item._source.affections == 2}}" color="#FFF0F1" text-color="#FF4852">负面</van-tag>
|
||||
</view>
|
||||
</view>
|
||||
<view class="middle-title" style="margin-top: 16rpx;">
|
||||
{{item._source.title}}
|
||||
</view>
|
||||
<view class="bottom-source">
|
||||
<view>来源:{{item._source.source}}</view>
|
||||
<view style="margin-left: 64rpx;">作者:{{item._source.user_author}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
@ -0,0 +1,36 @@
|
||||
.top-tab {
|
||||
background: #FFF;
|
||||
}
|
||||
.tdl-content {
|
||||
width: 100%;
|
||||
background: #F9F9F9;
|
||||
padding: 32rpx;
|
||||
}
|
||||
.tdl-item {
|
||||
width: 84%;
|
||||
background: #FFF;
|
||||
padding: 36rpx 32rpx 32rpx 32rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.top-time-item {
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
.top-time {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.middle-title {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #333333
|
||||
}
|
||||
.bottom-source {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-top: 18rpx;
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
const app = getApp();
|
||||
Page({
|
||||
data: {
|
||||
Guid: '',
|
||||
//form
|
||||
sQuDao: [],
|
||||
sQingGan: [],
|
||||
sCrisis: [],
|
||||
iGroupBy: 0,
|
||||
iTimeType: 0,
|
||||
listType: 0,
|
||||
//API
|
||||
affList: [],
|
||||
qgList: [],
|
||||
wjList: [{key: 1,value: '低级危机'},{key: 2,value: '中级危机'},{key: 3,value: '高级危机'}],
|
||||
//列表
|
||||
dataList: [],
|
||||
//全选
|
||||
isSelectAll: [],
|
||||
},
|
||||
onLoad: function(options) {
|
||||
this.setData({Guid: options.Guid})
|
||||
},
|
||||
onShow() {
|
||||
this.getApi();
|
||||
this.getData();
|
||||
},
|
||||
getApi() {
|
||||
app.globalData.request({
|
||||
action: 'getQuDao', //获取所有渠道
|
||||
token: 't%2BrswgjvzGM=',
|
||||
}).then(res => {
|
||||
this.setData({affList: res})
|
||||
});
|
||||
app.globalData.request({
|
||||
action: 'getQingGan', //获取所有情感
|
||||
token: 't%2BrswgjvzGM=',
|
||||
}).then(res => {
|
||||
this.setData({qgList: res})
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
app.globalData.request({
|
||||
action: 'getList', //数据列表
|
||||
token: 't%2BrswgjvzGM=',
|
||||
sTimeType: wx.getStorageSync('sTimeType') || 34,
|
||||
sStartTime: wx.getStorageSync('sStartTime') || '',
|
||||
sEndTime: wx.getStorageSync('sEndTime') || '',
|
||||
sQuDao: (this.data.sQuDao).join(',') || '-1',
|
||||
sQingGan: (this.data.sQingGan).join(',') || '-1',
|
||||
sTitle: '',
|
||||
iPageIndex: 1,
|
||||
iPageSize: 20,
|
||||
sType: 'ZhuTiFenXiBl',
|
||||
sGuid: this.data.Guid,
|
||||
isSourcetype: 0, //1返回渠道 0不返回
|
||||
iTimeType: this.data.iTimeType, //0发布时间 1入库时间
|
||||
iGroupBy: this.data.iGroupBy, //0不去重 1相似度去重
|
||||
listType: this.data.listType, //0默认 1影响力倒序
|
||||
}).then(res => {
|
||||
this.setData({dataList: res})
|
||||
});
|
||||
},
|
||||
changeTime(event) {
|
||||
wx.setStorageSync('sTimeType', event.detail.sTimeType);
|
||||
if(event.detail.sStartTime) {
|
||||
wx.setStorageSync('sStartTime', event.detail.sStartTime);
|
||||
};
|
||||
if(event.detail.sEndTime) {
|
||||
wx.setStorageSync('sEndTime', event.detail.sEndTime);
|
||||
};
|
||||
this.getData();
|
||||
},
|
||||
changeSource(event) {this.setData({ sQuDao: event.detail });this.getData()},
|
||||
changeQingGan(event) {this.setData({ sQingGan: event.detail });this.getData()},
|
||||
changeWeiJi(event) {this.setData({ sCrisis: event.detail });this.getData()},
|
||||
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()},
|
||||
changeSelectAll(event) {
|
||||
this.setData({ isSelectAll: event.detail});
|
||||
},
|
||||
toThemeBoard() {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"navigationBarTitleText": "主题详情",
|
||||
"navigationBarBackgroundColor":"#ffffff",
|
||||
"navigationBarTextStyle":"black",
|
||||
"usingComponents": {
|
||||
"time-component":"/components/timecomponent/index"
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
<view class="edl-content">
|
||||
<view class="top-tab">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item id="allSource" title="全部渠道">
|
||||
<van-checkbox-group value="{{ sQuDao }}" bind:change="changeSource">
|
||||
<van-checkbox wx:for="{{affList}}" wx:key="key" name="{{item.key}}" shape="square">{{item.value}}</van-checkbox>
|
||||
</van-checkbox-group>
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item id="allAff" title="全部调性">
|
||||
<van-checkbox-group value="{{ sQingGan }}" bind:change="changeQingGan">
|
||||
<van-checkbox wx:for="{{qgList}}" wx:key="key" name="{{item.key}}" shape="square">{{item.value}}</van-checkbox>
|
||||
</van-checkbox-group>
|
||||
<van-checkbox-group value="{{ sCrisis }}" bind:change="changeWeiJi">
|
||||
<van-checkbox wx:for="{{wjList}}" wx:key="key" name="{{item.key}}" shape="square">{{item.value}}</van-checkbox>
|
||||
</van-checkbox-group>
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item id="sort" title="时间范围">
|
||||
<view style="margin-top: -32rpx;">
|
||||
<time-component bind:change="changeTime"></time-component>
|
||||
</view>
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item id="back" title="更多筛选">
|
||||
<view style="padding: 32rpx;">
|
||||
<view>去重方式</view>
|
||||
<van-radio-group value="{{ iGroupBy }}" bind:change="iGroupByChange">
|
||||
<van-radio name="0">不去重</van-radio>
|
||||
<van-radio name="1">相似度去重</van-radio>
|
||||
</van-radio-group>
|
||||
</view>
|
||||
<view style="padding: 0rpx 32rpx 32rpx 32rpx;">
|
||||
<view>排序方式</view>
|
||||
<van-radio-group value="{{ listType }}" bind:change="listTypeChange">
|
||||
<van-radio name="0">默认</van-radio>
|
||||
<van-radio name="1">影响力倒序</van-radio>
|
||||
</van-radio-group>
|
||||
<van-radio-group value="{{ iTimeType }}" bind:change="iTimeTypeByChange">
|
||||
<van-radio name="0">发布时间</van-radio>
|
||||
<van-radio name="1">入库时间</van-radio>
|
||||
</van-radio-group>
|
||||
</view>
|
||||
</van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</view>
|
||||
<view class="tdl-content">
|
||||
<view class="tdl-item" wx:for="{{dataList}}" wx:key="index">
|
||||
<view class="top-time">
|
||||
<view class="top-time-item">{{item._source.sourcetime}}</view>
|
||||
<view style="line-height: 12rpx;">
|
||||
<van-tag wx:if="{{item._source.crisis == 1}}" color="#FFE9A8" text-color="#FFBF00">低级危机</van-tag>
|
||||
<van-tag wx:if="{{item._source.crisis == 2}}" color="#FFDFCF" text-color="#FF6E25">中级危机</van-tag>
|
||||
<van-tag wx:if="{{item._source.crisis == 3}}" color="#FFF0F1" text-color="#FF4852">高级危机</van-tag>
|
||||
<van-tag wx:if="{{item._source.affections == 1}}" color="#F0F8FF" text-color="#0084FF">正面</van-tag>
|
||||
<van-tag wx:if="{{item._source.affections == 3}}" color="#FFFBF0" text-color="#FDCD42">中性</van-tag>
|
||||
<van-tag wx:if="{{item._source.affections == 2}}" color="#FFF0F1" text-color="#FF4852">负面</van-tag>
|
||||
</view>
|
||||
</view>
|
||||
<view class="middle-title" style="margin-top: 16rpx;">
|
||||
{{item._source.title}}
|
||||
</view>
|
||||
<view class="bottom-source">
|
||||
<view>来源:{{item._source.source}}</view>
|
||||
<view style="margin-left: 64rpx;">作者:{{item._source.user_author}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tdl-footer" style="display: flex;justify-content: space-between;">
|
||||
<view style="width: 20%;margin-top: 3%;">
|
||||
<van-checkbox-group value="{{ isSelectAll }}" bind:change="changeSelectAll">
|
||||
<van-checkbox name="0" shape="square">全选</van-checkbox>
|
||||
</van-checkbox-group>
|
||||
</view>
|
||||
<view style="width: 80%;">
|
||||
<van-button bind:click="toThemeBoard" custom-style="width: 45%" color="#0084FF" class="theme-add-btn" plain>生成数据</van-button>
|
||||
<van-button bind:click="toThemeBoard" custom-style="width: 45%" color="#0084FF" class="theme-add-btn">数据看板</van-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
@ -0,0 +1,53 @@
|
||||
.top-tab {
|
||||
background: #FFF;
|
||||
}
|
||||
.tdl-content {
|
||||
width: 100%;
|
||||
background: #F9F9F9;
|
||||
padding: 32rpx;
|
||||
}
|
||||
.tdl-item {
|
||||
width: 84%;
|
||||
background: #FFF;
|
||||
padding: 36rpx 32rpx 32rpx 32rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.top-time-item {
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
.top-time {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.middle-title {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #333333
|
||||
}
|
||||
.bottom-source {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-top: 18rpx;
|
||||
}
|
||||
.tdl-footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
background: #FFF;
|
||||
width: 100%;
|
||||
padding: 16rpx 16rpx 24rpx 16rpx;
|
||||
}
|
||||
/* 按钮 */
|
||||
.theme-add-btn {
|
||||
font-weight: bold;
|
||||
line-height: 88rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.theme-add {
|
||||
padding: 12px;
|
||||
background-color: #006BFF;
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
// pages/themeList/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
<!--pages/themeList/index.wxml-->
|
||||
<text>pages/themeList/index.wxml</text>
|
@ -0,0 +1 @@
|
||||
/* pages/themeList/index.wxss */
|
Loading…
Reference in new issue