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.

196 lines
3.8 KiB

3 years ago
// pages/index/Rankdetail/Rankdetail.js
3 years ago
var newtime=new Date();
3 years ago
const app = getApp();
3 years ago
Page({
/**
* 页面的初始数据
*/
data: {
3 years ago
end:newtime.toLocaleDateString(),
3 years ago
show:false,
date:'2016-09-01',
date2:'2016-09-02',
currentDate: new Date().getTime(),
minDate: new Date().getTime(),
3 years ago
ranking: [],
// ranking: [
// {
// time:'2022-05',
// vehicle:9391,
// share: 10.02,
// },
// {
// time:'2022-05',
// vehicle:9391,
// share: 10.02,
// },
// {
// time:'2022-05',
// vehicle:9391,
// share: 10.02,
// },
// {
// time:'2022-05',
// vehicle:9391,
// share: 10.02,
// },
// {
// time:'2022-05',
// vehicle:9391,
// share: 10.02,
// },
// {
// time:'2022-05',
// vehicle:9391,
// share: 10.02,
// },
// {
// time:'2022-05',
// vehicle:9391,
// share: 10.02,
// },
// {
// time:'2022-05',
// vehicle:9391,
// share: 10.02,
// },
// {
// time:'2022-05',
// vehicle:9391,
// share: 10.02,
// },
// {
// time:'2022-05',
// vehicle:9391,
// share: 10.02,
// },
// ],
3 years ago
},
// sliderChange(event) {
// this.setData({
// sliderValue: event.detail
// });
// },
dropdownSel(e){
this.setData({
value1:e.detail
})
3 years ago
},
getData(){
app.globalData.request({
action: 'getCheZhuCarSeriesListHome',
sType: 'Marketing',
// sBrand: wx.getStorageSync('sBrand') || '',
// sSeriesName:wx.getStorageSync("sSeriesName") || '',
}).then(res => {
const arr=[]
res.forEach(e => {
let obj={
time:e.sourcetime,
vehicle:e.salescount,
share:e.salespm,
}
arr.push(obj)
});
this.setData({
ranking:arr
})})
3 years ago
},
priceSel(e){
this.setData({
priceSelected: e.currentTarget.dataset.index
})
},
3 years ago
//详情跳转
detail(){
wx.navigateTo({
url: '/pages/index/detailedvolume/detailedvolume',
})
},
3 years ago
showPopup() {
this.setData({ show: true });
},
onClose() {
this.setData({ show: false });
},
onInput(event) {
this.setData({
currentDate: event.detail,
});
},
// 点击日期组件确定事件
bindDateChange: function (e) {
this.setData({
date: e.detail.value
})
},
bindDateChange2: function (e) {
this.setData({
date2: e.detail.value
})
},
3 years ago
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
3 years ago
this.getData()
3 years ago
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
3 years ago
//动态设置标题
wx.setNavigationBarTitle({
title:this.data.query.title
})
3 years ago
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})