|
|
@@ -160,8 +160,8 @@ export default {
|
|
|
lastSearchText:'', // 上次的搜索内容
|
|
|
searchTimer: null, // 搜索防抖定时器
|
|
|
riseData: {}, // 价格上涨配置
|
|
|
- stockStatus:0, // 1:有库存 2:无库存
|
|
|
- priceStatus:0, // 1:有价格 2:无价格
|
|
|
+ hasStock:-1, // 0没库存 1有库存
|
|
|
+ priceType:-1, // 0 无价格,1 有价格
|
|
|
// 新增筛选相关数据
|
|
|
showFilterPanel: false,
|
|
|
selectedPrice: null, // 选中的价格筛选
|
|
|
@@ -170,11 +170,11 @@ export default {
|
|
|
// 筛选选项配置
|
|
|
priceOptions: [
|
|
|
{ label: '有价格', value: 1 },
|
|
|
- { label: '无价格', value: 2 }
|
|
|
+ { label: '无价格', value: 0 }
|
|
|
],
|
|
|
stockOptions: [
|
|
|
{ label: '有库存', value: 1 },
|
|
|
- { label: '无库存', value: 2 }
|
|
|
+ { label: '无库存', value: 0 }
|
|
|
],
|
|
|
flowerNumOptions: [
|
|
|
{ label: '6支', value: 6 },
|
|
|
@@ -246,8 +246,8 @@ export default {
|
|
|
this.selectedFlowerNum = null;
|
|
|
|
|
|
// 清空后立即更新筛选变量
|
|
|
- this.priceStatus = 0;
|
|
|
- this.stockStatus = 0;
|
|
|
+ this.priceType = -1;
|
|
|
+ this.hasStock = -1;
|
|
|
this.flowerNum = 0;
|
|
|
|
|
|
// 关闭筛选面板
|
|
|
@@ -260,8 +260,8 @@ export default {
|
|
|
|
|
|
confirmFilters() {
|
|
|
// 更新原有的筛选变量以保持兼容性
|
|
|
- this.priceStatus = this.selectedPrice || 0;
|
|
|
- this.stockStatus = this.selectedStock || 0;
|
|
|
+ this.priceType = this.selectedPrice || 0;
|
|
|
+ this.hasStock = this.selectedStock || 0;
|
|
|
this.flowerNum = this.selectedFlowerNum || 0;
|
|
|
|
|
|
// 关闭筛选面板
|
|
|
@@ -356,7 +356,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getGoodsList() {
|
|
|
- return getCategoryToGoods({page: this.list.page,searchText:this.lastSearchText,catId:this.catId, flowerNum:this.flowerNum, priceStatus:this.priceStatus, stockStatus:this.stockStatus,requestType:'goodsList'}).then(res => {
|
|
|
+ return getCategoryToGoods({page: this.list.page,searchText:this.lastSearchText,catId:this.catId, flowerNum:this.flowerNum, priceType:this.priceType, hasStock:this.hasStock,requestType:'goodsList'}).then(res => {
|
|
|
this.completes(res)
|
|
|
})
|
|
|
},
|