|
|
@ -23,10 +23,11 @@ Page({ |
|
|
|
loading: false,//显示加载
|
|
|
|
period: false,//显示无数据
|
|
|
|
select: 0,//选中
|
|
|
|
sort: 0,// 1 asc 升序 0 desc 降序
|
|
|
|
sort: '',// 1 asc 升序 0 desc 降序
|
|
|
|
types: '刷新', // 点击更多、下拉上啦刷新
|
|
|
|
bg: '', |
|
|
|
attrList: [], |
|
|
|
sortType: '', |
|
|
|
}, |
|
|
|
onPullDownRefresh: function () { |
|
|
|
console.log(111) |
|
|
@ -92,7 +93,8 @@ Page({ |
|
|
|
page: page, |
|
|
|
pro:'', |
|
|
|
keyword:'', |
|
|
|
sort_criteria: sort, |
|
|
|
sort_criteria: that.data.sortType, |
|
|
|
sort: sort, |
|
|
|
query_criteria: '',//'{"brand_id":"","min_price":"","max_price":""}',
|
|
|
|
}).then(res => { |
|
|
|
if (res.code == 200) { |
|
|
@ -220,7 +222,8 @@ Page({ |
|
|
|
var that = this; |
|
|
|
this.setData({ |
|
|
|
select: 0, |
|
|
|
sort: 1, |
|
|
|
sort: '', |
|
|
|
sortType: '', |
|
|
|
imageurl1: "../../images/mo.png", |
|
|
|
imageurl2: "../../images/mo.png", |
|
|
|
page: 1, |
|
|
@ -234,17 +237,18 @@ Page({ |
|
|
|
if (this.data.daindex1 == 0) { |
|
|
|
this.setData({ |
|
|
|
imageurl1: "../../images/xia.png", |
|
|
|
daindex1: 1, |
|
|
|
daindex1: 'desc', |
|
|
|
imageurl2: "../../images/mo.png", |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.setData({ |
|
|
|
imageurl1: "../../images/shang.png", |
|
|
|
daindex1: 0, |
|
|
|
daindex1: 'asc', |
|
|
|
imageurl2: "../../images/mo.png", |
|
|
|
}) |
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
sortType: 'volume', |
|
|
|
select: 1, |
|
|
|
sort: that.data.daindex1, |
|
|
|
page: 1, |
|
|
@ -258,17 +262,18 @@ Page({ |
|
|
|
if (this.data.daindex2 == 0) { |
|
|
|
this.setData({ |
|
|
|
imageurl2: "../../images/shang.png", |
|
|
|
daindex2: 1, |
|
|
|
daindex2: 'asc', |
|
|
|
imageurl1: "../../images/mo.png", |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.setData({ |
|
|
|
imageurl2: "../../images/xia.png", |
|
|
|
imageurl1: "../../images/mo.png", |
|
|
|
daindex2: 0 |
|
|
|
daindex2: 'desc' |
|
|
|
}) |
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
sortType: 'price', |
|
|
|
select: 2, |
|
|
|
sort: that.data.daindex2, |
|
|
|
page: 1, |
|
|
|