|
|
@ -65,7 +65,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<uv-empty v-else text="该景区没有哦" textSize="30rpx" iconSize="200rpx" icon="list"></uv-empty> |
|
|
|
<uv-empty v-else text="没有哦" textSize="30rpx" iconSize="200rpx" icon="list"></uv-empty> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
@ -74,13 +74,13 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { housePageList, houseType } from "@/common/api.js" |
|
|
|
import { getInfo } from "@/common/api.js" |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
scale: 12, //缩放级别 |
|
|
|
show: true, |
|
|
|
context: uni.createInnerAudioContext(), |
|
|
|
tabs: ['遗产文化', '找美食', '找民宿', '找厕所'], |
|
|
|
tabs: [], |
|
|
|
spotGuideIndex: 0, // 当前选中的菜单索引 |
|
|
|
position: { |
|
|
|
latitude: 23.106574, |
|
|
@ -93,7 +93,7 @@ export default { |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 10, |
|
|
|
houseTypeList: [], // 房源类型列表 |
|
|
|
currentHouseType: 0 // 当前选中的房源类型索引 |
|
|
|
currentHouseType: 0 ,// 当前选中的房源类型索引 |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
@ -125,22 +125,43 @@ export default { |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getCurrentLocation() |
|
|
|
this.onHousePageList() |
|
|
|
this.onHouseType() // 获取房源类型 |
|
|
|
this.onHousePageList() // 加载房源列表 |
|
|
|
this.onHousePageList() // 加载房源列表 |
|
|
|
this.getUserInfo() // 加载房源列表 |
|
|
|
}, |
|
|
|
onPullDownRefresh() { |
|
|
|
if(!uni.getStorageSync('token') || this.userInfo.isPay != 1){ |
|
|
|
return |
|
|
|
} |
|
|
|
let that = this |
|
|
|
that.pageNo = 1 |
|
|
|
that.list = [] |
|
|
|
that.onHousePageList() |
|
|
|
}, |
|
|
|
onReachBottom() { |
|
|
|
if(!uni.getStorageSync('token') || this.userInfo.isPay != 1){ |
|
|
|
return |
|
|
|
} |
|
|
|
let that = this |
|
|
|
that.pageNo = that.pageNo + 1 |
|
|
|
that.onHousePageList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getUserInfo(state){ |
|
|
|
this.$store.commit('getUserInfo', userInfo => { |
|
|
|
if(userInfo.isPay != 1){ |
|
|
|
|
|
|
|
uni.showModal({ |
|
|
|
title: '开通会员可查看租房地图', |
|
|
|
success : res => { |
|
|
|
if(res.confirm){ |
|
|
|
this.getUserInfo() |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取当前位置 |
|
|
|
getCurrentLocation() { |
|
|
|
const that = this; |
|
|
@ -304,6 +325,11 @@ export default { |
|
|
|
}, |
|
|
|
// 获取房源列表 |
|
|
|
onHousePageList() { |
|
|
|
|
|
|
|
if(!uni.getStorageSync('token') || this.userInfo.isPay != 1){ |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
let that = this |
|
|
|
let params = { |
|
|
|
classId: that.classId, |