作者 朱振飞

价格区间

... ... @@ -698,7 +698,6 @@ Page({
for (var i = 0; i < newnavarr.length; i++) {
if (i == index) {
newnavarr[i].sel = !newnavarr[i].sel;
if (type == 4) {
if (newnavarr[i].sel == true) {
console.log(999)
... ... @@ -717,8 +716,6 @@ Page({
pricechose: false,
morechose: false,
fenchose: false
})
}
}else if(type==2){
... ... @@ -798,9 +795,6 @@ Page({
newnavarr[i].sel = false
}
}
this.setData({
navarr: newnavarr
})
... ... @@ -842,19 +836,25 @@ Page({
console.log(that.data.selectinfo)
let middlevalue = '';
let during = that.data.selectinfo.price[0].number;
let max = parseInt(that.data.selectinfo.price[0].max) + parseInt(that.data.selectinfo.price[0].number);
let duan = parseInt(max/during);
let per_val = (during/max*100).toFixed(2);
let tempData = [];
for(let i = 1; i<=duan ; i++){
tempData.push(i)
}
that.setData({
leftMin: parseInt(that.data.selectinfo.price[0].realmin),
rightMax: parseInt(that.data.selectinfo.price[0].realmax),
min: parseInt(that.data.selectinfo.price[0].min) - parseInt(that.data.selectinfo.price[0].number),
max: parseInt(that.data.selectinfo.price[0].max) + parseInt(that.data.selectinfo.price[0].number),
priceyuan: that.data.selectinfo.price[0].realmin + '元' + '-' + that.data.selectinfo.price[0].realmax + '元',
pricevalue: that.data.selectinfo.price[0].realmin + '-' + that.data.selectinfo.price[0].realmax,
number: that.data.selectinfo.price[0].number
number: that.data.selectinfo.price[0].number,
during: tempData,
per_val:per_val
})
console.log(909080807070)
... ...
... ... @@ -26,24 +26,19 @@
<!-- 价格 -->
<view class="register" wx:if="{{pricechose}}" bindtap="hideprice" catchtouchmove='true'>
<view class="pregisterwrap">
<view class="pyuan">{{priceyuan}}</view>
<view class="zy-slider" catchtap='pingbi'>
<zy-slider id="zy-slider1" minValue="{{leftMin}}" maxValue="{{rightMax}}" min="{{min}}" max="{{max}}" blockColor="#0099FF" backgroundColor="#B0C4DE" selectedColor="#FF1493" bind:lowValueChange="lowValueChangeAction" bind:heighValueChange="heighValueChangeAction"
/>
<!-- style="left:{{ppleft}}rpx; width:{{ppvalue-ppleft}}rpx" -->
<view class="pp" style="width:95%;background:red;height:10rpx;margin:50rpx auto 0">
<view class="ppitem"></view>
<view class="ppitem"></view>
<view class="ppitem"></view>
<view class="ppitem"></view>
<view class="pp" style="height:10rpx;margin:50rpx 0 0 5px">
<block wx:for='{{during}}' wx:key=''>
<view style="width: {{per_val}}%" class="single_item">
<view class="detail_num">{{item*number}}</view>
</view>
</block>
</view>
</view>
</view>
</view>
... ... @@ -51,12 +46,10 @@
<view class="register" wx:if="{{fenchose}}" bindtap="hidefen" catchtouchmove='true'>
<view class="pregisterwrap">
<view class="pyuan">{{score}}</view>
<view class="zy-slider">
<zy-slider id="zy-slider1" minValue="{{fenleftMin}}" maxValue="{{fenrightMax}}" min="{{fenmin}}" max="{{fenmax}}" blockColor="#0099FF" backgroundColor="#B0C4DE" selectedColor="#FF1493" bind:lowValueChange="fenlowValueChangeAction" bind:heighValueChange="fenheighValueChangeAction"
/>
</view>
</view>
</view>
... ... @@ -97,12 +90,7 @@
data-basic_sort="{{item.basic_sort}}" bind:heighValueChange="heighValueChangeAction1" data-parindex="{{par}}" />
</view>
</view>
</view>
</view>
</view>
<view class="shaisel">
... ... @@ -125,8 +113,6 @@
<view class="nodataimg" wx:if="{{zhinenglist.length==0}}">
<image src="/img/wushuju.png"></image>
</view>
<block wx:else>
<view class="searchitem" wx:for="{{zhinenglist}}" wx:key="" bindtap="jumpbrand" data-id="{{item.id}}">
<view class="searchitemleft">
... ... @@ -146,9 +132,6 @@
</view>
<view class="starimg" bindtap="collect" data-id="{{item.id}}">
<image src="{{url}}aicon_10x.png" wx:if="{{item.is_favorite==1}}"></image>
<image src="{{url}}aicon_09x.png" wx:else></image>
</view>
... ...
... ... @@ -324,6 +324,35 @@ page {
width:1px;
height:50rpx;
background: green;
}
.single_item{
height: 2px;
background: #f5f5f5;
position: relative;
}
.single_item::after{
content:'';
height: 8px;
width: 2px;
background-color: #ccc;
right: 0;
position: absolute;
bottom: 0;
}
.single_item:last-child{
opacity: 0
}
.single_item:first-child{
background: #FFF;
}
.single_item:last-child::after{
height: 0;
}
.detail_num{
color: #999;
font-size: 24rpx;
position: absolute;
top: -25px;
right: 0;
transform: translateX(50%);
}
\ No newline at end of file
... ...
// pages/yonghuxieyi/yonghuxieyi.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--pages/yonghuxieyi/yonghuxieyi.wxml-->
<text>pages/yonghuxieyi/yonghuxieyi.wxml</text>
... ...
/* pages/yonghuxieyi/yonghuxieyi.wxss */
\ No newline at end of file
... ...
... ... @@ -49,7 +49,7 @@
"list": []
},
"miniprogram": {
"current": 47,
"current": 48,
"list": [
{
"id": -1,
... ... @@ -384,6 +384,14 @@
"id": -1,
"name": "用户协议",
"pathName": "pages/yonghuxieyi/yonghuxieyi",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/homeblock/zhinengselect/zhinengselect",
"pathName": "pages/homeblock/zhinengselect/zhinengselect",
"query": "",
"scene": null
}
]
... ...