Commit 869e2e11 by 李嘉林

feat: 改为默认按照销量排序

parent 5c4ba6cc
......@@ -257,7 +257,13 @@ const componentOptions = {
}).exec();
},
getProductList(code, type) {
let { goodsSort,attributeValueList } = this.data.datas.componentData;
let { goodsSort, attributeValueList } = this.data.datas.componentData;
// 为了让默认是4,但是老数据存的是0, 所以要在用的地方把0改成4,把4改成0
if (goodsSort == '0') {
goodsSort = '4';
} else if (goodsSort == '4') {
goodsSort = '0';
}
let goodsList = [];
if (type == 2) {
goodsList = this.data.pageGoodsList[this.data.datasIndex];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment