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.

225 lines
5.7 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

// 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) {
// },
// /**
// * 生命周期函数--监听页面初次渲染完成
// */
// onReady() {
// },
// /**
// * 生命周期函数--监听页面显示
// */
// onShow() {
// },
// /**
// * 生命周期函数--监听页面隐藏
// */
// onHide() {
// },
// /**
// * 生命周期函数--监听页面卸载
// */
// onUnload() {
// },
// /**
// * 页面相关事件处理函数--监听用户下拉动作
// */
// onPullDownRefresh() {
// },
// /**
// * 页面上拉触底事件的处理函数
// */
// onReachBottom() {
// },
// /**
// * 用户点击右上角分享
// */
// onShareAppMessage() {
// }
// })
Component({
data: {
content: {},
},
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);
}
},
methods: {
aa(){
wx.reLaunch({
url :'https://weibo.com/6443621722/LD0KoxFpJ'
});
},
// 时间
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
// })
app.globalData.request({
action: 'getHomeList0528',
sType: 'Home',
sTimeType:sTimeType,
sStartTime:sStartTime,
sEndTime:sEndTime,
// sQuDao:key
}).then(res => {
const data= res[0];
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)
},
},
})