From 2902947b0d211dced9349a563ac8abf861bd66d2 Mon Sep 17 00:00:00 2001 From: lixuan Date: Tue, 6 Dec 2022 20:10:22 +0800 Subject: [PATCH 1/2] xiugai --- components/sl-filter/filter-view.vue | 6 +++--- pages/tabbar/station/stationList.vue | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/components/sl-filter/filter-view.vue b/components/sl-filter/filter-view.vue index e16553c..e20d975 100644 --- a/components/sl-filter/filter-view.vue +++ b/components/sl-filter/filter-view.vue @@ -516,7 +516,7 @@ this.oilCode = detailItem.value } if(indexs==0){ - this.paixu = detailItem.value=='juli'?1:2 + this.paixu = detailItem.value } console.log(index, list, isMutiple, key, detailItem,indexs,'打印打印打印') // this.detailItems = detailItem.value*1000 @@ -664,7 +664,7 @@ this.menuList[0].detailList[0].isSelected = true this.menuList[0].detailList[1].isSelected = false this.paixu = 1 - this.selectedTitleObj['sort'] = '距离排序' + this.selectedTitleObj['comprehensiveSort'] = '距离优先' } if(index == 0&&!this.oilCode&&this.paixu==2){ uni.showToast({ @@ -696,7 +696,7 @@ obj.result.cityCode = this.cityCode obj.result.areaCode = this.areaCode obj.result.distance = this.provinceCode?'':this.cityCode?'':this.areaCode?'':this.detailItems - obj.result.sort = this.paixu==1?'juli':'price' + obj.result.comprehensiveSort = this.paixu obj.result.oilProductCode = this.oilCode // obj.result.distance = this.detailItems console.log(obj,'look me!') diff --git a/pages/tabbar/station/stationList.vue b/pages/tabbar/station/stationList.vue index ca02449..2092991 100644 --- a/pages/tabbar/station/stationList.vue +++ b/pages/tabbar/station/stationList.vue @@ -89,16 +89,16 @@ siteName: '', menuList: [ { - title: '距离排序', + title: '距离优先', isMutiple: false, - key: 'sort', + key: 'comprehensiveSort', detailList: [{ - title: "距离排序", - value: 'juli' + title: "距离优先", + value: 1 }, { - title: "价格排序", - value: 'price' + title: "价格优先", + value: 2 } ] }, @@ -503,7 +503,7 @@ currentPage: this.currentPage, pageSize: 10, params: { //类型:Object 必有字段 备注:// 筛选对象 - // sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序 + sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序 siteName: this.siteName, ...uni.getStorageSync('location'), // ...this.filterData @@ -519,7 +519,7 @@ // siteLevel: this.siteName ? '' : this.filterDatas siteLevel: this.filterDatas .siteLevel , - sort:this.filterDatas.sort?this.filterDatas.sort:'juli', + comprehensiveSort:this.filterDatas.comprehensiveSort?this.filterDatas.comprehensiveSort:1, provinceCode:this.filterDatas.provinceCode, cityCode:this.filterDatas.cityCode, areaCode:this.filterDatas.areaCode, From 6ac28b64e5e83cacde68facd8a4f5660ce2e44e0 Mon Sep 17 00:00:00 2001 From: lixuan Date: Tue, 6 Dec 2022 20:22:34 +0800 Subject: [PATCH 2/2] xiugai --- components/sl-filter/filter-view.vue | 6 +++--- pages/tabbar/station/stationList.vue | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/sl-filter/filter-view.vue b/components/sl-filter/filter-view.vue index e20d975..6c43177 100644 --- a/components/sl-filter/filter-view.vue +++ b/components/sl-filter/filter-view.vue @@ -516,7 +516,7 @@ this.oilCode = detailItem.value } if(indexs==0){ - this.paixu = detailItem.value + this.paixu = detailItem.value=='juli'?1:2 } console.log(index, list, isMutiple, key, detailItem,indexs,'打印打印打印') // this.detailItems = detailItem.value*1000 @@ -664,7 +664,7 @@ this.menuList[0].detailList[0].isSelected = true this.menuList[0].detailList[1].isSelected = false this.paixu = 1 - this.selectedTitleObj['comprehensiveSort'] = '距离优先' + this.selectedTitleObj['sort'] = '距离优先' } if(index == 0&&!this.oilCode&&this.paixu==2){ uni.showToast({ @@ -696,7 +696,7 @@ obj.result.cityCode = this.cityCode obj.result.areaCode = this.areaCode obj.result.distance = this.provinceCode?'':this.cityCode?'':this.areaCode?'':this.detailItems - obj.result.comprehensiveSort = this.paixu + obj.result.sort = this.paixu==1?'juli':'price' obj.result.oilProductCode = this.oilCode // obj.result.distance = this.detailItems console.log(obj,'look me!') diff --git a/pages/tabbar/station/stationList.vue b/pages/tabbar/station/stationList.vue index 2092991..c085a67 100644 --- a/pages/tabbar/station/stationList.vue +++ b/pages/tabbar/station/stationList.vue @@ -91,14 +91,14 @@ { title: '距离优先', isMutiple: false, - key: 'comprehensiveSort', + key: 'sort', detailList: [{ title: "距离优先", - value: 1 + value: 'juli' }, { title: "价格优先", - value: 2 + value: 'price' } ] }, @@ -503,7 +503,7 @@ currentPage: this.currentPage, pageSize: 10, params: { //类型:Object 必有字段 备注:// 筛选对象 - sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序 + // sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序 siteName: this.siteName, ...uni.getStorageSync('location'), // ...this.filterData @@ -519,7 +519,7 @@ // siteLevel: this.siteName ? '' : this.filterDatas siteLevel: this.filterDatas .siteLevel , - comprehensiveSort:this.filterDatas.comprehensiveSort?this.filterDatas.comprehensiveSort:1, + sort:this.filterDatas.sort?this.filterDatas.sort:'juli', provinceCode:this.filterDatas.provinceCode, cityCode:this.filterDatas.cityCode, areaCode:this.filterDatas.areaCode,