Merge branch 'dd-7' of git.oa00.com:xiaowen/swsWecat into dd-7

* 'dd-7' of git.oa00.com:xiaowen/swsWecat:
  wyl

# Conflicts:
#	pages/index/Salesranking/Salesranking.wxss
dev
liuyongli 3 years ago
commit e25c88a49a

@ -1,6 +1,4 @@
/* pages/index/Salesranking/Allbrands/Allbrands.wxss */
/* pages/index/Rankdetail/Rankdetail.wxss */
/* 排行榜 */
.list_event {
margin: 32rpx;

@ -14,6 +14,10 @@ Page({
grade_name3: '按能源',
grade_name4: '列表展示',
grades4: ['列表展示', '图表展示'],
Stats1:1,
Stats2:2,
Stats3:3,
Stats4:4,
//弹出框
show: false,
duration: 300,
@ -127,7 +131,7 @@ Page({
// brandOption:histogram(carName,carValue,'#0084FF',false)
})
}).then(res => {
console.log("这是数据",res)
// console.log("这是数据",res)
if (res && res.length > 0) {
iPageIndex++;
//把新请求到的数据添加到列表里
@ -159,8 +163,8 @@ Page({
},
//页面上拉触底事件的处理函数
onReachBottom:function() {
console.log("上拉触底事件")
console.log(iPageIndex)
// console.log("上拉触底事件")
// console.log(iPageIndex)
let that = this
if (!that.data.loadMore) {
that.setData({
@ -231,36 +235,68 @@ Page({
this.data.builds = e.detail.val
}
},
getBox(num){
switch(num){
case 1:
return "top-noselected";
case 2:
return "top-selected";
case 3:
return "top-selecteds"
}
},
getFont(num){
switch(num){
case 1:
return "notitle";
case 2:
return "title";
case 3:
return "titles"
}
},
//点击下拉
bindShowMsg(e) {
var id = e.currentTarget.id
if (id == 1) {
this.data.Stats1=2
this.setData({
select1: !this.data.select1,
select2: false,
select3: false,
select4: false,
box1:this.getBox(this.data.Stats1),
font1:this.getFont(this.data.Stats1)
})
} else if (id == 2) {
this.data.Stats2=2
this.setData({
select2: !this.data.select2,
select1: false,
select3: false,
select4: false,
box2:this.getBox(this.data.Stats2),
font2:this.getFont(this.data.Stats2)
})
} else if (id == 3) {
this.data.Stats3=2
this.setData({
select3: !this.data.select3,
select2: false,
select1: false,
select4: false,
box3:this.getBox(this.data.Stats3),
font3:this.getFont(this.data.Stats3)
})
} else if (id == 4) {
this.data.Stats4=2
this.setData({
select4: !this.data.select4,
select1: false,
select3: false,
select2: false,
box4:this.getBox(this.data.Stats4),
font4:this.getFont(this.data.Stats4)
})
}
},
@ -270,13 +306,14 @@ Page({
var value = e.currentTarget.dataset.name.value
iPageIndex=1
iPageSize = 20
var fonts=value!=""
this.data.Stats1=3
this.setData({
ranking:[],
grade_name1: name,
sSpec: value,
select1: false,
fontSize:fonts
box1:this.getBox(this.data.Stats1),
font1:this.getFont(this.data.Stats1)
})
this.getTrend()
},
@ -286,11 +323,14 @@ Page({
var value = e.currentTarget.dataset.name.value
iPageIndex=1
iPageSize = 20
this.data.Stats2=3
this.setData({
ranking:[],
grade_name2: name,
select2: false,
sPriceType: value
sPriceType: value,
box2:this.getBox(this.data.Stats2),
font2:this.getFont(this.data.Stats2)
})
this.getTrend()
},
@ -300,21 +340,27 @@ Page({
var value = e.currentTarget.dataset.name.value
iPageIndex=1
iPageSize = 20
this.data.Stats3=3
this.setData({
ranking:[],
grade_name3: name,
select3: false,
sEnergyType: value
sEnergyType: value,
box3:this.getBox(this.data.Stats3),
font3:this.getFont(this.data.Stats3)
})
this.getTrend()
},
// 列表展示
mySelect4(e) {
var name = e.currentTarget.dataset.name
this.data.Stats4=3
this.setData({
grade_name4: name,
select4: false,
a: name != "列表展示"
a: name != "列表展示",
box4:this.getBox(this.data.Stats4),
font4:this.getFont(this.data.Stats4)
})
},
// 全部

@ -19,8 +19,8 @@
</view>
<view class="top">
<!-- 下拉框 -->
<view class="{{fontSize?'top-noselected':'top-selected'}}" id="1" bindtap="bindShowMsg">
<text class="{{fontSize?'notitle':'title'}}">{{grade_name1}}</text>
<view class="{{box1}}" id="1" bindtap="bindShowMsg">
<text class="{{font1}}">{{grade_name1}}</text>
<text class="timeIcon">▼</text>
</view>
<!-- 下拉需要显示的列表 -->
@ -32,8 +32,8 @@
</view>
<view class="top">
<!-- 下拉框 -->
<view class="top-selected" id="2" bindtap="bindShowMsg">
<text class="title">{{grade_name2}}</text>
<view class="{{box2}}" id="2" bindtap="bindShowMsg">
<text class="{{font2}}">{{grade_name2}}</text>
<text class="timeIcon">▼</text>
</view>
<!-- 下拉需要显示的列表 -->
@ -45,8 +45,8 @@
</view>
<view class="top">
<!-- 下拉框 -->
<view class="top-selected" id="3" bindtap="bindShowMsg">
<text class="title">{{grade_name3}}</text>
<view class="{{box3}}" id="3" bindtap="bindShowMsg">
<text class="{{font3}}">{{grade_name3}}</text>
<text class="timeIcon">▼</text>
</view>
<!-- 下拉需要显示的列表 -->
@ -58,8 +58,8 @@
</view>
<view class="top">
<!-- 下拉框 -->
<view class="top-selected" id="4" bindtap="bindShowMsg">
<text class="title">{{grade_name4}}</text>
<view class="{{box4}}" id="4" bindtap="bindShowMsg">
<text class="{{font4}}">{{grade_name4}}</text>
<text class="timeIcon">▼</text>
</view>
<!-- 下拉需要显示的列表 -->

@ -256,11 +256,10 @@
margin: 0 16rpx;
align-items: baseline;
/* width: 120rpx; */
}
/* 下拉框 */
/* 选中 */
.top-selected {
}
/* 下拉框 */
/* 没选中 */
.top-noselected{
width: 130rpx;
height: 60rpx;
display: flex;
@ -273,10 +272,23 @@
padding: 0 10rpx;
font-size: 30rpx;
background-color: #ffffff;
}
/* 没选中 */
.top-noselected {
}
/* 选中 */
.top-selecteds{
width: 125rpx;
height: 60rpx;
display: flex;
margin-top: 10rpx;
/* float: right; */
align-items: center;
justify-content:space-between;
border: 1px solid #027AFF ;
padding: 0 10rpx;
font-size: 30rpx;
background-color: #fff;
}
/* 选择中 */
.top-selected{
width: 125rpx;
height: 60rpx;
display: flex;
@ -289,51 +301,53 @@
font-size: 30rpx;
background-color: #027AFF;
}
.title {
/* 选中 */
.title{
color: #333;
font-size: 24rpx
}
.notitle {
color: #fff;
/* 选择中 */
.titles{
color: #027AFF;
font-size: 24rpx
}
/* 下拉内容 */
.select_box {
background-color: #fff;
/* padding: 0 20rpx; */
width: 100%;
float: inline-end;
position: fixed;
right: 0;
z-index: 99;
overflow: hidden;
text-align: center;
animation: myfirst 0.5s;
font-size: 30rpx;
}
.select_one {
padding-left: 20rpx;
width: 100%;
height: 60rpx;
position: relative;
line-height: 60rpx;
}
/* 下拉过度效果 */
@keyframes myfirst {
from {
height: 0rpx;
}
to {
height: 210rpx;
}
/* 未选中 */
.notitle{
color: #fff;
font-size: 24rpx
}
/* 下拉内容 */
.select_box {
background-color: #fff;
/* padding: 0 20rpx; */
width: 100%;
float:inline-end;
position:fixed;
right: 0;
z-index: 99;
overflow: hidden;
text-align:center;
animation: myfirst 0.5s;
font-size: 30rpx;
}
.select_one {
padding-left: 20rpx;
width: 100%;
height: 60rpx;
position: relative;
line-height: 60rpx;
}
/* 下拉过度效果 */
@keyframes myfirst {
from {
height: 0rpx;
}
to {
height: 210rpx;
}
}
.loading {
position: relative;

Loading…
Cancel
Save