zx 3 years ago
parent 0e88daedcf
commit 087ae86cf6

@ -25,8 +25,8 @@ Component({
img: e.currentTarget.dataset.id.img
}
let isAdded = false;
for(let i=0;i<this.data.history.length;i++) { //列表中已存在则移到最前,否则添加到最前
if(JSON.stringify(this.data.history[i]) == JSON.stringify(o)) {
for(let i=0;i<this.data.history.length;i++) { //列表中已存在则移到最前,否则在最前添加
if(this.data.history[i].img == o.img) {
isAdded = true;
let arr = wx.getStorageSync('historyBrand');
arr.splice(i, 1);
@ -49,9 +49,6 @@ Component({
},
lifetimes: {
attached() {
if(wx.getStorageSync('historyBrand')) {
this.setData({history: wx.getStorageSync('historyBrand')})
}
wx.showToast({
title: '加载中',
icon: 'loading',
@ -63,12 +60,12 @@ Component({
token: 't%2BrswgjvzGM=',
}).then(res => {
let arr = []
// let recommandArr = [];
// res.forEach(ele => {
// if(ele.firstword == '热门') {
// recommandArr.push(ele)
// }
// });
let recommandArr = [];
res.forEach(ele => {
if(ele.firstword == '热门') {
recommandArr.push(ele)
}
});
for (let i = 65; i <= 90; i++) {
arr.push({
name: String.fromCharCode(i),
@ -84,8 +81,14 @@ Component({
}
this.setData({
brandList:arr,
// recommandBrand: recommandArr,
recommandBrand: recommandArr,
});
if(wx.getStorageSync('historyBrand').length != 0) {
this.setData({history: wx.getStorageSync('historyBrand')})
} else { //首次加载默认为推荐品牌
this.setData({history: recommandArr});
wx.setStorageSync('historyBrand', recommandArr);
}
setTimeout(() =>{
wx.hideToast();
},500)

@ -1,7 +1,7 @@
<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" wx:if="{{history.length != 0}}">
<scroll-view class="bs-tab-sv" scroll-x="true">
<view class="bs-tab-sv-item" wx:for="{{history}}" wx:key="index" data-id="{{item}}" bindtap="toBrandInsight">
<image class="userAvatar" src="{{item.img}}" />

@ -1,7 +1,7 @@
<view>
<view style="height: 40px;"></view>
<van-search style="width: 100%;" background="#006BFF" placeholder="请输入车型名称" bind:search="handlerSearch" />
<view class="bs-tabs">
<view class="bs-tabs" wx:if="{{history.length != 0}}">
<scroll-view class="bs-tab-sv" scroll-x="true">
<view class="bs-tab-sv-item" wx:for="{{history}}" wx:key="index">
<!-- <image class="userAvatar" src="{{item.img}}" /> -->

@ -29,6 +29,8 @@ Component({
'background: rgb(75,203,100)',
'background: rgb(75,214,213)',
],
copyShow: false,
copyData: {},
},
methods: {
getData() {
@ -128,8 +130,13 @@ Component({
this.setData({wordCloudData: arr1, wShow: true})
});
},
toEventDetail(value) {
// 外链
toEventDetail(event) {
let cpdt = event.currentTarget.dataset.id._source
this.setData({copyShow: true, copyData: cpdt});
let str = '发布时间:'+cpdt.sourcetime+'来源:'+cpdt.source+'标题:'+cpdt.srctitle+'链接:'+cpdt.url+'调性:'+(cpdt.affections == 1?'正面':cpdt.affections == 2?'中性':'负面')+'作者:'+cpdt.user_author
wx.setClipboardData({
data: str,
})
},
toTailDataList() {
wx.navigateTo({

@ -63,7 +63,7 @@
<view class="to-more" bindtap="toTailDataList">查看更多 ></view>
</view>
<view style="width: 100%;margin-top: 32rpx;">
<view class="event_content" wx:for="{{wyDataList}}" wx:if="{{index < 5}}" wx:key="_id" data-id='{{item._id}}' bindtap="toEventDetail">
<view class="event_content" wx:for="{{wyDataList}}" wx:if="{{index < 5}}" wx:key="_id" data-id='{{item}}' bindtap="toEventDetail">
<view class="event_text">
<view class="text_title">{{item._source.srctitle}}
</view>
@ -79,4 +79,16 @@
</view>
</view>
</view>
<van-dialog use-slot title="复制成功" show="{{copyShow}}">
<view style="padding: 32rpx">
<view style="font-size: 17px;font-weight: 600;color: #D0D0D0;line-height: 24px;margin-bottom: 24rpx">已复制到剪贴板,快去分享吧</view>
<view>发布时间:{{copyData.sourcetime}}</view>
<!-- <view>车型:{{copyData.sourcetime}}</view> -->
<view>来源:{{copyData.source}}</view>
<view>标题:{{copyData.srctitle}}</view>
<view style="word-break: break-all">链接:{{copyData.url}}</view>
<view>调性:{{copyData.affections == 1?'正面':copyData.affections == 2?'中性':'负面'}}</view>
<view>作者:{{copyData.user_author}}</view>
</view>
</van-dialog>
</view>

@ -14,6 +14,8 @@ Page({
affList: [],
qgList: [],
wjList: [{key: 1,value: '低级危机'},{key: 2,value: '中级危机'},{key: 3,value: '高级危机'}],
copyShow: false,
copyData: {},
},
onShow() {
this.setData({
@ -69,5 +71,13 @@ Page({
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,
})
},
})

@ -52,7 +52,7 @@
<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;">
<view class="middle-title" data-id='{{item}}' bindtap="toEventDetail" style="margin-top: 16rpx;">
{{item._source.title}}
</view>
<view class="bottom-source">
@ -60,4 +60,16 @@
<view style="margin-left: 64rpx;">作者:{{item._source.user_author}}</view>
</view>
</view>
<van-dialog use-slot title="复制成功" show="{{copyShow}}">
<view style="padding: 32rpx">
<view style="font-size: 17px;font-weight: 600;color: #D0D0D0;line-height: 24px;margin-bottom: 24rpx">已复制到剪贴板,快去分享吧</view>
<view>发布时间:{{copyData.sourcetime}}</view>
<!-- <view>车型:{{copyData.sourcetime}}</view> -->
<view>来源:{{copyData.source}}</view>
<view>标题:{{copyData.title}}</view>
<view style="word-break: break-all">链接:{{copyData.url}}</view>
<view>调性:{{copyData.affections == 1?'正面':copyData.affections == 2?'中性':'负面'}}</view>
<view>作者:{{copyData.user_author}}</view>
</view>
</van-dialog>
</view>

@ -1,7 +1,9 @@
const app = getApp();
Page({
data: {
tailDataList: []
tailDataList: [],
copyShow: false,
copyData: {},
},
onShow() {
this.getData();
@ -26,5 +28,13 @@ Page({
}).then(res => {
this.setData({tailDataList: res})
});
}
},
toEventDetail(event) {
let cpdt = event.currentTarget.dataset.id._source
this.setData({copyShow: true, copyData: cpdt});
let str = '发布时间:'+cpdt.sourcetime+'来源:'+cpdt.source+'标题:'+cpdt.srctitle+'链接:'+cpdt.url+'调性:'+(cpdt.affections == 1?'正面':cpdt.affections == 2?'中性':'负面')+'作者:'+cpdt.user_author
wx.setClipboardData({
data: str,
})
},
})

@ -11,7 +11,7 @@
<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;">
<view class="middle-title" data-id='{{item}}' bindtap="toEventDetail" style="margin-top: 16rpx;">
{{item._source.srctitle}}
</view>
<view class="bottom-source">
@ -19,4 +19,16 @@
<view style="margin-left: 64rpx;">作者:{{item._source.user_author}}</view>
</view>
</view>
<van-dialog use-slot title="复制成功" show="{{copyShow}}">
<view style="padding: 32rpx">
<view style="font-size: 17px;font-weight: 600;color: #D0D0D0;line-height: 24px;margin-bottom: 24rpx">已复制到剪贴板,快去分享吧</view>
<view>发布时间:{{copyData.sourcetime}}</view>
<!-- <view>车型:{{copyData.sourcetime}}</view> -->
<view>来源:{{copyData.source}}</view>
<view>标题:{{copyData.srctitle}}</view>
<view style="word-break: break-all">链接:{{copyData.url}}</view>
<view>调性:{{copyData.affections == 1?'正面':copyData.affections == 2?'中性':'负面'}}</view>
<view>作者:{{copyData.user_author}}</view>
</view>
</van-dialog>
</view>

@ -33,8 +33,6 @@ Component({
dx.push(key);
dy.push(res[key])
};
console.log(dx);
console.log(dy);
this.setData({
brandOption: histogram(dx,dy,[],'#0084FF')
})

@ -17,7 +17,9 @@ Component({
qgList: [],
wjList: [{key: 1,value: '低级危机'},{key: 2,value: '中级危机'},{key: 3,value: '高级危机'}],
//列表
dataList: []
dataList: [],
copyShow: false,
copyData: {},
},
methods: {
getApi() {
@ -68,6 +70,14 @@ Component({
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()},
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,
})
},
},
lifetimes: {
attached() {

@ -53,7 +53,7 @@
<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;">
<view class="middle-title" data-id='{{item}}' bindtap="toEventDetail" style="margin-top: 16rpx;">
{{item._source.title}}
</view>
<view class="bottom-source">
@ -62,4 +62,16 @@
</view>
</view>
</view>
<van-dialog use-slot title="复制成功" show="{{copyShow}}">
<view style="padding: 32rpx">
<view style="font-size: 17px;font-weight: 600;color: #D0D0D0;line-height: 24px;margin-bottom: 24rpx">已复制到剪贴板,快去分享吧</view>
<view>发布时间:{{copyData.sourcetime}}</view>
<!-- <view>车型:{{copyData.sourcetime}}</view> -->
<view>来源:{{copyData.source}}</view>
<view>标题:{{copyData.title}}</view>
<view style="word-break: break-all">链接:{{copyData.url}}</view>
<view>调性:{{copyData.affections == 1?'正面':copyData.affections == 2?'中性':'负面'}}</view>
<view>作者:{{copyData.user_author}}</view>
</view>
</van-dialog>
</view>

@ -15,6 +15,8 @@ Component({
//热门词云
wordCloudActive: 0,
wordCloudData: [],
copyShow: false,
copyData: {},
},
methods: {
getData() {
@ -96,11 +98,12 @@ Component({
this.setData({wordCloudData: arr1})
});
},
toEventDetail(value) {
let id = value.currentTarget.dataset.id;
wx.setStorageSync('sRele', id);
wx.navigateTo({
url: "/pages/insight/pages/eventInsight/index" + '?id=' + id
toEventDetail(event) {
let cpdt = event.currentTarget.dataset.id._source
this.setData({copyShow: true, copyData: cpdt});
let str = '发布时间:'+cpdt.sourcetime+'来源:'+cpdt.source+'标题:'+cpdt.srctitle+'链接:'+cpdt.url+'调性:'+(cpdt.affections == 1?'正面':cpdt.affections == 2?'中性':'负面')+'作者:'+cpdt.user_author
wx.setClipboardData({
data: str,
})
},
changeWordCloud(event) {

@ -62,7 +62,7 @@
<view class="to-more" bindtap="toTailDataList">查看更多 ></view>
</view>
<view style="width: 105%;margin-top: 32rpx;">
<view class="event_content" wx:for="{{wyDataList}}" wx:if="{{index < 5}}" wx:key="_id" data-id='{{item._id}}' bindtap="toEventDetail">
<view class="event_content" wx:for="{{wyDataList}}" wx:if="{{index < 5}}" wx:key="_id" data-id='{{item}}' bindtap="toEventDetail">
<view class="event_text">
<view class="text_title">{{item._source.srctitle}}
</view>
@ -78,4 +78,16 @@
</view>
</view>
</view>
<van-dialog use-slot title="复制成功" show="{{copyShow}}">
<view style="padding: 32rpx">
<view style="font-size: 17px;font-weight: 600;color: #D0D0D0;line-height: 24px;margin-bottom: 24rpx">已复制到剪贴板,快去分享吧</view>
<view>发布时间:{{copyData.sourcetime}}</view>
<!-- <view>车型:{{copyData.sourcetime}}</view> -->
<view>来源:{{copyData.source}}</view>
<view>标题:{{copyData.srctitle}}</view>
<view style="word-break: break-all">链接:{{copyData.url}}</view>
<view>调性:{{copyData.affections == 1?'正面':copyData.affections == 2?'中性':'负面'}}</view>
<view>作者:{{copyData.user_author}}</view>
</view>
</van-dialog>
</view>

@ -11,6 +11,8 @@ Page({
affList: [],
qgList: [],
wjList: [{key: 1,value: '低级危机'},{key: 2,value: '中级危机'},{key: 3,value: '高级危机'}],
copyShow: false,
copyData: {},
},
onShow() {
this.getApi();
@ -62,5 +64,13 @@ Page({
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,
})
},
})

@ -52,7 +52,7 @@
<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;">
<view class="middle-title" data-id='{{item}}' bindtap="toEventDetail" style="margin-top: 16rpx;">
{{item._source.title}}
</view>
<view class="bottom-source">
@ -60,4 +60,16 @@
<view style="margin-left: 64rpx;">作者:{{item._source.user_author}}</view>
</view>
</view>
<van-dialog use-slot title="复制成功" show="{{copyShow}}">
<view style="padding: 32rpx">
<view style="font-size: 17px;font-weight: 600;color: #D0D0D0;line-height: 24px;margin-bottom: 24rpx">已复制到剪贴板,快去分享吧</view>
<view>发布时间:{{copyData.sourcetime}}</view>
<!-- <view>车型:{{copyData.sourcetime}}</view> -->
<view>来源:{{copyData.source}}</view>
<view>标题:{{copyData.title}}</view>
<view style="word-break: break-all">链接:{{copyData.url}}</view>
<view>调性:{{copyData.affections == 1?'正面':copyData.affections == 2?'中性':'负面'}}</view>
<view>作者:{{copyData.user_author}}</view>
</view>
</van-dialog>
</view>

@ -1,7 +1,9 @@
const app = getApp();
Page({
data: {
tailDataList: []
tailDataList: [],
copyShow: false,
copyData: {},
},
onShow() {
this.getData();
@ -21,5 +23,13 @@ Page({
}).then(res => {
this.setData({tailDataList: res})
});
}
},
toEventDetail(event) {
let cpdt = event.currentTarget.dataset.id._source
this.setData({copyShow: true, copyData: cpdt});
let str = '发布时间:'+cpdt.sourcetime+'来源:'+cpdt.source+'标题:'+cpdt.srctitle+'链接:'+cpdt.url+'调性:'+(cpdt.affections == 1?'正面':cpdt.affections == 2?'中性':'负面')+'作者:'+cpdt.user_author
wx.setClipboardData({
data: str,
})
},
})

@ -11,7 +11,7 @@
<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;">
<view class="middle-title" data-id='{{item}}' bindtap="toEventDetail" style="margin-top: 16rpx;">
{{item._source.srctitle}}
</view>
<view class="bottom-source">
@ -19,4 +19,16 @@
<view style="margin-left: 64rpx;">作者:{{item._source.user_author}}</view>
</view>
</view>
<van-dialog use-slot title="复制成功" show="{{copyShow}}">
<view style="padding: 32rpx">
<view style="font-size: 17px;font-weight: 600;color: #D0D0D0;line-height: 24px;margin-bottom: 24rpx">已复制到剪贴板,快去分享吧</view>
<view>发布时间:{{copyData.sourcetime}}</view>
<!-- <view>车型:{{copyData.sourcetime}}</view> -->
<view>来源:{{copyData.source}}</view>
<view>标题:{{copyData.srctitle}}</view>
<view style="word-break: break-all">链接:{{copyData.url}}</view>
<view>调性:{{copyData.affections == 1?'正面':copyData.affections == 2?'中性':'负面'}}</view>
<view>作者:{{copyData.user_author}}</view>
</view>
</van-dialog>
</view>

@ -39,6 +39,8 @@ Page({
reportOption: [],
reportShow: false,
fieldList: [],
copyShow: false,
copyData: {},
},
onLoad: function(options) {
this.setData({Guid: options.Guid, sStartTime: options.StartTime, sEndTime: options.EndTime})
@ -172,9 +174,6 @@ Page({
+'&sQuDao='+quDao+'&sQingGan='+qingGan+'&sTitle='+title+'&website='+website,
})
},
toDetail() {
// 外链
},
openReport() {
this.setData({reportShow: true})
},
@ -211,6 +210,14 @@ Page({
fieldChange(event) {
this.setData({fieldList: event.detail})
},
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,
})
},
// 时间选择器
onDisplayStart() {
this.setData({ show1: true });

@ -81,7 +81,7 @@
<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;" bindtap="toDetail">
<view class="middle-title" data-id='{{item}}' bindtap="toEventDetail" style="margin-top: 16rpx;">
{{item._source.title}}
</view>
<view class="bottom-source">
@ -110,4 +110,16 @@
</van-checkbox-group>
</scroll-view>
</van-dialog>
<van-dialog use-slot title="复制成功" show="{{copyShow}}">
<view style="padding: 32rpx">
<view style="font-size: 17px;font-weight: 600;color: #D0D0D0;line-height: 24px;margin-bottom: 24rpx">已复制到剪贴板,快去分享吧</view>
<view>发布时间:{{copyData.sourcetime}}</view>
<!-- <view>车型:{{copyData.sourcetime}}</view> -->
<view>来源:{{copyData.source}}</view>
<view>标题:{{copyData.title}}</view>
<view style="word-break: break-all">链接:{{copyData.url}}</view>
<view>调性:{{copyData.affections == 1?'正面':copyData.affections == 2?'中性':'负面'}}</view>
<view>作者:{{copyData.user_author}}</view>
</view>
</van-dialog>
</view>
Loading…
Cancel
Save