wylyl22 3 years ago
parent a5e666062e
commit 59c4d4c8f4

@ -117,17 +117,17 @@ Component({
case "新闻数据":
return 1
case "论坛数据":
return 2
case "微信数据":
return 5
case "评论数据":
return 3
case "微数据":
case "微信数据":
return 4
case "短视频数据":
case "APP数据":
return 6
case "其他数据":
case "微博数据":
return 5
case "短视频数据":
return 7
case "其他数据":
return 2
default:
return null
}
@ -135,11 +135,10 @@ Component({
dynamic(e){
var value=e.currentTarget.id
var key=this.getKey(value)
// wx.setStorageSync('sQuDao',key)
// console.log(key)
wx.setStorageSync('sQuDao',this.getKey(value))
console.log(this.getKey(value))
wx.navigateTo({
url: "/pages/index/total/tatal?keys="+key
url: "/pages/index/total/tatal"
})
},
}

@ -398,10 +398,10 @@
@keyframes myfirst{
from{
height: 0rpx;
opacity: 0;
}
to{
height: 210rpx;
opacity: 1;
}
}
.timeIcon{

@ -1,224 +1,191 @@
// pages/index/total/tatal.js
const app =getApp();
// Page({
// /**
// * 页面的初始数据
// */
// data: {
// content:[
// {
// time: '2022-04-29 23:00:00',
// title: '谁说国产没有高性能SUV这3款国产SUV配2.0T发动机星途凌云换个运动轮胎妥妥的6秒3最快6...',
// author: '明哥飞扬',
// media:'新浪微博'
// },
// {
// time: '2022-04-29 23:00:00',
// title: '星途凌云S上市传播分析评论中毒 奇瑞车为何如此招黑?',
// author: '明哥飞扬',
// media:'新浪微博'
// },
// {
// time: '2022-04-29 23:00:00',
// title: 'MG5天蝎座上市传播分析评论区疑似闹“水灾',
// author: '明哥飞扬',
// media:'新浪微博'
// },
// {
// time: '2022-04-29 23:00:00',
// title: '谁说国产没有高性能SUV这3款国产SUV配2.0T发动机星途凌云换个运动轮胎妥妥的6秒3最快6...',
// author: '明哥飞扬',
// media:'新浪微博'
// },
// ]
// },
// /**
// * 生命周期函数--监听页面加载
// */
// onLoad(options) {
// console.log("aaa",options);
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// },
// /**
// * 生命周期函数--监听页面初次渲染完成
// */
// onReady() {
// },
// /**
// * 生命周期函数--监听页面显示
// */
// onShow() {
// },
// /**
// * 生命周期函数--监听页面隐藏
// */
// onHide() {
// },
// /**
// * 生命周期函数--监听页面卸载
// */
// onUnload() {
// },
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
sQuDao:wx.getStorageSync('sQuDao') ||'',
})
this.getData()
},
getData(){
wx.showToast({
title: '加载中',
icon: 'loading',
duration: 300000
})
// let key = ele.key
app.globalData.request({
action: 'getHomeList0528',
sType: 'Home',
sTimeType:"34",
// sStartTime:sStartTime,
// sEndTime:sEndTime,
sQuDao:wx.getStorageSync('sQuDao')||""
}).then(res => {
const _source = []
res.forEach(ele =>{
let obj = {
sourcetime:ele._source.sourcetime,
title:ele._source.title,
user_author:ele._source.user_author,
source:ele._source.source
}
_source.push(obj)
})
this.setData({
content:_source
});
// console.log('9999',data)
// console.log('9999',arr)
});
setTimeout(() =>{
wx.hideToast();
},500)
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
// /**
// * 页面相关事件处理函数--监听用户下拉动作
// */
// onPullDownRefresh() {
// },
// /**
// * 页面上拉触底事件的处理函数
// */
// onReachBottom() {
// },
// /**
// * 用户点击右上角分享
// */
// onShareAppMessage() {
// }
// })
Component({
data: {
content: {},
},
}
})
// Component({
// data: {
// content: {},
// },
methods: {
// methods: {
// modalChoose(e) {
// let id = e.currentTarget.dataset.id; //获取点击的id
// app.globalData.request({
// action: 'getUserSeriesName',
// token: 't%2BrswgjvzGM=',
// sBrandName: id
// }).then(res => {
// this.setData({
// modalList: res,
// popShow: true,
// currentBrand: id,
// })
// });
// },
// handlerSearch(value) {
// let keyword = value.detail;
// app.globalData.request({
// action: 'getQueryrSeriesName',
// token: 't%2BrswgjvzGM=',
// queryname: keyword
// }).then(res => {
// //图片少了.png后缀
// let arr = []
// for (let i = 65; i <= 90; i++) {
// arr.push({
// name: String.fromCharCode(i),
// data: []
// });
// }
// for(let i of res){
// for(let j of arr){
// if(i.firstword == j.name){
// let obj = {
// brandname: i.name,
// img: i.img+'.png',
// data: i.data,
// firstword: i.firstword
// }
// j.data.push(obj)
// }
// }
// };
// this.setData({
// brandList: arr
// });
// });
// },
// toModalInsight(value) {
// let id = value.target.dataset.id;
// wx.setStorageSync('sSeriesName', id);
// // wx.navigateTo({
// // url: "/pages/insight/pages/modalInsight/index"
// // })
// },
// onClose() {
// this.setData({
// popShow: false
// })
// }
},
lifetimes: {
attached() {
let sTimeType = wx.getStorageSync("sTimeType") || 34;
let sStartTime = wx.getStorageSync("sStartTime") || '';
let sEndTime = wx.getStorageSync("sEndTime") || '';
this.getData(sTimeType, sStartTime, sEndTime);
// // modalChoose(e) {
// // let id = e.currentTarget.dataset.id; //获取点击的id
// // app.globalData.request({
// // action: 'getUserSeriesName',
// // token: 't%2BrswgjvzGM=',
// // sBrandName: id
// // }).then(res => {
// // this.setData({
// // modalList: res,
// // popShow: true,
// // currentBrand: id,
// // })
// // });
// // },
// // handlerSearch(value) {
// // let keyword = value.detail;
// // app.globalData.request({
// // action: 'getQueryrSeriesName',
// // token: 't%2BrswgjvzGM=',
// // queryname: keyword
// // }).then(res => {
// // //图片少了.png后缀
// // let arr = []
// // for (let i = 65; i <= 90; i++) {
// // arr.push({
// // name: String.fromCharCode(i),
// // data: []
// // });
// // }
// // for(let i of res){
// // for(let j of arr){
// // if(i.firstword == j.name){
// // let obj = {
// // brandname: i.name,
// // img: i.img+'.png',
// // data: i.data,
// // firstword: i.firstword
// // }
// // j.data.push(obj)
// // }
// // }
// // };
// // this.setData({
// // brandList: arr
// // });
// // });
// // },
// // toModalInsight(value) {
// // let id = value.target.dataset.id;
// // wx.setStorageSync('sSeriesName', id);
// // // wx.navigateTo({
// // // url: "/pages/insight/pages/modalInsight/index"
// // // })
// // },
// // onClose() {
// // this.setData({
// // popShow: false
// // })
// // }
// },
// lifetimes: {
// attached() {
// let sTimeType = wx.getStorageSync("sTimeType") || 34;
// let sStartTime = wx.getStorageSync("sStartTime") || '';
// let sEndTime = wx.getStorageSync("sEndTime") || '';
// this.getData(sTimeType, sStartTime, sEndTime);
}
// }
},
// },
methods: {
// 时间
changeTime(e){
let sTimeType = e.detail.sTimeType;
let sStartTime = e.detail.sStartTime;
let sEndTime = e.detail.sEndTime;
this.getData(sTimeType, sStartTime, sEndTime);
},
getData(sTimeType, sStartTime, sEndTime){
wx.showToast({
title: '加载中',
icon: 'loading',
duration: 300000
})
// let key = ele.key
app.globalData.request({
action: 'getHomeList0528',
sType: 'Home',
sTimeType:sTimeType,
sStartTime:sStartTime,
sEndTime:sEndTime,
// sQuDao:wx.getStorageSync('sQuDao')
}).then(res => {
const data= res;
const _source = []
// for (let i = 0 ;i<res.length;i++){
// data.push(res[i])
// }
// res.forEach(ele =>{
// let obj = {
// sourcetime:data._source.sourcetime,
// title:data._source.title,
// user_author:data._source.user_author,
// source:data._source.source
// }
// _source.push(obj)
// })
this.setData({
content:data._source
});
// console.log('9999',data)
// console.log('9999',arr)
});
setTimeout(() =>{
wx.hideToast();
},500)
},
},
})
// methods: {
// // 时间
// changeTime(e){
// let sTimeType = e.detail.sTimeType;
// let sStartTime = e.detail.sStartTime;
// let sEndTime = e.detail.sEndTime;
// this.getData(sTimeType, sStartTime, sEndTime);
// },
// },
// })

@ -1,14 +1,14 @@
<!--pages/index/total/tatal.wxml-->
<view class="content" wx:for="{{content}}" wx:key="index" data-id='{{content.id}}'>
<view class="content" wx:for="{{content}}" wx:key="">
<view class="content_event">
<view class="content_pinpai">{{content.sourcetime}}
<view class="content_pinpai">{{item.sourcetime}}
</view>
<view class="content_title">{{content.title}}
<view class="content_title">{{item.title}}
</view>
<view class="content_text">
<view class="content_pinpai">作者:{{content.user_author}}
<view class="content_pinpai">作者:{{item.user_author}}
</view>
<view class="content_pinpai">媒体:{{content.source}}
<view class="content_pinpai">媒体:{{item.source}}
</view>
</view>
</view>

Loading…
Cancel
Save