|
|
|
@ -33,8 +33,8 @@ |
|
|
|
|
<!-- 筛选开始 --> |
|
|
|
|
<scroll-view class="screentop bg-white" style="flex: 1;"> |
|
|
|
|
<view class=""> |
|
|
|
|
<sl-filter v-if="isFilterData" reflexTitle ref="slFilter" :productCodeList="productCodeList" :areaCodeList="areaCodeList" |
|
|
|
|
@result="filterRes" :menuList="menuList"></sl-filter> |
|
|
|
|
<sl-filter v-if="isFilterData" reflexTitle ref="slFilter" :productCodeList="productCodeList" |
|
|
|
|
:areaCodeList="areaCodeList" @result="filterRes" :menuList="menuList"></sl-filter> |
|
|
|
|
<!-- <sl-filter reflexTitle ref="slFilter" @result="filterRes" :menuList="menuList"></sl-filter> --> |
|
|
|
|
</view> |
|
|
|
|
<view class="bg-white min-height-50 padding-top" v-if="siteList.length>0"> |
|
|
|
@ -379,7 +379,7 @@ |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getSiteList() { |
|
|
|
|
let data1 = { |
|
|
|
|
let parameter = { |
|
|
|
|
currentPage: this.currentPage, |
|
|
|
|
pageSize: 10, |
|
|
|
|
params: { //类型:Object 必有字段 备注:// 筛选对象 |
|
|
|
@ -390,9 +390,12 @@ |
|
|
|
|
siteName: this.siteName, |
|
|
|
|
...uni.getStorageSync('location'), |
|
|
|
|
// ...this.filterData |
|
|
|
|
siteBrand: this.siteName ? '' : this.filterData.siteBrand, // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 ) |
|
|
|
|
channelCode: this.siteName ? '' : this.filterData.channelCode, // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌)) |
|
|
|
|
oilProductCode: this.siteName ? '' : this.filterData.oilProductCode, // 备注:// 油号选择 ( 0# 92# 92#) |
|
|
|
|
siteBrand: this.siteName ? '' : this.filterData |
|
|
|
|
.siteBrand, // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 ) |
|
|
|
|
channelCode: this.siteName ? '' : this.filterData |
|
|
|
|
.channelCode, // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌)) |
|
|
|
|
oilProductCode: this.siteName ? '' : this.filterData |
|
|
|
|
.oilProductCode, // 备注:// 油号选择 ( 0# 92# 92#) |
|
|
|
|
provinceCode: this.filterData.provinceCode, |
|
|
|
|
cityCode: this.filterData.cityCode, |
|
|
|
|
areaCode: this.filterData.areaCode, |
|
|
|
@ -400,22 +403,9 @@ |
|
|
|
|
zpDisable: 'ENABLE', |
|
|
|
|
comprehensiveSort: this.filterData.comprehensiveSort ? this.filterData.comprehensiveSort : 1 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if (!uni.getStorageSync('Authorization')) { |
|
|
|
|
oilSiteApi.readOnlySites(data1).then(res => { |
|
|
|
|
if (res.code == 20000) { |
|
|
|
|
this.siteList = this.siteList.concat(res.data.list) |
|
|
|
|
if (res.data.list.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页 |
|
|
|
|
this.loadStatus = 'nomore' |
|
|
|
|
} else { |
|
|
|
|
this.currentPage++ |
|
|
|
|
this.loadStatus = 'load' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
oilSiteApi.getSiteLists(data1).then(res => { |
|
|
|
|
|
|
|
|
|
oilSiteApi.getSiteLists(parameter).then(res => { |
|
|
|
|
if (res.code == 20000) { |
|
|
|
|
this.siteList = this.siteList.concat(res.data.list) |
|
|
|
|
if (res.data.list.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页 |
|
|
|
@ -426,40 +416,30 @@ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
toDetail(item) { |
|
|
|
|
let user = uni.getStorageSync("user"); |
|
|
|
|
if (!user) { |
|
|
|
|
uni.showModal({ |
|
|
|
|
content: "登录后才能查看哦", |
|
|
|
|
confirmText: "去登录", |
|
|
|
|
success: function(res) { |
|
|
|
|
if (res.confirm) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: "/BagAuth/pages/login/login", |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
let itemS = encodeURIComponent(JSON.stringify(item)); |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`, |
|
|
|
|
fail: (err) => {}, |
|
|
|
|
success: () => {} |
|
|
|
|
}) |
|
|
|
|
// if (uni.getStorageSync('user')) { |
|
|
|
|
// uni.navigateTo({ |
|
|
|
|
// url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`, |
|
|
|
|
// fail: (err) => { |
|
|
|
|
// // console.log(err) |
|
|
|
|
// }, |
|
|
|
|
// success: () => { |
|
|
|
|
// // console.log('err') |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// } else { |
|
|
|
|
// uni.showModal({ |
|
|
|
|
// title: '请您登录', |
|
|
|
|
// content: "登录小星加油才可以加油 |˛˙꒳˙)♡", |
|
|
|
|
// confirmText: '去登陆', |
|
|
|
|
// success: (res) => { |
|
|
|
|
// if (res.confirm) { |
|
|
|
|
// uni.reLaunch({ |
|
|
|
|
// url: '../../../BagAuth/pages/login/login' |
|
|
|
|
// }) |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// } |
|
|
|
|
}, |
|
|
|
|
nameSelect(value, item) { |
|
|
|
|
this.title2 = item.text |
|
|
|
|