You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
2.7 KiB
76 lines
2.7 KiB
const app = getApp();
|
|
Page({
|
|
data: {
|
|
brandDataList: [],
|
|
//form
|
|
sQuDao: [],
|
|
sQingGan: [],
|
|
sCrisis: [],
|
|
iTimeType: 0,
|
|
//api
|
|
affList: [],
|
|
qgList: [],
|
|
wjList: [{key: 1,value: '低级危机'},{key: 2,value: '中级危机'},{key: 3,value: '高级危机'}],
|
|
copyShow: false,
|
|
copyData: {},
|
|
},
|
|
onShow() {
|
|
this.getApi();
|
|
this.getData();
|
|
},
|
|
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',
|
|
iPageIndex: 1,
|
|
iPageSize: 10,
|
|
sType: 'BrandData',
|
|
isSourcetype: 0, //1返回渠道 0不返回
|
|
iTimeType: this.data.iTimeType, //0发布时间 1入库时间
|
|
sCrisis: (this.data.sCrisis).join(','),
|
|
sBrand: wx.getStorageSync('sBrand') || '',
|
|
sSeries: wx.getStorageSync('sSeries') || '',
|
|
}).then(res => {
|
|
this.setData({brandDataList: res})
|
|
});
|
|
},
|
|
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})
|
|
});
|
|
},
|
|
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()},
|
|
iTimeTypeByChange(event) {this.setData({ iTimeType: event.detail });this.getData()},
|
|
changeTime(result) {
|
|
this.setData({
|
|
sTimeType: result.detail.sTimeType,
|
|
sStartTime: result.detail.sStartTime,
|
|
sEndTime: result.detail.sEndTime,
|
|
});
|
|
this.getData();
|
|
},
|
|
toEventDetail(event) {
|
|
let cpdt = event.currentTarget.dataset.id._source
|
|
this.setData({copyShow: true, copyData: cpdt});
|
|
let str = '发布时间:'+cpdt.sourcetime+'来源:'+cpdt.source+'标题:'+cpdt.title+'链接:'+cpdt.url+'调性:'+(cpdt.affections == 1?'正面':cpdt.affections == 2?'中性':'负面')+'作者:'+cpdt.user_author
|
|
wx.setClipboardData({
|
|
data: str,
|
|
})
|
|
},
|
|
}) |