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