This commit is contained in:
caolc
2023-09-08 10:01:06 +08:00
parent 5adc52996c
commit 4d5aa4ac8d
12 changed files with 957 additions and 107 deletions

View File

@@ -256,8 +256,13 @@
}
},
},
onLoad() {
this.refreshLocation()
onShow() {
this.tools.userLocationChenk().then(res => {
this.refreshLocation();
}).catch(err => {});
},
onLoad() {
// this.refreshLocation()
if (!uni.getStorageSync('filterData')) {
this.getFilterData()
} else {
@@ -373,13 +378,14 @@
});
},
getSiteList() {
this.refreshLocation()
getSiteList() {
let data1 = {
currentPage: this.currentPage,
pageSize: 10,
params: { //类型Object 必有字段 备注:// 筛选对象
clientBelong:'ZHONGPIN',
longitude: 117.157817, // 必有字段 备注:// 当前位置经度
latitude: 31.802472, // 必有字段 备注:// 当前位置维度
sort: "juli", //类型String 必有字段 备注:// 智能排序 ( price价格最低 juli距离最近 ) 默认距离排序
siteName: this.siteName,
...uni.getStorageSync('location'),
@@ -410,7 +416,7 @@
})
} else {
oilSiteApi.getSiteLists(data1).then(res => {
if (res.code == 20000) {
if (res.code == 20000) {
this.siteList = this.siteList.concat(res.data.list)
if (res.data.list.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
this.loadStatus = 'nomore'