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.

356 lines
8.5 KiB

// pages/index/Rankdetail/Rankdetail.js
Page({
/**
* 页面的初始数据
*/
data: {
sortOpt: [
{
text: '列表展示',
value1: 0
},
{
text: '图表展示',
value1: 1
}
],
value:0,
// 时间
priceOpt: ['2022年5月','2022年4月','2022年3月',
'2022年2月','2022年1月','2021年12月',
'2021年11月','2021年10月','2021年9月',
'2021年8月','2021年7月','2021年6月',
'2021年5月','近半年','近一年',
],
prcieInterval: [0, 10, 20, 30, 40, 50, '不限'],
value1: 0,
// 品牌
value2: '全部品牌',
typeOpt: [
],
// 级别
level:[
{
text:'全部级别',
value4:'0'
},
{
text:'微型车',
value4:'1'
},
{
text:'小型车',
value4:'2'
},
{
text:'紧凑型车',
value4:'3'
},
{
text:'中型车',
value4:'4'
},
{
text:'中大型车',
value4:'5'
},
{
text:'MPV',
value4:'6'
},
{
text:'SUV',
value4:'7'
}
],
// 价格
Price:[
{
text:'全部价格',
value5:'0'
},
{
text:'10万以内',
value5:'1'
},
{
text:'10万-15万',
value5:'2'
},
{
text:'15万-25万',
value5:'3'
},
{
text:'25万-35万',
value5:'4'
},
{
text:'35万-50万',
value5:'5'
},
{
text:'50万以上',
value5:'6'
}
],
// 能源
energy:[
{
text:'全部能源',
value6:'0'
},
{
text:'新能源',
value6:'1'
},
{
text:'汽油',
value6:'2'
},
{
text:'柴油',
value6:'3'
},
{
text:'油电混合',
value6:'4'
},
{
text:'轻混系统',
value6:'5'
},
],
// 数据列表
ranking: [
{
volume: '12345',
media: '媒体',
num:'3.23-6.98万',
energy:'新能源',
stsId:"2",
},
{
volume: '12345',
media: '媒体',
num:'3.23-6.98万',
energy:'汽油',
stsId:"1",
},
{
volume: '12345',
media: '媒体',
num:'3.23-6.98万',
energy:'柴油',
},
{
volume: '12345',
media: '媒体',
num:'3.23-6.98万',
energy:'油电混合',
},
{
volume: '12345',
media: '媒体',
num:'3.23-6.98万',
energy:'轻混系统',
},
{
volume: '12345',
media: '媒体',
num:'3.23-6.98万',
energy:'新能源',
},
{
volume: '12345',
media: '媒体',
num:'3.23-6.98万',
energy:'新能源',
},
{
volume: '12345',
media: '媒体',
num:'3.23-6.98万',
energy:'新能源',
},
],
showChart: true,
positiveOption: {
backgroundColor: '#F9F9F9',
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'line' // 默认为直线,可选为:'line' | 'shadow'
},
confine: true
},
legend: {
x:'15',
icon: 'rectangle',//data图标样式
itemWidth: 10,//data图标大小
itemHeight: 10,
textStyle: {
fontSize: 9
},
},
//图表位置
grid: {
left: 400,
right: 200,
bottom: 10,
top: 200,
containLabel: true,
height:'auto'
},
yAxis: [
{
type: 'value',
axisTick:{
show:false //去除刻度线
},
axisLine:{
show:false //去除轴线
},
axisLabel: {
color: '#999999',//y轴文本颜色
textStyle: {
fontSize : 9
}
},
splitLine: { //分割线
// lineStyle:{
// // color:"#2d3436"
// }
show: true,
lineStyle: {
type: 'dashed',
color: '#E8E8E8',
}
}
}
],
xAxis: [
{
type: 'category',
data: ['12月', '1月', '2月', '3月', '4月', '5月', '6月'],
axisTick:{
show:false //去除刻度线
},
axisLine:{
show:false, //去除轴线
},
axisLabel: {
color: '#999999',//x轴文本颜色
textStyle: {
fontSize : 9
}
}
}
],
series: [
{
type: 'line',
symbol:'none', //去圆点
data: [100, 200, 300, 500, 700, 500, 300],
itemStyle: {
normal:{
color: '#0084FF',
lineStyle: {
color: '#0084FF'
}
}
}
},
]
},
},
// sliderChange(event) {
// this.setData({
// sliderValue: event.detail
// });
// },
dropdownSel(e){
this.setData({
value1:e.detail
})
},
priceSel(e){
this.setData({
priceSelected: e.currentTarget.dataset.index
})
},
onclick() {
this.setData({ show: true });
},
onClose() {
this.setData({ show: false });
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log('111',this.data.sortOpt[0].value1)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
// this.getTabBar().init();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})